From 8f7c5120c3ae91b1ef7507bddd5a673c2a8b1343 Mon Sep 17 00:00:00 2001 From: Nut He <18328704+hetao92@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:25:44 +0800 Subject: [PATCH 1/3] fix: fix issues --- .../FileConfigSetting/index.module.less | 5 +- app/components/FileConfigSetting/index.tsx | 27 +- app/components/GQLCodeMirror/index.tsx | 18 +- app/config/locale/en-US.ts | 990 +++++++++--------- app/config/locale/zh-CN.ts | 975 ++++++++--------- .../SchemaConfig/FileMapping/index.tsx | 110 +- .../Import/TaskCreate/SchemaConfig/index.tsx | 59 +- .../Edit/CommonEdit/PropertiesForm.tsx | 92 +- .../SchemaConfig/Edit/CommonEdit/index.tsx | 88 +- package-lock.json | 18 +- package.json | 2 +- vite.config.ts | 1 + 12 files changed, 1221 insertions(+), 1164 deletions(-) diff --git a/app/components/FileConfigSetting/index.module.less b/app/components/FileConfigSetting/index.module.less index d09c6712..f24b91a8 100644 --- a/app/components/FileConfigSetting/index.module.less +++ b/app/components/FileConfigSetting/index.module.less @@ -61,7 +61,10 @@ width: 210px; background: @white; box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25); - padding: 11px 15px; + padding: 0; + .configForm { + padding: 11px 15px; + } :global(.ant-dropdown-menu) { box-shadow: none; } diff --git a/app/components/FileConfigSetting/index.tsx b/app/components/FileConfigSetting/index.tsx index 5f08723b..aeb6c9a0 100644 --- a/app/components/FileConfigSetting/index.tsx +++ b/app/components/FileConfigSetting/index.tsx @@ -2,7 +2,7 @@ import Icon from '@app/components/Icon'; import { useI18n } from '@vesoft-inc/i18n'; import { Button, Input, Modal, Table, Popconfirm, Dropdown, MenuProps } from 'antd'; import { v4 as uuidv4 } from 'uuid'; -import { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; import { usePapaParse } from 'react-papaparse'; import cls from 'classnames'; import { StudioFile } from '@app/interfaces/import'; @@ -22,7 +22,7 @@ const DelimiterConfigModal = (props: { onConfirm: (string) => void }) => { const { intl } = useI18n(); const [value, setValue] = useState(''); return ( -
+
e.stopPropagation()}> {intl.get('common.value')} void }) => { const FileConfigSetting = (props: IProps) => { const { onConfirm, onCancel, preUploadList, duplicateCheckList } = props; const { intl } = useI18n(); + const ref = useRef(null); const state = useLocalObservable( () => ({ data: [], @@ -46,17 +47,25 @@ const FileConfigSetting = (props: IProps) => { previewContent: [], loading: false, uploading: false, + modalOpen: false, setState: (obj) => Object.assign(state, obj), }), { data: observable.ref, activeItem: observable.ref }, ); const { readRemoteFile, readString } = usePapaParse(); + const closeDelimiterConfigModal = useCallback((e: MouseEvent) => { + state.modalOpen && setState({ modalOpen: false }); + }, []); useEffect(() => { const { setState } = state; setState({ data: preUploadList, activeItem: preUploadList[0], }); + window.document.addEventListener('click', closeDelimiterConfigModal); + return () => { + window.document.removeEventListener('click', closeDelimiterConfigModal); + }; }, []); useEffect(() => { state.activeItem && readFile(); @@ -135,6 +144,7 @@ const FileConfigSetting = (props: IProps) => { const { data, setState } = state; setState({ data: data.map((item) => ((item.delimiter = value), item)), + modalOpen: false, }); readFile(); }, []); @@ -182,7 +192,7 @@ const FileConfigSetting = (props: IProps) => { !uploading && onCancel(); }, []); - const { uploading, data, activeItem, previewContent, loading, setState } = state; + const { modalOpen, uploading, data, activeItem, previewContent, loading, setState } = state; const parseColumns = previewContent.length ? previewContent[0].map((header, index) => { const textIndex = index; @@ -202,6 +212,10 @@ const FileConfigSetting = (props: IProps) => { label: , }, ]; + const openModal = useCallback((e) => { + e.stopPropagation(); + setState({ modalOpen: true }); + }, []); const columns = [ { title: intl.get('import.fileName'), @@ -229,12 +243,13 @@ const FileConfigSetting = (props: IProps) => { <> {intl.get('import.delimiter')} - + ), @@ -264,7 +279,7 @@ const FileConfigSetting = (props: IProps) => { }, ]; return ( -
+
{ ...props.option, }; const { intl } = useI18n(); - return ( - - - - - - ); + const items: CollapseProps['items'] = [ + { + key: 'ngql', + label: intl.get('common.exportNGQL'), + children: , + }, + ]; + return ; }; export default GQLCodeMirror; diff --git a/app/config/locale/en-US.ts b/app/config/locale/en-US.ts index 33bc353f..e399fd4a 100644 --- a/app/config/locale/en-US.ts +++ b/app/config/locale/en-US.ts @@ -1,497 +1,523 @@ export default { - 'common': { - 'requestError': 'Request Error', - 'currentSpace': 'Current Graph Space', - 'seeTheHistory': 'History', - 'table': 'Table', - 'log': 'Log', - 'sorryNGQLCannotBeEmpty': 'nGQL cannot be empty', - 'disablesUseToSwitchSpace': 'DO NOT switch between graph spaces with nGQL statements in the console.', - 'NGQLHistoryList': 'nGQL History', - 'empty': 'Clear', - 'run': 'Run', - 'console': 'Console', - 'ok': 'OK', - 'success': 'Success', - 'fail': 'Fail', - 'cancel': 'Cancel', - 'confirm': 'Confirm', - 'import': 'Import', - 'ask': 'Are you sure to proceed?', - 'openInExplore': 'Open In Explorer', - 'schema': 'Schema', - 'create': 'Create', - 'name': 'Name', - 'operation': 'Operations', - 'delete': 'Delete', - 'optional': 'Optional', - 'exportNGQL': 'View nGQL', - 'relatedProperties': 'Related Properties', - 'type': 'Type', - 'edit': 'Edit', - 'deleteSuccess': 'Deleted successfully', - 'propertyName': 'Property Name', - 'dataType': 'Data Type', - 'allowNull': 'Allow Null', - 'defaults': 'Defaults', - 'addProperty': 'Add Property', - 'updateSuccess': 'Updated Successfully', - 'add': 'Add', - 'tag': 'Tag', - 'edge': 'Edge Type', - 'index': 'Index', - 'yes': 'Yes', - 'no': 'No', - 'graph': 'Graph', - 'color': 'Color', - 'total': 'Total', - 'namePlaceholder': 'Please enter the {name} name', - 'comment': 'Comment', - 'space': 'Space', - 'version': 'Version', - 'statistics': 'Statistics', - 'duplicate': 'Copy', - 'copy': 'Copy', - 'copySuccess': 'Copied successfully', - 'sketch': 'Schema drafting', - 'viewSchema': 'View Schema', - 'beta': 'Beta', - 'danglingEdge': 'Dangling edge', - 'columnName': 'Column name', - 'src': 'Source', - 'dst': 'Destination', - 'value': 'Value', - 'continue': 'Continue', - 'update': 'Update', - 'prev': 'Previous', - 'createTime': 'Create Time', - 'rerun': 'Rerun' + common: { + requestError: 'Request Error', + currentSpace: 'Current Graph Space', + seeTheHistory: 'History', + table: 'Table', + log: 'Log', + sorryNGQLCannotBeEmpty: 'nGQL cannot be empty', + disablesUseToSwitchSpace: 'DO NOT switch between graph spaces with nGQL statements in the console.', + NGQLHistoryList: 'nGQL History', + empty: 'Clear', + run: 'Run', + console: 'Console', + ok: 'OK', + success: 'Success', + fail: 'Fail', + cancel: 'Cancel', + confirm: 'Confirm', + import: 'Import', + ask: 'Are you sure to proceed?', + openInExplore: 'Open In Explorer', + schema: 'Schema', + create: 'Create', + name: 'Name', + operation: 'Operations', + delete: 'Delete', + optional: 'Optional', + exportNGQL: 'View nGQL', + relatedProperties: 'Related Properties', + type: 'Type', + edit: 'Edit', + deleteSuccess: 'Deleted successfully', + propertyName: 'Property Name', + dataType: 'Data Type', + allowNull: 'Allow Null', + defaults: 'Defaults', + addProperty: 'Add Property', + updateSuccess: 'Updated Successfully', + add: 'Add', + tag: 'Tag', + edge: 'Edge Type', + index: 'Index', + yes: 'Yes', + no: 'No', + graph: 'Graph', + color: 'Color', + total: 'Total', + namePlaceholder: 'Please enter the {name} name', + comment: 'Comment', + space: 'Space', + version: 'Version', + statistics: 'Statistics', + duplicate: 'Copy', + copy: 'Copy', + copySuccess: 'Copied successfully', + sketch: 'Schema drafting', + viewSchema: 'View Schema', + beta: 'Beta', + danglingEdge: 'Dangling edge', + columnName: 'Column name', + src: 'Source', + dst: 'Destination', + value: 'Value', + continue: 'Continue', + update: 'Update', + prev: 'Previous', + createTime: 'Create Time', + rerun: 'Rerun', }, - 'doc': { - 'welcome': 'Welcome to', - 'functionIntro': 'Functions introduction', - 'schemaIntro': `You can use the Schema page to operate graph spaces in ${window.gConfig.databaseName}`, - 'importIntro': `You can use the Import page to batch import vertex and edge data into ${window.gConfig.databaseName} for graph exploration and data analysis.`, - 'consoleIntro': 'When data is imported, you can use the Console page to query graph data.', - 'learningDoc': 'Learning Docs', - 'getStarted': `Getting started with ${window.gConfig.databaseName} Studio`, - 'getStartedTip': `What's ${window.gConfig.databaseName} Studio`, - 'useGuide': `Documents of ${window.gConfig.databaseName} Studio`, - 'useGuideTip': `Learn how to use ${window.gConfig.databaseName} Studio`, - 'ngqlIntro': `${window.gConfig.databaseName} Query Language (nGQL)`, - 'ngqlIntroTip': `nGQL is a declarative graph query language for ${window.gConfig.databaseName}. It allows expressive and efficient graph patterns. `, - 'start': 'Get Started', - 'sketchIntro': 'Schema drafting', - 'basketballplayerIntro': 'A typical schema composed of two vertex types (player and team) and two edge types (serve and follow), widely referenced by documentation.', - 'snsIntro': 'Social Network Graph demo, new friend recommendation, feed generation, etc.', - 'movieIntro': 'Movie recommendation with CBF, ItemCF and UserCF in Graph.', - 'datalineageIntro': `Metadata governance on ${window.gConfig.databaseName}, data lineage query, data dependency analysis, etc.`, - 'idMappingIntro': 'ID Mapping, Identity Resolution for a user system in Graph', - 'fifa2022Intro': '2022 Football World Game knowledge graph, try predict the winner, assuming we don\'t know the result.', - 'shareholdingIntro': 'Shareholding graph, query the shareholding relationship of a company, and the relationship between the company and the shareholder.', - 'openstackIntro': 'A demo of AI Ops with Graph, taking OpenStack as an example, where all resources were included in one graph.', - 'fraudDetectionIntro': 'Fraud detection with Graph, taking loan application as an example' + doc: { + welcome: 'Welcome to', + functionIntro: 'Functions introduction', + schemaIntro: `You can use the Schema page to operate graph spaces in ${window.gConfig.databaseName}`, + importIntro: `You can use the Import page to batch import vertex and edge data into ${window.gConfig.databaseName} for graph exploration and data analysis.`, + consoleIntro: 'When data is imported, you can use the Console page to query graph data.', + learningDoc: 'Learning Docs', + getStarted: `Getting started with ${window.gConfig.databaseName} Studio`, + getStartedTip: `What's ${window.gConfig.databaseName} Studio`, + useGuide: `Documents of ${window.gConfig.databaseName} Studio`, + useGuideTip: `Learn how to use ${window.gConfig.databaseName} Studio`, + ngqlIntro: `${window.gConfig.databaseName} Query Language (nGQL)`, + ngqlIntroTip: `nGQL is a declarative graph query language for ${window.gConfig.databaseName}. It allows expressive and efficient graph patterns. `, + start: 'Get Started', + sketchIntro: + 'You can design your schemas on the canvas to visually display the relationships between vertices and edges.', + basketballplayerIntro: + 'A typical schema composed of two vertex types (player and team) and two edge types (serve and follow), widely referenced by documentation.', + snsIntro: 'Social Network Graph demo, new friend recommendation, feed generation, etc.', + movieIntro: 'Movie recommendation with CBF, ItemCF and UserCF in Graph.', + datalineageIntro: `Metadata governance on ${window.gConfig.databaseName}, data lineage query, data dependency analysis, etc.`, + idMappingIntro: 'ID Mapping, Identity Resolution for a user system in Graph', + fifa2022Intro: + "2022 Football World Game knowledge graph, try predict the winner, assuming we don't know the result.", + shareholdingIntro: + 'Shareholding graph, query the shareholding relationship of a company, and the relationship between the company and the shareholder.', + openstackIntro: + 'A demo of AI Ops with Graph, taking OpenStack as an example, where all resources were included in one graph.', + fraudDetectionIntro: 'Fraud detection with Graph, taking loan application as an example', }, - 'warning': { - 'connectError': 'Connection refused, please configure server again', - 'crashPage': 'Oops, something went wrong', - 'crashPageTip': 'Service crashed, please contact administrator', - 'refreshPage': 'Refresh page', - 'contactStaff': 'Contact Us', - 'errorMessage': 'Error Message' + warning: { + connectError: 'Connection refused, please configure server again', + crashPage: 'Oops, something went wrong', + crashPageTip: 'Service crashed, please contact administrator', + refreshPage: 'Refresh page', + contactStaff: 'Contact Us', + errorMessage: 'Error Message', }, - 'configServer': { - 'connect': 'Connect', - 'host': 'Graphd IP address', - 'port': 'Port', - 'username': 'Username', - 'password': 'Password', - 'success': 'succeed', - 'clear': 'Log out', - 'title': `Connect to ${window.gConfig.databaseName}`, - 'tip': 'Don\'t know the address? Docs->' + configServer: { + connect: 'Connect', + host: 'Graphd IP address', + port: 'Port', + username: 'Username', + password: 'Password', + success: 'succeed', + clear: 'Log out', + title: `Connect to ${window.gConfig.databaseName}`, + tip: "Don't know the address? Docs->", }, - 'formRules': { - 'hostRequired': 'Host Required', - 'portRequired': 'Port Required', - 'usernameRequired': 'Username Required', - 'passwordRequired': 'Password Required', - 'positiveIntegerRequired': 'Please enter a non-negative integer', - 'nameValidate': 'The name must start with a letter, and it only supports English letters, numbers and underscores', - 'nameRequired': 'Please enter the name', - 'numberRequired': 'Please enter a positive integer', - 'replicaLimit': 'Replica factor must not exceed the number of your current online machines({number})', - 'ttlRequired': 'Please select the corresponding property, and the data type of the property must be integer or timestamp', - 'ttlDurationRequired': 'Please enter the time (in seconds)', - 'dataTypeRequired': 'Please select the data type', - 'edgeTypeRequired': 'Please select the edge type', - 'srcIdRequired': 'Please select the source VID', - 'dstIdRequired': 'Please select the destination VID', - 'vidRequired': 'Please select the VID', - 'vidTypeRequired': 'Vid type is required', - 'fixStringLengthRequired': 'fix string length limit is required', - 'spaceRequired': 'Space is required', - 'maxBytes': 'It cannot exceed {max} bytes', - 'ttlLimit': 'The data type of the property must be int or timestamp', - 'associateNameRequired': 'Associated {type} name is required', - 'fileRequired': 'Please select the file', - 'formHostRequired': 'Host Required', - 'formPortRequired': 'Port Required', - 'regionRequired': 'Region Required', - 'endpointRequired': 'Endpoint Required', - 'bucketRequired': 'Bucket Required', - 'accessKeyIdRequired': 'Access Key ID Required', - 'accessKeySecretRequired': 'Access Key Secret Required', - 'platformRequired': 'Platform Required' + formRules: { + hostRequired: 'Host Required', + portRequired: 'Port Required', + usernameRequired: 'Username Required', + passwordRequired: 'Password Required', + positiveIntegerRequired: 'Please enter a non-negative integer', + nameValidate: 'The name must start with a letter, and it only supports English letters, numbers and underscores', + nameRequired: 'Please enter the name', + numberRequired: 'Please enter a positive integer', + replicaLimit: 'Replica factor must not exceed the number of your current online machines({number})', + ttlRequired: + 'Please select the corresponding property, and the data type of the property must be integer or timestamp', + ttlDurationRequired: 'Please enter the time (in seconds)', + dataTypeRequired: 'Please select the data type', + edgeTypeRequired: 'Please select the edge type', + srcIdRequired: 'Please select the source VID', + dstIdRequired: 'Please select the destination VID', + vidRequired: 'Please select the VID', + vidTypeRequired: 'Vid type is required', + fixStringLengthRequired: 'fix string length limit is required', + spaceRequired: 'Space is required', + maxBytes: 'It cannot exceed {max} bytes', + ttlLimit: 'The data type of the property must be int or timestamp', + associateNameRequired: 'Associated {type} name is required', + fileRequired: 'Please select the file', + formHostRequired: 'Host Required', + formPortRequired: 'Port Required', + regionRequired: 'Region Required', + endpointRequired: 'Endpoint Required', + bucketRequired: 'Bucket Required', + accessKeyIdRequired: 'Access Key ID Required', + accessKeySecretRequired: 'Access Key Secret Required', + platformRequired: 'Platform Required', }, - 'console': { - 'execTime': 'Execution Time', - 'exportVertex': 'Please choose the column representing vertex IDs from the table', - 'exportEdge': 'Please choose the columns representing source vertex ID, destination vertex ID, and rank of an edge', - 'deleteHistory': 'Clear History', - 'cypherParam': 'Cypher Parameter', - 'favorites': 'Favorites', - 'addToFavorites': 'Add to favorites', - 'unfavorite': 'Unfavorite', - 'clearFavorites': 'Clear Favorites', - 'graphviz': 'Graphviz', - 'selectSpace': 'Please select Graph Space' + console: { + execTime: 'Execution Time', + exportVertex: 'Please choose the column representing vertex IDs from the table', + exportEdge: 'Please choose the columns representing source vertex ID, destination vertex ID, and rank of an edge', + deleteHistory: 'Clear History', + cypherParam: 'Cypher Parameter', + favorites: 'Favorites', + addToFavorites: 'Add to favorites', + unfavorite: 'Unfavorite', + clearFavorites: 'Clear Favorites', + graphviz: 'Graphviz', + selectSpace: 'Please select Graph Space', }, - 'explore': { - 'vertexStyle': 'Vertex Color', - 'notExist': 'Not exist', - 'expandItem': 'Expand', - 'collapseItem': 'Collapse' + explore: { + vertexStyle: 'Vertex Color', + notExist: 'Not exist', + expandItem: 'Expand', + collapseItem: 'Collapse', }, - 'import': { - 'uploadFile': 'Upload Files', - 'dataSourceManagement': 'Data Source Management', - 'importData': 'Import Data', - 'createTask': 'New Import', - 'uploadTemp': 'Import Template', - 'downloadConfig': 'Download Config', - 'downloadLog': 'Download Log', - 'viewLogs': 'View Logs', - 'details': 'Details', - 'task': 'import task', - 'taskList': 'Task List', - 'taskName': 'Task Name', - 'tag': 'Map Tags', - 'edge': 'Map Edges', - 'runImport': 'Import', - 'fileName': 'File Name', - 'withHeader': 'Header', - 'fileSize': 'Size', - 'fileTitle': 'File list', - 'bindDatasource': 'Add source file', - 'endImport': 'Stop Import', - 'prop': 'Prop', - 'mapping': 'CSV Index', - 'edgeText': 'Edge', - 'choose': 'Mapping', - 'ignore': 'Ignore', - 'vertexText': 'Vertex', - 'indexNotEmpty': 'column index can\'t be null.', - 'enterPassword': `Please enter the ${window.gConfig.databaseName} account password to continue`, - 'isEmpty': 'is empty', - 'startImporting': 'Start importing', - 'stopImportingSuccess': 'Stop import successfully.', - 'deleteSuccess': 'Delete task successfully', - 'batchSize': 'Batch Size', - 'importCompleted': 'Import completed', - 'importStopped': 'Import stopped', - 'importFailed': 'Failed', - 'importRunning': 'Running', - 'importPending': 'Pending', - 'notImported': '{total} records not imported', - 'selectFile': 'Select file', - 'addTag': 'Add Tag', - 'addEdge': 'Add Edge Type', - 'selectTag': 'Select Tag', - 'selectEdge': 'Select Edge Type', - 'config': 'Task Config', - 'parseFailed': 'File parsing failed', - 'uploadTemplate': 'Drag & drop the YAML configuration file to this area', - 'uploadBoxTip': 'The YAML configuration file is used to describe information about the files to be imported, the database server, and more. ', - 'fileUploadRequired': '1. Please make sure all CSV data files are uploaded before import the YAML file. If not, please go to ', - 'fileUploadRequired2': ' first.', - 'exampleDownload': '2. An example for the configuration file: ', - 'uploadTemplateTip': '3. Configure the Yaml file: please keep only the file name (retain the file extension) for all file paths (path, logPath) in the template, e.g. logPath: config.csv', - 'reUpload': 'Re-upload', - 'fileNotExist': '{name} file does not exist!', - 'importYaml': 'Import the YAML file', - 'templateMatchError': 'The user in the configuration does not match the current login account', - 'uploadSuccessfully': 'Upload files successfully.', - 'fileSizeLimit': '{name} is too large and exceeds the upload limit({size}), please upload the file to the data/upload directory under the installation directory via scp', - 'noHttp': 'The address in the configuration file does not support http protocol, please remove http(s)://', - 'addressMatch': 'The address in the configuration file must contain the Graph address of current login connection. Separate multiple addresses with ', - 'dataSourceFile': 'Data source file', - 'vidColumn': 'VID column', - 'srcVidColumn': 'Source VID column', - 'dstVidColumn': 'Destination VID column', - 'vidFunction': 'VID function', - 'vidPrefix': 'VID prefix', - 'vidSuffix': 'VID suffix', - 'concurrencyTip': `Number of ${window.gConfig.databaseName} client concurrency.`, - 'batchSizeTip': 'The number of statements inserting data in a batch.', - 'retryTip': 'Retry times of nGQL statement execution failures.', - 'vidFunctionTip': 'Function to generate VID. Currently only hash functions are supported.', - 'vidPrefixTip': 'prefix added to the original vid.', - 'vidSuffixTip': 'suffix added to the original vid.', - 'selectCsvColumn': 'Select CSV Index', - 'graphAddress': 'Graph service address', - 'concurrency': 'Concurrency', - 'retry': 'Retry', - 'graphAddressTip': 'The following Graph host will be used for data import', - 'currentHost': 'Current connected host', - 'expandMoreConfig': 'Expand more configurations', - 'pickUpConfig': 'Pick up more configurations', - 'tagRequired': 'Please select tag', - 'edgeRequired': 'Please select edge type', - 'tagFileRequired': 'Please add tag source file', - 'edgeFileRequired': 'Please add edge source file', - 'tagFileSelect': 'Please select tag source file', - 'edgeFileSelect': 'Please select edge source file', - 'configDisplay': 'These data files will be loaded', - 'loadToTag': 'Load {file} to tag {name}', - 'loadToEdge': 'Load {file} to edge type {name}', - 'importConfirm': 'Import task confirm', - 'delimiter': 'Delimiter', - 'previewFiles': 'Preview file list', - 'sampleData': 'Sample data', - 'hasHeader': 'Has header', - 'noHeader': 'No header', - 'enterDelimiter': 'Enter delimiter', - 'applicateToAll': 'Apply to all files', - 'deleteFiles': 'Delete select files', - 'fileRepeatTip': 'These files are already exists, continuing to upload will overwrite the original file', - 'filePreview': 'Preview file {name}', - 'uploadConfirm': 'Upload Confirm', - 'localFiles': 'Local files', - 's3': 'Object Storage', - 'sftp': 'SFTP', - 'newDataSource': 'New Data Source', - 'editDataSource': 'Edit Data Source', - 'deleteDataSource': 'Delete Data Source', - 'datasourceList': '{type} list', - 'ipAddress': 'IP Address:Port', - 'bucketName': 'Bucket Name', - 'accessKeyId': 'AccessKeyId', - 'region': 'Region', - 'createTime': 'Add Date', - 'endpoint': 'Endpoint', - 'accessKeySecret': 'AccessKeySecret', - 'dataSourceType': 'Data Source Type', - 'selectPlatform': 'Select platform', - 'enterAddress': 'Enter endpoint', - 'enterRegion': 'Enter region', - 'serverAddress': 'Server Address', - 'port': 'Port', - 'newDataSourceTip': 'Please add the data source for the first time', - 'addNewImport': 'Add New Import', - 'addNewImportTip': 'After adding the data source, create an import task to import the data into the database', - 'start': 'Start', - 's3Tip': 'Only support cloud services that compatible with the Amazon S3 interface', - 'readerConcurrency': 'Reader concurrency', - 'readerConcurrencyTip': 'The number of concurrent readers that read data from the data source', - 'importerConcurrency': 'Importer concurrency', - 'importerConcurrencyTip': `The number of concurrent importers that import data into ${window.gConfig.databaseName}`, - 'selectDatasourceFile': 'Select Data Source file', - 'datasourceType': 'Data Source Type', - 'filePath': 'File Path', - 'directory': 'Directory', - 'preview': 'Preview', - 'customize': 'Customize', - 's3Platform': 'S3 compatible Service Provider', - 'account': 'Account', - 'endpointTip': 'Please use an endpoint without a bucket name in the domain name, e.g. {sample}', - 'awsTip': 'https://s3.us-east-2.amazonaws.com', - 'ossTip': 'https://oss-cn-hangzhou.aliyuncs.com', - 'cosTip': 'https://cos.ap-shanghai.myqcloud.com', - 'customizeTip': 'http://127.0.0.1:9000', - 'addressRequired': 'Please enter the import address in the configuration file', - 'usernameRequired': 'Please enter the username in the configuration file', - 'passwordRequired': 'Please enter the password in the configuration file', - 's3AccessKeyRequired': 'Please enter the s3 accessKeyID in the configuration file', - 's3SecretKeyRequired': 'Please enter the s3 accessKeySecret in the configuration file', - 'sftpUsernameRequired': 'Please enter the sftp username in the configuration file', - 'sftpPasswordRequired': 'Please enter the sftp password in the configuration file', - 'ossAccessKeyRequired': 'Please enter the oss accessKeyID in the configuration file', - 'ossSecretKeyRequired': 'Please enter the oss accessKeySecret in the configuration file', - 'draft': 'Draft', - 'saveDraft': 'Save Draft', - 'modifyTime': 'Modify time', - 'taskNameRequired': 'Please enter the task name and select space', - 'fileMissing': '{files} does not exist, please re-upload the file', - 'datasourceMissing': 'The related data source of {files} is not found, please re-add the related datasource and reconfigure the task', - 'templateRerunTip': 'The task generated by template import does not support editing, please directly modify the template file and import it.', - 'rerunError': 'The task configuration record cannot be found, and the task cannot be rerun', - 'editTaskError': 'Cannot find task configuration record, cannot continue editing' + import: { + uploadFile: 'Upload Files', + dataSourceManagement: 'Data Source Management', + importData: 'Import Data', + createTask: 'New Import', + uploadTemp: 'Import Template', + downloadConfig: 'Download Config', + downloadLog: 'Download Log', + viewLogs: 'View Logs', + details: 'Details', + task: 'import task', + taskList: 'Task List', + taskName: 'Task Name', + tag: 'Map Tags', + edge: 'Map Edges', + runImport: 'Import', + fileName: 'File Name', + withHeader: 'Header', + fileSize: 'Size', + fileTitle: 'File list', + bindDatasource: 'Add source file', + endImport: 'Stop Import', + prop: 'Prop', + mapping: 'CSV Index', + edgeText: 'Edge', + choose: 'Mapping', + ignore: 'Ignore', + vertexText: 'Vertex', + indexNotEmpty: "column index can't be null.", + enterPassword: `Please enter the ${window.gConfig.databaseName} account password to continue`, + isEmpty: 'is empty', + startImporting: 'Start importing', + stopImportingSuccess: 'Stop import successfully.', + deleteSuccess: 'Delete task successfully', + batchSize: 'Batch Size', + importCompleted: 'Import completed', + importStopped: 'Import stopped', + importFailed: 'Failed', + importRunning: 'Running', + importPending: 'Pending', + notImported: '{total} records not imported', + selectFile: 'Select file', + addTag: 'Add Tag', + addEdge: 'Add Edge Type', + selectTag: 'Select Tag', + selectEdge: 'Select Edge Type', + config: 'Task Config', + parseFailed: 'File parsing failed', + uploadTemplate: 'Drag & drop the YAML configuration file to this area', + uploadBoxTip: + 'The YAML configuration file is used to describe information about the files to be imported, the database server, and more. ', + fileUploadRequired: + '1. Please make sure all CSV data files are uploaded before import the YAML file. If not, please go to ', + fileUploadRequired2: ' first.', + exampleDownload: '2. An example for the configuration file: ', + uploadTemplateTip: + '3. Configure the Yaml file: please keep only the file name (retain the file extension) for all file paths (path, logPath) in the template, e.g. logPath: config.csv', + reUpload: 'Re-upload', + fileNotExist: '{name} file does not exist!', + importYaml: 'Import the YAML file', + templateMatchError: 'The user in the configuration does not match the current login account', + uploadSuccessfully: 'Upload files successfully.', + fileSizeLimit: + '{name} is too large and exceeds the upload limit({size}), please upload the file to the data/upload directory under the installation directory via scp', + noHttp: 'The address in the configuration file does not support http protocol, please remove http(s)://', + addressMatch: + 'The address in the configuration file must contain the Graph address of current login connection. Separate multiple addresses with ', + dataSourceFile: 'Data source file', + vidColumn: 'VID column', + srcVidColumn: 'Source VID column', + dstVidColumn: 'Destination VID column', + vidFunction: 'VID function', + vidPrefix: 'VID prefix', + vidSuffix: 'VID suffix', + concurrencyTip: `Number of ${window.gConfig.databaseName} client concurrency.`, + batchSizeTip: 'The number of statements inserting data in a batch.', + retryTip: 'Retry times of nGQL statement execution failures.', + vidFunctionTip: 'Function to generate VID. Currently only hash functions are supported.', + vidPrefixTip: 'prefix added to the original vid.', + vidSuffixTip: 'suffix added to the original vid.', + selectCsvColumn: 'Select CSV Index', + graphAddress: 'Graph service address', + concurrency: 'Concurrency', + retry: 'Retry', + graphAddressTip: 'The following Graph host will be used for data import', + currentHost: 'Current connected host', + expandMoreConfig: 'Expand more configurations', + pickUpConfig: 'Pick up more configurations', + tagRequired: 'Please select tag', + edgeRequired: 'Please select edge type', + tagFileRequired: 'Please add tag source file', + edgeFileRequired: 'Please add edge source file', + tagFileSelect: 'Please select tag source file', + edgeFileSelect: 'Please select edge source file', + configDisplay: 'These data files will be loaded', + loadToTag: 'Load {file} to tag {name}', + loadToEdge: 'Load {file} to edge type {name}', + importConfirm: 'Import task confirm', + delimiter: 'Delimiter', + previewFiles: 'Preview file list', + sampleData: 'Sample data', + hasHeader: 'Has header', + noHeader: 'No header', + enterDelimiter: 'Enter delimiter', + applicateToAll: 'Apply to all files', + deleteFiles: 'Delete select files', + fileRepeatTip: 'These files are already exists, continuing to upload will overwrite the original file', + filePreview: 'Preview file {name}', + uploadConfirm: 'Upload Confirm', + localFiles: 'Local files', + s3: 'Object Storage', + sftp: 'SFTP', + newDataSource: 'New Data Source', + editDataSource: 'Edit Data Source', + deleteDataSource: 'Delete Data Source', + datasourceList: '{type} list', + ipAddress: 'IP Address:Port', + bucketName: 'Bucket Name', + accessKeyId: 'AccessKeyId', + region: 'Region', + createTime: 'Add Date', + endpoint: 'Endpoint', + accessKeySecret: 'AccessKeySecret', + dataSourceType: 'Data Source Type', + selectPlatform: 'Select platform', + enterAddress: 'Enter endpoint', + enterRegion: 'Enter region', + serverAddress: 'Server Address', + port: 'Port', + newDataSourceTip: 'Please add the data source for the first time', + addNewImport: 'Add New Import', + addNewImportTip: 'After adding the data source, create an import task to import the data into the database', + start: 'Start', + s3Tip: 'Only support cloud services that compatible with the Amazon S3 interface', + readerConcurrency: 'Reader concurrency', + readerConcurrencyTip: 'The number of concurrent readers that read data from the data source', + importerConcurrency: 'Importer concurrency', + importerConcurrencyTip: `The number of concurrent importers that import data into ${window.gConfig.databaseName}`, + selectDatasourceFile: 'Select Data Source file', + datasourceType: 'Data Source Type', + filePath: 'File Path', + directory: 'Directory', + preview: 'Preview', + customize: 'Customize', + s3Platform: 'S3 compatible Service Provider', + account: 'Account', + endpointTip: 'Please use an endpoint without a bucket name in the domain name, e.g. {sample}', + awsTip: 'https://s3.us-east-2.amazonaws.com', + ossTip: 'https://oss-cn-hangzhou.aliyuncs.com', + cosTip: 'https://cos.ap-shanghai.myqcloud.com', + customizeTip: 'http://127.0.0.1:9000', + addressRequired: 'Please enter the import address in the configuration file', + usernameRequired: 'Please enter the username in the configuration file', + passwordRequired: 'Please enter the password in the configuration file', + s3AccessKeyRequired: 'Please enter the s3 accessKeyID in the configuration file', + s3SecretKeyRequired: 'Please enter the s3 accessKeySecret in the configuration file', + sftpUsernameRequired: 'Please enter the sftp username in the configuration file', + sftpPasswordRequired: 'Please enter the sftp password in the configuration file', + ossAccessKeyRequired: 'Please enter the oss accessKeyID in the configuration file', + ossSecretKeyRequired: 'Please enter the oss accessKeySecret in the configuration file', + draft: 'Draft', + saveDraft: 'Save Draft', + modifyTime: 'Modify time', + taskNameRequired: 'Please enter the task name and select space', + fileMissing: '{files} does not exist, please re-upload the file', + datasourceMissing: + 'The related data source of {files} is not found, please re-add the related datasource and reconfigure the task', + templateRerunTip: + 'The task generated by template import does not support editing, please directly modify the template file and import it.', + rerunError: 'The task configuration record cannot be found, and the task cannot be rerun', + editTaskError: 'Cannot find task configuration record, cannot continue editing', }, - 'schema': { - 'spaceList': 'Graph Space List', - 'useSpaceErrTip': 'Space not found. Trying to use a newly created graph space may fail because the creation is implemented asynchronously. To make sure the follow-up operations work as expected, Wait for two heartbeat cycles, i.e., 20 seconds.', - 'createSuccess': 'Create Successfully', - 'defineFields': 'Define Properties', - 'uniqProperty': 'Property name cannot be duplicated', - 'cancelOperation': 'Do you want to close this panel', - 'cancelPropmt': 'If you close the panel, the configuration will be deleted automatically. Are you sure that you want to close the panel?', - 'fieldDisabled': 'A TTL configuration is set for this property, so it cannot be edited. If you want to edit this property, delete the TTL configuration.', - 'indexExist': 'An index exists, so TTL configuration is not permitted. A tag or edge type cannot have both an index and TTL configuration.', - 'indexType': 'Index Type', - 'indexName': 'Index Name', - 'indexFields': 'Indexed Properties', - 'associateName': 'Associated {type} name', - 'dragSorting': '(Drag to Sort)', - 'selectFields': 'Please choose a property', - 'indexedLength': 'Please enter indexed length', - 'indexedLengthDescription': 'Set the indexed string length. If you are indexing fixed strings, you must not set this option.', - 'indexedLengthRequired': 'Indexed length must be a positive integer', - 'rebuild': 'Rebuild', - 'createSpace': 'Create Space', - 'No': 'No', - 'spaceName': 'Name', - 'partitionNumber': 'Partition Number', - 'replicaFactor': 'Replica Factor', - 'charset': 'Charset', - 'collate': 'Collate', - 'vidType': 'Vid Type', - 'group': 'Group', - 'comment': 'Comment', - 'operations': 'Operations', - 'spaceNameEnter': 'Please enter the space name', - 'propertyCount': 'Property Num', - 'configTypeList': '{type} List', - 'configTypeAction': '{action} {type}', - 'timestampFormat': 'Supported data inserting methods:
1. call function now()
2. call function timestamp(), for example: timestamp(\'2021-07-05T06:18:43.984000\')
3. Input the timestamp directly, namely the number of seconds from 1970-01-01 00:00:00', - 'dateFormat': 'Supported data inserting methods:
Call function date(), for example: date(\'2021-03-17\')', - 'timeFormat': 'Supported data inserting methods:
Call function time(), for example: time(\'17:53:59\')', - 'datetimeFormat': 'Supported data inserting methods:
Call function datetime(), for example: datetime(\'2021-03-17T17:53:59\')', - 'geographyFormat': 'Supported data inserting methods:
Call function ST_GeogFromText(), for example:ST_GeogFromText(\'POINT(6 10)\')', - 'geography(point)Format': 'Supported data inserting methods:
Call function ST_GeogFromText(\'POINT()\'), for example:ST_GeogFromText(\'POINT(6 10)\')', - 'geography(linestring)Format': 'Supported data inserting methods:
Call function ST_GeogFromText(\'LINESTRING()\'), for example:ST_GeogFromText(\'LINESTRING(3 4,10 50,20 25)\')', - 'geography(polygon)Format': 'Supported data inserting methods:
Call function ST_GeogFromText(\'POLYGON()\'), for example:ST_GeogFromText(\'POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2))\')', - 'durationFormat': 'Supported data inserting methods:
Call function duration(), for example:duration({years: 1, seconds: 0})', - 'setTTL': 'Set TTL (Time To Live)', - 'refresh': 'Refresh', - 'startStat': 'Start Stats', - 'statTip': 'The statistics execution time is affected by the amount of data.', - 'lastRefreshTime': 'Last refreshed time', - 'statsType': 'Type', - 'statsName': 'Name', - 'statsCount': 'Count', - 'statError': 'Stat failed, Please try again.', - 'statFinished': 'Statistics end', - 'deleteSpace': 'Delete Graph Space', - 'cloneSpace': 'Clone Graph Space', - 'length': 'Length', - 'selectVidTypeTip': 'Please select the type', - 'csvDownload': 'Export CSV File', - 'pngDownload': 'Export PNG File', - 'rebuildSuccess': '{names} rebuild successfully', - 'rebuildFailed': '{names} rebuild failed', - 'startRebuildIndex': 'Start rebuilding the index {name}', - 'getSchema': 'Get Schema', - 'getSchemaTip': `Because there is no strong binding relationship between tags and edges in the current ${window.gConfig.databaseName} version, the results will be generated based on randomly obtained data, for reference only.`, - 'danglingEdge': 'Dangling edge', - 'showDDL': 'View Schema DDL', - 'downloadNGQL': 'Download.nGQL', - 'getDDLError': 'Failed to get the schema DDL, Please try again', - 'totalVertices': 'Total Vertices Count', - 'totalEdges': 'Total Edges Count' + schema: { + spaceList: 'Graph Space List', + useSpaceErrTip: + 'Space not found. Trying to use a newly created graph space may fail because the creation is implemented asynchronously. To make sure the follow-up operations work as expected, Wait for two heartbeat cycles, i.e., 20 seconds.', + createSuccess: 'Create Successfully', + defineFields: 'Define Properties', + uniqProperty: 'Property name cannot be duplicated', + cancelOperation: 'Do you want to close this panel', + cancelPropmt: + 'If you close the panel, the configuration will be deleted automatically. Are you sure that you want to close the panel?', + fieldDisabled: + 'A TTL configuration is set for this property, so it cannot be edited. If you want to edit this property, delete the TTL configuration.', + indexExist: + 'An index exists, so TTL configuration is not permitted. A tag or edge type cannot have both an index and TTL configuration.', + indexType: 'Index Type', + indexName: 'Index Name', + indexFields: 'Indexed Properties', + associateName: 'Associated {type} name', + dragSorting: '(Drag to Sort)', + selectFields: 'Please choose a property', + indexedLength: 'Please enter indexed length', + indexedLengthDescription: + 'Set the indexed string length. If you are indexing fixed strings, you must not set this option.', + indexedLengthRequired: 'Indexed length must be a positive integer', + rebuild: 'Rebuild', + createSpace: 'Create Space', + No: 'No', + spaceName: 'Name', + partitionNumber: 'Partition Number', + replicaFactor: 'Replica Factor', + charset: 'Charset', + collate: 'Collate', + vidType: 'Vid Type', + group: 'Group', + comment: 'Comment', + operations: 'Operations', + spaceNameEnter: 'Please enter the space name', + propertyCount: 'Property Num', + configTypeList: '{type} List', + configTypeAction: '{action} {type}', + timestampFormat: + "Supported data inserting methods:
1. call function now()
2. call function timestamp(), for example: timestamp('2021-07-05T06:18:43.984000')
3. Input the timestamp directly, namely the number of seconds from 1970-01-01 00:00:00", + dateFormat: "Supported data inserting methods:
Call function date(), for example: date('2021-03-17')", + timeFormat: "Supported data inserting methods:
Call function time(), for example: time('17:53:59')", + datetimeFormat: + "Supported data inserting methods:
Call function datetime(), for example: datetime('2021-03-17T17:53:59')", + geographyFormat: + "Supported data inserting methods:
Call function ST_GeogFromText(), for example:ST_GeogFromText('POINT(6 10)')", + 'geography(point)Format': + "Supported data inserting methods:
Call function ST_GeogFromText('POINT()'), for example:ST_GeogFromText('POINT(6 10)')", + 'geography(linestring)Format': + "Supported data inserting methods:
Call function ST_GeogFromText('LINESTRING()'), for example:ST_GeogFromText('LINESTRING(3 4,10 50,20 25)')", + 'geography(polygon)Format': + "Supported data inserting methods:
Call function ST_GeogFromText('POLYGON()'), for example:ST_GeogFromText('POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2))')", + durationFormat: + 'Supported data inserting methods:
Call function duration(), for example:duration({years: 1, seconds: 0})', + setTTL: 'Set TTL (Time To Live)', + refresh: 'Refresh', + startStat: 'Start Stats', + statTip: 'The statistics execution time is affected by the amount of data.', + lastRefreshTime: 'Last refreshed time', + statsType: 'Type', + statsName: 'Name', + statsCount: 'Count', + statError: 'Stat failed, Please try again.', + statFinished: 'Statistics end', + deleteSpace: 'Delete Graph Space', + cloneSpace: 'Clone Graph Space', + length: 'Length', + selectVidTypeTip: 'Please select the type', + csvDownload: 'Export CSV File', + pngDownload: 'Export PNG File', + rebuildSuccess: '{names} rebuild successfully', + rebuildFailed: '{names} rebuild failed', + startRebuildIndex: 'Start rebuilding the index {name}', + getSchema: 'Get Schema', + getSchemaTip: `Because there is no strong binding relationship between tags and edges in the current ${window.gConfig.databaseName} version, the results will be generated based on randomly obtained data, for reference only.`, + danglingEdge: 'Dangling edge', + showDDL: 'View Schema DDL', + downloadNGQL: 'Download.nGQL', + getDDLError: 'Failed to get the schema DDL, Please try again', + totalVertices: 'Total Vertices Count', + totalEdges: 'Total Edges Count', }, - 'empty': { - 'stats': 'No Statistics Data', - 'statsTip': 'Click the button to start statistics', - 'tag': 'No Tag Data', - 'tagTip': 'Click the button to create tag', - 'edge': 'No Edge Data', - 'edgeTip': 'Click the button to create edge', - 'index': 'No Index Data', - 'indexTip': 'Click the button to create index' + empty: { + stats: 'No Statistics Data', + statsTip: 'Click the button to start statistics', + tag: 'No Tag Data', + tagTip: 'Click the button to create tag', + edge: 'No Edge Data', + edgeTip: 'Click the button to create edge', + index: 'No Index Data', + indexTip: 'Click the button to create index', }, - 'menu': { - 'use': 'Use Manual', - 'release': 'Release Note', - 'forum': 'Help Forum', - 'nGql': 'nGQL', - 'feedback': 'Trouble Feedback', - 'repo': 'GitHub Repo', - 'trial': 'Enterprise Edition Trial', - 'contact': 'Contact Us' + menu: { + use: 'Use Manual', + release: 'Release Note', + forum: 'Help Forum', + nGql: 'nGQL', + feedback: 'Trouble Feedback', + repo: 'GitHub Repo', + trial: 'Enterprise Edition Trial', + contact: 'Contact Us', }, - 'link': { - 'nGQLHref': 'https://docs.nebula-graph.io/3.5.0/3.ngql-guide/1.nGQL-overview/1.overview/', - 'mannualHref': 'https://docs.nebula-graph.io/3.5.0/nebula-studio/about-studio/st-ug-what-is-graph-studio/', - 'startStudioHref': 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-plan-schema/', - 'versionLogHref': 'https://docs.nebula-graph.io/3.5.0/20.appendix/release-notes/studio-release-note/', - 'forumHref': 'https://discuss.nebula-graph.io/', - 'feedback': 'https://app.slack.com/client/TJB3N2BPD/CJNFUM7AR', - 'trial': 'https://www.nebula-graph.io/visualization-tools-free-trial', - 'contact': 'https://www.nebula-graph.io/contact', - 'loginHref': 'https://docs.nebula-graph.io/3.5.0/nebula-studio/deploy-connect/st-ug-connect/' + link: { + nGQLHref: 'https://docs.nebula-graph.io/3.5.0/3.ngql-guide/1.nGQL-overview/1.overview/', + mannualHref: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/about-studio/st-ug-what-is-graph-studio/', + startStudioHref: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-plan-schema/', + versionLogHref: 'https://docs.nebula-graph.io/3.5.0/20.appendix/release-notes/studio-release-note/', + forumHref: 'https://discuss.nebula-graph.io/', + feedback: 'https://app.slack.com/client/TJB3N2BPD/CJNFUM7AR', + trial: 'https://www.nebula-graph.io/visualization-tools-free-trial', + contact: 'https://www.nebula-graph.io/contact', + loginHref: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/deploy-connect/st-ug-connect/', }, - 'sketch': { - 'dragTip': 'Drag and drop to the canvas', - 'tag': 'Tag', - 'edge': 'Edge Type', - 'name': '{name} Name', - 'detail': '{name} details', - 'comment': 'Comment', - 'properties': 'Properties', - 'propertyName': 'Property Name', - 'dataType': 'Data Type', - 'addProperty': 'Add Property', - 'type': 'type', - 'list': 'Draft List', - 'new': 'New', - 'applyToSpace': 'Apply to Space', - 'createSpace': 'Create New Space', - 'selectSpace': 'Select Space', - 'noCurrentSketch': 'No schema sketch selected', - 'noCurrentSketchTips': 'Please select a schema sketch first', - 'sketchInvalid': 'Please complete the current Schema information', - 'saveSuccess': 'Save successfully', - 'saveReminder': 'The current sketch has been modified but not saved, whether to continue to switch sketches?', - 'saveTip': 'The current sketch has been modified but not saved, please save first.', - 'confirmDelete': 'Sure to delete?', - 'saveDraft': 'Save draft', - 'export': 'Export', - 'applySpaceTip': 'The new schema will not overwrite the original schema in the space', - 'sameSchemaWarning': '{content} already exists in the space, please change the {hasType} name or select another space.', - 'noData': 'No data, please import data first', - 'uniqName': 'Tag & Edge type name cannot be duplicated', - 'spaceExisted': 'Space already exists', - 'updateNameSuccess': 'Update name successfully', - 'search': 'Search name' + sketch: { + dragTip: 'Drag and drop to the canvas', + tag: 'Tag', + edge: 'Edge Type', + name: '{name} Name', + detail: '{name} details', + comment: 'Comment', + properties: 'Properties', + propertyName: 'Property Name', + dataType: 'Data Type', + addProperty: 'Add Property', + type: 'type', + list: 'Draft List', + new: 'New', + applyToSpace: 'Apply to Space', + createSpace: 'Create New Space', + selectSpace: 'Select Space', + noCurrentSketch: 'No schema sketch selected', + noCurrentSketchTips: 'Please select a schema sketch first', + sketchInvalid: 'Please complete the current Schema information', + saveSuccess: 'Save successfully', + saveReminder: 'The current sketch has been modified but not saved, whether to continue to switch sketches?', + saveTip: 'The current sketch has been modified but not saved, please save first.', + confirmDelete: 'Sure to delete?', + saveDraft: 'Save draft', + export: 'Export', + applySpaceTip: 'The new schema will not overwrite the original schema in the space', + sameSchemaWarning: + '{content} already exists in the space, please change the {hasType} name or select another space.', + noData: 'No data, please import data first', + uniqName: 'Tag & Edge type name cannot be duplicated', + spaceExisted: 'Space already exists', + updateNameSuccess: 'Update name successfully', + search: 'Search name', + }, + welcome: { + guide: "Beginner's Guide", + quickStart: 'Start', + quickStartDesc: 'Documents', + demos: 'Demos', + starterDatasets: 'Starter Datasets', + solutionDatasets: 'Solution Datasets', + demoDownload: 'Download', + demoDownloading: 'downloading', + demoIntro: 'Demo Introduction', + loadWaiting: 'Data is loading, please wait... It will end in {second}s', + downloadSuccess: 'Dataset `{space}` has been downloaded successfully', + spaceExist: 'The graph space `{space}` already exists', + schemaModuleLink: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-create-schema/', + importModuleLink: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-import-data/', + consoleModuleLink: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-console/', + sketchModuleLink: 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/draft/', + basketballplayerDocLink: '', + shareholdingDocLink: 'https://nebula-graph.io/demo/shared-holding', + openstackDocLink: '', + snsDocLink: 'https://siwei.io/en/nebulagraph-sns/', + datalineageDocLink: 'https://siwei.io/en/data-lineage-oss-ref-solution/', + movieDocLink: '', + idMappingDocLink: '', + fraudDetectionDocLink: 'https://siwei.io/en/fraud-detection-with-nebulagraph/', + fifa2022DocLink: 'https://siwei.io/en/chatgpt-and-nebulagraph-predict-fifa-world-cup/', + alwaysShow: 'Always show the welcome page', + progressTitle: 'Download & Import Data', }, - 'welcome': { - 'guide': 'Beginner\'s Guide', - 'quickStart': 'Start', - 'quickStartDesc': 'Documents', - 'demos': 'Demos', - 'starterDatasets': 'Starter Datasets', - 'solutionDatasets': 'Solution Datasets', - 'demoDownload': 'Download', - 'demoDownloading': 'downloading', - 'demoIntro': 'Demo Introduction', - 'loadWaiting': 'Data is loading, please wait... It will end in {second}s', - 'downloadSuccess': 'Dataset `{space}` has been downloaded successfully', - 'spaceExist': 'The graph space `{space}` already exists', - 'schemaModuleLink': 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-create-schema/', - 'importModuleLink': 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-import-data/', - 'consoleModuleLink': 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/st-ug-console/', - 'sketchModuleLink': 'https://docs.nebula-graph.io/3.5.0/nebula-studio/quick-start/draft/', - 'basketballplayerDocLink': '', - 'shareholdingDocLink': 'https://nebula-graph.io/demo/shared-holding', - 'openstackDocLink': '', - 'snsDocLink': 'https://siwei.io/en/nebulagraph-sns/', - 'datalineageDocLink': 'https://siwei.io/en/data-lineage-oss-ref-solution/', - 'movieDocLink': '', - 'idMappingDocLink': '', - 'fraudDetectionDocLink': 'https://siwei.io/en/fraud-detection-with-nebulagraph/', - 'fifa2022DocLink': 'https://siwei.io/en/chatgpt-and-nebulagraph-predict-fifa-world-cup/', - 'alwaysShow': 'Always show the welcome page', - 'progressTitle': 'Download & Import Data' - } }; diff --git a/app/config/locale/zh-CN.ts b/app/config/locale/zh-CN.ts index 10229a06..fba64f1a 100644 --- a/app/config/locale/zh-CN.ts +++ b/app/config/locale/zh-CN.ts @@ -1,498 +1,505 @@ export default { - 'common': { - 'requestError': '请求错误', - 'currentSpace': '当前图空间', - 'seeTheHistory': '查看历史', - 'table': '表格', - 'log': '日志', - 'sorryNGQLCannotBeEmpty': 'nGQL语句不能为空', - 'disablesUseToSwitchSpace': '禁止使用命令切换Space', - 'NGQLHistoryList': 'nGQL历史列表', - 'empty': '清空', - 'run': '运行', - 'console': '控制台', - 'ok': '确认', - 'success': '成功', - 'fail': '失败', - 'cancel': '取消', - 'confirm': '确认', - 'import': '导入', - 'ask': '确定进行当前操作?', - 'openInExplore': '导入图探索', - 'schema': 'Schema', - 'create': '创建', - 'name': '名称', - 'operation': '操作', - 'delete': '删除', - 'optional': '可选', - 'exportNGQL': '对应的nGQL语句', - 'relatedProperties': '相关属性', - 'type': '类型', - 'edit': '编辑', - 'deleteSuccess': '删除成功', - 'propertyName': '属性名称', - 'dataType': '数据类型', - 'allowNull': '允许空值', - 'defaults': '默认值', - 'addProperty': '添加属性', - 'updateSuccess': '更新成功', - 'add': '添加', - 'tag': '标签', - 'edge': '边类型', - 'index': '索引', - 'yes': '确定', - 'no': '取消', - 'graph': '可视化', - 'color': '颜色', - 'total': '共计', - 'namePlaceholder': '请输入{name}名', - 'comment': '描述', - 'space': '图空间', - 'version': '版本', - 'statistics': '统计', - 'duplicate': '复制', - 'copy': '复制', - 'copySuccess': '复制成功', - 'sketch': 'Schema 草图', - 'viewSchema': '查看 Schema', - 'beta': 'Beta', - 'danglingEdge': '悬挂边', - 'columnName': '列名', - 'src': '起点', - 'dst': '终点', - 'value': '值', - 'continue': '继续', - 'update': '更新', - 'prev': '上一步', - 'createTime': '创建时间', - 'rerun': '重新导入' + common: { + requestError: '请求错误', + currentSpace: '当前图空间', + seeTheHistory: '查看历史', + table: '表格', + log: '日志', + sorryNGQLCannotBeEmpty: 'nGQL语句不能为空', + disablesUseToSwitchSpace: '禁止使用命令切换Space', + NGQLHistoryList: 'nGQL历史列表', + empty: '清空', + run: '运行', + console: '控制台', + ok: '确认', + success: '成功', + fail: '失败', + cancel: '取消', + confirm: '确认', + import: '导入', + ask: '确定进行当前操作?', + openInExplore: '导入图探索', + schema: 'Schema', + create: '创建', + name: '名称', + operation: '操作', + delete: '删除', + optional: '可选', + exportNGQL: '对应的nGQL语句', + relatedProperties: '相关属性', + type: '类型', + edit: '编辑', + deleteSuccess: '删除成功', + propertyName: '属性名称', + dataType: '数据类型', + allowNull: '允许空值', + defaults: '默认值', + addProperty: '添加属性', + updateSuccess: '更新成功', + add: '添加', + tag: '标签', + edge: '边类型', + index: '索引', + yes: '确定', + no: '取消', + graph: '可视化', + color: '颜色', + total: '共计', + namePlaceholder: '请输入{name}名', + comment: '描述', + space: '图空间', + version: '版本', + statistics: '统计', + duplicate: '复制', + copy: '复制', + copySuccess: '复制成功', + sketch: 'Schema 草图', + viewSchema: '查看 Schema', + beta: 'Beta', + danglingEdge: '悬挂边', + columnName: '列名', + src: '起点', + dst: '终点', + value: '值', + continue: '继续', + update: '更新', + prev: '上一步', + createTime: '创建时间', + rerun: '重新导入', }, - 'doc': { - 'welcome': '欢迎使用', - 'functionIntro': '功能介绍', - 'schemaIntro': `您可以在 schema 模块对 ${window.gConfig.databaseName} 图空间进行管理。`, - 'importIntro': `您可以使用导入模块将数据批量导入 ${window.gConfig.databaseName}。`, - 'consoleIntro': `您可以使用控制台模块对 ${window.gConfig.databaseName} 内的数据进行查询操作。`, - 'learningDoc': '学习文档', - 'getStarted': `认识 ${window.gConfig.databaseName} Studio`, - 'getStartedTip': `什么是 ${window.gConfig.databaseName} Studio。`, - 'useGuide': `${window.gConfig.databaseName} Studio 使用手册`, - 'useGuideTip': `学习如何使用 ${window.gConfig.databaseName} Studio。`, - 'ngqlIntro': `${window.gConfig.databaseName} 查询语言 (nGQL)`, - 'ngqlIntroTip': `nGQL 是 ${window.gConfig.databaseName} 使用的的声明式图查询语言,是为开发和运维人员设计的类 SQL 查询语言,易于学习。`, - 'start': '快速开始', - 'sketchIntro': 'Schema 草图', - 'basketballplayerIntro': '最简单的示例图谱空间,最广泛被文档中引用的数据集', - 'snsIntro': '社交网络示例图谱空间,包含用户、好友、帖子、评论等数据,新好友推荐、时间线生成、社交分析', - 'movieIntro': '电影推荐图谱,尝试在图上做 CBF、ItemCF 和 UserCF 算法', - 'datalineageIntro': '元数据管理实例数据集,血缘查询、血缘依赖分析、大数据治理', - 'idMappingIntro': 'ID Mapping,用户系统上的实体分析案例', - 'fifa2022Intro': '面向关系而非复杂属性的世界杯图谱,尝试利用图算法预测冠军吧(假设我们还不知道冠军)', - 'shareholdingIntro': '股权关系图谱,图上实做股权穿透、公司实控人分析、背景调查', - 'openstackIntro': '图驱动的复杂基础设施智能运维实操,基于 OpenStack 全资源抓取图谱的例子', - 'fraudDetectionIntro': '欺诈检测的图应用,以借贷场景为例' + doc: { + welcome: '欢迎使用', + functionIntro: '功能介绍', + schemaIntro: `您可以在 schema 模块对 ${window.gConfig.databaseName} 图空间进行管理。`, + importIntro: `您可以使用导入模块将数据批量导入 ${window.gConfig.databaseName}。`, + consoleIntro: `您可以使用控制台模块对 ${window.gConfig.databaseName} 内的数据进行查询操作。`, + learningDoc: '学习文档', + getStarted: `认识 ${window.gConfig.databaseName} Studio`, + getStartedTip: `什么是 ${window.gConfig.databaseName} Studio。`, + useGuide: `${window.gConfig.databaseName} Studio 使用手册`, + useGuideTip: `学习如何使用 ${window.gConfig.databaseName} Studio。`, + ngqlIntro: `${window.gConfig.databaseName} 查询语言 (nGQL)`, + ngqlIntroTip: `nGQL 是 ${window.gConfig.databaseName} 使用的的声明式图查询语言,是为开发和运维人员设计的类 SQL 查询语言,易于学习。`, + start: '快速开始', + sketchIntro: '您可以在画板上自行设计 Schema,直观展示点边关系。', + basketballplayerIntro: '最简单的示例图谱空间,最广泛被文档中引用的数据集', + snsIntro: '社交网络示例图谱空间,包含用户、好友、帖子、评论等数据,新好友推荐、时间线生成、社交分析', + movieIntro: '电影推荐图谱,尝试在图上做 CBF、ItemCF 和 UserCF 算法', + datalineageIntro: '元数据管理实例数据集,血缘查询、血缘依赖分析、大数据治理', + idMappingIntro: 'ID Mapping,用户系统上的实体分析案例', + fifa2022Intro: '面向关系而非复杂属性的世界杯图谱,尝试利用图算法预测冠军吧(假设我们还不知道冠军)', + shareholdingIntro: '股权关系图谱,图上实做股权穿透、公司实控人分析、背景调查', + openstackIntro: '图驱动的复杂基础设施智能运维实操,基于 OpenStack 全资源抓取图谱的例子', + fraudDetectionIntro: '欺诈检测的图应用,以借贷场景为例', }, - 'warning': { - 'connectError': '数据库连接有误,请重新配置', - 'crashPage': '页面崩溃了', - 'crashPageTip': '服务崩溃,请联系管理员', - 'refreshPage': '刷新页面', - 'contactStaff': '联系客服', - 'errorMessage': '错误信息' + warning: { + connectError: '数据库连接有误,请重新配置', + crashPage: '页面崩溃了', + crashPageTip: '服务崩溃,请联系管理员', + refreshPage: '刷新页面', + contactStaff: '联系客服', + errorMessage: '错误信息', }, - 'configServer': { - 'connect': '连接', - 'host': 'Graphd IP 地址', - 'port': 'Port', - 'username': '用户名', - 'password': '密码', - 'success': '配置成功', - 'clear': '登出', - 'title': '配置数据库', - 'tip': '连接数据库说明文档->' + configServer: { + connect: '连接', + host: 'Graphd IP 地址', + port: 'Port', + username: '用户名', + password: '密码', + success: '配置成功', + clear: '登出', + title: '配置数据库', + tip: '连接数据库说明文档->', }, - 'formRules': { - 'hostRequired': '请填写数据库服务器的IP地址', - 'portRequired': '请填写数据库服务器的端口', - 'usernameRequired': '请填写用户名', - 'passwordRequired': '请填写密码', - 'positiveIntegerRequired': '请输入一个非负整数', - 'nameValidate': '命名必须以字母开头,且只支持输入英文字母、数字以及下划线_', - 'nameRequired': '请输入名称', - 'numberRequired': '请输入正整数', - 'replicaLimit': '副本数量不得超过你当前 online 机器数量({number})', - 'ttlRequired': '请选择TTL指定的属性, 且属性的数据类型需为 integer 或 timestamp', - 'ttlDurationRequired': '请输入时间(s)', - 'dataTypeRequired': '请选择数据类型', - 'edgeTypeRequired': '请选择边类型', - 'srcIdRequired': '请选择起点 VID', - 'dstIdRequired': '请选择终点 VID', - 'vidRequired': '请选择 VID', - 'vidTypeRequired': '请选择 VID 类型', - 'fixStringLengthRequired': '请输入字符串固定长度', - 'spaceRequired': '图空间不能为空', - 'maxBytes': '不能超过 {max} 字节', - 'ttlLimit': '属性的数据类型必须是int或者timestamp', - 'associateNameRequired': '请选择关联 {type} 名称', - 'fileRequired': '请选择文件', - 'formHostRequired': '请填写服务器IP地址', - 'formPortRequired': '请填写服务器端口', - 'regionRequired': '请选择区域', - 'endpointRequired': '请填写 Endpoint', - 'bucketRequired': '请填写 Bucket', - 'accessKeyIdRequired': '请填写 Access Key ID', - 'accessKeySecretRequired': '请填写 Access Key Secret', - 'platformRequired': '请选择平台' + formRules: { + hostRequired: '请填写数据库服务器的IP地址', + portRequired: '请填写数据库服务器的端口', + usernameRequired: '请填写用户名', + passwordRequired: '请填写密码', + positiveIntegerRequired: '请输入一个非负整数', + nameValidate: '命名必须以字母开头,且只支持输入英文字母、数字以及下划线_', + nameRequired: '请输入名称', + numberRequired: '请输入正整数', + replicaLimit: '副本数量不得超过你当前 online 机器数量({number})', + ttlRequired: '请选择TTL指定的属性, 且属性的数据类型需为 integer 或 timestamp', + ttlDurationRequired: '请输入时间(s)', + dataTypeRequired: '请选择数据类型', + edgeTypeRequired: '请选择边类型', + srcIdRequired: '请选择起点 VID', + dstIdRequired: '请选择终点 VID', + vidRequired: '请选择 VID', + vidTypeRequired: '请选择 VID 类型', + fixStringLengthRequired: '请输入字符串固定长度', + spaceRequired: '图空间不能为空', + maxBytes: '不能超过 {max} 字节', + ttlLimit: '属性的数据类型必须是int或者timestamp', + associateNameRequired: '请选择关联 {type} 名称', + fileRequired: '请选择文件', + formHostRequired: '请填写服务器IP地址', + formPortRequired: '请填写服务器端口', + regionRequired: '请选择区域', + endpointRequired: '请填写 Endpoint', + bucketRequired: '请填写 Bucket', + accessKeyIdRequired: '请填写 Access Key ID', + accessKeySecretRequired: '请填写 Access Key Secret', + platformRequired: '请选择平台', }, - 'console': { - 'execTime': '执行时间消耗', - 'exportVertex': '请选择表中代表点VID的列', - 'exportEdge': '请选择结果中分别代表边的起点(src_vid)、终点(dst_vid)和权重(rank)的列', - 'deleteHistory': '清除历史', - 'cypherParam': '自定义参数', - 'favorites': '收藏夹', - 'addToFavorites': '添加到收藏夹', - 'unfavorite': '取消收藏', - 'clearFavorites': '清空收藏夹', - 'graphviz': 'Graphviz', - 'selectSpace': '请选择图空间' + console: { + execTime: '执行时间消耗', + exportVertex: '请选择表中代表点VID的列', + exportEdge: '请选择结果中分别代表边的起点(src_vid)、终点(dst_vid)和权重(rank)的列', + deleteHistory: '清除历史', + cypherParam: '自定义参数', + favorites: '收藏夹', + addToFavorites: '添加到收藏夹', + unfavorite: '取消收藏', + clearFavorites: '清空收藏夹', + graphviz: 'Graphviz', + selectSpace: '请选择图空间', }, - 'explore': { - 'vertexStyle': '节点颜色', - 'notExist': '不存在', - 'expandItem': '展开', - 'collapseItem': '收起' + explore: { + vertexStyle: '节点颜色', + notExist: '不存在', + expandItem: '展开', + collapseItem: '收起', }, - 'import': { - 'uploadFile': '上传文件', - 'dataSourceManagement': '数据源管理', - 'importData': '导入数据', - 'createTask': '创建导入任务', - 'uploadTemp': '导入模板', - 'downloadConfig': '下载配置文件', - 'downloadLog': '下载日志', - 'viewLogs': '查看日志', - 'details': '详情', - 'task': '导入任务', - 'taskList': '任务列表', - 'taskName': '任务名称', - 'tag': '关联标签', - 'edge': '关联边', - 'runImport': '导入', - 'fileName': '文件名', - 'withHeader': '表头', - 'fileSize': '大小', - 'fileTitle': '文件列表', - 'bindDatasource': '添加导入文件', - 'endImport': '终止导入', - 'prop': '属性', - 'mapping': '对应列标', - 'edgeText': '边', - 'choose': '选择', - 'ignore': '忽略', - 'vertexText': '点', - 'indexNotEmpty': '对应列标不能为空', - 'enterPassword': '请输入 database 账号密码以继续', - 'isEmpty': '为空', - 'startImporting': '开始导入', - 'stopImportingSuccess': '已停止导入', - 'deleteSuccess': '已删除任务记录', - 'batchSize': '批处理量', - 'importCompleted': '导入完成', - 'importStopped': '导入中止', - 'importFailed': '导入失败', - 'importRunning': '导入中', - 'importPending': '等待导入', - 'notImported': '{total}条记录未导入', - 'selectFile': '选择绑定文件', - 'addTag': '添加 Tag', - 'addEdge': '添加 Edge Type', - 'selectTag': '选择 Tag', - 'selectEdge': '选择 Edge 类型', - 'config': '任务配置', - 'parseFailed': '文件解析失败', - 'uploadTemplate': '将 YAML 配置文件拖放到该区域', - 'uploadBoxTip': '使用 YAML 配置文件用来描述待导入文件信息、数据库服务器等信息。', - 'fileUploadRequired': '1. 请确保在导入 YAML 文件之前上传所有 CSV 数据文件。 如果没有,请先前往', - 'fileUploadRequired2': '数据文件', - 'exampleDownload': '2. 配置文件示例:', - 'uploadTemplateTip': '3. 配置Yaml文件:模板中所有文件路径(path、logPath)请只保留文件名(保留文件扩展名),例如: 日志路径:config.csv', - 'reUpload': '重新上传', - 'fileNotExist': '文件 {name} 不存在', - 'importYaml': '导入 YAML 文件', - 'templateMatchError': '配置中的用户姓名与当前登录账号不一致', - 'uploadSuccessfully': '上传文件成功', - 'fileSizeLimit': '{name}文件过大,超过上传限制({size}),请将文件通过 scp 的方式上传到安装目录下的 data/upload 目录', - 'noHttp': '配置文件中的 address 不支持携带 http 协议,请去除 http(s)://', - 'addressMatch': '配置文件中的 address 字段必须包含当前登录的 Graph 地址。多个地址用“,”隔开。', - 'dataSourceFile': '文件源', - 'vidColumn': 'VID 列', - 'srcVidColumn': '起点 VID 列', - 'dstVidColumn': '终点 VID 列', - 'vidFunction': 'VID 函数', - 'vidPrefix': 'VID 前缀', - 'vidSuffix': 'VID 后缀', - 'concurrencyTip': `${window.gConfig.databaseName} 客户端并发数`, - 'batchSizeTip': '单批次插入数据的语句数量', - 'retryTip': 'nGQL 语句执行失败的重试次数', - 'vidFunctionTip': '生成 VID 的函数。目前只支持 hash 函数', - 'vidPrefixTip': '给原始 VID 添加的前缀', - 'vidSuffixTip': '给原始 VID 添加的后缀', - 'selectCsvColumn': '选择 CSV 列', - 'graphAddress': 'Graph 服务地址', - 'concurrency': '并发数', - 'retry': '重试次数', - 'graphAddressTip': 'Graph 服务的地址和端口。将使用以下 Graph 节点进行数据导入', - 'currentHost': '当前登录的 Graph 节点', - 'expandMoreConfig': '展开更多配置', - 'pickUpConfig': '收起配置', - 'tagRequired': '请添加标签', - 'edgeRequired': '请添加边类型', - 'tagFileRequired': '请添加标签导入文件源', - 'edgeFileRequired': '请添加边类型导入文件源', - 'tagFileSelect': '请选择标签导入文件源', - 'edgeFileSelect': '请选择边类型导入文件源', - 'configDisplay': '配置展示', - 'loadToTag': '导入文件 {file} 到标签 {name}', - 'loadToEdge': '导入文件 {file} 到边类型 {name}', - 'importConfirm': '导入任务确认', - 'delimiter': '分隔符', - 'previewFiles': '上传文件预览', - 'sampleData': '示例数据', - 'hasHeader': '携带表头', - 'noHeader': '无表头', - 'enterDelimiter': '请输入分隔符', - 'applicateToAll': '应用到所有文件', - 'deleteFiles': '删除选中文件', - 'fileRepeatTip': '上述文件已存在,继续上传将覆盖原文件', - 'filePreview': '预览文件 {name}', - 'uploadConfirm': '上传文件确认', - 'localFiles': '本地文件', - 's3': '云存储', - 'sftp': 'SFTP', - 'newDataSource': '新建数据源', - 'editDataSource': '编辑数据源', - 'deleteDataSource': '删除数据源', - 'datasourceList': '{type}列表', - 'ipAddress': 'IP 地址:端口', - 'bucketName': 'Bucket 名称', - 'accessKeyId': 'AccessKeyId', - 'region': '区域', - 'createTime': '添加日期', - 'account': '账号', - 'endpoint': 'Endpoint', - 'accessKeySecret': 'AccessKeySecret', - 'dataSourceType': '数据源类型', - 'selectPlatform': '选择平台', - 'enterAddress': '请输入终端节点地址', - 'enterRegion': '请输入区域', - 'serverAddress': '服务器地址', - 'port': '端口', - 'newDataSourceTip': '请先添加数据源', - 'addNewImport': '添加导入任务', - 'addNewImportTip': '添加数据源后,创建导入任务将数据导入数据库', - 'start': '开始', - 's3Tip': '只支持兼容Amazon S3接口的云服务', - 'readerConcurrency': '读取并发数', - 'readerConcurrencyTip': '读取文件的并发数', - 'importerConcurrency': '导入并发数', - 'importerConcurrencyTip': '导入数据的并发数', - 'selectDatasourceFile': '选择数据源文件', - 'datasourceType': '数据源类型', - 'filePath': '文件路径', - 'directory': '目录', - 'preview': '预览', - 'customize': '自定义', - 's3Platform': 'S3 服务提供商', - 'endpointTip': '请使用域名中不含 bucket 名称的节点,例如 {sample}', - 'awsTip': 'https://s3.us-east-2.amazonaws.com', - 'ossTip': 'https://oss-cn-hangzhou.aliyuncs.com', - 'cosTip': 'https://cos.ap-shanghai.myqcloud.com', - 'customizeTip': 'http://127.0.0.1:9000', - 'addressRequired': '请在配置文件中输入导入地址', - 'usernameRequired': '请在配置文件中输入用户名', - 'passwordRequired': '请在配置文件中输入密码', - 's3AccessKeyRequired': '请在配置文件中输入 s3 的 accessKeyID', - 's3SecretKeyRequired': '请在配置文件中输入 s3 的 accessKeySecret', - 'sftpUsernameRequired': '请在配置文件中输入 sftp 的用户名', - 'sftpPasswordRequired': '请在配置文件中输入 sftp 的密码', - 'ossAccessKeyRequired': '请在配置文件中输入 oss 的 accessKeyID', - 'ossSecretKeyRequired': '请在配置文件中输入 oss 的 accessKeySecret', - 'draft': '草稿', - 'saveDraft': '保存草稿', - 'modifyTime': '编辑时间', - 'taskNameRequired': '请填写任务名称并选择图空间', - 'fileMissing': '{files} 文件不存在,请重新上传文件或添加相关数据源', - 'datasourceMissing': '{files} 所在数据源未找到,请重新添加相关数据源并重新配置任务', - 'templateRerunTip': '模板导入生成的任务不支持编辑,请直接修改模板文件并导入', - 'rerunError': '找不到任务配置记录,无法重跑任务', - 'editTaskError': '找不到任务配置记录,无法继续编辑' + import: { + uploadFile: '上传文件', + dataSourceManagement: '数据源管理', + importData: '导入数据', + createTask: '创建导入任务', + uploadTemp: '导入模板', + downloadConfig: '下载配置文件', + downloadLog: '下载日志', + viewLogs: '查看日志', + details: '详情', + task: '导入任务', + taskList: '任务列表', + taskName: '任务名称', + tag: '关联标签', + edge: '关联边', + runImport: '导入', + fileName: '文件名', + withHeader: '表头', + fileSize: '大小', + fileTitle: '文件列表', + bindDatasource: '添加导入文件', + endImport: '终止导入', + prop: '属性', + mapping: '对应列标', + edgeText: '边', + choose: '选择', + ignore: '忽略', + vertexText: '点', + indexNotEmpty: '对应列标不能为空', + enterPassword: '请输入 database 账号密码以继续', + isEmpty: '为空', + startImporting: '开始导入', + stopImportingSuccess: '已停止导入', + deleteSuccess: '已删除任务记录', + batchSize: '批处理量', + importCompleted: '导入完成', + importStopped: '导入中止', + importFailed: '导入失败', + importRunning: '导入中', + importPending: '等待导入', + notImported: '{total}条记录未导入', + selectFile: '选择绑定文件', + addTag: '添加 Tag', + addEdge: '添加 Edge Type', + selectTag: '选择 Tag', + selectEdge: '选择 Edge 类型', + config: '任务配置', + parseFailed: '文件解析失败', + uploadTemplate: '将 YAML 配置文件拖放到该区域', + uploadBoxTip: '使用 YAML 配置文件用来描述待导入文件信息、数据库服务器等信息。', + fileUploadRequired: '1. 请确保在导入 YAML 文件之前上传所有 CSV 数据文件。 如果没有,请先前往', + fileUploadRequired2: '数据文件', + exampleDownload: '2. 配置文件示例:', + uploadTemplateTip: + '3. 配置Yaml文件:模板中所有文件路径(path、logPath)请只保留文件名(保留文件扩展名),例如: 日志路径:config.csv', + reUpload: '重新上传', + fileNotExist: '文件 {name} 不存在', + importYaml: '导入 YAML 文件', + templateMatchError: '配置中的用户姓名与当前登录账号不一致', + uploadSuccessfully: '上传文件成功', + fileSizeLimit: '{name}文件过大,超过上传限制({size}),请将文件通过 scp 的方式上传到安装目录下的 data/upload 目录', + noHttp: '配置文件中的 address 不支持携带 http 协议,请去除 http(s)://', + addressMatch: '配置文件中的 address 字段必须包含当前登录的 Graph 地址。多个地址用“,”隔开。', + dataSourceFile: '文件源', + vidColumn: 'VID 列', + srcVidColumn: '起点 VID 列', + dstVidColumn: '终点 VID 列', + vidFunction: 'VID 函数', + vidPrefix: 'VID 前缀', + vidSuffix: 'VID 后缀', + concurrencyTip: `${window.gConfig.databaseName} 客户端并发数`, + batchSizeTip: '单批次插入数据的语句数量', + retryTip: 'nGQL 语句执行失败的重试次数', + vidFunctionTip: '生成 VID 的函数。目前只支持 hash 函数', + vidPrefixTip: '给原始 VID 添加的前缀', + vidSuffixTip: '给原始 VID 添加的后缀', + selectCsvColumn: '选择 CSV 列', + graphAddress: 'Graph 服务地址', + concurrency: '并发数', + retry: '重试次数', + graphAddressTip: 'Graph 服务的地址和端口。将使用以下 Graph 节点进行数据导入', + currentHost: '当前登录的 Graph 节点', + expandMoreConfig: '展开更多配置', + pickUpConfig: '收起配置', + tagRequired: '请添加标签', + edgeRequired: '请添加边类型', + tagFileRequired: '请添加标签导入文件源', + edgeFileRequired: '请添加边类型导入文件源', + tagFileSelect: '请选择标签导入文件源', + edgeFileSelect: '请选择边类型导入文件源', + configDisplay: '配置展示', + loadToTag: '导入文件 {file} 到标签 {name}', + loadToEdge: '导入文件 {file} 到边类型 {name}', + importConfirm: '导入任务确认', + delimiter: '分隔符', + previewFiles: '上传文件预览', + sampleData: '示例数据', + hasHeader: '携带表头', + noHeader: '无表头', + enterDelimiter: '请输入分隔符', + applicateToAll: '应用到所有文件', + deleteFiles: '删除选中文件', + fileRepeatTip: '上述文件已存在,继续上传将覆盖原文件', + filePreview: '预览文件 {name}', + uploadConfirm: '上传文件确认', + localFiles: '本地文件', + s3: '云存储', + sftp: 'SFTP', + newDataSource: '新建数据源', + editDataSource: '编辑数据源', + deleteDataSource: '删除数据源', + datasourceList: '{type}列表', + ipAddress: 'IP 地址:端口', + bucketName: 'Bucket 名称', + accessKeyId: 'AccessKeyId', + region: '区域', + createTime: '添加日期', + account: '账号', + endpoint: 'Endpoint', + accessKeySecret: 'AccessKeySecret', + dataSourceType: '数据源类型', + selectPlatform: '选择平台', + enterAddress: '请输入终端节点地址', + enterRegion: '请输入区域', + serverAddress: '服务器地址', + port: '端口', + newDataSourceTip: '请先添加数据源', + addNewImport: '添加导入任务', + addNewImportTip: '添加数据源后,创建导入任务将数据导入数据库', + start: '开始', + s3Tip: '只支持兼容Amazon S3接口的云服务', + readerConcurrency: '读取并发数', + readerConcurrencyTip: '读取文件的并发数', + importerConcurrency: '导入并发数', + importerConcurrencyTip: '导入数据的并发数', + selectDatasourceFile: '选择数据源文件', + datasourceType: '数据源类型', + filePath: '文件路径', + directory: '目录', + preview: '预览', + customize: '自定义', + s3Platform: 'S3 服务提供商', + endpointTip: '请使用域名中不含 bucket 名称的节点,例如 {sample}', + awsTip: 'https://s3.us-east-2.amazonaws.com', + ossTip: 'https://oss-cn-hangzhou.aliyuncs.com', + cosTip: 'https://cos.ap-shanghai.myqcloud.com', + customizeTip: 'http://127.0.0.1:9000', + addressRequired: '请在配置文件中输入导入地址', + usernameRequired: '请在配置文件中输入用户名', + passwordRequired: '请在配置文件中输入密码', + s3AccessKeyRequired: '请在配置文件中输入 s3 的 accessKeyID', + s3SecretKeyRequired: '请在配置文件中输入 s3 的 accessKeySecret', + sftpUsernameRequired: '请在配置文件中输入 sftp 的用户名', + sftpPasswordRequired: '请在配置文件中输入 sftp 的密码', + ossAccessKeyRequired: '请在配置文件中输入 oss 的 accessKeyID', + ossSecretKeyRequired: '请在配置文件中输入 oss 的 accessKeySecret', + draft: '草稿', + saveDraft: '保存草稿', + modifyTime: '编辑时间', + taskNameRequired: '请填写任务名称并选择图空间', + fileMissing: '{files} 文件不存在,请重新上传文件或添加相关数据源', + datasourceMissing: '{files} 所在数据源未找到,请重新添加相关数据源并重新配置任务', + templateRerunTip: '模板导入生成的任务不支持编辑,请直接修改模板文件并导入', + rerunError: '找不到任务配置记录,无法重跑任务', + editTaskError: '找不到任务配置记录,无法继续编辑', }, - 'schema': { - 'spaceList': '图空间列表', - 'useSpaceErrTip': '图空间未找到。立刻尝试使用刚创建的图空间可能会失败,因为创建是异步实现的。为确保数据同步,后续操作能顺利进行,请等待 2 个心跳周期(20 秒)。', - 'createSuccess': '创建成功', - 'defineFields': '定义属性', - 'uniqProperty': '属性名称不允许重名', - 'cancelOperation': '是否取消配置并关闭面板', - 'cancelPropmt': '关闭面板将删除所有属性,是否继续?', - 'fieldDisabled': '该属性被 ttl_col 引用,不支持更改操作,如要更改,请先更新 ttl', - 'indexExist': '已拥有索引,无法同时配置 TTL', - 'indexType': '索引类型', - 'indexName': '索引名称', - 'indexFields': '索引属性', - 'associateName': '关联 {type} 名称', - 'dragSorting': '(可拖拽排序)', - 'selectFields': '请选择关联的属性', - 'indexedLength': '请输入索引长度', - 'indexedLengthDescription': '设置索引字符串的长度。如果索引定长字符串,则索引长度无法修改。', - 'indexedLengthRequired': '索引长度应为正整数', - 'rebuild': '重建索引', - 'createSpace': '创建图空间', - 'No': '序号', - 'spaceName': '名称', - 'partitionNumber': 'Partition Number', - 'replicaFactor': 'Replica Factor', - 'charset': 'Charset', - 'collate': 'Collate', - 'vidType': 'Vid Type', - 'group': 'Group', - 'comment': 'Comment', - 'operations': '操作', - 'spaceNameEnter': '请输入图空间名称', - 'propertyCount': '属性数量', - 'configTypeList': '{type}列表', - 'configTypeAction': '{action}{type}', - 'timestampFormat': '时间类型支持插入方式:
1. 调用函数 now()
2. 调用函数 timestamp(),例如:timestamp(\'2021-07-05T06:18:43.984000\')
3. 直接输入时间戳,即从 1970-01-01 00:00:00 开始的秒数', - 'dateFormat': '日期类型支持插入方式:
调用函数 date(),例如:date(\'2021-03-17\')', - 'timeFormat': '时间类型支持插入方式:
调用函数 time(),例如time(\'17:53:59\')', - 'datetimeFormat': '日期时间类型支持插入方式:
调用函数 datetime(),例如:datetime(\'2021-03-17T17:53:59\')', - 'geographyFormat': 'geo 类型支持插入方式:
调用函数 ST_GeogFromText(),例如:ST_GeogFromText(\'POINT(6 10)\')', - 'geography(point)Format': 'geo(point) 类型支持插入方式:
调用函数 ST_GeogFromText(\'POINT()\'),例如:ST_GeogFromText(\'POINT(6 10)\')', - 'geography(linestring)Format': 'geo(linestring) 类型支持插入方式:
调用函数 ST_GeogFromText(\'LINESTRING()\'),例如:ST_GeogFromText(\'LINESTRING(3 4,10 50,20 25)\')', - 'geography(polygon)Format': 'geo(polygon) 类型支持插入方式:
调用函数 ST_GeogFromText(\'POLYGON()\'),例如:ST_GeogFromText(\'POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2))\')', - 'durationFormat': 'duration 类型支持插入方式:
调用函数 duration(),例如:duration({years: 1, seconds: 0})', - 'setTTL': '设置TTL(存活时间)', - 'refresh': '更新', - 'startStat': '开始统计', - 'statTip': '统计执行时间受数据量影响。', - 'lastRefreshTime': '上次更新时间', - 'statsType': '维度', - 'statsName': '名称', - 'statsCount': '数量', - 'statError': '统计失败,请重试', - 'statFinished': '统计结束', - 'deleteSpace': '删除图空间', - 'cloneSpace': '克隆图空间', - 'length': '长度', - 'selectVidTypeTip': '选择 Vid 类型', - 'csvDownload': '导出 CSV', - 'pngDownload': ' 导出 PNG', - 'rebuildSuccess': '{names}重建完成', - 'rebuildFailed': '{names}重建失败', - 'startRebuildIndex': '开始重建索引{name}', - 'getSchema': '获取 Schema', - 'getSchemaTip': `因为当前 ${window.gConfig.databaseName} 版本下不存在点边的强绑定关系,结果将依据随机捞取到的数据生成,仅供参考。`, - 'danglingEdge': '悬挂边', - 'showDDL': '查看 Schema DDL', - 'downloadNGQL': '下载 .NGQL 文件', - 'getDDLError': '获取 Schema DDL 失败, 请重试', - 'totalVertices': '总计点数量', - 'totalEdges': '总计边数量' + schema: { + spaceList: '图空间列表', + useSpaceErrTip: + '图空间未找到。立刻尝试使用刚创建的图空间可能会失败,因为创建是异步实现的。为确保数据同步,后续操作能顺利进行,请等待 2 个心跳周期(20 秒)。', + createSuccess: '创建成功', + defineFields: '定义属性', + uniqProperty: '属性名称不允许重名', + cancelOperation: '是否取消配置并关闭面板', + cancelPropmt: '关闭面板将删除所有属性,是否继续?', + fieldDisabled: '该属性被 ttl_col 引用,不支持更改操作,如要更改,请先更新 ttl', + indexExist: '已拥有索引,无法同时配置 TTL', + indexType: '索引类型', + indexName: '索引名称', + indexFields: '索引属性', + associateName: '关联 {type} 名称', + dragSorting: '(可拖拽排序)', + selectFields: '请选择关联的属性', + indexedLength: '请输入索引长度', + indexedLengthDescription: '设置索引字符串的长度。如果索引定长字符串,则索引长度无法修改。', + indexedLengthRequired: '索引长度应为正整数', + rebuild: '重建索引', + createSpace: '创建图空间', + No: '序号', + spaceName: '名称', + partitionNumber: 'Partition Number', + replicaFactor: 'Replica Factor', + charset: 'Charset', + collate: 'Collate', + vidType: 'Vid Type', + group: 'Group', + comment: 'Comment', + operations: '操作', + spaceNameEnter: '请输入图空间名称', + propertyCount: '属性数量', + configTypeList: '{type}列表', + configTypeAction: '{action}{type}', + timestampFormat: + "时间类型支持插入方式:
1. 调用函数 now()
2. 调用函数 timestamp(),例如:timestamp('2021-07-05T06:18:43.984000')
3. 直接输入时间戳,即从 1970-01-01 00:00:00 开始的秒数", + dateFormat: "日期类型支持插入方式:
调用函数 date(),例如:date('2021-03-17')", + timeFormat: "时间类型支持插入方式:
调用函数 time(),例如time('17:53:59')", + datetimeFormat: "日期时间类型支持插入方式:
调用函数 datetime(),例如:datetime('2021-03-17T17:53:59')", + geographyFormat: "geo 类型支持插入方式:
调用函数 ST_GeogFromText(),例如:ST_GeogFromText('POINT(6 10)')", + 'geography(point)Format': + "geo(point) 类型支持插入方式:
调用函数 ST_GeogFromText('POINT()'),例如:ST_GeogFromText('POINT(6 10)')", + 'geography(linestring)Format': + "geo(linestring) 类型支持插入方式:
调用函数 ST_GeogFromText('LINESTRING()'),例如:ST_GeogFromText('LINESTRING(3 4,10 50,20 25)')", + 'geography(polygon)Format': + "geo(polygon) 类型支持插入方式:
调用函数 ST_GeogFromText('POLYGON()'),例如:ST_GeogFromText('POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2))')", + durationFormat: + 'duration 类型支持插入方式:
调用函数 duration(),例如:duration({years: 1, seconds: 0})', + setTTL: '设置TTL(存活时间)', + refresh: '更新', + startStat: '开始统计', + statTip: '统计执行时间受数据量影响。', + lastRefreshTime: '上次更新时间', + statsType: '维度', + statsName: '名称', + statsCount: '数量', + statError: '统计失败,请重试', + statFinished: '统计结束', + deleteSpace: '删除图空间', + cloneSpace: '克隆图空间', + length: '长度', + selectVidTypeTip: '选择 Vid 类型', + csvDownload: '导出 CSV', + pngDownload: ' 导出 PNG', + rebuildSuccess: '{names}重建完成', + rebuildFailed: '{names}重建失败', + startRebuildIndex: '开始重建索引{name}', + getSchema: '获取 Schema', + getSchemaTip: `因为当前 ${window.gConfig.databaseName} 版本下不存在点边的强绑定关系,结果将依据随机捞取到的数据生成,仅供参考。`, + danglingEdge: '悬挂边', + showDDL: '查看 Schema DDL', + downloadNGQL: '下载 .NGQL 文件', + getDDLError: '获取 Schema DDL 失败, 请重试', + totalVertices: '总计点数量', + totalEdges: '总计边数量', }, - 'empty': { - 'stats': '暂无统计数据', - 'statsTip': '请点击按钮开始统计', - 'tag': '暂无标签数据', - 'tagTip': '请点击按钮创建标签', - 'edge': '暂无边类型数据', - 'edgeTip': '请点击按钮创建边类型', - 'index': '暂无索引数据', - 'indexTip': '请点击按钮创建索引' + empty: { + stats: '暂无统计数据', + statsTip: '请点击按钮开始统计', + tag: '暂无标签数据', + tagTip: '请点击按钮创建标签', + edge: '暂无边类型数据', + edgeTip: '请点击按钮创建边类型', + index: '暂无索引数据', + indexTip: '请点击按钮创建索引', }, - 'menu': { - 'use': '使用手册', - 'release': '更新日志', - 'forum': '求助论坛', - 'nGql': 'nGQL', - 'feedback': '问题反馈', - 'repo': 'GitHub项目', - 'trial': '企业版试用', - 'contact': '联系我们' + menu: { + use: '使用手册', + release: '更新日志', + forum: '求助论坛', + nGql: 'nGQL', + feedback: '问题反馈', + repo: 'GitHub项目', + trial: '企业版试用', + contact: '联系我们', }, - 'link': { - 'nGQLHref': 'https://docs.nebula-graph.com.cn/3.5.0/3.ngql-guide/1.nGQL-overview/1.overview/', - 'mannualHref': 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/about-studio/st-ug-what-is-graph-studio/', - 'startStudioHref': 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-plan-schema/', - 'versionLogHref': 'https://docs.nebula-graph.com.cn/3.5.0/20.appendix/release-notes/studio-release-note/', - 'forumHref': 'https://discuss.nebula-graph.com.cn/', - 'feedback': 'https://discuss.nebula-graph.com.cn/tag/nebula-studio', - 'trial': 'https://wj.qq.com/s2/10158890/69a8', - 'contact': 'https://www.nebula-graph.com.cn/contact', - 'loginHref': 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/deploy-connect/st-ug-connect/' + link: { + nGQLHref: 'https://docs.nebula-graph.com.cn/3.5.0/3.ngql-guide/1.nGQL-overview/1.overview/', + mannualHref: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/about-studio/st-ug-what-is-graph-studio/', + startStudioHref: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-plan-schema/', + versionLogHref: 'https://docs.nebula-graph.com.cn/3.5.0/20.appendix/release-notes/studio-release-note/', + forumHref: 'https://discuss.nebula-graph.com.cn/', + feedback: 'https://discuss.nebula-graph.com.cn/tag/nebula-studio', + trial: 'https://wj.qq.com/s2/10158890/69a8', + contact: 'https://www.nebula-graph.com.cn/contact', + loginHref: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/deploy-connect/st-ug-connect/', }, - 'sketch': { - 'dragTip': '拖放到画布上', - 'tag': '标签', - 'edge': '边类型', - 'name': '{name}名称', - 'detail': '{name}详情', - 'comment': '描述', - 'properties': '属性', - 'propertyName': '属性名称', - 'dataType': '数据类型', - 'addProperty': '添加属性', - 'type': '类型', - 'list': '草图列表', - 'new': '新建', - 'applyToSpace': '应用到图空间', - 'createSpace': '创建图空间', - 'selectSpace': '选择图空间', - 'noCurrentSketch': '当前没有选中草图', - 'noCurrentSketchTips': '请在左侧列表中选择草图', - 'sketchInvalid': '请完善当前 Schema 信息。', - 'saveSuccess': '保存成功', - 'saveReminder': '当前草图有修改未保存,是否继续切换草图?', - 'saveTip': '当前草图有修改未保存, 请先保存。', - 'confirmDelete': '请确认是否删除', - 'saveDraft': '保存草稿', - 'export': '导出', - 'applySpaceTip': '新的 schema 不会覆盖图空间中已有的 schema 信息', - 'sameSchemaWarning': '图空间中已存在{content},请修改{hasType}名称,或者选择其他图空间。', - 'noData': '暂无数据,请先导入数据', - 'uniqName': '标签和边类型名称不允许重名', - 'spaceExisted': '图空间已存在', - 'updateNameSuccess': '更新名称成功', - 'search': '搜索草图名称' + sketch: { + dragTip: '拖放到画布上', + tag: '标签', + edge: '边类型', + name: '{name}名称', + detail: '{name}详情', + comment: '描述', + properties: '属性', + propertyName: '属性名称', + dataType: '数据类型', + addProperty: '添加属性', + type: '类型', + list: '草图列表', + new: '新建', + applyToSpace: '应用到图空间', + createSpace: '创建图空间', + selectSpace: '选择图空间', + noCurrentSketch: '当前没有选中草图', + noCurrentSketchTips: '请在左侧列表中选择草图', + sketchInvalid: '请完善当前 Schema 信息。', + saveSuccess: '保存成功', + saveReminder: '当前草图有修改未保存,是否继续切换草图?', + saveTip: '当前草图有修改未保存, 请先保存。', + confirmDelete: '请确认是否删除', + saveDraft: '保存草稿', + export: '导出', + applySpaceTip: '新的 schema 不会覆盖图空间中已有的 schema 信息', + sameSchemaWarning: '图空间中已存在{content},请修改{hasType}名称,或者选择其他图空间。', + noData: '暂无数据,请先导入数据', + uniqName: '标签和边类型名称不允许重名', + spaceExisted: '图空间已存在', + updateNameSuccess: '更新名称成功', + search: '搜索草图名称', }, - 'welcome': { - 'doc': '文档', - 'guide': '新手引导', - 'quickStart': '开始', - 'quickStartDesc': '文档', - 'demos': '示例', - 'starterDatasets': '入门数据集', - 'solutionDatasets': '行业数据集', - 'demoDownload': '下载', - 'demoDownloading': '下载中', - 'demoIntro': 'Demo 介绍', - 'loadWaiting': '数据加载中,请稍等...预计将在 {second}s 后结束', - 'downloadSuccess': '数据集 `{space}` 下载成功', - 'spaceExist': '图空间 `{space}` 已存在', - 'schemaModuleLink': 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-create-schema/', - 'importModuleLink': 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-import-data/', - 'consoleModuleLink': 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-console/', - 'sketchModuleLink': 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/draft/', - 'basketballplayerDocLink': 'https://nebula-graph.com.cn/posts/playground-basketball-player', - 'shareholdingDocLink': 'https://nebula-graph.com.cn/demo/shared-holding', - 'openstackDocLink': 'https://www.siwei.io/graph-enabled-infra-ops', - 'snsDocLink': 'https://www.siwei.io/nebulagraph-sns/', - 'datalineageDocLink': 'https://www.siwei.io/data-lineage-oss-ref-solution/', - 'movieDocLink': 'https://www.siwei.io/recommendation-system-with-graphdb/', - 'idMappingDocLink': 'https://www.siwei.io/identity-resolution/', - 'fraudDetectionDocLink': 'https://www.siwei.io/fraud-detection-with-nebulagraph/', - 'fifa2022DocLink': 'https://www.siwei.io/chatgpt-and-nebulagraph-predict-fifa-world-cup/', - 'alwaysShow': '始终展示欢迎页', - 'progressTitle': '下载 & 导入数据' - } -}; \ No newline at end of file + welcome: { + doc: '文档', + guide: '新手引导', + quickStart: '开始', + quickStartDesc: '文档', + demos: '示例', + starterDatasets: '入门数据集', + solutionDatasets: '行业数据集', + demoDownload: '下载', + demoDownloading: '下载中', + demoIntro: 'Demo 介绍', + loadWaiting: '数据加载中,请稍等...预计将在 {second}s 后结束', + downloadSuccess: '数据集 `{space}` 下载成功', + spaceExist: '图空间 `{space}` 已存在', + schemaModuleLink: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-create-schema/', + importModuleLink: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-import-data/', + consoleModuleLink: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/st-ug-console/', + sketchModuleLink: 'https://docs.nebula-graph.com.cn/3.5.0/nebula-studio/quick-start/draft/', + basketballplayerDocLink: 'https://nebula-graph.com.cn/posts/playground-basketball-player', + shareholdingDocLink: 'https://nebula-graph.com.cn/demo/shared-holding', + openstackDocLink: 'https://www.siwei.io/graph-enabled-infra-ops', + snsDocLink: 'https://www.siwei.io/nebulagraph-sns/', + datalineageDocLink: 'https://www.siwei.io/data-lineage-oss-ref-solution/', + movieDocLink: 'https://www.siwei.io/recommendation-system-with-graphdb/', + idMappingDocLink: 'https://www.siwei.io/identity-resolution/', + fraudDetectionDocLink: 'https://www.siwei.io/fraud-detection-with-nebulagraph/', + fifa2022DocLink: 'https://www.siwei.io/chatgpt-and-nebulagraph-predict-fifa-world-cup/', + alwaysShow: '始终展示欢迎页', + progressTitle: '下载 & 导入数据', + }, +}; diff --git a/app/pages/Import/TaskCreate/SchemaConfig/FileMapping/index.tsx b/app/pages/Import/TaskCreate/SchemaConfig/FileMapping/index.tsx index 497f2a47..678fe907 100644 --- a/app/pages/Import/TaskCreate/SchemaConfig/FileMapping/index.tsx +++ b/app/pages/Import/TaskCreate/SchemaConfig/FileMapping/index.tsx @@ -1,4 +1,4 @@ -import { Button, Collapse, Input, Select, Table, Tooltip } from 'antd'; +import { Button, Collapse, CollapseProps, Input, Select, Table, Tooltip } from 'antd'; import { useCallback, useEffect, useMemo, useState } from 'react'; import { observer } from 'mobx-react-lite'; import cls from 'classnames'; @@ -16,7 +16,6 @@ import styles from '../index.module.less'; import FileSelectModal from './FileSelectModal'; const Option = Select.Option; -const Panel = Collapse.Panel; interface IProps { item: ITagFileItem | IEdgeFileItem; @@ -52,51 +51,47 @@ const VIDSetting = observer( }, [data, idKey], ); - useEffect(() => { - ([idPrefix, idSuffix, idFunction].some((i) => !!data[i]) || data[idKey].length > 1) && setKey(['default']); - }, []); - return ( -
- - -
- {intl.get(`import.${label}`)} - handleMapping(index)} - // @ts-ignore - file={data.file} - data={data[idKey]} - multipleMode={true} - > - {!data[idKey] || data[idKey].length === 0 - ? intl.get('import.selectCsvColumn') - : data[idKey].map((i) => `Column ${i}`).join(', ')} - -
- -
- {intl.get('import.vidFunction')} - {intl.get('import.vidFunctionTip')} -
-
- {intl.get('import.vidPrefix')} - {intl.get('import.vidPrefixTip')} -
-
- {intl.get('import.vidSuffix')} - {intl.get('import.vidSuffixTip')} -
- - } - /> -
- } - key="default" - > + const items: CollapseProps['items'] = [ + { + key: 'default', + label: ( +
+
+ {intl.get(`import.${label}`)} + handleMapping(index)} + // @ts-ignore + file={data.file} + data={data[idKey]} + multipleMode={true} + > + {!data[idKey] || data[idKey].length === 0 + ? intl.get('import.selectCsvColumn') + : data[idKey].map((i) => `Column ${i}`).join(', ')} + +
+ +
+ {intl.get('import.vidFunction')} + {intl.get('import.vidFunctionTip')} +
+
+ {intl.get('import.vidPrefix')} + {intl.get('import.vidPrefixTip')} +
+
+ {intl.get('import.vidSuffix')} + {intl.get('import.vidSuffixTip')} +
+ + } + /> +
+ ), + children: ( + <> {spaceVidType === 'INT64' && idFunction && (
{intl.get('import.vidFunction')} @@ -153,15 +148,30 @@ const VIDSetting = observer( {intl.get('import.preview')}
{data[idPrefix] && {data[idPrefix]}} - {data[idKey].map((i) => ( + {data[idKey]?.map((i) => ( {`Column ${i}`} ))} {data[idSuffix] && {data[idSuffix]}}
)} - -
+ + ), + }, + ]; + useEffect(() => { + ([idPrefix, idSuffix, idFunction].some((i) => !!data[i]) || data[idKey].length > 1) && setKey(['default']); + }, []); + return ( +
+
); }, diff --git a/app/pages/Import/TaskCreate/SchemaConfig/index.tsx b/app/pages/Import/TaskCreate/SchemaConfig/index.tsx index 7024a5b7..ef0e1e4a 100644 --- a/app/pages/Import/TaskCreate/SchemaConfig/index.tsx +++ b/app/pages/Import/TaskCreate/SchemaConfig/index.tsx @@ -1,4 +1,4 @@ -import { Button, Collapse, Select } from 'antd'; +import { Button, Collapse, CollapseProps, Select } from 'antd'; import { useCallback } from 'react'; import { CloseOutlined } from '@ant-design/icons'; import { observer } from 'mobx-react-lite'; @@ -12,7 +12,6 @@ import { ITagItem, IEdgeItem, ITagFileItem, IEdgeFileItem, TagFileItem, EdgeFile import { IImportFile } from '@app/interfaces/import'; import styles from './index.module.less'; import FileMapping from './FileMapping'; -const { Panel } = Collapse; const Option = Select.Option; interface IProps { configItem: ITagItem | IEdgeItem; @@ -105,33 +104,35 @@ const SchemaConfig = (props: IProps) => { (item: ITagFileItem | IEdgeFileItem) => configItem.deleteFileItem(item as any), [configItem], ); - return ( - - } - key="default" - extra={} - > - {files.map((item: ITagFileItem | IEdgeFileItem, index) => ( - - ))} - {!!name && ( -
- -
- )} -
-
- ); + const items: CollapseProps['items'] = [ + { + key: 'default', + label: , + extra: , + children: ( + <> + {files.map((item: ITagFileItem | IEdgeFileItem, index) => ( + + ))} + {!!name && ( +
+ +
+ )} + + ), + }, + ]; + return ; }; export default observer(SchemaConfig); diff --git a/app/pages/Schema/SchemaConfig/Edit/CommonEdit/PropertiesForm.tsx b/app/pages/Schema/SchemaConfig/Edit/CommonEdit/PropertiesForm.tsx index 965e4a3f..75052009 100644 --- a/app/pages/Schema/SchemaConfig/Edit/CommonEdit/PropertiesForm.tsx +++ b/app/pages/Schema/SchemaConfig/Edit/CommonEdit/PropertiesForm.tsx @@ -9,16 +9,16 @@ import styles from './index.module.less'; const confirm = Modal.confirm; interface IProps { - editType: ISchemaType + editType: ISchemaType; initialRequired: boolean; data: any; editDisabled: boolean; onBeforeEdit: (index: number | null) => void; - onEdit: (config: IAlterForm) => void; + onEdit: (config: IAlterForm) => boolean; } interface IEditProperty extends IProperty { - alterType: AlterType + alterType: AlterType; } const itemLayout = { wrapperCol: { @@ -27,13 +27,14 @@ const itemLayout = { }; const PropertiesForm = (props: IProps) => { - const { - editType, - initialRequired, - data: { name, properties, ttlConfig }, + const { + editType, + initialRequired, + data: { name, properties, ttlConfig }, editDisabled, - onEdit, - onBeforeEdit } = props; + onEdit, + onBeforeEdit, + } = props; const { intl } = useI18n(); const [list, setList] = useState(properties); const [editField, setEditField] = useState(null); @@ -48,13 +49,13 @@ const PropertiesForm = (props: IProps) => { useEffect(() => { setPropertyRequired(initialRequired); }, [initialRequired]); - + useEffect(() => { form.resetFields(); }, [editField]); - const handleClearProperties = e => { + const handleClearProperties = (e) => { const clear = e.target.checked; - if(clear) { + if (clear) { setPropertyRequired(clear); handlePropertyAdd(); } else { @@ -63,10 +64,12 @@ const PropertiesForm = (props: IProps) => { content: intl.get('schema.cancelPropmt'), okText: intl.get('common.yes'), cancelText: intl.get('common.no'), - onOk: () => { - setPropertyRequired(clear); + onOk: async () => { if (properties.length > 0) { - handlePropertyDelete(properties); + const isSuccess = await handlePropertyDelete(properties); + isSuccess && setPropertyRequired(clear); + } else { + setPropertyRequired(clear); } }, }); @@ -89,9 +92,8 @@ const PropertiesForm = (props: IProps) => { onBeforeEdit(list.length); }; - const handlePropertyDelete = async (fields: IProperty[]) => { - onEdit({ + const isSuccess = await onEdit({ type: editType, name, action: 'DROP', @@ -99,6 +101,7 @@ const PropertiesForm = (props: IProps) => { fields, }, }); + return isSuccess; }; const handleEditBefore = (data: IProperty, index: number) => { @@ -120,12 +123,12 @@ const PropertiesForm = (props: IProps) => { onBeforeEdit(null); if (editField?.alterType === 'ADD') { setList(list.slice(0, -1)); - if(list.length === 1) { + if (list.length === 1) { setPropertyRequired(false); } } }; - + const handlePropertyUpdate = (values) => { const { name: propertyName, type, value, comment, allowNull, fixedLength } = values; const { alterType } = editField!; @@ -134,14 +137,16 @@ const PropertiesForm = (props: IProps) => { name, action: alterType, config: { - fields: [{ - name: propertyName, - type, - value, - comment, - allowNull, - fixedLength - }], + fields: [ + { + name: propertyName, + type, + value, + comment, + allowNull, + fixedLength, + }, + ], }, }); }; @@ -150,11 +155,7 @@ const PropertiesForm = (props: IProps) => { form.setFieldsValue({ value: '' }); }; return ( -
+ {intl.get('schema.defineFields')} @@ -163,34 +164,41 @@ const PropertiesForm = (props: IProps) => {
- -
{intl.get('common.propertyName')} - {intl.get('common.dataType')} + + {intl.get('common.propertyName')} + + + {intl.get('common.dataType')} + {intl.get('common.allowNull')}{intl.get('common.defaults')}{intl.get('common.comment')} {list.map((item, index) => { - return editRow === index - ? - : + ) : ( + handleEditBefore(item, index)} - />; + /> + ); })} diff --git a/app/pages/Schema/SchemaConfig/Edit/CommonEdit/index.tsx b/app/pages/Schema/SchemaConfig/Edit/CommonEdit/index.tsx index d4e76524..bd06d1b0 100644 --- a/app/pages/Schema/SchemaConfig/Edit/CommonEdit/index.tsx +++ b/app/pages/Schema/SchemaConfig/Edit/CommonEdit/index.tsx @@ -32,14 +32,14 @@ interface IPropertyItem { interface IData { name: string; comment: string; - properties: IProperty[], + properties: IProperty[]; ttlConfig: { - duration: string, - col: string - } + duration: string; + col: string; + }; } interface IProps { - editType: ISchemaType + editType: ISchemaType; } const ConfigEdit = (props: IProps) => { const { editType } = props; @@ -48,7 +48,9 @@ const ConfigEdit = (props: IProps) => { const { intl } = useI18n(); const [editName, setEditName] = useState(''); const [editKey, setEditKey] = useState(null); - const { schema: { getTagOrEdgeDetail, getTagOrEdgeInfo, alterField, getIndexTree } } = useStore(); + const { + schema: { getTagOrEdgeDetail, getTagOrEdgeInfo, alterField, getIndexTree }, + } = useStore(); const [tempComment, setTempComment] = useState(''); const [loading, setLoading] = useState(false); const [data, setData] = useState({ @@ -57,8 +59,8 @@ const ConfigEdit = (props: IProps) => { properties: [], ttlConfig: { col: '', - duration: '' - } + duration: '', + }, } as IData); const [ttlRequired, setTtlRequired] = useState(false); const [propertiesRequired, setPropertiesRequired] = useState(false); @@ -69,16 +71,13 @@ const ConfigEdit = (props: IProps) => { const getDetails = async () => { const _editName = state[editType]; - if(!_editName) { + if (!_editName) { history.push(`/schema/${editType}/list`); } setEditName(_editName); setLoading(true); const createGql = await getTagOrEdgeDetail(editType, _editName); - const { code: propCode, data: propData } = await getTagOrEdgeInfo( - editType, - _editName, - ); + const { code: propCode, data: propData } = await getTagOrEdgeInfo(editType, _editName); setLoading(false); if (createGql) { const fieldInfo = propCode === 0 ? propData.tables : []; @@ -90,17 +89,16 @@ const ConfigEdit = (props: IProps) => { const reg = /CREATE (?:TAG|EDGE)\s`.+`\s\((.*)\)\s+(ttl_duration = \d+),\s+(ttl_col = ".*?")(, comment = ".*")?/gm; const str = data.replace(/[\r\n]/g, ' '); const infoList = reg.exec(str) || []; - const properties: IProperty[] = fieldInfo.map(i => ({ - name: i.Field, - showType: i.Type, - type: i.Type.startsWith('fixed_string') ? 'fixed_string' : i.Type, - allowNull: i.Null === 'YES', - comment: i.Comment === '_EMPTY_' ? '' : i.Comment, - value: i.Default === '_EMPTY_' ? '' : convertBigNumberToString(i.Default), - fixedLength: i.Type.startsWith('fixed_string') - ? i.Type.replace(/[fixed_string(|)]/g, '') - : '', - })) || []; + const properties: IProperty[] = + fieldInfo.map((i) => ({ + name: i.Field, + showType: i.Type, + type: i.Type.startsWith('fixed_string') ? 'fixed_string' : i.Type, + allowNull: i.Null === 'YES', + comment: i.Comment === '_EMPTY_' ? '' : i.Comment, + value: i.Default === '_EMPTY_' ? '' : convertBigNumberToString(i.Default), + fixedLength: i.Type.startsWith('fixed_string') ? i.Type.replace(/[fixed_string(|)]/g, '') : '', + })) || []; const duration = infoList[2]?.split(' = ')[1] || ''; const col = infoList[3]?.split(' = ')[1].replace(/"/g, '') || ''; const comment = infoList[4]?.split(' = ')[1].slice(1, -1) || ''; @@ -114,8 +112,8 @@ const ConfigEdit = (props: IProps) => { properties, ttlConfig: { col, - duration - } + duration, + }, }); setTempComment(comment); }; @@ -134,6 +132,7 @@ const ConfigEdit = (props: IProps) => { await getDetails(); setEditKey(null); } + return res.code === 0; }; const handleCommentUpdate = async () => { setLoading(true); @@ -156,15 +155,13 @@ const ConfigEdit = (props: IProps) => { setLoading(true); const res = (await getIndexTree(editType)) || []; setLoading(false); - const hasIndex = res.some(i => i.name === editName); + const hasIndex = res.some((i) => i.name === editName); return hasIndex; }; return (
- +
@@ -179,36 +176,24 @@ const ConfigEdit = (props: IProps) => { className={styles.inputComment} defaultValue={data.comment} value={tempComment} - onChange={e => setTempComment(e.target.value)} + onChange={(e) => setTempComment(e.target.value)} /> {editKey !== 'comment' ? ( <> - ) : ( <> - - )} - @@ -219,15 +204,16 @@ const ConfigEdit = (props: IProps) => { editDisabled={editKey !== null} onBeforeEdit={(index) => setEditKey(index !== null ? `properties[${index}]` : null)} initialRequired={propertiesRequired} - onEdit={handleAlter} - data={data} /> - + setEditKey(type === null ? null : 'ttl')} /> diff --git a/package-lock.json b/package-lock.json index 508f05ca..a87993b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "mobx-react-lite": "^3.4.3", "query-string": "^7.1.1", "react": "^18.2.0", - "react-beautiful-dnd": "^13.0.0", + "react-beautiful-dnd": "^13.1.1", "react-color": "^2.19.3", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.2.0", @@ -6906,9 +6906,9 @@ } }, "node_modules/react-beautiful-dnd": { - "version": "13.1.0", - "resolved": "https://registry.npmmirror.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.0.tgz", - "integrity": "sha512-aGvblPZTJowOWUNiwd6tNfEpgkX5OxmpqxHKNW/4VmvZTNTbeiq7bA3bn5T+QSF2uibXB0D1DmJsb1aC/+3cUA==", + "version": "13.1.1", + "resolved": "https://registry.npmmirror.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz", + "integrity": "sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==", "dependencies": { "@babel/runtime": "^7.9.2", "css-box-model": "^1.2.0", @@ -6919,8 +6919,8 @@ "use-memo-one": "^1.1.1" }, "peerDependencies": { - "react": "^16.8.5 || ^17.0.0", - "react-dom": "^16.8.5 || ^17.0.0" + "react": "^16.8.5 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.5 || ^17.0.0 || ^18.0.0" } }, "node_modules/react-beautiful-dnd/node_modules/memoize-one": { @@ -13757,9 +13757,9 @@ } }, "react-beautiful-dnd": { - "version": "13.1.0", - "resolved": "https://registry.npmmirror.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.0.tgz", - "integrity": "sha512-aGvblPZTJowOWUNiwd6tNfEpgkX5OxmpqxHKNW/4VmvZTNTbeiq7bA3bn5T+QSF2uibXB0D1DmJsb1aC/+3cUA==", + "version": "13.1.1", + "resolved": "https://registry.npmmirror.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz", + "integrity": "sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==", "requires": { "@babel/runtime": "^7.9.2", "css-box-model": "^1.2.0", diff --git a/package.json b/package.json index e43ff4b7..bf71776a 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "mobx-react-lite": "^3.4.3", "query-string": "^7.1.1", "react": "^18.2.0", - "react-beautiful-dnd": "^13.0.0", + "react-beautiful-dnd": "^13.1.1", "react-color": "^2.19.3", "react-copy-to-clipboard": "^5.1.0", "react-dom": "^18.2.0", diff --git a/vite.config.ts b/vite.config.ts index 8b8f7e97..5cee2c1c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -37,6 +37,7 @@ const htmlPlugin = (data?: Record): Plugin => { export default defineConfig({ build: { target: 'esnext', + sourcemap: true, }, plugins: [ react(), From 5c4fe13e46d8c775fded51e5f8a9f6301c2c6b93 Mon Sep 17 00:00:00 2001 From: Nut He <18328704+hetao92@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:56:59 +0800 Subject: [PATCH 2/3] mod: code review --- .../FileConfigSetting/index.module.less | 5 +--- app/components/FileConfigSetting/index.tsx | 23 ++++--------------- server/api/studio/internal/model/sketch.go | 4 ++-- server/api/studio/internal/model/taskInfo.go | 2 +- 4 files changed, 9 insertions(+), 25 deletions(-) diff --git a/app/components/FileConfigSetting/index.module.less b/app/components/FileConfigSetting/index.module.less index f24b91a8..d09c6712 100644 --- a/app/components/FileConfigSetting/index.module.less +++ b/app/components/FileConfigSetting/index.module.less @@ -61,10 +61,7 @@ width: 210px; background: @white; box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.25); - padding: 0; - .configForm { - padding: 11px 15px; - } + padding: 11px 15px; :global(.ant-dropdown-menu) { box-shadow: none; } diff --git a/app/components/FileConfigSetting/index.tsx b/app/components/FileConfigSetting/index.tsx index aeb6c9a0..13ba9365 100644 --- a/app/components/FileConfigSetting/index.tsx +++ b/app/components/FileConfigSetting/index.tsx @@ -22,13 +22,14 @@ const DelimiterConfigModal = (props: { onConfirm: (string) => void }) => { const { intl } = useI18n(); const [value, setValue] = useState(''); return ( -
e.stopPropagation()}> +
{intl.get('common.value')} setValue(e.target.value)} placeholder={intl.get('import.enterDelimiter')} + onClick={(e) => e.stopPropagation()} />