Skip to content

Commit b48a446

Browse files
author
Moyee
authored
Merge pull request #20 from TuGraph-family/graph-0803
feat: New Graph Analysis Module
2 parents 6ca973d + 424e966 commit b48a446

File tree

31 files changed

+1729
-65
lines changed

31 files changed

+1729
-65
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,24 @@ TuGraph DB BROWSER 是 TuGraph 图数据库的可视化工具。可以完成图
1212
yarn run bootstrap
1313
```
1414

15-
2. 项目编译
15+
2. 启动客户端
1616

17-
```bash
18-
yarn run build
17+
```js
18+
cd client
19+
yarn start // 切记,一定要 yarn start,npm run start 会存在若干问题!
1920
```
2021

21-
1. 启动项目
22+
2. 启动服务端
2223

2324
```bash
24-
yarn run start
25+
cd server
26+
npm run dec
2527
```
2628

2729
浏览器访问 http://localhost:8888
30+
31+
32+
发布时打压缩包
33+
```
34+
tar -czvf tugraph-db-browser.tgz ./
35+
```

client/packages/app/client/.umirc.ts

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ const umiConfig = getUmiConfig();
88

99
process.env.MFSU_AD = 'none';
1010

11+
const ANTD_VERSION = '4.23.5';
12+
const GI_SDK_APP_VERSION = '1.2.0';
13+
1114
export default defineConfig({
1215
hash: true,
1316
define: {
@@ -31,10 +34,7 @@ export default defineConfig({
3134
react: 'React',
3235
'react-dom': 'ReactDOM',
3336
antd: 'antd',
34-
'@antv/g2plot': 'G2Plot',
3537
'antd/es/*': 'antd',
36-
'@ant-design/charts': 'charts',
37-
'@ant-design/icons': 'icons',
3838
moment: 'moment',
3939
},
4040
headScripts: [
@@ -47,22 +47,13 @@ export default defineConfig({
4747
// <!--- Antd DEPENDENCIES-->
4848
'https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js',
4949
'https://gw.alipayobjects.com/os/lib/moment/2.29.1/moment.js',
50-
'https://gw.alipayobjects.com/os/lib/antd/4.20.6/dist/antd.min.js',
51-
'https://gw.alipayobjects.com/os/lib/ant-design/charts/1.2.13/dist/charts.min.js',
52-
'https://gw.alipayobjects.com/os/lib/ant-design/icons/4.6.4/dist/index.umd.min.js',
53-
// <!--- G2/G2Plot DEPENDENCIES-->
54-
'https://gw.alipayobjects.com/os/lib/antv/g6/4.8.14/dist/g6.min.js',
55-
'https://gw.alipayobjects.com/os/lib/antv/graphin/2.7.16/dist/graphin.min.js',
56-
'https://gw.alipayobjects.com/os/lib/antv/g2plot/2.4.16/dist/g2plot.min.js',
57-
'https://gw.alipayobjects.com/os/lib/antv/gi-sdk/2.3.5/dist/index.min.js',
50+
`https://gw.alipayobjects.com/os/lib/antd/${ANTD_VERSION}/dist/antd.min.js`,
51+
52+
`https://gw.alipayobjects.com/os/lib/antv/gi-sdk-app/${GI_SDK_APP_VERSION}/dist/index.min.js`,
5853
],
5954
styles: [
60-
// "https://gw.alipayobjects.com/os/lib/antd/4.18.3/dist/antd.min.css",
61-
// "https://gw.alipayobjects.com/os/lib/alipay/theme-tools/0.3.0/dist/GraphInsight/light.css",
62-
'https://gw.alipayobjects.com/os/lib/antd/4.23.5/dist/antd.css',
63-
'https://gw.alipayobjects.com/os/lib/antv/graphin/2.7.16/dist/index.css',
64-
'https://gw.alipayobjects.com/os/lib/antv/gi-sdk/2.3.5/dist/index.css',
65-
'https://gw.alipayobjects.com/os/lib/antv/gi-theme-antd/0.1.0/dist/light.css',
55+
`https://gw.alipayobjects.com/os/lib/antd/${ANTD_VERSION}/dist/antd.css`,
56+
`https://gw.alipayobjects.com/os/lib/antv/gi-sdk-app/${GI_SDK_APP_VERSION}/dist/index.css`,
6657
],
6758
theme: {
6859
'primary-color': '#1650ff',

client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/graph-query/components/path-query/index.module.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
}
9191
.anticon-caret-right {
9292
color: #c6c6c8 !important;
93-
transform: scale(1.5, 0.9);
93+
// transform: scale(1.5, 0.9);
9494
margin-left: -3px;
9595
}
9696
}

client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/domain-core/project/project-list/components/project-card/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,11 @@ const ProjectCard = ({
117117
true,
118118
`${redirectPath?.[1]?.path}?graphName=${graphName}`
119119
),
120-
getActions('图分析', false, ''),
120+
getActions(
121+
'图分析',
122+
true,
123+
`${redirectPath?.[2]?.path}?graphName=${graphName}`
124+
),
121125
]}
122126
bordered={false}
123127
hoverable

client/packages/app/client/src/components/@@plugins/src/components/studio/tugraph/global.less

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
.ant-btn {
99
border-radius: 6px;
1010
}
11-
.ant-select-selector {
12-
border-radius: 6px !important;
13-
}
11+
// .ant-select-selector {
12+
// border-radius: 6px !important;
13+
// }
1414
.ant-input {
1515
border-radius: 6px;
1616
}
@@ -24,3 +24,64 @@
2424
.ant-input-password {
2525
border-radius: 6px;
2626
}
27+
28+
.LanguageQueryPanel {
29+
height: calc(100vh - 145px) !important;
30+
.buttonContainer {
31+
bottom: 0px !important;
32+
}
33+
}
34+
35+
.navbar-setting {
36+
.ant-btn.ant-btn-text {
37+
padding: 0;
38+
margin-left: 4px;
39+
}
40+
}
41+
42+
.gi-rich-container .gi-rich-container-toolbar {
43+
border-bottom: none !important;
44+
.toolbar-item {
45+
.anticon {
46+
svg {
47+
font-size: 16px;
48+
}
49+
}
50+
}
51+
}
52+
53+
.gi-rich-container-side > div:first-child {
54+
box-shadow: 0px 0px 2px #ddd;
55+
max-width: 720px;
56+
}
57+
58+
.gi-rich-container-side {
59+
.ant-segmented {
60+
background: #eaeff9;
61+
padding: 4px;
62+
width: 100%
63+
}
64+
.ant-segmented:not(.ant-segmented-disabled):hover,
65+
.ant-segmented:not(.ant-segmented-disabled):focus {
66+
background: #eaeff9;
67+
}
68+
}
69+
70+
.style-setting-container {
71+
height: calc(100vh - 110px) !important;
72+
.style-setting-element-container .nodeConfigurationContainer, .style-setting-element-container .edgeConfigurationContainer {
73+
height: calc(100vh - 210px) !important;
74+
.ant-slider-mark-text {
75+
font-size: 12px;
76+
color: #6A6B71;
77+
}
78+
}
79+
}
80+
81+
.attribute-filter-container .attribute-filter-container-form {
82+
height: calc(100vh - 195px) !important;
83+
}
84+
85+
.statictics-filter-container .statictics-filter-container-form {
86+
height: calc(100vh - 195px) !important;
87+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@tugraph/plugin-graph-analysis/client';
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Plugin Template
2+
3+
## Register
4+
5+
```ts
6+
yarn pm add {{plugin-name}}
7+
```
8+
9+
## Activate
10+
11+
```bash
12+
yarn pm enable {{plugin-name}}
13+
```
14+
15+
## Launch the app
16+
17+
```bash
18+
# for development
19+
yarn dev
20+
21+
# for production
22+
yarn build
23+
yarn start
24+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// @ts-nocheck
2+
export * from './lib/client';
3+
export { default } from './lib/client';
4+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"use strict";
2+
3+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
4+
5+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
6+
7+
var _index = _interopRequireWildcard(require("./src/client"));
8+
9+
Object.defineProperty(exports, "__esModule", {
10+
value: true
11+
});
12+
var _exportNames = {};
13+
Object.defineProperty(exports, "default", {
14+
enumerable: true,
15+
get: function get() {
16+
return _index.default;
17+
}
18+
});
19+
20+
Object.keys(_index).forEach(function (key) {
21+
if (key === "default" || key === "__esModule") return;
22+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
23+
if (key in exports && exports[key] === _index[key]) return;
24+
Object.defineProperty(exports, key, {
25+
enumerable: true,
26+
get: function get() {
27+
return _index[key];
28+
}
29+
});
30+
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "@tugraph/plugin-graph-analysis",
3+
"version": "0.0.1",
4+
"main": "lib/server/index.js",
5+
"devDependencies": {
6+
"@tugraph/openpiece-client": "^0.0.17",
7+
"@tugraph/openpiece-server": "^0.0.10"
8+
},
9+
"peerDependencies": {
10+
"@tugraph/openpiece-client": "*",
11+
"@tugraph/openpiece-server": "*"
12+
},
13+
"publishConfig": {
14+
"access": "public"
15+
}
16+
}

0 commit comments

Comments
 (0)