Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@ TuGraph DB BROWSER 是 TuGraph 图数据库的可视化工具。可以完成图
yarn run bootstrap
```

2. 项目编译
2. 启动客户端

```bash
yarn run build
```js
cd client
yarn start // 切记,一定要 yarn start,npm run start 会存在若干问题!
```

1. 启动项目
2. 启动服务端

```bash
yarn run start
cd server
npm run dec
```

浏览器访问 http://localhost:8888


发布时打压缩包
```
tar -czvf tugraph-db-browser.tgz ./
```
25 changes: 8 additions & 17 deletions client/packages/app/client/.umirc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const umiConfig = getUmiConfig();

process.env.MFSU_AD = 'none';

const ANTD_VERSION = '4.23.5';
const GI_SDK_APP_VERSION = '1.2.0';

export default defineConfig({
hash: true,
define: {
Expand All @@ -31,10 +34,7 @@ export default defineConfig({
react: 'React',
'react-dom': 'ReactDOM',
antd: 'antd',
'@antv/g2plot': 'G2Plot',
'antd/es/*': 'antd',
'@ant-design/charts': 'charts',
'@ant-design/icons': 'icons',
moment: 'moment',
},
headScripts: [
Expand All @@ -47,22 +47,13 @@ export default defineConfig({
// <!--- Antd DEPENDENCIES-->
'https://gw.alipayobjects.com/os/lib/lodash/4.17.21/lodash.min.js',
'https://gw.alipayobjects.com/os/lib/moment/2.29.1/moment.js',
'https://gw.alipayobjects.com/os/lib/antd/4.20.6/dist/antd.min.js',
'https://gw.alipayobjects.com/os/lib/ant-design/charts/1.2.13/dist/charts.min.js',
'https://gw.alipayobjects.com/os/lib/ant-design/icons/4.6.4/dist/index.umd.min.js',
// <!--- G2/G2Plot DEPENDENCIES-->
'https://gw.alipayobjects.com/os/lib/antv/g6/4.8.14/dist/g6.min.js',
'https://gw.alipayobjects.com/os/lib/antv/graphin/2.7.16/dist/graphin.min.js',
'https://gw.alipayobjects.com/os/lib/antv/g2plot/2.4.16/dist/g2plot.min.js',
'https://gw.alipayobjects.com/os/lib/antv/gi-sdk/2.3.5/dist/index.min.js',
`https://gw.alipayobjects.com/os/lib/antd/${ANTD_VERSION}/dist/antd.min.js`,

`https://gw.alipayobjects.com/os/lib/antv/gi-sdk-app/${GI_SDK_APP_VERSION}/dist/index.min.js`,
],
styles: [
// "https://gw.alipayobjects.com/os/lib/antd/4.18.3/dist/antd.min.css",
// "https://gw.alipayobjects.com/os/lib/alipay/theme-tools/0.3.0/dist/GraphInsight/light.css",
'https://gw.alipayobjects.com/os/lib/antd/4.23.5/dist/antd.css',
'https://gw.alipayobjects.com/os/lib/antv/graphin/2.7.16/dist/index.css',
'https://gw.alipayobjects.com/os/lib/antv/gi-sdk/2.3.5/dist/index.css',
'https://gw.alipayobjects.com/os/lib/antv/gi-theme-antd/0.1.0/dist/light.css',
`https://gw.alipayobjects.com/os/lib/antd/${ANTD_VERSION}/dist/antd.css`,
`https://gw.alipayobjects.com/os/lib/antv/gi-sdk-app/${GI_SDK_APP_VERSION}/dist/index.css`,
],
theme: {
'primary-color': '#1650ff',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
}
.anticon-caret-right {
color: #c6c6c8 !important;
transform: scale(1.5, 0.9);
// transform: scale(1.5, 0.9);
margin-left: -3px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,11 @@ const ProjectCard = ({
true,
`${redirectPath?.[1]?.path}?graphName=${graphName}`
),
getActions('图分析', false, ''),
getActions(
'图分析',
true,
`${redirectPath?.[2]?.path}?graphName=${graphName}`
),
]}
bordered={false}
hoverable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
.ant-btn {
border-radius: 6px;
}
.ant-select-selector {
border-radius: 6px !important;
}
// .ant-select-selector {
// border-radius: 6px !important;
// }
.ant-input {
border-radius: 6px;
}
Expand All @@ -24,3 +24,64 @@
.ant-input-password {
border-radius: 6px;
}

.LanguageQueryPanel {
height: calc(100vh - 145px) !important;
.buttonContainer {
bottom: 0px !important;
}
}

.navbar-setting {
.ant-btn.ant-btn-text {
padding: 0;
margin-left: 4px;
}
}

.gi-rich-container .gi-rich-container-toolbar {
border-bottom: none !important;
.toolbar-item {
.anticon {
svg {
font-size: 16px;
}
}
}
}

.gi-rich-container-side > div:first-child {
box-shadow: 0px 0px 2px #ddd;
max-width: 720px;
}

.gi-rich-container-side {
.ant-segmented {
background: #eaeff9;
padding: 4px;
width: 100%
}
.ant-segmented:not(.ant-segmented-disabled):hover,
.ant-segmented:not(.ant-segmented-disabled):focus {
background: #eaeff9;
}
}

.style-setting-container {
height: calc(100vh - 110px) !important;
.style-setting-element-container .nodeConfigurationContainer, .style-setting-element-container .edgeConfigurationContainer {
height: calc(100vh - 210px) !important;
.ant-slider-mark-text {
font-size: 12px;
color: #6A6B71;
}
}
}

.attribute-filter-container .attribute-filter-container-form {
height: calc(100vh - 195px) !important;
}

.statictics-filter-container .statictics-filter-container-form {
height: calc(100vh - 195px) !important;
}
1 change: 1 addition & 0 deletions client/packages/app/client/src/plugins/graph-analysis.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from '@tugraph/plugin-graph-analysis/client';
24 changes: 24 additions & 0 deletions client/packages/plugins/graph-analysis/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Plugin Template

## Register

```ts
yarn pm add {{plugin-name}}
```

## Activate

```bash
yarn pm enable {{plugin-name}}
```

## Launch the app

```bash
# for development
yarn dev

# for production
yarn build
yarn start
```
4 changes: 4 additions & 0 deletions client/packages/plugins/graph-analysis/client.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// @ts-nocheck
export * from './lib/client';
export { default } from './lib/client';

30 changes: 30 additions & 0 deletions client/packages/plugins/graph-analysis/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"use strict";

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); }

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; }

var _index = _interopRequireWildcard(require("./src/client"));

Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {};
Object.defineProperty(exports, "default", {
enumerable: true,
get: function get() {
return _index.default;
}
});

Object.keys(_index).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _index[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _index[key];
}
});
});
16 changes: 16 additions & 0 deletions client/packages/plugins/graph-analysis/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "@tugraph/plugin-graph-analysis",
"version": "0.0.1",
"main": "lib/server/index.js",
"devDependencies": {
"@tugraph/openpiece-client": "^0.0.17",
"@tugraph/openpiece-server": "^0.0.10"
},
"peerDependencies": {
"@tugraph/openpiece-client": "*",
"@tugraph/openpiece-server": "*"
},
"publishConfig": {
"access": "public"
}
}
4 changes: 4 additions & 0 deletions client/packages/plugins/graph-analysis/server.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// @ts-nocheck
export * from './lib/server';
export { default } from './lib/server';

30 changes: 30 additions & 0 deletions client/packages/plugins/graph-analysis/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"use strict";

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); }

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; }

var _index = _interopRequireWildcard(require("./src/server"));

Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {};
Object.defineProperty(exports, "default", {
enumerable: true,
get: function get() {
return _index.default;
}
});

Object.keys(_index).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _index[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _index[key];
}
});
});
Loading