diff --git a/app/config/locale/en-US.json b/app/config/locale/en-US.json
index 2956fa42..fb3e8789 100644
--- a/app/config/locale/en-US.json
+++ b/app/config/locale/en-US.json
@@ -19,7 +19,6 @@
"confirm": "Confirm",
"import": "Import",
"ask": "Are you sure to proceed?",
- "output": "Export CSV File",
"openInExplore": "Open In Explorer",
"schema": "Schema",
"create": "Create",
@@ -77,7 +76,7 @@
"username": "Username",
"password": "Password",
"success": "succeed",
- "clear": "Clear Connection",
+ "clear": "Log out",
"title": "Connect to Nebula Graph"
},
"formRules": {
@@ -85,6 +84,7 @@
"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})",
@@ -130,7 +130,6 @@
"fileSize": "Size",
"fileTitle": "Select Files",
"bindDatasource": "Bind Datasource",
- "confirm": "Confirm",
"endImport": "Stop Import",
"prop": "Prop",
"mapping": "CSV Index",
@@ -154,10 +153,15 @@
"addTag": "Add Tag",
"config": "Task Config",
"parseFailed": "File parsing failed",
- "uploadTemplate": "Click or drag the yaml configuration file to this area to upload",
- "uploadTemplateTip": "Please keep only the file name (retain the file extension) for all file paths in the template, such as logPath: config.csv",
- "fileUploadRequired": "Make sure all csv data files are uploaded before uploading the configuration",
- "reUpload": "Re-upload"
+ "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 Nebula Graph 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. 3. Configure the Yaml file: please keep only the file name (retain the file extension) for all file paths (path, failDataPath, logPath) in the template, e.g. logPath: config.csv",
+ "reUpload": "Re-upload",
+ "fileNotExist": "{name} file does not exist!",
+ "importYaml": "Import the YAML file"
},
"schema": {
"spaceList": "Graph Space List",
@@ -215,11 +219,13 @@
"deleteSpace": "Delete Graph Space",
"cloneSpace": "Clone Graph Space",
"length": "Length",
- "selectVidTypeTip": "Please select the type"
+ "selectVidTypeTip": "Please select the type",
+ "csvDownload": "Export CSV File",
+ "pngDownload": "Export PNG File"
},
"menu": {
"use": "Use Manual",
- "release": "New Version",
+ "release": "Release Note",
"forum": "Help Forum",
"nGql": "nGQL"
},
diff --git a/app/config/locale/zh-CN.json b/app/config/locale/zh-CN.json
index 170ed0f2..2bfe14b1 100644
--- a/app/config/locale/zh-CN.json
+++ b/app/config/locale/zh-CN.json
@@ -19,7 +19,6 @@
"confirm": "确认",
"import": "导入",
"ask": "确定进行当前操作?",
- "output":"导出CSV文件",
"openInExplore": "导入图探索",
"schema": "Schema",
"create": "创建",
@@ -77,7 +76,7 @@
"username": "用户名",
"password": "密码",
"success": "配置成功",
- "clear": "清除连接",
+ "clear": "登出",
"title": "配置数据库"
},
"formRules": {
@@ -85,6 +84,7 @@
"usernameRequired": "请填写用户名",
"passwordRequired": "请填写密码",
"positiveIntegerRequired": "请输入一个非负整数",
+ "nameValidate": "命名必须以字母开头,且只支持输入英文字母、数字以及下划线_",
"nameRequired": "请输入名称",
"numberRequired": "请输入正整数",
"replicaLimit": "副本数量不得超过你当前 online 机器数量({number})",
@@ -130,7 +130,6 @@
"fileSize": "大小",
"fileTitle": "文件列表",
"bindDatasource": "绑定数据源",
- "confirm": "确认",
"endImport": "终止导入",
"prop": "属性",
"mapping": "对应列标",
@@ -154,10 +153,15 @@
"addTag": "添加 Tag",
"config": "任务配置",
"parseFailed": "文件解析失败",
- "uploadTemplate": "点击或拖动yaml配置文件到该区域上传",
- "uploadTemplateTip": "模板中所有文件路径请仅保留文件名(保留文件扩展名),比如 logPath: config.csv",
- "fileUploadRequired": "上传配置前请确保所有 csv 数据文件已上传",
- "reUpload": "重新上传"
+ "uploadTemplate": "将 YAML 配置文件拖放到该区域",
+ "uploadBoxTip": "The YAML configuration file is used to describe information about the files to be imported, the Nebula Graph server, and more. ",
+ "fileUploadRequired": "1. 请确保在导入 YAML 文件之前上传所有 CSV 数据文件。 如果没有,请先前往",
+ "fileUploadRequired2": "数据文件",
+ "exampleDownload": "2. 配置文件示例:",
+ "uploadTemplateTip": "3.配置Yaml文件:模板中所有文件路径(path、failDataPath、logPath)请只保留文件名(保留文件扩展名),例如: 日志路径:config.csv",
+ "reUpload": "重新上传",
+ "fileNotExist": "文件 {name} 不存在",
+ "importYaml": "导入 YAML 文件"
},
"schema": {
"spaceList": "图空间列表",
@@ -215,11 +219,13 @@
"deleteSpace": "删除图空间",
"cloneSpace": "克隆图空间",
"length": "长度",
- "selectVidTypeTip": "选择 Vid 类型"
+ "selectVidTypeTip": "选择 Vid 类型",
+ "csvDownload": "导出 CSV",
+ "pngDownload": " 导出 PNG"
},
"menu": {
"use": "使用手册",
- "release": "新发布",
+ "release": "更新日志",
"forum": "求助论坛",
"nGql": "nGQL"
},
diff --git a/app/config/rules.ts b/app/config/rules.ts
index baa83422..0d0ad482 100644
--- a/app/config/rules.ts
+++ b/app/config/rules.ts
@@ -1,4 +1,4 @@
-import { POSITIVE_INTEGER_REGEX } from '@app/utils/constant';
+import { NAME_REGEX, POSITIVE_INTEGER_REGEX } from '@app/utils/constant';
import intl from 'react-intl-universal';
export const hostRulesFn = () => [
@@ -22,12 +22,22 @@ export const passwordRulesFn = () => [
},
];
-export const nameRulesFn = () => [
- {
- required: true,
- message: intl.get('formRules.nameRequired'),
- },
-];
+export const nameRulesFn = () => {
+ const version = sessionStorage.getItem('nebulaVersion');
+ const nameRequired = [
+ {
+ required: true,
+ message: intl.get('formRules.nameRequired'),
+ },
+ ];
+ const nameValidate = [
+ {
+ pattern: NAME_REGEX,
+ message: intl.get('formRules.nameValidate'),
+ },
+ ];
+ return version?.startsWith('v2') ? [...nameRequired, ...nameValidate] : nameRequired;
+};
export const numberRulesFn = () => [
{
diff --git a/app/pages/Console/ExportModal.tsx b/app/pages/Console/ExportModal.tsx
index 115678d9..92acd8e1 100644
--- a/app/pages/Console/ExportModal.tsx
+++ b/app/pages/Console/ExportModal.tsx
@@ -84,7 +84,7 @@ const ExportModal = (props: IProps) => {
-
+
{({ getFieldValue }) => {
const type = getFieldValue('type');
return type === 'vertex' ? <>
@@ -133,7 +133,7 @@ const ExportModal = (props: IProps) => {
>;
}}
-
+