Skip to content

Commit

Permalink
feat: add space clone & import api fix (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
hetao92 authored Mar 17, 2022
1 parent 8336460 commit c889b1c
Show file tree
Hide file tree
Showing 14 changed files with 143 additions and 457 deletions.
211 changes: 7 additions & 204 deletions app/config/locale/en-US.json

Large diffs are not rendered by default.

207 changes: 7 additions & 200 deletions app/config/locale/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@
"common": {
"requestError": "请求错误",
"currentSpace": "当前图空间",
"languageSelect": "语言" ,
"seeTheHistory":"查看历史",
"table": "表格",
"log":"日志",
"record": "记录",
"sorryNGQLCannotBeEmpty": "对不起,nGQL语句不能为空",
"disablesUseToSwitchSpace": "禁止使用命令切换Space",
"NGQLHistoryList": "nGQL历史列表",
"spaceTip": "仅对某个Space进行操作时需要",
"empty": "清空",
"run":"运行",
"console": "控制台",
"explore": "图探索",
"ok": "确认",
"success": "成功",
"fail": "失败",
"noData": "没有相应数据",
"cancel": "取消",
"confirm": "确认",
"import": "导入",
Expand All @@ -27,13 +23,11 @@
"openInExplore": "导入图探索",
"schema": "Schema",
"create": "创建",
"serialNumber": "序号",
"name": "名称",
"operation": "操作",
"delete": "删除",
"optional": "可选",
"exportNGQL": "对应的nGQL语句",
"field": "字段",
"relatedProperties": "相关属性",
"type": "类型",
"edit": "编辑",
Expand All @@ -48,38 +42,16 @@
"tag": "标签",
"edge": "边类型",
"index": "索引",
"list": "列表",
"yes": "确定",
"no": "取消",
"graph": "可视化",
"description": "说明",
"zoomOut": "缩小",
"zoomIn": "放大",
"move": "移动",
"rollback": "撤销",
"unlock": "解锁",
"lock": "锁定",
"moreSuggestion": "更多建议",
"algorithm": "算法",
"viewDocs": "查看文档",
"hotKeys": "快捷键",
"show": "显示",
"selected": "选中",
"search": "查询",
"color": "颜色",
"icon": "图标",
"copy": "复制",
"copySuccess": "已复制到剪切板",
"total": "共计",
"exportSelectVertexes": "导出选中点CSV",
"exportSelectEdges": "导出选中边CSV",
"noSelectedData": "当前没有选中数据",
"namePlaceholder":"请输入{name}名",
"comment": "描述",
"space": "图空间",
"version": "版本",
"statistics": "统计",
"download": "下载"
"statistics": "统计"
},
"doc": {
"welcome": "欢迎使用",
Expand All @@ -97,46 +69,32 @@
"start": "快速开始"
},
"warning": {
"configServer": "请先配置服务器",
"connectError": "数据库连接有误,请重新配置"
},
"NGQLOutput": {
"success": "执行成功"
},
"configServer": {
"connect": "连接",
"host": "Host",
"username": "用户名",
"password": "密码",
"success": "配置成功",
"fail": "配置失败",
"clear": "清除连接",
"title": "配置数据库"
},
"formRules": {
"hostRequired": "请填写数据库服务器的IP地址",
"usernameRequired": "请填写用户名",
"passwordRequired": "请填写密码",
"nodeIdError": "格式错误,一行1个VID,按回车键分隔",
"idRequired": "请输入导入的节点id",
"positiveIntegerRequired": "请输入一个非负整数",
"nameValidate": "命名必须以字母开头,且只支持输入英文字母、数字以及下划线_",
"nameRequired": "请输入名称",
"numberRequired": "请输入正整数",
"replicaLimit": "副本数量不得超过你当前 online 机器数量({number})",
"propertyRequired": "请输入属性名称",
"defaultRequired": "请输入默认值",
"ttlRequired": "请选择TTL指定的属性, 且属性的数据类型需为integer或timestamp",
"ttlDurationRequired": "请输入时间(s)",
"dataTypeRequired": "请选择数据类型",
"fixedStringLength": "Fixed String 长度需为正整数"
"ttlDurationRequired": "请输入时间(s)"
},
"console": {
"cost": "开销",
"execTime": "执行时间消耗",
"exportVertex": "请选择表中代表点VID的列",
"exportEdge": "请选择结果中分别代表边的起点(src_vid)、终点(dst_vid)和权重(rank)的列",
"showSubgraphs": "查看子图",
"deleteHistory": "清除历史",
"cypherParam": "自定义参数",
"favorites": "收藏夹",
Expand All @@ -146,103 +104,13 @@
"graphviz": "Graphviz"
},
"explore": {
"clear": "清除",
"clearTip": "是否清除当前视图?",
"startWithVertices": "开始探索",
"addConfirm": "确认添加",
"undo": "回退",
"deleteSelectNodes": "删除选中",
"expand": "拓展",
"unExpand": "取消拓展",
"fileImport": "文件导入",
"sampleImport": "样本导入",
"importPlaceholder": "输入VID或者用于生成VID的数据,一行一个数据,按回车键断开。格式示例如下:\nstring1\nstring2\nstring3",
"outgoing": "流出",
"incoming": "流入",
"bidirect": "双向",
"filter": "自定义筛选条件",
"operator": "运算符",
"value": "",
"selectSpace": "请选择Space",
"selectReminder": "切换Space会清除当前显示的数据,您确定要切换吗?",
"zoom": "缩放",
"showTags": "显示点",
"showEdges": "显示边",
"confirm": "确定",
"vertexStyle": "节点颜色",
"quantityLimit": "结果数量限制",
"colorGroupByTag": "按标签类型分类",
"noVertexPrompt": "当前画板没有点数据,请",
"search": "探索",
"queryById": "按VID查询",
"queryByIndex": "按索引查询",
"queryByCustom": "自定义查询",
"idToBeQueried": "指定VID",
"idPretreatment": "VID预处理",
"indexQueryPrompt_prefix": "当前Space ",
"indexQueryPrompt_suffix": "下,没有任何标签的索引,无法进行索引查询",
"indexQueryPrompt2": "请按如下示例创建标签索引",
"runCodeInConsole": "去控制台运行语句",
"indexLink": "关于索引的更多信息,请查看对应的",
"documentIntroduction": "文档介绍",
"selectIndex": "选择索引",
"paramFilter": "使用索引",
"relationship": "组合关系",
"operationConfirm": "删除操作会清空后续筛选条件。请确认是否继续执行",
"quiry": "查询",
"customQueryDescription": "可在控制台输入相应nGQL语句,查询得到结果后,点击上图中的“导入图探索”按钮,进行可视化探索",
"openInConsole": "去控制台",
"insertMethodSelect": "当前画板存在部分数据,请选择新增查询结果的插入方式",
"incrementalInsertion": "增量插入",
"insertAfterClear": "清除插入",
"emptyIndex": "索引为空",
"indexConditionDescription": "匹配字段时,必须以索引中左边第一个字段开始,如果需要匹配多个字段,不得跳过字段,但是可以省略后续字段。",
"timestampInput": "时间戳字段只支持输入数字",
"documentIntroductionUrl": "https://docs.nebula-graph.com.cn/2.5.0/3.ngql-guide/14.native-index-statements/",
"customQueryUrl": "https://cloud-cdn.nebula-graph.com.cn/studio-resource/go-to-explore_zh.png",
"pretreatmentExplaination": "Hash能预处理bool、double、int、string类型的数据生成VID,但是UUID仅支持预处理string类型的数据。如果您需要使用Hash或UUID预处理string生成VID,则使用单引号或双引号标示每个string。",
"exportToImg": "导出图形",
"exportToCSV":"导出CSV",
"export":"导出",
"toBlobError": "导出失败。当前画布尺寸过大,请缩放画布尺寸后重试。",
"expandTip": "双击任意点也可实现该点的拓展。",
"hotKeysInstructions": "图探索快捷键说明",
"graphAlgorithm": "图算法",
"allPath": "全路径",
"shortestPath": "最短路径",
"noLoopPath": "非循环路径",
"algorithmParams": "算法参数",
"srcId": "起点",
"dstId": "终点",
"relation": "关系",
"direction": "方向",
"stepLimit": "步数限制",
"steps": "步数",
"singleStep": "单步",
"rangeStep": "范围",
"addCondition": "添加条件",
"expansionConditions": "拓展条件",
"customStyle": "自定义颜色/图标",
"nodeSearch": "画板节点搜索",
"searchEmpty": "未查询到相应数据",
"selectedVertexes": "选中的点",
"selectedEdges": "选中的边",
"viewDetails": "查看详情",
"notExist": "不存在",
"expandItem": "展开",
"collapseItem": "收起",
"searchTip": "当前支持以下比较符 [=, >, <, !=, <>, <=, >=]",
"expressionError": "表达式错误",
"expandTips": "双击节点默认按当前配置快捷展开",
"missingParams": "参数缺失",
"emptyIndexTips": "无属性索引暂不支持查询数据功能,建议选择带属性索引查询",
"docForFindPath": "https://docs.nebula-graph.com.cn/2.5.0/3.ngql-guide/16.subgraph-and-path/2.find-path/"
"collapseItem": "收起"
},
"import": {
"vertexID": "Vertex ID",
"import":"导入",
"selectSpace": "选择 Space",
"uploadFile": "上传文件",
"uploadSuccess": "上传文件成功",
"importData": "导入数据",
"createTask": "创建导入任务",
"uploadTemp": "导入模板",
Expand All @@ -256,70 +124,20 @@
"vertices": "关联点",
"edge": "关联边",
"runImport": "导入",
"next": "下一步",
"goback":"上一步",
"mountPath": "挂载路径",
"importConfigValidationSuccess": "配置验证成功",
"mountPathPlaceholder": "请输入docker启动的数据挂载路径",
"fileName": "文件名",
"withHeader": "头字段",
"fileType": "类型",
"fileSize": "大小",
"fileTitle": "文件列表",
"fileSizeErrorMsg": "文件必须小于100MB",
"preview": "预览",
"bindDatasource": "绑定数据源",
"confirm": "确认",
"importResults": "导入信息",
"newImport": "新建导入",
"endImport": "终止导入",
"againImport": "再次导入",
"prop": "属性",
"propTip": "{name}中拥有的属性",
"mapping": "对应列标",
"mappingTip": "属性字段对应csv文件的哪一列",
"typeTip": "属性字段对应的数据类型",
"setVertexId": "设为ID",
"setVertexIdTip": "当前字段是否作为Vertex Id",
"useHash": "ID Hash",
"useHashTip": "id字段对应值插入数据库中所做的处理",
"unset": "保持原值",
"uuid": "UUID",
"hash": "Hash",
"setSrc": "设为起点",
"setSrcTip": "将当前字段值作为起点",
"setDst": "设为终点",
"setDstTip": "将当前字段值作为终点",
"setRank": "设为Rank",
"setRankTip": "将当前字段值作为rank",
"edgeText": "",
"choose": "选择",
"ignore": "忽略",
"vertexText": "",
"importErrorInfo": "导入数据错误,请检查配置或数据文件",
"clearAllConfigInfo": "是否确定清空所有配置?",
"configFile": "配置文件:",
"logFile": "日志文件:",
"vertexesFile": "点相关文件:",
"vertexFile": "该点配置文件:",
"vertexErrorFile": "该点错误数据文件:",
"edgesFilePath": "边配置文件:",
"edgeFilePath": "该边配置文件:",
"edgeErrorFilePath": "该边错误数据文件:",
"all": "全部",
"mountPathWarning": "导入数据需在应用启动时配置WORKING_DIR环境变量,否则无法进行。",
"notExist": "不存在",
"importError": "未知错误",
"importMappingError": "数据文件配置映射导入失败",
"importFormatError": "数据文件格式不统一",
"importFileConfigError": "数据文件配置相关错误",
"importFileDownloadError": "数据文件下载失败",
"importFileError": "文件相关错误",
"importNebulaError": "与实例交互相关错误",
"datasource": "数据源",
"indexNotEmpty": "对应列标不能为空",
"reset": "重置",
"importFinished": "导入任务已结束",
"enterPassword": "请输入 nebula 账号密码",
"isEmpty": "为空",
"startImporting": "开始导入",
Expand All @@ -342,21 +160,13 @@
},
"schema": {
"spaceList": "图空间列表",
"backToSpaceList": "图空间列表",
"useSpaceErrTip": "图空间未找到。立刻尝试使用刚创建的图空间可能会失败,因为创建是异步实现的。为确保数据同步,后续操作能顺利进行,请等待 2 个心跳周期(20 秒)。",
"partitionNumDescription": "partition_num 表示数据分片数量。默认值为 100。建议为硬盘数量的 5 倍。",
"replicaFactorDescription": "replica_factor 表示副本数量。默认值是 1,生产集群建议为 3。由于采用多数表决原理,因此需为奇数。",
"charsetDescription": "charset 表示字符集,定义了字符以及字符的编码,默认为 utf8。",
"collateDescription": "collate 表示字符序,定义了字符的比较规则,默认为 utf8_bin。",
"vidTypeDescription": "vid type 指定图空间中点 ID(VID)的数据类型。",
"createSuccess": "创建成功",
"defineFields": "定义属性",
"uniqProperty": "属性名称不允许重名",
"cancelOperation": "是否取消配置并关闭面板",
"cancelPropmt": "关闭面板将删除所有属性,是否继续?",
"fieldDisabled": "该属性被 ttl_col 引用,不支持更改操作,如要更改,请先更新 ttl",
"ttlRequired": "请填写完整 ttl 关联的属性以及持续时间",
"fieldRequired": "请填写完整属性名称及数据类型",
"indexExist": "已拥有索引,无法同时配置 TTL",
"indexType": "索引类型",
"indexName": "索引名称",
Expand All @@ -367,11 +177,6 @@
"indexedLength": "索引长度",
"indexedLengthDescription": "设置索引字符串的长度。如果索引定长字符串,则索引长度无法修改。",
"indexedLengthRequired": "索引长度应为正整数",
"backToTagList": "返回标签列表",
"backToEdgeList": "返回边类型列表",
"backToIndexList": "返回索引列表",
"leavePage": "是否离开当前页面",
"leavePagePrompt": "离开当前页面后,未保存的记录将丢失",
"rebuild": "重建索引",
"createSpace": "创建图空间",
"No": "序号",
Expand Down Expand Up @@ -405,7 +210,9 @@
"statsName": "名称",
"statsCount": "数量",
"statError": "统计失败,请重试",
"statFinished": "统计结束"
"statFinished": "统计结束",
"deleteSpace": "删除图空间",
"cloneSpace": "克隆图空间"
},
"menu": {
"use": "使用手册",
Expand Down
10 changes: 0 additions & 10 deletions app/config/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,6 @@ export const passwordRulesFn = intl => [
},
];

export const nodeIdRulesFn = intl => [
{
required: true,
message: intl.get('formRules.idRequired'),
},
{
pattern: /^(.+)*(\n.+)*(\n)*$/,
message: intl.get('formRules.nodeIdError'),
},
];

export const nameRulesFn = intl => [
{
Expand Down
Loading

0 comments on commit c889b1c

Please sign in to comment.