Skip to content

Commit

Permalink
feat: add Manage panel -indices (#79)
Browse files Browse the repository at this point in the history
feat: add Manage panel -indices



Refs: #17

---------

Signed-off-by: seven <zilisheng1996@gmail.com>
  • Loading branch information
Blankll committed Aug 7, 2024
1 parent d11c9ff commit ad697d0
Show file tree
Hide file tree
Showing 16 changed files with 1,521 additions and 22 deletions.
3 changes: 3 additions & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ declare module 'vue' {
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
NDivider: typeof import('naive-ui')['NDivider']
NDropdown: typeof import('naive-ui')['NDropdown']
NDropdownItem: typeof import('naive-ui')['NDropdownItem']
NDropdownMenu: typeof import('naive-ui')['NDropdownMenu']
NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem']
NFormItemRow: typeof import('naive-ui')['NFormItemRow']
Expand All @@ -41,6 +43,7 @@ declare module 'vue' {
NScrollbar: typeof import('naive-ui')['NScrollbar']
NSelect: typeof import('naive-ui')['NSelect']
NSplit: typeof import('naive-ui')['NSplit']
NSwitch: typeof import('naive-ui')['NSwitch']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag']
Expand Down
2 changes: 1 addition & 1 deletion src/assets/styles/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ body,
--border-color: #363b41;
--gray-color: #c1c1c1;
--connect-list-hover-bg: rgba(255, 255, 255, 0.05);
--card-bg-color: #000000;
--card-bg-color: rgb(38, 38, 42);
}

body {
Expand Down
1 change: 1 addition & 0 deletions src/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from './debug';
export * from './pureObject';
export * from './base64';
export * from './crypto';
export * from './valueConversion';
4 changes: 4 additions & 0 deletions src/common/valueConversion.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const optionalToNullableInt = (value: string | number | null | undefined) => {
if (value === null || value === undefined) return null;
return parseInt(`${value}`, 10);
};
28 changes: 28 additions & 0 deletions src/lang/enUS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,32 @@ export const enUS = {
mappings: 'Mappings',
statisticTitle: 'Node Statistics',
},
index: {
newIndexForm: {
title: 'Create Index',
indexName: 'Index Name',
shards: 'Number of Shards',
replicas: 'Number of Replicas',
bodyJsonRequired: 'Body is not a valid JSON format',
indexRequired: 'Index name is required',
},
newAliasForm: {
title: 'Create Alias',
aliasName: 'Alias Name',
indexName: 'Index Name',
aliasRequired: 'Alias name is required',
indexRequired: 'Index name is required',
filterJsonRequired: 'Filter is not a valid JSON format',
},
newTemplateForm: {
title: 'Create Template',
indexTemplate: 'Index Template',
templateName: 'Template Name',
componentTemplate: 'Component Template',
templateRequired: 'Template name is required',
bodyJsonRequired: 'Request Body is not a valid JSON format',
},
},
},
connection: {
new: 'New connection',
Expand Down Expand Up @@ -93,9 +119,11 @@ export const enUS = {
dialogOps: {
warning: 'Warning',
removeNotice: 'Remove the connection permanently?',
create: 'Create',
confirm: 'Confirm',
cancel: 'Cancel',
removeSuccess: 'Connection removed successfully',
createSuccess: 'Created successfully',
},
editor: {
establishedRequired: 'Select a DB instance before execute actions',
Expand Down
28 changes: 28 additions & 0 deletions src/lang/zhCN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,32 @@ export const zhCN = {
mappings: '映射',
statisticTitle: '节点统计',
},
index: {
newIndexForm: {
title: '创建索引',
indexName: '索引名称',
shards: '分片数量',
replicas: '副本数量',
bodyJsonRequired: 'Body 不是有效的 JSON 格式',
indexRequired: '索引名称是必需的',
},
newAliasForm: {
title: '创建别名',
aliasName: '别名名称',
indexName: '索引名称',
aliasRequired: '别名名称是必需的',
indexRequired: '未选择索引',
filterJsonRequired: '过滤器不是有效的 JSON 格式',
},
newTemplateForm: {
title: '创建模板',
templateName: '模板名称',
indexTemplate: '索引模板',
componentTemplate: '组件模板',
templateRequired: '模板名称是必需的',
bodyJsonRequired: '请求体不是有效的 JSON 格式',
},
},
},
connection: {
new: '新建连接',
Expand Down Expand Up @@ -93,9 +119,11 @@ export const zhCN = {
dialogOps: {
warning: '提示',
removeNotice: '确认删除该连接?',
create: '创建',
confirm: '确认',
cancel: '取消',
removeSuccess: '连接删除成功',
createSuccess: '创建成功',
},
editor: {
establishedRequired: '请选择执行操作的数据库实例',
Expand Down
Loading

0 comments on commit ad697d0

Please sign in to comment.