Skip to content

Commit

Permalink
feat: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
pomelo-nwu committed Dec 19, 2024
1 parent 21e598e commit 72dcecf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/studio-driver/src/kuzu-wasm-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ export class KuzuDriver {
console.log(`Open dataset ${this.curDataset}`);

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { Utils } from '@graphscope/studio-components';
import { getDriver as getKuzuDriver, KuzuDriver } from '@graphscope/studio-driver';
import React from 'react';
import { Typography, Tag, Flex } from 'antd';
import { ExclamationCircleOutlined, CheckCircleOutlined } from '@ant-design/icons';
const { storage } = Utils;

const getDriver = async () => {
Expand Down Expand Up @@ -55,7 +58,26 @@ export const createKuzuGraph = async (dataset_id: string) => {
.join(';\n');
return {
success: false,
message: `Some nodes or edges failed to load, please check the data format: ${message}`,
message: (
<Flex vertical gap={16}>
<Typography.Title level={3} style={{ margin: '0px' }}>
Load Failed
</Typography.Title>

{[...logs.nodes, ...logs.edges].map(item => {
const type = item.message === 'false' ? 'error' : 'success';
const icon = item.message === 'false' ? <ExclamationCircleOutlined /> : <CheckCircleOutlined />;
return (
<Typography.Text type="secondary" key={item.name} italic>
<Tag color={type} icon={icon}>
{item.name}
</Tag>
{item.message}
</Typography.Text>
);
})}
</Flex>
),
};
}
return await driver.writeBack();
Expand Down

0 comments on commit 72dcecf

Please sign in to comment.