Skip to content

Commit 72dcecf

Browse files
committed
feat: update code
1 parent 21e598e commit 72dcecf

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

packages/studio-driver/src/kuzu-wasm-driver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ export class KuzuDriver {
517517
console.log(`Open dataset ${this.curDataset}`);
518518

519519
//@ts-ignore
520-
this.db = await this.kuzuEngine.Database(this.curDataset, 0, 10, false, false, 4194304 * 16 * 4);
520+
this.db = await this.kuzuEngine.Database(this.curDataset, 0, 10, false, false, 4194304 * 16 * 4 * 4);
521521
//@ts-ignore
522522
this.conn = await this.kuzuEngine.Connection(this.db);
523523

packages/studio-explore/src/components/Connection/import-into-kuzu/kuzu-wasm.tsx

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
import { Utils } from '@graphscope/studio-components';
22
import { getDriver as getKuzuDriver, KuzuDriver } from '@graphscope/studio-driver';
3+
import React from 'react';
4+
import { Typography, Tag, Flex } from 'antd';
5+
import { ExclamationCircleOutlined, CheckCircleOutlined } from '@ant-design/icons';
36
const { storage } = Utils;
47

58
const getDriver = async () => {
@@ -55,7 +58,26 @@ export const createKuzuGraph = async (dataset_id: string) => {
5558
.join(';\n');
5659
return {
5760
success: false,
58-
message: `Some nodes or edges failed to load, please check the data format: ${message}`,
61+
message: (
62+
<Flex vertical gap={16}>
63+
<Typography.Title level={3} style={{ margin: '0px' }}>
64+
Load Failed
65+
</Typography.Title>
66+
67+
{[...logs.nodes, ...logs.edges].map(item => {
68+
const type = item.message === 'false' ? 'error' : 'success';
69+
const icon = item.message === 'false' ? <ExclamationCircleOutlined /> : <CheckCircleOutlined />;
70+
return (
71+
<Typography.Text type="secondary" key={item.name} italic>
72+
<Tag color={type} icon={icon}>
73+
{item.name}
74+
</Tag>
75+
{item.message}
76+
</Typography.Text>
77+
);
78+
})}
79+
</Flex>
80+
),
5981
};
6082
}
6183
return await driver.writeBack();

0 commit comments

Comments
 (0)