Commit 36811a5b authored by Medicean's avatar Medicean

Merge branch 'future-db' into v2.0.x

parents b7d91d35 eb62a56f
...@@ -362,7 +362,16 @@ module.exports = { ...@@ -362,7 +362,16 @@ module.exports = {
menu: { menu: {
add: 'Add conf', add: 'Add conf',
del: 'Del conf', del: 'Del conf',
edit: 'Edit conf' edit: 'Edit conf',
adddb: 'New Database',
editdb: 'Edit Database',
deldb: 'Del Database',
addtable: 'New Table',
edittable: 'Edit TableName',
deltable: 'Del Table',
addcolumn: 'New Column',
editcolumn: 'Edit Column',
delcolumn: 'Del Column',
} }
}, },
query: { query: {
...@@ -382,6 +391,7 @@ module.exports = { ...@@ -382,6 +391,7 @@ module.exports = {
noresult: 'No query results!' noresult: 'No query results!'
} }
}, },
notsupport: 'Not support the current database type',
form: { form: {
title: 'Add conf', title: 'Add conf',
toolbar: { toolbar: {
...@@ -402,6 +412,70 @@ module.exports = { ...@@ -402,6 +412,70 @@ module.exports = {
confirm: 'Determine delete this configuration?', confirm: 'Determine delete this configuration?',
success: 'Delete configuration success!', success: 'Delete configuration success!',
error: (err) => antSword.noxss(`Delete configuration failed!\n${err}`) error: (err) => antSword.noxss(`Delete configuration failed!\n${err}`)
},
adddb: {
title: 'New Database',
dbname: 'Name',
characterset: 'Character Set',
charactercollation: 'Collation',
createbtn: 'OK',
cancelbtn: 'Cancel',
success: 'Create database successfully',
error: 'Failed to create database',
},
editdb: {
title: 'Database Properties',
dbname: 'Name(readonly)',
characterset: 'Character Set',
charactercollation: 'Collation',
updatebtn: 'OK',
cancelbtn: 'Cancel',
success: 'Edit database successfully',
error: 'Failed to edit database',
},
deldb: {
title: 'Delete Database',
confirm: (name) => antSword.noxss(`Are you sure you want to delete database ${name} ?`),
success: 'Delete database successfully',
error: 'Failed to delete database',
},
addtable: {
title: 'New Table',
add: 'New Column',
delete: 'Delete Column',
save: 'Save',
gridheader: "Name,Type,Length,Not Null,Key,Auto Increment",
delete_not_select: "Please select the row you want to delete first",
save_row_is_null: "The number of rows is empty",
cell_valid_error: (i,j)=>`Data format validation failed(row ${i+1}, col ${j+1})`,
confirmtitle: "New table name",
invalid_tablename: "Table names should not contain special symbols",
success: 'Create table successfully',
error: 'Failed to create table',
},
edittable: {
title: "New table name",
invalid_tablename: "Table names should not contain special symbols",
success: 'Update table name successfully',
error: 'Failed to update table',
},
deltable: {
title:'Delete Table',
confirm: (name) => antSword.noxss(`Are you sure you want to delete table ${name}?`),
success: 'Delete table successfully',
error: 'Failed to delete table',
},
addcolumn: {
},
editcolumn: {
},
delcolumn: {
title:'Delete Column',
confirm: (name) => antSword.noxss(`Are you sure you want to delete column ${name}?`),
success: 'Delete column successfully',
error: 'Failed to delete column',
} }
} }
}, },
......
...@@ -363,7 +363,16 @@ module.exports = { ...@@ -363,7 +363,16 @@ module.exports = {
menu: { menu: {
add: '添加配置', add: '添加配置',
del: '删除配置', del: '删除配置',
edit: '编辑配置' edit: '编辑配置',
adddb: '新建数据库',
editdb: '编辑数据库',
deldb: '删除数据库',
addtable: '新建表',
edittable: '编辑表名',
deltable: '删除表',
addcolumn: '添加列',
editcolumn: '编辑列',
delcolumn: '删除列',
} }
}, },
query: { query: {
...@@ -383,6 +392,7 @@ module.exports = { ...@@ -383,6 +392,7 @@ module.exports = {
noresult: '没有查询结果!' noresult: '没有查询结果!'
} }
}, },
notsupport: '该功能暂不支持当前类型数据库',
form: { form: {
title: '添加配置', title: '添加配置',
toolbar: { toolbar: {
...@@ -403,6 +413,70 @@ module.exports = { ...@@ -403,6 +413,70 @@ module.exports = {
confirm: '确定删除此配置吗?', confirm: '确定删除此配置吗?',
success: '删除配置成功!', success: '删除配置成功!',
error: (err) => antSword.noxss(`删除配置失败!\n${err}`) error: (err) => antSword.noxss(`删除配置失败!\n${err}`)
},
adddb: {
title: '新建数据库',
dbname: '名称',
characterset: '字符集',
charactercollation: '字符集排序',
createbtn: '创建',
cancelbtn: '取消',
success: '创建数据库成功',
error: '创建数据库失败',
},
editdb: {
title: '修改数据库',
dbname: '名称(只读)',
characterset: '字符集',
charactercollation: '字符集排序',
updatebtn: '修改',
cancelbtn: '取消',
success: '修改数据库成功',
error: '修改数据库失败',
},
deldb: {
title: '删除数据库',
confirm: (name) => antSword.noxss(`确定要删除数据库 ${name} 吗?`),
success: '删除数据库成功',
error: '删除数据库失败',
},
addtable: {
title: '新建表',
add: '新增字段',
delete: '删除字段',
save: '保存',
gridheader: "名称,类型,长度,不为空,主键,自增长",
delete_not_select: "请先选中要删除的行",
save_row_is_null: "行数为空",
cell_valid_error: (i,j)=>`数据格式校验失败(${i+1}行,${j+1}列)`,
confirmtitle: "输入新表名",
invalid_tablename: "表名不能带有特殊符号",
success: '新建表成功',
error: '新建表失败',
},
edittable: {
title: "输入新表名",
invalid_tablename: "表名不能带有特殊符号",
success: '修改表名成功',
error: '修改表名失败',
},
deltable: {
title:'删除表',
confirm: (name) => antSword.noxss(`确定要删除表 ${name} 吗?`),
success: '删除表成功',
error: '删除表失败',
},
addcolumn: {
},
editcolumn: {
},
delcolumn: {
title:'删除列',
confirm: (name) => antSword.noxss(`确定要删除列 ${name} 吗?`),
success: '删除列成功',
error: '删除列失败',
} }
} }
}, },
......
// //
// 数据库管理模块 // 数据库管理模块
// //
// TODO: 数据管理模块目前的代码存在大量冗余,后期会考虑将 数据库驱动 与 core 分成两个块来做
// import React from 'react'; // import React from 'react';
// import ReactDOM from 'react-dom'; // import ReactDOM from 'react-dom';
// import AceEditor from 'react-ace'; // import AceEditor from 'react-ace';
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment