├── .DS_Store ├── .bitmap ├── .gitignore ├── .npmrc ├── .prettierignore ├── .prettierrc.js ├── .umirc.ts ├── LEGAL.md ├── LICENSE ├── README.md ├── package.json ├── public └── assets │ └── favicon.png ├── src ├── app.tsx ├── assets │ ├── icons │ │ ├── demo.css │ │ ├── demo_index.html │ │ ├── iconfont.css │ │ ├── iconfont.js │ │ ├── iconfont.json │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ └── node-icons │ │ ├── demo.css │ │ ├── demo_index.html │ │ ├── iconfont.css │ │ ├── iconfont.js │ │ ├── iconfont.json │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 ├── components │ ├── color-picker │ │ ├── constant │ │ │ └── index.ts │ │ ├── index.less │ │ └── index.tsx │ ├── console-menu │ │ ├── index.less │ │ └── index.tsx │ ├── console │ │ ├── auth-manager │ │ │ ├── account-manager │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── edit-role │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── edit-user │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── index.module.less │ │ │ ├── index.tsx │ │ │ └── role-manager │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ ├── constant │ │ │ └── index.ts │ │ ├── database-info │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── hooks │ │ │ ├── useDataInfo.ts │ │ │ ├── useGraph.ts │ │ │ ├── useRole.ts │ │ │ └── useUser.ts │ │ ├── index.ts │ │ ├── interface │ │ │ ├── role.ts │ │ │ └── user.ts │ │ ├── mock.ts │ │ └── utils │ │ │ ├── localStorage.ts │ │ │ ├── query.ts │ │ │ ├── request.tsx │ │ │ └── timeFormatter.ts │ ├── custom-color-picker │ │ ├── index.less │ │ └── index.tsx │ ├── guidance │ │ ├── assets │ │ │ └── index.ts │ │ ├── download.tsx │ │ ├── end.tsx │ │ ├── filter.tsx │ │ ├── index.module.less │ │ ├── index.tsx │ │ ├── query.tsx │ │ ├── spread.tsx │ │ ├── style.tsx │ │ ├── types.ts │ │ └── welcome.tsx │ ├── icon-font │ │ ├── index.less │ │ └── index.tsx │ ├── icon-loader │ │ └── index.ts │ ├── icon-picker │ │ ├── constant │ │ │ ├── defaultClassIcons.ts │ │ │ └── index.ts │ │ ├── index.less │ │ └── index.tsx │ └── studio │ │ ├── components │ │ ├── async-table │ │ │ └── index.tsx │ │ ├── auth-item │ │ │ └── index.tsx │ │ ├── collapsable-steps │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── demo-card │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── edit-password │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── edit-table │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── garph-canvas │ │ │ └── index.tsx │ │ ├── graph-canvas-layout │ │ │ ├── constant │ │ │ │ └── index.ts │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── graph-canvas-tools │ │ │ ├── components │ │ │ │ ├── auto-zoom.tsx │ │ │ │ ├── real-zoom.tsx │ │ │ │ ├── zoom-in.tsx │ │ │ │ └── zoom-out.tsx │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── icon-font │ │ │ └── index.tsx │ │ ├── icon-item │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── search-input │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── split-panle │ │ │ └── index.tsx │ │ ├── switch-drawer │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── text-tabs │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ └── tooltip-text │ │ │ ├── index.module.less │ │ │ └── index.tsx │ │ ├── constant │ │ ├── demo-json │ │ │ └── schema-demo.json │ │ └── index.tsx │ │ ├── domain-core │ │ ├── graph-construct │ │ │ ├── add-nodes-edges │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── edit-nodes-edges │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── file-uploader │ │ │ │ └── index.tsx │ │ │ ├── import-data-config │ │ │ │ ├── data-map.tsx │ │ │ │ ├── data-mapping.tsx │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── import-data-result │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── import-data │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── index.module.less │ │ │ ├── index.tsx │ │ │ └── nodes-edges-list │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ ├── graph-query │ │ │ ├── components │ │ │ │ ├── excecute-result-panle │ │ │ │ │ ├── index.module.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── excecute-result │ │ │ │ │ ├── index.module.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── model-overview │ │ │ │ │ ├── components │ │ │ │ │ │ ├── edge-node-list │ │ │ │ │ │ │ ├── index.module.less │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ │ └── graph-canvas-mini │ │ │ │ │ │ │ ├── index.module.less │ │ │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── index.module.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── node-query │ │ │ │ │ ├── index.module.less │ │ │ │ │ └── index.tsx │ │ │ │ ├── path-query │ │ │ │ │ ├── index.module.less │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── path-modal │ │ │ │ │ │ ├── index.module.less │ │ │ │ │ │ └── index.tsx │ │ │ │ ├── statement-query-list │ │ │ │ │ ├── index.module.less │ │ │ │ │ └── index.tsx │ │ │ │ └── stored-procedure │ │ │ │ │ ├── index.module.less │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── stored-checkout │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── stored-download │ │ │ │ │ ├── index.module.less │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── stored-khop-panle │ │ │ │ │ ├── index.module.less │ │ │ │ │ └── index.tsx │ │ │ │ │ ├── stored-list │ │ │ │ │ ├── index.module.less │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── stored-form │ │ │ │ │ │ ├── index.module.less │ │ │ │ │ │ └── index.tsx │ │ │ │ │ └── stored-result │ │ │ │ │ ├── index.module.less │ │ │ │ │ └── index.tsx │ │ │ ├── constant │ │ │ │ └── index.tsx │ │ │ ├── cypherEditor.less │ │ │ ├── cypherEditor.tsx │ │ │ ├── index.module.less │ │ │ ├── index.tsx │ │ │ ├── interface │ │ │ │ └── excecute.ts │ │ │ └── utils │ │ │ │ ├── editEdgeParamsTransform.ts │ │ │ │ └── getConnectOptions.ts │ │ └── project │ │ │ └── project-list │ │ │ ├── components │ │ │ ├── add-tugraph │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── edit-form │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── edit-tugraph │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ ├── empty-project │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ └── project-card │ │ │ │ ├── index.module.less │ │ │ │ └── index.tsx │ │ │ └── translator │ │ │ └── index.tsx │ │ ├── graph-list │ │ ├── index.module.less │ │ └── index.tsx │ │ ├── hooks │ │ ├── useGraph.ts │ │ ├── useGraphData.ts │ │ ├── useImport.ts │ │ ├── useProcedure.ts │ │ ├── useQuery.ts │ │ ├── useSchema.ts │ │ └── useVisible.ts │ │ ├── index.md │ │ ├── index.ts │ │ ├── interface │ │ ├── graph.ts │ │ ├── graphData.ts │ │ ├── import.ts │ │ ├── procedure.ts │ │ ├── query.ts │ │ └── schema.ts │ │ ├── login │ │ ├── index.module.less │ │ ├── index.tsx │ │ └── particles-config.ts │ │ ├── mock.ts │ │ ├── services │ │ ├── ProcedureController.ts │ │ └── SchemaController.ts │ │ ├── styles │ │ └── mixin.less │ │ ├── user-center │ │ ├── index.module.less │ │ └── index.tsx │ │ └── utils │ │ ├── bigNumberTransform.ts │ │ ├── dataImportTransform.ts │ │ ├── downloadFile.ts │ │ ├── getDefaultDemoList.ts │ │ ├── getFileSizeTransform.ts │ │ ├── getZhPeriod.ts │ │ ├── graphTranslator.ts │ │ ├── index.ts │ │ ├── localStorage.ts │ │ ├── nodesEdgesListTranslator.ts │ │ ├── objectOper.ts │ │ ├── parseCsv.ts │ │ ├── processEdges.ts │ │ ├── request.tsx │ │ ├── routeParams.ts │ │ ├── schemaTransform.ts │ │ ├── uploadFile.ts │ │ └── url.ts ├── constants │ ├── demo_data │ │ ├── TheThreeBody │ │ │ ├── import.json │ │ │ ├── organization-organization-relationship.csv │ │ │ ├── organization-plan-relationship.csv │ │ │ ├── organizes.csv │ │ │ ├── person-organization-relationship.csv │ │ │ ├── person-person-relationship.csv │ │ │ ├── person-plan-relationship.csv │ │ │ ├── persons.csv │ │ │ ├── plans.csv │ │ │ ├── timeRelationship.csv │ │ │ └── timeline.csv │ │ ├── ThreeKingdoms │ │ │ ├── battle.csv │ │ │ ├── civil-servant.csv │ │ │ ├── civilServant_to_lord.csv │ │ │ ├── civilServant_to_state.csv │ │ │ ├── general.csv │ │ │ ├── general_father_lord.csv │ │ │ ├── general_to_battle.csv │ │ │ ├── general_to_lord.csv │ │ │ ├── general_to_state.csv │ │ │ ├── import.json │ │ │ ├── lord.csv │ │ │ ├── lord_brother_lord.csv │ │ │ ├── lord_father_lord.csv │ │ │ ├── lord_to_battle.csv │ │ │ ├── lord_to_lord.csv │ │ │ ├── lord_to_state.csv │ │ │ └── state.csv │ │ ├── WanderingEarth │ │ │ ├── celestialFsacilities.csv │ │ │ ├── event_celestialFacilities.csv │ │ │ ├── event_organization_celestialFacilities.csv │ │ │ ├── event_organization_role.csv │ │ │ ├── event_role_celestialFacility.csv │ │ │ ├── event_role_organization.csv │ │ │ ├── event_role_role.csv │ │ │ ├── import.json │ │ │ ├── organizations.csv │ │ │ ├── relationship_role_celestialFacility.csv │ │ │ ├── relationship_role_organization.csv │ │ │ ├── relationship_role_role.csv │ │ │ └── roles.csv │ │ └── movie │ │ │ ├── edge_acted_in.csv │ │ │ ├── edge_directed.csv │ │ │ ├── edge_has_genre.csv │ │ │ ├── edge_has_keyword.csv │ │ │ ├── edge_is_friend.csv │ │ │ ├── edge_produce.csv │ │ │ ├── edge_rate.csv │ │ │ ├── edge_write.csv │ │ │ ├── import.json │ │ │ ├── vertex_genre.csv │ │ │ ├── vertex_keyword.csv │ │ │ ├── vertex_movie.csv │ │ │ ├── vertex_person.csv │ │ │ └── vertex_user.csv │ └── index.ts ├── domains-core │ └── graph-analysis │ │ └── graph-schema │ │ ├── components │ │ ├── array-tabs │ │ │ └── index.tsx │ │ ├── attibutes-filter │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── attributes-filter-form │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── canvas-container │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── canvas-legend-pie-chart │ │ │ └── index.tsx │ │ ├── canvas-legend │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── canvas-sider │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── canvas-toolbar-segmented │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── config-query │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── context-menu │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── download-canvas │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── drawer-handler │ │ │ └── index.tsx │ │ ├── element-info │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── filter-segmented │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── graph-canvas │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── graph-filter │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── graph-json-view │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── graph-style-setting │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── graph-table-view │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── language-query │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── lasso-select │ │ │ └── index.tsx │ │ ├── layout-form-slider │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── layout-form-xy-input │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── layout-form │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── layout-style-segmented │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── page-back-arrow │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── page-layout-segmented │ │ │ └── index.tsx │ │ ├── page-title │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── path-chart │ │ │ └── index.tsx │ │ ├── path-query │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── query-filter-segmented │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── query-segmented │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── schema-field │ │ │ └── index.tsx │ │ ├── statistics-filter-attribute-select │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── statistics-filter-column-chart │ │ │ └── index.tsx │ │ ├── statistics-filter-form │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── statistics-filter-histogram-chart │ │ │ └── index.tsx │ │ ├── statistics-filter-line-chart │ │ │ └── index.tsx │ │ ├── statistics-filter-pie-chart │ │ │ └── index.tsx │ │ ├── statistics-filter-world-cloud-chart │ │ │ └── index.tsx │ │ ├── statistics-filter │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── view-select │ │ │ ├── index.less │ │ │ └── index.tsx │ │ └── zoom-in-out │ │ │ ├── index.less │ │ │ └── index.tsx │ │ ├── constants │ │ ├── action-bar.ts │ │ ├── config-center.ts │ │ ├── graph-style.ts │ │ ├── index.ts │ │ ├── layout.tsx │ │ └── schema.ts │ │ ├── contexts │ │ └── index.ts │ │ ├── hooks │ │ ├── use-schema-form-value │ │ │ └── index.ts │ │ └── use-schema-tab-container │ │ │ └── index.ts │ │ ├── interfaces │ │ └── index.ts │ │ ├── registers │ │ ├── breathing-node │ │ │ └── index.ts │ │ └── cluster-dagre-layout │ │ │ └── index.ts │ │ ├── root │ │ └── index.ts │ │ ├── translators │ │ ├── env-graph-language-translator │ │ │ └── index.ts │ │ ├── graph-schema-translator │ │ │ └── index.ts │ │ └── properties-translator │ │ │ └── index.ts │ │ └── utils │ │ ├── download-json │ │ └── index.ts │ │ ├── download-png │ │ └── index.tsx │ │ ├── filter-by-property-condition │ │ └── index.ts │ │ ├── filter-by-top-rule │ │ └── index.ts │ │ ├── filter-element-by-property-value │ │ └── index.ts │ │ ├── filter-graph-data-by-value │ │ └── index.ts │ │ ├── filter-graph-data │ │ └── index.ts │ │ ├── generate-edge-type-map │ │ └── index.ts │ │ ├── get-chart-data │ │ └── index.ts │ │ ├── get-engine-type-by-env │ │ └── index.ts │ │ ├── get-filtered-element-style │ │ └── index.ts │ │ ├── get-histogram-data │ │ └── index.ts │ │ ├── get-label-text-by-style-config │ │ └── index.ts │ │ ├── get-node-icon-by-style-config │ │ └── index.ts │ │ ├── get-node-size-by-style-config │ │ └── index.ts │ │ ├── get-operator-list-by-value-type │ │ └── index.ts │ │ ├── get-property-value-ranks │ │ └── index.ts │ │ ├── get-schema-by-env │ │ └── index.ts │ │ ├── get-styled-graph-data │ │ └── index.ts │ │ ├── get-styles-from-schema │ │ └── index.ts │ │ ├── graph-data-2-property-graph │ │ └── index.ts │ │ ├── group-and-count-nodes-by-label │ │ └── index.ts │ │ ├── hex-to-rgba │ │ └── index.ts │ │ ├── highlight-sub-graph │ │ └── index.ts │ │ ├── merge-graph-data │ │ └── index.ts │ │ ├── pie-chart-edges-translator │ │ └── index.ts │ │ ├── reset-graph-active-status │ │ └── index.ts │ │ ├── resize-canvas │ │ └── index.ts │ │ ├── set-graph-active-status │ │ └── index.ts │ │ ├── unique-elements-by │ │ └── index.ts │ │ └── update-graph-style-options │ │ └── index.ts ├── hooks │ └── useAnalysis.ts ├── layouts │ ├── index.less │ ├── index.tsx │ └── nav.tsx ├── pages │ ├── console.tsx │ ├── construct.tsx │ ├── graph-schema │ │ ├── index.less │ │ └── index.tsx │ ├── index.tsx │ ├── login.tsx │ ├── query.tsx │ ├── resetPassword.less │ ├── resetPassword.tsx │ └── studio.tsx ├── queries │ ├── analysis.ts │ ├── data.ts │ ├── graph.ts │ ├── info.ts │ ├── procedure.ts │ ├── query.ts │ ├── schema.ts │ └── security.ts ├── services │ ├── analysisi.ts │ ├── data.ts │ ├── info.ts │ ├── procedure.ts │ ├── query.ts │ ├── request.ts │ └── schema │ │ ├── IndexSchema.ts │ │ ├── index.ts │ │ ├── label.ts │ │ └── schema.ts ├── translator │ ├── graph-data-tanslator │ │ └── index.ts │ └── index.ts ├── types │ ├── services │ │ └── index.ts │ ├── studio │ │ └── procedure.ts │ └── typings.d.ts └── utils │ ├── common.ts │ ├── filterTitleEllipsis.ts │ ├── getEditorTotalCountByLineNumber.ts │ ├── getId.ts │ ├── history.ts │ ├── index.ts │ ├── originUtils.ts │ ├── parseHash.ts │ ├── parseSearch.ts │ ├── query.ts │ ├── safeParseJSON.ts │ ├── schema.ts │ └── transformHexToRgb.ts ├── tsconfig.json └── workspace.jsonc /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuGraph-family/tugraph-db-browser/38400298e6594a0601f97bcaa5a433f2f2398879/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .bit 2 | /node_modules 3 | /.env.local 4 | /.umirc.local.ts 5 | /config/config.local.ts 6 | /src/.umi 7 | /dist 8 | package-lock.json 9 | /src/.umi-production -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmmirror.com/ 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/.git 2 | **/.svn 3 | **/.hg 4 | **/node_modules 5 | 6 | -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: true, 3 | trailingComma: 'all', 4 | singleQuote: true, 5 | printWidth: 80, 6 | arrowParens: 'avoid', 7 | }; 8 | -------------------------------------------------------------------------------- /.umirc.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'umi'; 2 | 3 | /** 判断是不是 cosmos 私有化部署环境 */ 4 | const customPublicPath = process.argv[3]; 5 | 6 | export default defineConfig({ 7 | hash: true, 8 | title: 'TuGraph DB', 9 | history: { 10 | type: 'hash', 11 | }, 12 | outputPath: './dist/resource', 13 | publicPath: customPublicPath ? customPublicPath : '/resource/', 14 | theme: { 15 | '@primary-color': '#1650FF', 16 | '@border-radius-base': '6px', 17 | '@collapse-panel-border-radius': '6px', 18 | '@checkbox-border-radius': '4px', 19 | '@tag-border-radius': '4px', 20 | '@text-color': '#363740', 21 | '@heading-color': '#363740', 22 | '@text-color-dark': '#363740', 23 | }, 24 | routes: [ 25 | { path: '/', component: 'studio', title: '图项目' }, 26 | { path: '/login', component: 'login', title: '登录' }, 27 | { path: '/home', component: 'studio', title: '图项目' }, 28 | { path: '/console', component: 'console', title: '控制台' }, 29 | { path: '/construct', component: 'construct', title: '图构建' }, 30 | { path: '/analysis', component: 'graph-schema/index', title: '图分析' }, 31 | { path: '/query', component: 'query', title: '图查询' }, 32 | { path: '/reset', component: 'resetPassword', title: '重置密码' } 33 | ], 34 | npmClient: 'npm', 35 | favicons: ['/resource/assets/favicon.png'], 36 | esbuildMinifyIIFE: true, 37 | plugins: [ 38 | '@umijs/plugins/dist/initial-state', 39 | '@umijs/plugins/dist/model', 40 | '@umijs/plugins/dist/antd', 41 | ], 42 | initialState: {}, 43 | model: {}, 44 | antd: { 45 | import: true, 46 | }, 47 | }); 48 | -------------------------------------------------------------------------------- /LEGAL.md: -------------------------------------------------------------------------------- 1 | Legal Disclaimer 2 | 3 | Within this source code, the comments in Chinese shall be the original, governing version. Any comment in other languages are for reference only. In the event of any conflict between the Chinese language version comments and other language version comments, the Chinese language version shall prevail. 4 | 5 | 法律免责声明 6 | 7 | 关于代码注释部分,中文注释为官方版本,其它语言注释仅做参考。中文注释可能与其它语言注释存在不一致,当中文注释与其它语言注释存在不一致时,请以中文注释为准。 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TuGraph DB BROWSER 🔗 2 | 3 | TuGraph DB BROWSER 是 TuGraph 图数据库的可视化平台。可以完成图谱、模型、数据等的创建和导入。同时可用使用 TuGraph Cypher 进行数据的操作。 4 | 5 | ## 0. 环境准备 6 | 7 | - node.js >= 16 8 | 9 | ## 1. 安装项目依赖 10 | 11 | ```bash 12 | npm install --force 13 | ``` 14 | 15 | ## 2. 本地研发 16 | 17 | ```bash 18 | npm run dev 19 | ``` 20 | 21 | 浏览器访问 http://localhost:8000 22 | 23 | ## 3. 编译构建 24 | 25 | 通用环境编译命令 26 | ```bash 27 | npm run build 28 | ``` 29 | 30 | 31 | cosmos 私有化部署环境编译命令, 其中 xxx 可以指定拼接的 prefixPath 32 | ```bash 33 | npm run custom-build xxx 34 | ``` 35 | -------------------------------------------------------------------------------- /public/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuGraph-family/tugraph-db-browser/38400298e6594a0601f97bcaa5a433f2f2398879/public/assets/favicon.png -------------------------------------------------------------------------------- /src/assets/icons/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuGraph-family/tugraph-db-browser/38400298e6594a0601f97bcaa5a433f2f2398879/src/assets/icons/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/icons/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuGraph-family/tugraph-db-browser/38400298e6594a0601f97bcaa5a433f2f2398879/src/assets/icons/iconfont.woff -------------------------------------------------------------------------------- /src/assets/icons/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuGraph-family/tugraph-db-browser/38400298e6594a0601f97bcaa5a433f2f2398879/src/assets/icons/iconfont.woff2 -------------------------------------------------------------------------------- /src/assets/node-icons/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuGraph-family/tugraph-db-browser/38400298e6594a0601f97bcaa5a433f2f2398879/src/assets/node-icons/iconfont.ttf -------------------------------------------------------------------------------- /src/assets/node-icons/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuGraph-family/tugraph-db-browser/38400298e6594a0601f97bcaa5a433f2f2398879/src/assets/node-icons/iconfont.woff -------------------------------------------------------------------------------- /src/assets/node-icons/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TuGraph-family/tugraph-db-browser/38400298e6594a0601f97bcaa5a433f2f2398879/src/assets/node-icons/iconfont.woff2 -------------------------------------------------------------------------------- /src/components/color-picker/constant/index.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_NODE_ACTIVE_COLOR = '#1890ff'; 2 | -------------------------------------------------------------------------------- /src/components/color-picker/index.less: -------------------------------------------------------------------------------- 1 | .color-picker { 2 | display: flex; 3 | 4 | &-item { 5 | width: 20px; 6 | border-radius: 4px; 7 | height: 20px; 8 | cursor: pointer; 9 | display: flex; 10 | justify-content: center; 11 | align-items: center; 12 | color: rgb(106 107 113 / 100%); 13 | 14 | &:hover { 15 | box-shadow: #f2f2f2 0 0 0 3px; 16 | } 17 | 18 | &:not(:last-child) { 19 | margin-right: 16px; 20 | } 21 | 22 | &__ellipsis { 23 | color: rgb(106 107 113 / 100%); 24 | border: 1px solid #dddddf; 25 | } 26 | } 27 | } 28 | 29 | .color-picker-item-popover { 30 | .item-popover-content { 31 | display: flex; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/components/console-menu/index.less: -------------------------------------------------------------------------------- 1 | .consoleMenu { 2 | display: flex; 3 | justify-content: flex-start; 4 | flex-direction: column; 5 | width: 100%; 6 | height: 100%; 7 | padding: 8px; 8 | background: rgb(228, 235, 255); 9 | border-right: 1px solid rgba(26, 27, 37, 0.06); 10 | 11 | .consoleMenuItem { 12 | color: rgba(26, 27, 37, 0.65); 13 | padding: 0 16px 0 24px; 14 | margin-bottom: 8px; 15 | height: 40px; 16 | line-height: 40px; 17 | cursor: pointer; 18 | } 19 | .consoleMenuItemSelected { 20 | background-color: rgba(26, 27, 37, 0.04); 21 | color: rgba(54, 55, 64, 1); 22 | padding: 0 16px 0 24px; 23 | margin-bottom: 8px; 24 | height: 40px; 25 | line-height: 40px; 26 | cursor: pointer; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/components/console-menu/index.tsx: -------------------------------------------------------------------------------- 1 | import { CONSOLE_LINKS } from '@/constants'; 2 | import styles from './index.less'; 3 | 4 | const ConsoleMenu = ({ 5 | onMenuChange, 6 | menuKey, 7 | }: { 8 | onMenuChange: (value: any) => void; 9 | menuKey: string; 10 | }) => { 11 | return ( 12 |
>(params: P): string => {
23 | const path = location.pathname.replace('/v4', '');
24 | const query = queryString.stringify(params);
25 | return `${path}?${query}`;
26 | };
27 |
28 | /**
29 | * Get the value of a specified parameter from the URL
30 | * @param name String
31 | * @returns String
32 | */
33 | export const getQueryString = (name: string) => {
34 | const reg = new RegExp(`(^|&|\\?)${name}=([^(&|#)]*)`, 'i');
35 | const match = location.href.match(reg);
36 | if (match) {
37 | return decodeURIComponent(match[2]);
38 | }
39 | return '';
40 | };
41 |
--------------------------------------------------------------------------------
/src/components/studio/utils/schemaTransform.ts:
--------------------------------------------------------------------------------
1 | import { map, find } from 'lodash';
2 | import { Schema, SchemaProperty } from '../interface/import';
3 | import { GraphData, NodeIndexProp, SchemaProperties } from '../interface/schema';
4 |
5 | export const indexMergeToProperties = (index: NodeIndexProp[], properties: SchemaProperties[]): SchemaProperty[] => {
6 | return map(properties, (property) => {
7 | const { name, type, optional } = property;
8 | const indexMatch = find(index, (indexProp) => indexProp.propertyName === name);
9 | if (indexMatch) {
10 | return {
11 | name,
12 | type,
13 | optional,
14 | unique: indexMatch.isUnique,
15 | index: true,
16 | };
17 | }
18 | return {
19 | name,
20 | type,
21 | optional,
22 | };
23 | });
24 | };
25 |
26 | export const schemaTransform = (schema: GraphData): Schema[] => {
27 | const { nodes, edges } = schema;
28 | // 针对节点数据的转换
29 | const nodeSchemas = map(nodes, (node) => {
30 | const { labelName, primaryField, properties, index } = node;
31 |
32 | return {
33 | label: labelName,
34 | type: 'VERTEX',
35 | properties: indexMergeToProperties(index, properties),
36 | primary: primaryField,
37 | };
38 | });
39 |
40 | // 针对边数据的转换
41 | const edgeSchemas = edges.map((edge) => {
42 | const { labelName, properties } = edge;
43 | return {
44 | label: labelName,
45 | type: 'EDGE',
46 | properties,
47 | constraints: edge.edgeConstraints,
48 | };
49 | });
50 |
51 | return [...nodeSchemas, ...edgeSchemas];
52 | };
53 |
--------------------------------------------------------------------------------
/src/components/studio/utils/uploadFile.ts:
--------------------------------------------------------------------------------
1 | import { FileData } from '../interface/import';
2 | import { map, find, compact, isEmpty } from 'lodash';
3 | import { GraphData } from '../interface/schema';
4 |
5 | export const mergeFileDataList = (fileList: FileData[], file: FileData) => {
6 | if (!find(fileList, fileItem => fileItem.fileName === file.fileName)) {
7 | return [...fileList, file];
8 | }
9 | const result = map(fileList, fileItem => {
10 | if (fileItem.fileName === file.fileName) {
11 | return file;
12 | } else {
13 | return fileItem;
14 | }
15 | });
16 | return result;
17 | };
18 |
19 | const mapToOption = (item: { labelName?: string }) => {
20 | if (item?.labelType == 'edge') {
21 | return item.labelName
22 | ? { value: item.labelName, label: item.labelName, }
23 | : null;
24 | } else {
25 | return item.labelName
26 | ? { value: item.labelName, label: item.labelName }
27 | : null;
28 | }
29 | };
30 |
31 | export const cascaderOptionsTransform = (data: GraphData) => {
32 | const { nodes, edges } = data;
33 | const nodeOptions = compact(map(nodes, mapToOption));
34 | const edgeOptions = compact(map(edges, mapToOption));
35 | const nodeItem = isEmpty(nodeOptions)
36 | ? null
37 | : { value: 'node', label: '点', children: nodeOptions };
38 | const edgeItem = isEmpty(edgeOptions)
39 | ? null
40 | : { value: 'edge', label: '边', children: edgeOptions };
41 | return compact([nodeItem, edgeItem]);
42 | };
43 |
--------------------------------------------------------------------------------
/src/components/studio/utils/url.ts:
--------------------------------------------------------------------------------
1 | import queryString from 'query-string';
2 |
3 | // 改路由参数
4 | export function addQueryParam(key: string, value: string) {
5 | const location = window.location;
6 | const hashList = location.hash?.split('?');
7 | const query = queryString.parse((hashList?.[1] || '')?.trim());
8 |
9 | query[key] = value;
10 | location.hash = `${hashList[0]}?${queryString.stringify(query)}`;
11 | }
12 |
13 | export function getQueryParam(key: string) {
14 | const urlParams = new URLSearchParams(window.location.search);
15 | return urlParams.get(key);
16 | }
17 |
--------------------------------------------------------------------------------
/src/constants/demo_data/TheThreeBody/organization-organization-relationship.csv:
--------------------------------------------------------------------------------
1 | "水滴","舰队国际","秒杀"
2 | "水滴","太阳系","封锁"
3 | "二向箔","太阳系","清理"
4 | "终极规律号","自然选择号","攻击"
5 | "终极规律号","企业号","攻击"
6 | "终极规律号","深空号","攻击"
7 | "终极规律号","蓝色空间号","攻击"
8 | "蓝色空间号","终极规律号","攻击"
9 | "星舰地球","自然选择号","包括"
10 | "星舰地球","深空号","包括"
11 | "星舰地球","蓝色空间号","包括"
12 | "星舰地球","终极规律号","包括"
13 | "星舰地球","企业号","包括"
14 | "青铜时代号","量子号","攻击"
15 | "万有引力号","蓝色空间号","追击、合并"
16 |
--------------------------------------------------------------------------------
/src/constants/demo_data/TheThreeBody/organization-plan-relationship.csv:
--------------------------------------------------------------------------------
1 | "ETO","破壁计划","提出"
2 | "PDC","面壁计划","提出"
3 | "PDC","群星计划","提出"
--------------------------------------------------------------------------------
/src/constants/demo_data/TheThreeBody/organizes.csv:
--------------------------------------------------------------------------------
1 | "ETO","全称是Earth-Threebody Organization(地球三体组织),原本以“借助外来力量拯救腐朽的人类社会”为最高宗旨,其目的在后期转变为“消灭人类暴政”,希望三体文明接管地球。精神领袖为叶文洁,实际领导人为伊文斯。"
2 | "PDC","全称是Planet Defense Council(行星防御理事会),利用三体人思维透明的致命缺陷,制订“面壁计划”并选出四位面壁者"
3 | "PIA","全称Planetary Defense Council(行星防御理事会战略情报局),以三体舰队和母星为侦察目标的情报机构,在行政上由行星防御理事会(PDC)领导"
4 | "舰队国际","随着三体危机的到来,所有的国家都衰落了,但国家仍然存在。人类分为两大国际:地球国际、舰队国际。地球国际是原有的联合国,而舰队国际则是由新组建的欧洲、北美、亚洲三大舰队组成"
5 | "星环集团","程心在艾AA帮助下建立星环集团,扶持托马斯·维德等人的光速飞船研究"
6 | "星舰地球","章北海带领逃离的自然选择号,以及追击他们的4艘战舰(终极规律号、企业号、深空号、蓝色空间号),最终成立了星舰地球。"
7 | "智子","质子经过二维展开改造后的智能微观粒子,可以进行通讯、侦查、干扰粒子高能加速器等任务;二、受三体世界智能粒子(也就是上面所讲的智子)控制的拟人机器人,可视作三体人驻地球的大使"
8 | "自然选择号","亚洲舰队第三分舰队的旗舰,舰长是东方延绪,因为要排查舰队中的钢印族,让冬眠了200多年章北海复苏担任执行舰长暂时接任东方延绪,直到调查结束。章北海刚拿到“自然选择”号的控制权后利用重置口令的时机劫持战舰逃离。"
9 | "深空号","追击自然选择号。后因联合舰队全军覆没,归属章北海和星舰地球,并起航向NH588J2飞行。后在黑暗战役中因终极规律号的次声波氢弹被摧毁。"
10 | "蓝色空间号","恒星级战舰。黑暗战役中,在“终极规律”号抢先对其他战舰发动次声波氢弹攻击后,对“终极规律”号发起了反击,“蓝色空间”夺取了除已被完全摧毁的终极规律号其他三艘战舰的全部资源后离去。"
11 | "终极规律号","它向星舰地球的其他四艘飞船发射了十二枚装载着次声波氢弹弹头的隐形导弹,向二十万公里外的自然选择号发射的三枚比其他九枚提前了一段时间,以使其和向附近三艘飞船发射的导弹同时到达起爆位置。"
12 | "企业号","追击自然选择号。后因联合舰队全军覆没,归属章北海和星舰地球,并起航向NH588J2飞行。后在黑暗战役中因终极规律号的次声波氢弹被摧毁。"
13 | "量子号","炮灰"
14 | "青铜时代号","在太空军遭受水滴打击的时刻,早已进入推进四准备的青铜时代号和量子号成功避免了水滴的打击,迅速逃离了太阳系。在之前的五艘星舰进行黑暗战役的过程中,青铜时代号也对量子号发动了袭击,获取了量子号中的所有资源。当罗辑成功在地球与三体之间建立威胁后,青铜时代号的官兵被人类骗回了地球,然后星舰上的全体人员被迫接受了审判。"
15 | "水滴","由三体文明使用强互作用力材料(SIM)所制成的宇宙探测器,因为其外形与水滴相似,所以被人类称之为水滴。它对电磁波的反射率为100%,且绝对光滑,温度处于绝对零度,强度高达太阳系中最坚硬的材料的百倍以上的坚硬外壳。"
16 | "二向箔","首次出现于一艘来自歌者“母世界”的宇宙飞船。由于宇宙战争愈演愈烈,二向箔对于高等文明而言已不够格作为武器使用,但其仍作为一种廉价的清理工具用于清除隐藏在结构较复杂的恒星系统中的弱小文明。并且对它的滥用极大加速了宇宙的死亡。"
17 | "万有引力号","万有引力号是太空军遭受水滴打击后地球建造的第一艘恒星级战舰,最大的特点是星舰本身具备了引力波发射器的能力。但由于青铜时代星舰上的一名指挥官对蓝色空间号进行了警告,所以蓝色空间没有回归。最后在得知三体人向地球发动新的打击后,蓝色空间和万有引力两舰通过协商,向宇宙发出了决定三体和地球命运的引力波。最后两星舰一起带着人类文明向远方驶去。"
18 | "太阳系",
19 | "三体第一舰队",
20 | "光速飞船",
21 | "蓝星",
22 | "DX3906恒星","云天明身患绝症,知自己将不久于人世,于是花了大学同学胡文报恩的300万,购买了编号为“DX3906”的恒星,送给大学时期暗恋的女孩程心。"
23 | "5公斤生态球",
--------------------------------------------------------------------------------
/src/constants/demo_data/TheThreeBody/person-organization-relationship.csv:
--------------------------------------------------------------------------------
1 | "伊文斯","ETO","创办"
2 | "叶文洁","ETO","精神领袖"
3 | "潘寒","ETO","降临派"
4 | "申玉菲","ETO","拯救派"
5 | "萨伊","PDC","轮值主席"
6 | "于维民","PIA","PIA副局长"
7 | "米哈伊尔·瓦季姆","PIA","PIA主任"
8 | "柯曼琳","PIA","PIA高级顾问"
9 | "丁仪","水滴","近距离接触"
10 | "丁仪","量子号","提前深海"
11 | "丁仪","青铜时代号","提前深海"
12 | "东方延绪","自然选择号","舰长"
13 | "汪淼","智子","被干扰"
14 | "云天明","三体第一舰队","被复活"
15 | "程心","PIA","加入"
16 | "褚岩","蓝色空间号","舰长"
17 | "艾AA","星环集团","辅助建立"
18 | "程心","星环集团","建立"
19 | "托马斯·维德","光速飞船","推进计划"
20 | "艾AA","DX3906恒星","乘坐“星环号”光速飞船"
21 | "程心","DX3906恒星","乘坐“星环号”光速飞船"
22 | "程心","蓝星","前往"
23 | "关一帆","蓝星","前往"
24 | "关一帆","万有引力号","随舰学者"
25 | "约瑟夫·莫沃维奇","万有引力号","舰长"
26 | "韦斯特","万有引力号","心理医生"
27 | "戴文","万有引力号","宪兵指挥官"
28 | "伊万","万有引力号","维护工程师"
29 | "薇拉","万有引力号","维护工程师"
30 | "程心","5公斤生态球","保留"
31 | "章北海","自然选择号","成为舰长后叛逃"
32 |
--------------------------------------------------------------------------------
/src/constants/demo_data/TheThreeBody/person-person-relationship.csv:
--------------------------------------------------------------------------------
1 | "绍琳","叶文洁","母亲"
2 | "绍琳","叶文雪","母亲"
3 | "绍琳","叶哲泰","妻子"
4 | "叶哲泰","叶文洁","父亲"
5 | "叶哲泰","叶文雪","父亲"
6 | "叶文雪","叶文洁","姐妹"
7 | "杨卫宁","叶文洁","丈夫"
8 | "叶文洁","杨卫宁","杀死"
9 | "叶文洁","雷志成","杀死"
10 | "叶文洁","沙瑞山","学生"
11 | "叶文洁","罗辑","宇宙文明公理"
12 | "叶文洁","潘寒","护卫扭断了脖子"
13 | "沙瑞山","汪淼","帮助观察到整个宇宙在闪烁"
14 | "杨冬","叶文洁","女儿"
15 | "杨冬","丁仪","恋人"
16 | "白沐霖","叶文洁","诬陷"
17 | "汪淼","杨冬","同学"
18 | "汪淼","潘寒","卧底"
19 | "汪淼","申玉菲","卧底"
20 | "申玉菲","魏成","夫妻"
21 | "潘寒","申玉菲","刺杀"
22 | "史强","汪淼","拯救"
23 | "史强","常伟思","同事"
24 | "史强","罗辑","保护、纯洁的工作关系"
25 | "三体人","罗辑","下令刺杀"
26 | "1379号监听员","叶文洁","警告不要回答"
27 | "三体人","1379号监听员","惩罚"
28 | "罗辑","庄颜","丈夫"
29 | "罗辑","程心","执剑人交接"
30 | "冯·诺依曼","弗雷德里克·泰勒","破壁"
31 | "山杉惠子","比尔·希恩斯","破壁"
32 | "墨子","曼努尔·雷迪亚兹","破壁"
33 | "比尔·希恩斯","山杉惠子","丈夫"
34 | "丁仪","章北海","间接启发"
35 | "托马斯·维德","程心","领导-暗杀-全权代理-旅行承诺"
36 | "云天明","程心","曾经暗恋,赠予DX3906恒星"
37 | "云天明","艾AA","度过幸福一生"
38 | "智子","程心","服务"
39 | "智子","关一帆","服务"
40 | "关一帆","程心","落入黑域,启动飞船一起前往蓝星"
--------------------------------------------------------------------------------
/src/constants/demo_data/TheThreeBody/person-plan-relationship.csv:
--------------------------------------------------------------------------------
1 | "史强","古筝行动","提出"
2 | "汪淼","古筝行动","提供纳米飞刃材料"
3 | "常伟思","古筝行动","总指挥官"
4 | "伊文斯","古筝行动","在本次行动中被杀"
5 | "罗辑","雪地计划","提出"
6 | "弗雷德里克·泰勒","量子舰队计划","提出"
7 | "曼努尔·雷迪亚兹","水星坠落连锁反应计划","提出"
8 | "比尔·希恩斯","失败主义钢印计划","提出"
9 | "罗辑","面壁计划","真实战略意图:建立黑暗森林威慑"
10 | "弗雷德里克·泰勒","面壁计划","真实战略意图:利用球状闪电武器对人类舰队发动突然攻击使其量子化,用量子舰队来对抗三体。"
11 | "曼努尔·雷迪亚兹","面壁计划","真实战略意图:在水星地层中埋藏大量的氢弹,一旦引爆会使整个太阳系变成比三体更加恶劣的地狱,以全人类的生命为筹码要挟三体。"
12 | "比尔·希恩斯","面壁计划","研究思想钢印并向人类植入绝对失败主义的理念,让人类尽快逃离太阳系以避免与三体的正面接触。"
13 | "章北海","增援未来计划","提出"
14 | "三体人","染色计划","提出"
15 | "三体人","神迹计划","提出"
16 | "云天明","黑域计划","三个童话"
17 | "云天明","掩体计划","三个童话"
18 | "云天明","光速飞船计划","三个童话"
19 | "云天明","阶梯计划","大脑被送至三体世界"
20 | "程心","阶梯计划","送出云天明大脑"
21 |
--------------------------------------------------------------------------------
/src/constants/demo_data/TheThreeBody/timeRelationship.csv:
--------------------------------------------------------------------------------
1 | "魔法时代","人类时代"
2 | "人类时代","黄金时代"
3 | "黄金时代","危机纪元"
4 | "危机纪元","威慑纪元"
5 | "威慑纪元","威慑后"
6 | "威慑后","广播纪元"
7 | "广播纪元","掩体纪元"
8 | "掩体纪元","银河纪元"
9 | "银河纪元","DX3906星系黑域纪元"
10 | "DX3906星系黑域纪元","647号宇宙预备时间线"
--------------------------------------------------------------------------------
/src/constants/demo_data/TheThreeBody/timeline.csv:
--------------------------------------------------------------------------------
1 | "魔法时代","公元1453年5月3日-1453年5月29日","魔法师狄奥伦娜死完,拜占庭陷落"
2 | "人类时代","公元1453年-1980年","叶文洁出生、红岸基地成立"
3 | "黄金时代","公元1980年-201X年","人类意识到智子的存在,叶文洁在杨冬墓前向罗辑告知了宇宙社会学两个公理和两个概念"
4 | "危机纪元","公元201x年-2208年","罗辑被选为面壁人,罗辑领悟黑暗森林法则"
5 | "威慑纪元","公元2208年-2270年","水滴攻击“蓝色空间”与追击的“万有引力"
6 | "威慑后","公元2270年-2272年","全人类开始向澳大利亚移民"
7 | "广播纪元","公元2272年-2332年","三体世界被毁灭"
8 | "掩体纪元","公元2333年-2400年","星环集团宣布研制曲率驱动飞船的计划,太阳开始二维化"
9 | "银河纪元","公元2273年-不明","程心与艾AA到达DX3906,程心与关一帆进入死域"
10 | "DX3906星系黑域纪元","公元2687年-2731年","程心与关一帆发现他们留下的礼物-647号小宇宙"
11 | "647号宇宙预备时间线","公元2687年-公元18906416年","程心、关一帆走出黑域,进入647号小宇宙,遇见智子,程心写回忆录"
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/battle.csv:
--------------------------------------------------------------------------------
1 | name,start_time,end_time
2 | 群雄讨董,190,190
3 | 界桥之战,191,191
4 | 兖州之战,192,195
5 | 徐州之战,194,198
6 | 平定江东,195,196
7 | 宛城之战,197,197
8 | 官渡之战,200,200
9 | 赤壁之战,208,208
10 | 刘备入蜀,212,214
11 | 汉中之战,217,219
12 | 襄樊之战,219,219
13 | 夷陵之战,222,222
14 | 诸葛北伐,228,234
15 | 淮南三叛,251,258
16 | 司马昭灭蜀,263,263
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/civil-servant.csv:
--------------------------------------------------------------------------------
1 | name,camp,hometown,family
2 | 荀彧,魏,豫州,颍川荀氏
3 | 荀攸,魏,豫州,颍川荀氏
4 | 贾诩,魏,凉州,武威贾氏
5 | 郭嘉,魏,豫州,
6 | 程昱,魏,兖州,
7 | 陈群,魏,豫州,颍川陈氏
8 | 钟繇,魏,豫州,颍川钟氏
9 | 钟会,魏,豫州,颍川钟氏
10 | 诸葛亮,蜀,徐州,琅琊诸葛氏
11 | 孙乾,蜀,青州,
12 | 简庸,蜀,幽州,
13 | 糜竺,蜀,徐州,
14 | 庞统,蜀,荆州,
15 | 刘巴,蜀,荆州,零陵刘氏
16 | 法正,蜀,司州,
17 | 李严,蜀,荆州,
18 | 蒋琬,蜀,荆州,
19 | 费祎,蜀,荆州,
20 | 董允,蜀,荆州,
21 | 张昭,吴,徐州,
22 | 顾雍,吴,扬州,吴郡顾氏
23 | 诸葛瑾,吴,徐州,
24 | 步骘,吴,扬州,
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/civilServant_to_lord.csv:
--------------------------------------------------------------------------------
1 | slaver,master
2 | 荀彧,袁绍
3 | 荀彧,曹操
4 | 荀攸,曹操
5 | 贾诩,董卓
6 | 贾诩,曹操
7 | 郭嘉,袁绍
8 | 郭嘉,曹操
9 | 程昱,曹操
10 | 陈群,曹操
11 | 钟繇,曹操
12 | 钟会,曹丕
13 | 诸葛亮,刘备
14 | 孙乾,刘备
15 | 简庸,刘备
16 | 糜竺,刘备
17 | 庞统,刘备
18 | 刘巴,刘备
19 | 法正,刘璋
20 | 法正,刘备
21 | 李严,刘璋
22 | 李严,刘备
23 | 蒋琬,刘备
24 | 费祎,刘备
25 | 董允,刘备
26 | 张昭,孙策
27 | 顾雍,孙权
28 | 诸葛瑾,孙权
29 | 步骘,孙权
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/civilServant_to_state.csv:
--------------------------------------------------------------------------------
1 | name,hometown
2 | 荀彧,豫州
3 | 荀攸,豫州
4 | 贾诩,凉州
5 | 郭嘉,豫州
6 | 程昱,兖州
7 | 陈群,豫州
8 | 钟繇,豫州
9 | 钟会,豫州
10 | 诸葛亮,徐州
11 | 孙乾,青州
12 | 简庸,幽州
13 | 糜竺,徐州
14 | 庞统,荆州
15 | 刘巴,荆州
16 | 法正,司州
17 | 李严,荆州
18 | 蒋琬,荆州
19 | 费祎,荆州
20 | 董允,荆州
21 | 张昭,徐州
22 | 顾雍,扬州
23 | 诸葛瑾,徐州
24 | 步骘,扬州
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/general.csv:
--------------------------------------------------------------------------------
1 | name,camp,hometown,family
2 | 夏侯惇,魏,豫州,谯县夏侯氏
3 | 曹仁,魏,豫州,谯县曹氏
4 | 曹真,魏,豫州,谯县曹氏
5 | 曹洪,魏,豫州,谯县曹氏
6 | 曹纯,魏,豫州,谯县曹氏
7 | 曹休,魏,豫州,谯县曹氏
8 | 夏侯尚,魏,豫州,谯县夏侯氏
9 | 夏侯渊,魏,豫州,谯县夏侯氏
10 | 许褚,魏,豫州,
11 | 典韦,魏,兖州,
12 | 张郃,魏,冀州,河间张氏
13 | 徐晃,魏,司州,
14 | 张辽,魏,并州,
15 | 乐进,魏,兖州,
16 | 于禁,魏,兖州,
17 | 张绣,魏,凉州,
18 | 关羽,蜀,司州,
19 | 张飞,蜀,幽州,
20 | 赵云,蜀,冀州,
21 | 马超,蜀,司州,
22 | 黄忠,蜀,荆州,
23 | 黄权,蜀,益州,
24 | 魏延,蜀,荆州,
25 | 姜维,蜀,凉州,
26 | 周瑜,吴,扬州,庐江周氏
27 | 鲁肃,吴,徐州,
28 | 吕蒙,吴,豫州,
29 | 陆逊,吴,扬州,吴郡陆氏
30 | 陆抗,吴,扬州,吴郡陆氏
31 | 程普,吴,幽州,
32 | 韩当,吴,幽州,
33 | 周泰,吴,扬州,
34 | 黄盖,吴,荆州,
35 | 蒋钦,吴,扬州,
36 | 甘宁,吴,益州,
37 | 凌统,吴,扬州,
38 | 徐盛,吴,徐州,
39 | 潘璋,吴,兖州,
40 | 丁奉,吴,扬州,
41 | 太史慈,吴,青州,
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/general_father_lord.csv:
--------------------------------------------------------------------------------
1 | son,father
2 | 马超,马腾
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/general_to_battle.csv:
--------------------------------------------------------------------------------
1 | name,war
2 | 张绣,宛城之战
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/general_to_lord.csv:
--------------------------------------------------------------------------------
1 | slaver,master
2 | 夏侯惇,曹操
3 | 曹仁,曹操
4 | 曹真,曹操
5 | 曹洪,曹操
6 | 曹纯,曹操
7 | 曹休,曹操
8 | 夏侯尚,曹操
9 | 夏侯渊,曹操
10 | 许褚,曹操
11 | 典韦,曹操
12 | 张郃,袁绍
13 | 张郃,曹操
14 | 徐晃,曹操
15 | 张辽,吕布
16 | 张辽,曹操
17 | 乐进,曹操
18 | 于禁,曹操
19 | 关羽,刘备
20 | 张飞,刘备
21 | 赵云,刘备
22 | 马超,刘备
23 | 黄忠,刘备
24 | 黄权,刘备
25 | 魏延,刘备
26 | 姜维,刘禅
27 | 周瑜,孙策
28 | 鲁肃,孙权
29 | 吕蒙,孙权
30 | 陆逊,孙权
31 | 陆抗,孙权
32 | 程普,孙坚
33 | 韩当,孙坚
34 | 周泰,孙策
35 | 黄盖,孙坚
36 | 蒋钦,孙策
37 | 甘宁,孙权
38 | 凌统,孙权
39 | 徐盛,孙权
40 | 潘璋,孙权
41 | 丁奉,孙权
42 | 太史慈,孙策
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/general_to_state.csv:
--------------------------------------------------------------------------------
1 | name,hometown
2 | 夏侯惇,豫州
3 | 曹仁,豫州
4 | 曹真,豫州
5 | 曹洪,豫州
6 | 曹休,豫州
7 | 夏侯尚,豫州
8 | 夏侯渊,豫州
9 | 许褚,豫州
10 | 典韦,兖州
11 | 张郃,冀州
12 | 徐晃,司州
13 | 张辽,并州
14 | 乐进,兖州
15 | 于禁,兖州
16 | 张绣,凉州
17 | 关羽,司州
18 | 张飞,幽州
19 | 赵云,冀州
20 | 马超,司州
21 | 黄忠,荆州
22 | 黄权,益州
23 | 魏延,荆州
24 | 姜维,凉州
25 | 周瑜,扬州
26 | 鲁肃,徐州
27 | 吕蒙,豫州
28 | 陆逊,扬州
29 | 陆抗,扬州
30 | 程普,幽州
31 | 韩当,幽州
32 | 周泰,扬州
33 | 黄盖,荆州
34 | 蒋钦,扬州
35 | 甘宁,益州
36 | 凌统,扬州
37 | 徐盛,徐州
38 | 潘璋,兖州
39 | 丁奉,扬州
40 | 太史慈,青州
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/lord.csv:
--------------------------------------------------------------------------------
1 | name,camp,hometown,family,father_position,position
2 | 曹操,魏,豫州,谯县曹氏,太尉,魏武帝
3 | 曹丕,魏,豫州,谯县曹氏,丞相,魏文帝
4 | 曹叡,魏,豫州,谯县曹氏,皇帝,魏明帝
5 | 刘备,蜀,幽州,涿郡刘氏,,汉昭烈帝
6 | 刘禅,蜀,幽州,涿郡刘氏,皇帝,安乐公
7 | 孙坚,吴,扬州,吴郡孙氏,商人,破虏将军
8 | 孙策,吴,扬州,吴郡孙氏,破虏将军,讨逆将军
9 | 孙权,吴,扬州,吴郡孙氏,破虏将军,吴大帝
10 | 袁绍,汉,豫州,汝南袁氏,司空,汉大将军
11 | 袁术,汉,豫州,汝南袁氏,司空,左将军
12 | 司马懿,晋,司州,河内司马氏,京兆尹,晋宣帝
13 | 司马师,晋,司州,河内司马氏,太傅,大将军
14 | 司马昭,晋,司州,河内司马氏,太傅,相国
15 | 董卓,汉,凉州,凉州豪强,县尉,汉相国
16 | 吕布,汉,并州,并州豪强,,平东将军
17 | 公孙瓒,汉,幽州,辽西公孙氏,两千石,前将军
18 | 刘焉,汉,荆州,竟陵刘氏,太守,益州牧
19 | 刘璋,汉,荆州,竟陵刘氏,益州牧,益州牧
20 | 刘表,汉,兖州,山阳刘氏,汉朝宗亲,荆州牧
21 | 刘协,汉,司州,大汉皇族,皇帝,汉献帝
22 | 马腾,汉,凉州,扶风马氏,县尉,卫尉
23 | 刘繇,汉,青州,东莱刘氏,太守,扬州牧
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/lord_brother_lord.csv:
--------------------------------------------------------------------------------
1 | ybrother,ebrother
2 | 孙权,孙策
3 | 司马昭,司马师
4 | 袁术,袁绍
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/lord_father_lord.csv:
--------------------------------------------------------------------------------
1 | son,father
2 | 刘禅,刘备
3 | 曹丕,曹操
4 | 孙策,孙坚
5 | 孙权,孙坚
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/lord_to_battle.csv:
--------------------------------------------------------------------------------
1 | name,war
2 | 曹操,群雄讨董
3 | 袁绍,群雄讨董
4 | 董卓,群雄讨董
5 | 袁术,群雄讨董
6 | 孙坚,群雄讨董
7 | 刘备,群雄讨董
8 | 吕布,群雄讨董
9 | 公孙瓒,群雄讨董
10 | 袁绍,界桥之战
11 | 公孙瓒,界桥之战
12 | 曹操,兖州之战
13 | 吕布,兖州之战
14 | 曹操,徐州之战
15 | 吕布,徐州之战
16 | 刘备,徐州之战
17 | 袁术,徐州之战
18 | 孙策,平定江东
19 | 袁术,平定江东
20 | 刘繇,平定江东
21 | 曹操,宛城之战
22 | 袁绍,官渡之战
23 | 曹操,官渡之战
24 | 曹操,赤壁之战
25 | 刘备,赤壁之战
26 | 孙权,赤壁之战
27 | 刘备,刘备入蜀
28 | 刘璋,刘备入蜀
29 | 刘备,汉中之战
30 | 曹操,汉中之战
31 | 曹操,襄樊之战
32 | 孙权,襄樊之战
33 | 刘备,襄樊之战
34 | 刘备,夷陵之战
35 | 孙权,夷陵之战
36 | 刘禅,诸葛北伐
37 | 曹叡,诸葛北伐
38 | 司马懿,淮南三叛
39 | 司马师,淮南三叛
40 | 司马昭,淮南三叛
41 | 司马昭,司马昭灭蜀
42 | 刘禅,司马昭灭蜀
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/lord_to_lord.csv:
--------------------------------------------------------------------------------
1 | slaver,master
2 | 司马懿,曹操
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/lord_to_state.csv:
--------------------------------------------------------------------------------
1 | name,hometown
2 | 曹操,豫州
3 | 曹丕,豫州
4 | 曹叡,豫州
5 | 刘备,幽州
6 | 刘禅,幽州
7 | 孙坚,扬州
8 | 孙策,扬州
9 | 孙权,扬州
10 | 袁绍,豫州
11 | 袁术,豫州
12 | 司马懿,司州
13 | 司马师,司州
14 | 司马昭,司州
15 | 董卓,凉州
16 | 吕布,并州
17 | 公孙瓒,幽州
18 | 刘焉,荆州
19 | 刘璋,荆州
20 | 刘表,兖州
21 | 刘协,司州
22 | 马腾,凉州
23 | 刘繇,青州
--------------------------------------------------------------------------------
/src/constants/demo_data/ThreeKingdoms/state.csv:
--------------------------------------------------------------------------------
1 | state,caption
2 | 司州,洛阳
3 | 青州,临淄
4 | 徐州,郯县
5 | 兖州,昌邑
6 | 豫州,谯县
7 | 幽州,蓟县
8 | 冀州,高邑
9 | 并州,晋阳
10 | 荆州,汉寿
11 | 扬州,寿春
12 | 凉州,姑臧
13 | 益州,成都
14 | 交州,龙编
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/celestialFsacilities.csv:
--------------------------------------------------------------------------------
1 | "地球",""
2 | "月球",""
3 | "木星",""
4 |
5 | "方舟空间站","太空电梯上"
6 | "国际空间站","近地轨道上,在流浪旅途中领航"
7 | "太空电梯",""
8 | "太空电梯基地",""
9 | "互联网北京根服务器",""
10 | "杭州行星发动机",""
11 | "苏拉威西行星发动机",""
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/event_celestialFacilities.csv:
--------------------------------------------------------------------------------
1 | "方舟空间站","地球",6,"6 方舟空间站坠毁至地面","太空电梯危机",2044
2 |
3 | "月球","地球",4,"4 月球即将坠向地球","月球危机",2058
4 |
5 | "地球","木星",5,"5 距离过近导致地震,木星危机开始","木星危机",2075
6 | "国际空间站","木星",20,"20 爆炸后点燃了混合了地球空气的木星","木星危机",2075
7 | "木星","地球",21,"21 燃烧后的冲击波推开地球,木星危机解除,地球继续流浪","木星危机",2075
8 |
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/event_organization_celestialFacilities.csv:
--------------------------------------------------------------------------------
1 | "联合政府","月球",5,"5 决定用相控阵核弹炸毁月球","月球危机",2058
2 | "联合政府","地球",6,"6 决定重启互联网提前流浪地球","月球危机",2058
3 | "联合政府","地球",15,"15 成功点火推理地球开始流浪","月球危机",2058
4 |
5 | "救援小队","杭州行星发动机",8,"8 护送火石前往,遭遇二次地震","木星危机",2075
6 | "救援小队","杭州行星发动机",9,"9 运输车在地震中损毁,弃车步行前往,路上韩子昂牺牲","木星危机",2075
7 | "救援小队","苏拉威西行星发动机",10,"10 在杭州任务失败后,运送火石前往苏拉威西","木星危机",2075
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/event_organization_role.csv:
--------------------------------------------------------------------------------
1 | "联合政府","刘启",3,"3 被查出违法开车,被关进监狱","木星危机",2075
2 | "救援小队","韩子昂",6,"6 在韩子昂逃难时紧急征用其车辆","木星危机",2075
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/event_role_celestialFacility.csv:
--------------------------------------------------------------------------------
1 | "MOSS","太空电梯基地",2,"2 出动无人机攻击","太空电梯危机",2044
2 | "反叛者","方舟空间站",4,"4 引爆随太空电梯上升带来的炸弹","太空电梯危机",2044
3 | "MOSS","太空电梯基地",5,"5 覆写550A控制基地","太空电梯危机",2044
4 |
5 | "MOSS","月球",3,"3 MOSS控制下的月球发动机爆炸","月球危机",2058
6 | "刘培强","月球",7,"7 前往部署核弹,后返回空间站","月球危机",2058
7 | "张鹏","月球",8,"8.1 前往引爆核弹","月球危机",2058
8 | "安德烈·戈拉希诺夫","月球",8,"8.2 前往引爆核弹","月球危机",2058
9 | "刘培强","国际空间站",8,"8.3 在张鹏指引下返回空间站","月球危机",2058
10 | "马兆","互联网北京根服务器",9,"9.1 前往重启根服务器","月球危机",2058
11 | "图恒宇","互联网北京根服务器",9,"9.2 前往重启根服务器","月球危机",2058
12 | "图丫丫","互联网北京根服务器",14,"14 背出密钥完成了服务器重启","月球危机",2058
13 |
14 | "刘启","地球",2,"2 和妹妹一起偷偷跑到地表","木星危机",2075
15 | "刘培强","国际空间站",12,"12 前往总控室停止空间站","木星危机",2075
16 | "刘启","苏拉威西行星发动机",15,"15 送入火石","木星危机",2075
17 | "李一一","苏拉威西行星发动机",18,"18 修改程序让尾焰点燃木星,但还差一点到极限距离","木星危机",2075
18 | "刘培强","国际空间站",19,"19 操控飞向行星发动机尾焰","木星危机",2075
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/event_role_organization.csv:
--------------------------------------------------------------------------------
1 | "刘培强","领航员面试组",1,"1 面试领航员","月球危机",2058
2 | "周喆直","联合政府",13,"13 强行命令启动点火行星发动机","月球危机",2058
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/event_role_role.csv:
--------------------------------------------------------------------------------
1 | "反叛者","MOSS",1,"1 入侵控制系统","太空电梯危机",2044
2 | "反叛者","刘培强",3,"3.1 发生战斗","太空电梯危机",2044
3 | "反叛者","韩朵朵大",3,"3.2 发生战斗","太空电梯危机",2044
4 |
5 | "图恒宇","MOSS",2,"2 上传丫丫的意识","月球危机",2058
6 | "马兆","图恒宇",10,"10 被电缆缠住淹死在洪水前将密钥交给图恒宇","月球危机",2058
7 | "图恒宇","图丫丫",11,"11 在被洪水淹死前上传了自己的意识并让丫丫记住密钥","月球危机",2058
8 | "图恒宇","图丫丫",12,"12 在数字生命世界和丫丫重逢","月球危机",2058
9 |
10 | "韩朵朵小","刘启",1,"1 地下城停电,找到哥哥","木星危机",2075
11 | "韩子昂","刘启",4,"4 营救刘启和韩朵朵失败,也被关进监狱","木星危机",2075
12 | "刘培强","MOSS",7,"7 与王磊通话后被强制休眠","木星危机",2075
13 | "刘培强","MOSS",11,"11 从休眠中苏醒,认为MOSS叛逃","木星危机",2075
14 | "马卡洛夫","刘培强",13,"13 帮助刘培强前往总控室的路上牺牲","木星危机",2075
15 | "MOSS","刘培强",14,"14 在总控室对峙,MOSS解释流浪地球计划失败,其在执行火种计划","木星危机",2075
16 | "刘培强","MOSS",16,"16 夺取控制权后与刘启通话","木星危机",2075
17 | "刘启","李一一",17,"17 讨论后决定点燃木星推开地球","木星危机",2075
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/organizations.csv:
--------------------------------------------------------------------------------
1 | "救援小队","执行火石运送任务"
2 | "领航员面试组","面试领航员"
3 | "联合政府","地球上各国成立的联合政府"
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/relationship_role_celestialFacility.csv:
--------------------------------------------------------------------------------
1 | "刘培强","太空电梯","守卫"
2 | "韩朵朵大","太空电梯","守卫"
3 | "张鹏","太空电梯","守卫"
4 | "MOSS","太空电梯基地","控制"
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/relationship_role_organization.csv:
--------------------------------------------------------------------------------
1 | "周喆直","联合政府","代表中国"
2 | "郝晓晞","联合政府","代表中国"
3 | "马兆","领航员面试组","成员"
4 | "图恒宇","领航员面试组","成员"
5 | "刘培强","领航员面试组","面试"
6 | "MOSS","领航员面试组","面试辅助"
7 | "王磊","救援小队","队长"
8 | "韩子昂","救援小队","队长"
9 | "刘启","救援小队","队员"
10 | "韩朵朵小","救援小队","队员"
11 | "李一一","救援小队","队员"
12 | "Tim","救援小队","队员"
13 | "何连科","救援小队","队员"
14 | "赵志刚","救援小队","队员"
15 | "张小强","救援小队","队员"
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/relationship_role_role.csv:
--------------------------------------------------------------------------------
1 | "韩子昂","韩朵朵大","父女"
2 | "韩子昂","刘培强","女婿"
3 | "韩子昂","韩朵朵小","收养"
4 | "韩朵朵小","刘启","兄妹"
5 | "王磊","韩子昂","队长"
6 | "王磊","刘启","队长"
7 | "王磊","韩朵朵小","队长"
8 | "王磊","李一一","队长"
9 | "王磊","Tim","队长"
10 | "王磊","何连科","队长"
11 | "王磊","赵志刚","队长"
12 | "王磊","张小强","队长"
13 | "刘启","李一一","合作"
14 |
15 | "周喆直","郝晓晞","领导"
16 | "郝晓晞","李一一","母子"
17 | "马兆","图恒宇","师徒"
18 | "马兆","图恒宇","领导"
19 | "马兆","刘培强","观察"
20 | "图恒宇","图丫丫","父女"
21 | "图恒宇","刘培强","观察"
22 | "图恒宇","丫丫母亲","夫妻"
23 | "丫丫母亲","图丫丫","母女"
24 | "刘培强","韩朵朵大","夫妻"
25 | "刘培强","刘启","父子"
26 | "刘培强","赫伯特","战友"
27 | "刘培强","马卡洛夫","战友"
28 | "韩朵朵大","刘启","母子"
29 | "张鹏","刘培强","师徒"
30 | "张鹏","安德烈·戈拉希诺夫","战友"
31 | "安德烈·戈拉希诺夫","马卡洛夫","师徒"
--------------------------------------------------------------------------------
/src/constants/demo_data/WanderingEarth/roles.csv:
--------------------------------------------------------------------------------
1 | 1999,"韩子昂","运输车驾驶员"
2 | 2023,"刘培强","航天员"
3 | 0,"韩朵朵大","航天员"
4 | 2060,"韩朵朵小","初中生"
5 | 2050,"刘启","工程车辆维修员"
6 | 2048,"李一一","技术观察员"
7 | 0,"Tim","中美混血儿"
8 | 0,"何连科","救援队队员"
9 | 2020,"王磊","救援队队长"
10 | 0,"赵志刚","救援队队员"
11 | 0,"张小强","救援队队员"
12 | 0,"MOSS","量子计算机AI,550A、550C、550W"
13 | 0,"反叛者","数字生命计划的信徒,强烈反对移山计划"
14 | 0,"郝晓晞","联合政府中国代表"
15 | 0,"周喆直","联合政府中国代表"
16 | 1997,"马兆","研究员"
17 | 2010,"图恒宇","研究员"
18 | 0,"丫丫母亲",""
19 | 0,"图丫丫",""
20 | 0,"张鹏","航天员"
21 | 0,"赫伯特","航天员"
22 | 0,"安德烈·戈拉希诺夫","航天员"
23 | 0,"马卡洛夫","航天员"
--------------------------------------------------------------------------------
/src/constants/demo_data/movie/edge_directed.csv:
--------------------------------------------------------------------------------
1 | 13,130
2 | 13,1
3 | 13,28
4 | 13,68
5 | 14,130
6 | 14,1
7 | 14,28
8 | 14,68
9 | 100,82
10 | 145,130
11 | 466,457
12 | 490,3915
13 | 491,471
14 | 491,496
15 | 524,517
16 | 549,737
17 | 549,532
18 | 549,564
19 | 607,598
20 | 627,615
21 | 664,641
22 | 664,698
23 | 664,797
24 | 690,681
25 | 724,710
26 | 728,805
27 | 761,750
28 | 776,770
29 | 776,2498
30 | 791,781
31 | 791,2885
32 | 1077,1096
33 | 1107,1097
34 | 1133,1118
35 | 1252,1241
36 | 1254,1241
37 | 1295,1356
38 | 1297,1293
39 | 1379,1366
40 | 1382,1366
41 | 1421,1412
42 | 1557,1550
43 | 1604,1596
44 | 1705,1693
45 | 1766,1768
46 | 1869,1856
47 | 1942,1935
48 | 1943,1935
49 | 2020,2008
50 | 2073,2055
51 | 2243,2232
52 | 2409,2398
53 | 2410,2398
54 | 2439,2422
55 | 2440,2422
56 | 2664,2654
57 | 2779,2767
58 | 3112,3106
59 | 3113,3106
60 | 3267,3252
61 | 3398,3390
62 | 3464,3459
63 | 3630,3624
64 | 3688,3680
65 | 3760,3753
66 |
--------------------------------------------------------------------------------
/src/constants/demo_data/movie/edge_produce.csv:
--------------------------------------------------------------------------------
1 | 13,130
2 | 14,130
3 | 15,1
4 | 15,28
5 | 15,68
6 | 106,82
7 | 108,2498
8 | 109,82
9 | 145,130
10 | 490,3915
11 | 491,496
12 | 491,3915
13 | 549,737
14 | 549,532
15 | 549,564
16 | 607,598
17 | 609,598
18 | 616,615
19 | 664,641
20 | 664,698
21 | 664,797
22 | 665,641
23 | 665,698
24 | 665,797
25 | 665,3390
26 | 666,641
27 | 666,698
28 | 666,797
29 | 666,3390
30 | 683,1693
31 | 725,710
32 | 725,805
33 | 728,710
34 | 728,805
35 | 764,750
36 | 776,2498
37 | 791,2885
38 | 793,781
39 | 1119,1118
40 | 1253,1241
41 | 1295,1356
42 | 1297,1293
43 | 1298,1293
44 | 1365,1356
45 | 1371,2232
46 | 1557,1550
47 | 1705,1693
48 | 1767,1768
49 | 2021,2008
50 | 2068,2055
51 | 2074,2055
52 | 2075,2055
53 | 2243,2232
54 | 2244,2232
55 | 2779,2767
56 | 2895,2885
57 | 3113,3106
58 | 3392,3390
59 | 3464,3459
60 | 3689,3680
61 |
--------------------------------------------------------------------------------
/src/constants/demo_data/movie/edge_write.csv:
--------------------------------------------------------------------------------
1 | 13,130
2 | 13,1
3 | 13,28
4 | 13,68
5 | 14,130
6 | 14,1
7 | 14,28
8 | 14,68
9 | 100,82
10 | 108,82
11 | 108,2498
12 | 145,130
13 | 490,3915
14 | 491,471
15 | 491,496
16 | 492,471
17 | 492,496
18 | 495,457
19 | 524,517
20 | 525,517
21 | 549,737
22 | 549,532
23 | 549,564
24 | 550,532
25 | 550,564
26 | 551,532
27 | 551,564
28 | 608,598
29 | 628,615
30 | 664,641
31 | 664,698
32 | 664,797
33 | 667,641
34 | 667,698
35 | 667,797
36 | 668,641
37 | 668,698
38 | 668,797
39 | 726,710
40 | 727,710
41 | 728,710
42 | 728,805
43 | 762,750
44 | 763,750
45 | 777,770
46 | 778,770
47 | 791,781
48 | 792,781
49 | 907,681
50 | 1094,1096
51 | 1095,1096
52 | 1106,1097
53 | 1108,1097
54 | 1133,1118
55 | 1134,1118
56 | 1252,1241
57 | 1254,1241
58 | 1255,1241
59 | 1295,1356
60 | 1297,1293
61 | 1299,1293
62 | 1365,1356
63 | 1379,1366
64 | 1380,1366
65 | 1381,1366
66 | 1382,1366
67 | 1422,1412
68 | 1423,1412
69 | 1557,1550
70 | 1605,1596
71 | 1606,1596
72 | 1706,1693
73 | 1766,1768
74 | 1870,1856
75 | 1871,1856
76 | 1872,1856
77 | 1873,1856
78 | 1874,1856
79 | 1942,1935
80 | 1943,1935
81 | 1943,2422
82 | 1944,1935
83 | 2022,2008
84 | 2073,2055
85 | 2076,2055
86 | 2243,2232
87 | 2245,2232
88 | 2411,2398
89 | 2412,2398
90 | 2441,2422
91 | 2442,2422
92 | 2443,2422
93 | 2444,2422
94 | 2510,2498
95 | 2664,2654
96 | 2780,2767
97 | 2896,2885
98 | 2897,2885
99 | 3112,3106
100 | 3113,3106
101 | 3268,3252
102 | 3269,3252
103 | 3399,3390
104 | 3464,3459
105 | 3631,3624
106 | 3690,3680
107 | 3761,3753
108 |
--------------------------------------------------------------------------------
/src/constants/demo_data/movie/vertex_genre.csv:
--------------------------------------------------------------------------------
1 | 16,Action
2 | 17,Adventure
3 | 18,Sci-Fi
4 | 19,Thriller
5 | 110,Crime
6 | 129,Documentary
7 | 146,Drama
8 | 526,Western
9 | 610,History
10 | 611,War
11 | 669,Fantasy
12 | 746,Mystery
13 | 779,Comedy
14 | 780,Romance
15 | 1256,Animation
16 | 1257,Musical
17 | 1258,Family
18 | 2246,Horror
19 | 3270,Suspense
20 |
--------------------------------------------------------------------------------
/src/constants/index.ts:
--------------------------------------------------------------------------------
1 | export const APP_ENTRY = 'TU_GRAPH';
2 | export const APP_LINKS = [
3 | {
4 | title: '图项目',
5 | key: APP_ENTRY + '_STUDIO',
6 | path: '/home',
7 | },
8 | {
9 | title: '控制台',
10 | key: APP_ENTRY + '_CONSOLE',
11 | path: '/console',
12 | },
13 | ];
14 |
15 | export const CONSOLE_LINKS = [
16 | {
17 | title: '账户管理',
18 | key: APP_ENTRY + '_AUTH',
19 | path: '/auth',
20 | },
21 | {
22 | title: '数据库信息',
23 | key: APP_ENTRY + '_DATABASE',
24 | path: '/database',
25 | },
26 | ];
27 | export const PROXY_HOST = `http://${window.location.hostname}:7001`;
28 |
29 | export const TUGRAPH_USER_NAME = 'TUGRAPH_USER_NAME';
30 | export const TUGRAPH_PASSWORD = 'TUGRAPH_PASSWORD';
31 | export const TUGRAPH_URI = 'TUGRAPH_URI';
32 | export const TUGRPAH_USER_LOGIN_TIME = 'TUGRPAH_USER_LOGIN_TIME';
33 | export const TUGRAPH_HISTORY_URI = 'TUGRAPH_HISTORY_URI';
34 |
35 |
36 | /* 数据类型 */
37 | export const DATA_TYPE = [
38 | { label: 'INT8', value: 'INT8', default: 0 },
39 | { label: 'INT16', value: 'INT16', default: 0 },
40 | { label: 'INT32', value: 'INT32', default: 0 },
41 | { label: 'INT64', value: 'INT64', default: 0 },
42 | { label: 'DOUBLE', value: 'DOUBLE', default: '0.0' },
43 | { label: 'STRING', value: 'STRING', default: '' },
44 | { label: 'DATE', value: 'DATE', default: '0000-01-01' },
45 | { label: 'DATETIME', value: 'DATETIME', default: '0000-01-01 00:00:00' },
46 | // { label: 'BLOB', value: 'BLOB', default: '' },
47 | { label: 'BOOL', value: 'BOOL', default: false },
48 | ];
49 |
50 | /** style prefix */
51 | export const PUBLIC_PERFIX_CLASS = 'ant-tugraph';
52 |
--------------------------------------------------------------------------------
/src/domains-core/graph-analysis/graph-schema/components/attibutes-filter/index.less:
--------------------------------------------------------------------------------
1 | .attribute-filter-container {
2 | .attribute-filter-container-form {
3 | overflow: auto;
4 | max-height: calc(100vh - 260px);
5 |
6 | .img {
7 | width: 16px;
8 | height: 16px;
9 | margin-right: 8px;
10 | }
11 | }
12 |
13 | .attribute-button-group {
14 | margin-top: 20px;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/domains-core/graph-analysis/graph-schema/components/attributes-filter-form/index.less:
--------------------------------------------------------------------------------
1 | .attributes-filter-form {
2 | .nodes-edges-options {
3 | .img {
4 | width: 16px;
5 | height: 16px;
6 | margin-right: 8px;
7 | }
8 | }
9 |
10 | .formList {
11 | display: flex;
12 | flex-direction: row;
13 | align-items: center;
14 | justify-content: center;
15 | margin-bottom: 8px;
16 | margin-left: -2px;
17 | }
18 |
19 | .conditionIcon {
20 | margin-bottom: 8px;
21 | }
22 |
23 | .conditionIcon::before {
24 | display: inline-block;
25 | margin-right: 4px;
26 | color: #ff4d4f;
27 | font-size: 14px;
28 | font-family: SimSun, sans-serif;
29 | line-height: 1;
30 | content: '*';
31 | }
32 |
33 | :global {
34 | .ant-collapse-extra,
35 | .anticon-delete {
36 | color: #000a1a;
37 | opacity: 0.45;
38 | margin-left: 8px;
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/domains-core/graph-analysis/graph-schema/components/canvas-container/index.less:
--------------------------------------------------------------------------------
1 | .canvas-container {
2 | height: 100%;
3 | display: flex;
4 | flex-direction: column;
5 | position: relative;
6 |
7 | :global {
8 | .ant-spin-nested-loading,
9 | .ant-spin-container {
10 | height: 100%;
11 | display: flex;
12 | flex-direction: column;
13 |
14 | .canvas-center {
15 | flex: 1;
16 | overflow: hidden;
17 | }
18 | }
19 |
20 | .ant-spin-spinning {
21 | max-height: 100% !important;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/domains-core/graph-analysis/graph-schema/components/canvas-sider/index.less:
--------------------------------------------------------------------------------
1 | .canvas-sider {
2 | height: 100%;
3 | transition: all ease 1s;
4 |
5 | &-content {
6 | height: 100%;
7 | overflow-y: auto;
8 | }
9 |
10 | &-resizable {
11 | background-color: #f7f9fc;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/domains-core/graph-analysis/graph-schema/components/canvas-toolbar-segmented/index.less:
--------------------------------------------------------------------------------
1 | .canvas-toolbar {
2 | display: flex;
3 | align-items: center;
4 |
5 | &::before {
6 | content: '';
7 | display: inline-block;
8 | width: 1px;
9 | height: 12px;
10 | background-color: rgba(0, 0, 0, 6%);
11 | margin: 0 10px;
12 | }
13 |
14 | &-title {
15 | color: rgba(152, 152, 157, 100%);
16 | margin-right: 6px;
17 | white-space: nowrap;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/domains-core/graph-analysis/graph-schema/components/canvas-toolbar-segmented/index.tsx:
--------------------------------------------------------------------------------
1 | /**
2 | * 图分析头部工具栏-画布操作
3 | */
4 | import IconFont from '@/components/icon-font';
5 | import { useSchemaTabContainer } from '@/domains-core/graph-analysis/graph-schema/hooks/use-schema-tab-container';
6 | import { Button } from 'antd';
7 | import type { SegmentedProps } from 'antd/lib/segmented';
8 | import { default as React } from 'react';
9 | import styles from './index.less';
10 |
11 | interface CanvasToolbarSegmentedProps extends SegmentedProps {
12 | activeOptions?: string[];
13 | }
14 |
15 | const CanvasToolbarSegmented: React.FC
21 |
22 |