diff --git a/ui/src/locales/lang/en-US/common.ts b/ui/src/locales/lang/en-US/common.ts
index 0da8035d6..527f0967d 100644
--- a/ui/src/locales/lang/en-US/common.ts
+++ b/ui/src/locales/lang/en-US/common.ts
@@ -48,6 +48,7 @@ export default {
},
status: {
label: 'Status',
+ disable: 'Disable',
enabled: 'Enabled',
disabled: 'Disabled',
enableSuccess: 'Successful',
diff --git a/ui/src/locales/lang/en-US/views/function-lib.ts b/ui/src/locales/lang/en-US/views/function-lib.ts
deleted file mode 100644
index 1ca7103b3..000000000
--- a/ui/src/locales/lang/en-US/views/function-lib.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-export default {
- title: 'Function',
- internalTitle: 'Internal Function',
- added: 'Added',
- createFunction: 'Create Function',
- editFunction: 'Edit Function',
- copyFunction: 'Copy Function',
- importFunction: 'Import Function',
- searchBar: {
- placeholder: 'Search by function name'
- },
- setting: {
- disabled: 'Disabled'
- },
- tip: {
- saveMessage: 'Unsaved changes will be lost. Are you sure you want to exit?'
- },
- delete: {
- confirmTitle: 'Confirm deletion of function:',
- confirmMessage:
- 'Deleting this function will cause errors in APP that reference it when they are queried. Please proceed with caution.'
- },
- disabled: {
- confirmTitle: 'Confirm disable function:',
- confirmMessage:
- 'Disabling this function will cause errors in APP that reference it when they are queried. Please proceed with caution.'
- },
- functionForm: {
- title: {
- copy: 'Copy',
- baseInfo: 'Basic Information'
- },
- form: {
- functionName: {
- label: 'Name',
- placeholder: 'Please enter the function name',
- requiredMessage: 'Please enter the function name'
- },
- functionDescription: {
- label: 'Description',
- placeholder: 'Please enter a description of the function'
- },
- permission_type: {
- label: 'Permissions',
- requiredMessage: 'Please select'
- },
- paramName: {
- label: 'Parameter Name',
- placeholder: 'Please enter the parameter name',
- requiredMessage: 'Please enter the parameter name'
- },
- dataType: {
- label: 'Data Type'
- },
- source: {
- label: 'Source',
- custom: 'Custom',
- reference: 'Reference Parameter'
- },
- required: {
- label: 'Required'
- },
- param: {
- paramInfo1: 'Displayed when using the function',
- paramInfo2: 'Not displayed when using the function',
- code: 'Content (Python)',
- selectPlaceholder: 'Please select parameter',
- inputPlaceholder: 'Please enter parameter values',
- },
- debug: {
- run: 'Run',
- output: 'Output',
- runResult: 'Run Result',
- runSuccess: 'Successful',
- runFailed: 'Run Failed'
- }
- }
- }
-}
diff --git a/ui/src/locales/lang/en-US/views/index.ts b/ui/src/locales/lang/en-US/views/index.ts
index 993e5fe93..96f0b6360 100644
--- a/ui/src/locales/lang/en-US/views/index.ts
+++ b/ui/src/locales/lang/en-US/views/index.ts
@@ -3,7 +3,7 @@ import application from './application'
import applicationOverview from './application-overview'
import dataset from './dataset'
import system from './system'
-import functionLib from './function-lib'
+import tool from './tool'
import user from './user'
import team from './team'
import model from './model'
@@ -19,7 +19,7 @@ export default {
application,
applicationOverview,
system,
- functionLib,
+ tool,
user,
team,
model,
diff --git a/ui/src/locales/lang/en-US/views/tool.ts b/ui/src/locales/lang/en-US/views/tool.ts
new file mode 100644
index 000000000..6da1a011b
--- /dev/null
+++ b/ui/src/locales/lang/en-US/views/tool.ts
@@ -0,0 +1,67 @@
+export default {
+ title: 'Tool',
+ internalTitle: 'Internal Tool',
+ added: 'Added',
+ createTool: 'Create Tool',
+ editTool: 'Edit Tool',
+ copyTool: 'Copy Tool',
+ importTool: 'Import Tool',
+ searchBar: {
+ placeholder: 'Search by tool name',
+ },
+ tip: {
+ saveMessage: 'Unsaved changes will be lost. Are you sure you want to exit?',
+ },
+ delete: {
+ confirmTitle: 'Confirm deletion of tool:',
+ confirmMessage:
+ 'Deleting this tool will cause errors in APP that reference it when they are queried. Please proceed with caution.',
+ },
+ disabled: {
+ confirmTitle: 'Confirm disable tool:',
+ confirmMessage:
+ 'Disabling this tool will cause errors in APP that reference it when they are queried. Please proceed with caution.',
+ },
+
+ form: {
+ toolName: {
+ label: 'Name',
+ placeholder: 'Please enter the tool name',
+ requiredMessage: 'Please enter the tool name',
+ },
+ toolDescription: {
+ label: 'Description',
+ placeholder: 'Please enter a description of the tool',
+ },
+ paramName: {
+ label: 'Parameter Name',
+ placeholder: 'Please enter the parameter name',
+ requiredMessage: 'Please enter the parameter name',
+ },
+ dataType: {
+ label: 'Data Type',
+ },
+ source: {
+ label: 'Source',
+ custom: 'Custom',
+ reference: 'Reference Parameter',
+ },
+ required: {
+ label: 'Required',
+ },
+ param: {
+ paramInfo1: 'Displayed when using the tool',
+ paramInfo2: 'Not displayed when using the tool',
+ code: 'Content (Python)',
+ selectPlaceholder: 'Please select parameter',
+ inputPlaceholder: 'Please enter parameter values',
+ },
+ debug: {
+ run: 'Run',
+ output: 'Output',
+ runResult: 'Run Result',
+ runSuccess: 'Successful',
+ runFailed: 'Run Failed',
+ },
+ },
+}
diff --git a/ui/src/locales/lang/zh-CN/common.ts b/ui/src/locales/lang/zh-CN/common.ts
index 9e432bb5a..e81524e7c 100644
--- a/ui/src/locales/lang/zh-CN/common.ts
+++ b/ui/src/locales/lang/zh-CN/common.ts
@@ -52,6 +52,7 @@ export default {
},
status: {
label: '状态',
+ disable: '禁用',
enabled: '已启用',
disabled: '已禁用',
enableSuccess: '启用成功',
diff --git a/ui/src/locales/lang/zh-CN/views/index.ts b/ui/src/locales/lang/zh-CN/views/index.ts
index be89022bc..a8f343b8d 100644
--- a/ui/src/locales/lang/zh-CN/views/index.ts
+++ b/ui/src/locales/lang/zh-CN/views/index.ts
@@ -7,7 +7,6 @@ import tool from './tool'
// import applicationOverview from './application-overview'
// import system from './system'
-// import functionLib from './function-lib'
// import user from './user'
// import team from './team'
@@ -27,7 +26,6 @@ export default {
// application,
// applicationOverview,
// system,
- // functionLib,
// user,
// team,
// document,
diff --git a/ui/src/locales/lang/zh-CN/views/tool.ts b/ui/src/locales/lang/zh-CN/views/tool.ts
index ebdfbc3ae..4702ef7e9 100644
--- a/ui/src/locales/lang/zh-CN/views/tool.ts
+++ b/ui/src/locales/lang/zh-CN/views/tool.ts
@@ -1,3 +1,51 @@
export default {
title: '工具',
+ createTool: '创建工具',
+ editTool: '编辑工具',
+ disabled: {
+ confirmTitle: '是否禁用工具:',
+ confirmMessage: '禁用后,引用了该工具的应用提问时会报错 ,请谨慎操作。',
+ },
+ form: {
+ toolName: {
+ label: '名称',
+ name: '工具名称',
+ placeholder: '请输入工具名称',
+ requiredMessage: '请输入工具名称',
+ },
+ toolDescription: {
+ label: '描述',
+ placeholder: '请输入工具的描述',
+ },
+ paramName: {
+ label: '参数名',
+ placeholder: '请输入参数名',
+ requiredMessage: '请输入参数名',
+ },
+ dataType: {
+ label: '数据类型',
+ },
+ source: {
+ label: '来源',
+ custom: '自定义',
+ reference: '引用参数',
+ },
+ required: {
+ label: '是否必填',
+ },
+ param: {
+ paramInfo1: '使用工具时显示',
+ paramInfo2: '使用工具时不显示',
+ code: '工具内容(Python)',
+ selectPlaceholder: '请选择参数',
+ inputPlaceholder: '请输入参数值',
+ },
+ debug: {
+ run: '运行',
+ output: '输出',
+ runResult: '运行结果',
+ runSuccess: '运行成功',
+ runFailed: '运行失败',
+ },
+ },
}
diff --git a/ui/src/locales/lang/zh-Hant/common.ts b/ui/src/locales/lang/zh-Hant/common.ts
index e68e94858..a1aa4e8ec 100644
--- a/ui/src/locales/lang/zh-Hant/common.ts
+++ b/ui/src/locales/lang/zh-Hant/common.ts
@@ -48,6 +48,7 @@ export default {
},
status: {
label: '狀態',
+ disable: '停用',
enabled: '已啟用',
disabled: '已停用',
enableSuccess: '啟用成功',
diff --git a/ui/src/locales/lang/zh-Hant/views/function-lib.ts b/ui/src/locales/lang/zh-Hant/views/function-lib.ts
deleted file mode 100644
index 789cbf0ec..000000000
--- a/ui/src/locales/lang/zh-Hant/views/function-lib.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-export default {
- title: '函數庫',
- internalTitle: '內置函數',
- added: '已新增',
- createFunction: '建立函數',
- editFunction: '編輯函數',
- copyFunction: '複製函數',
- importFunction: '匯入函數',
- searchBar: {
- placeholder: '按函數名稱搜尋'
- },
- setting: {
- disabled: '停用'
- },
- tip: {
- saveMessage: '當前的更改尚未保存,確認退出嗎?'
- },
- delete: {
- confirmTitle: '是否刪除函數:',
- confirmMessage: '刪除後,引用該函數的應用在查詢時會報錯,請謹慎操作。'
- },
- disabled: {
- confirmTitle: '是否停用函數:',
- confirmMessage: '停用後,引用該函數的應用在查詢時會報錯,請謹慎操作。'
- },
- functionForm: {
- title: {
- copy: '副本',
- baseInfo: '基礎信息'
- },
- form: {
- functionName: {
- label: '名稱',
- placeholder: '請輸入函數名稱',
- requiredMessage: '請輸入函數名稱'
- },
- functionDescription: {
- label: '描述',
- placeholder: '請輸入函數的描述'
- },
- permission_type: {
- label: '權限',
- requiredMessage: '請選擇'
- },
- paramName: {
- label: '參數名',
- placeholder: '請輸入參數名',
- requiredMessage: '請輸入參數名'
- },
- dataType: {
- label: '數據類型'
- },
- source: {
- label: '來源',
- custom: '自定義',
- reference: '引用參數'
- },
- required: {
- label: '是否必填'
- },
- param: {
- paramInfo1: '使用函數時顯示',
- paramInfo2: '使用函數時不顯示',
- code: '函数内容(Python)',
- selectPlaceholder: '請选择參數',
- inputPlaceholder: '請輸入參數值',
- },
- debug: {
- run: '運行',
- output: '輸出',
- runResult: '運行結果',
- runSuccess: '運行成功',
- runFailed: '運行失敗'
- }
- }
- }
-}
diff --git a/ui/src/locales/lang/zh-Hant/views/index.ts b/ui/src/locales/lang/zh-Hant/views/index.ts
index 993e5fe93..96f0b6360 100644
--- a/ui/src/locales/lang/zh-Hant/views/index.ts
+++ b/ui/src/locales/lang/zh-Hant/views/index.ts
@@ -3,7 +3,7 @@ import application from './application'
import applicationOverview from './application-overview'
import dataset from './dataset'
import system from './system'
-import functionLib from './function-lib'
+import tool from './tool'
import user from './user'
import team from './team'
import model from './model'
@@ -19,7 +19,7 @@ export default {
application,
applicationOverview,
system,
- functionLib,
+ tool,
user,
team,
model,
diff --git a/ui/src/locales/lang/zh-Hant/views/tool.ts b/ui/src/locales/lang/zh-Hant/views/tool.ts
new file mode 100644
index 000000000..50c30823c
--- /dev/null
+++ b/ui/src/locales/lang/zh-Hant/views/tool.ts
@@ -0,0 +1,68 @@
+export default {
+ title: '工具',
+ internalTitle: '內置工具',
+ added: '已新增',
+ createTool: '建立工具',
+ editTool: '編輯工具',
+ copyTool: '複製工具',
+ importTool: '匯入工具',
+ searchBar: {
+ placeholder: '按工具名稱搜尋',
+ },
+ tip: {
+ saveMessage: '當前的更改尚未保存,確認退出嗎?',
+ },
+ delete: {
+ confirmTitle: '是否刪除工具:',
+ confirmMessage: '刪除後,引用該工具的應用在查詢時會報錯,請謹慎操作。',
+ },
+ disabled: {
+ confirmTitle: '是否停用工具:',
+ confirmMessage: '停用後,引用該工具的應用在查詢時會報錯,請謹慎操作。',
+ },
+ form: {
+ toolName: {
+ label: '名稱',
+ placeholder: '請輸入工具名稱',
+ requiredMessage: '請輸入工具名稱',
+ },
+ toolDescription: {
+ label: '描述',
+ placeholder: '請輸入工具的描述',
+ },
+ permission_type: {
+ label: '權限',
+ requiredMessage: '請選擇',
+ },
+ paramName: {
+ label: '參數名',
+ placeholder: '請輸入參數名',
+ requiredMessage: '請輸入參數名',
+ },
+ dataType: {
+ label: '數據類型',
+ },
+ source: {
+ label: '來源',
+ custom: '自定義',
+ reference: '引用參數',
+ },
+ required: {
+ label: '是否必填',
+ },
+ param: {
+ paramInfo1: '使用工具時顯示',
+ paramInfo2: '使用工具時不顯示',
+ code: '工具内容(Python)',
+ selectPlaceholder: '請选择參數',
+ inputPlaceholder: '請輸入參數值',
+ },
+ debug: {
+ run: '運行',
+ output: '輸出',
+ runResult: '運行結果',
+ runSuccess: '運行成功',
+ runFailed: '運行失敗',
+ },
+ },
+}
diff --git a/ui/src/styles/element-plus.scss b/ui/src/styles/element-plus.scss
index 1f37b696c..8a853f162 100644
--- a/ui/src/styles/element-plus.scss
+++ b/ui/src/styles/element-plus.scss
@@ -3,6 +3,7 @@ $primary-color: #3370ff;
--el-color-primary: #3370ff;
--el-color-success: #34c724;
--el-text-color-primary: #1f2329;
+ --el-border-radius-base: 6px;
// --el-menu-item-height: 45px;
// --el-box-shadow-light: 0px 2px 4px 0px rgba(31, 35, 41, 0.12);
// --el-border-color: #dee0e3;
@@ -28,7 +29,7 @@ $primary-color: #3370ff;
background: none;
}
.el-tree-node__content {
- border-radius: 4px;
+ border-radius: var(--el-border-radius-base);
padding: 7px 0;
&:hover {
background: var(--app-text-color-light-1);
@@ -75,7 +76,6 @@ $primary-color: #3370ff;
font-size: 16px;
}
-
// dropdown
.el-dropdown {
color: var(--el-text-color-primary);
@@ -99,3 +99,69 @@ $primary-color: #3370ff;
background: var(--el-color-primary-light-9);
}
}
+
+// message
+.el-message {
+ --el-message-close-icon-color: var(--app-text-color-secondary);
+}
+.el-message-box {
+ --el-messagebox-font-size: 16px;
+ --el-messagebox-width: 475px;
+ padding: 24px;
+ .el-message-box__header {
+ padding: 0;
+ }
+ .el-message-box__title {
+ word-break: break-all;
+ width: 95%;
+ }
+}
+
+.el-message-box__content {
+ padding: 24px 0;
+ color: var(--app-text-color);
+ font-weight: 400;
+}
+.el-message-box__btns {
+ padding: 0;
+ button {
+ min-width: 80px;
+ &:nth-child(2) {
+ margin-left: 12px;
+ }
+ }
+ button.danger {
+ background: var(--el-color-danger);
+ border: var(--el-color-danger);
+ color: #ffffff;
+ }
+}
+.el-message-box__headerbtn {
+ right: 10px;
+ top: 16px;
+ .el-message-box__close {
+ font-size: 20px;
+ }
+}
+
+// drawer
+.el-drawer {
+ .el-drawer__header {
+ padding: 16px 24px;
+ margin: 0;
+ border-bottom: 1px solid var(--el-border-color);
+ color: var(--app-text-color);
+ }
+ .el-drawer__body {
+ padding: 16px 24px;
+ }
+ .el-drawer__footer {
+ border-top: 1px solid var(--el-border-color);
+ padding: 16px 24px;
+ }
+}
+
+// popper
+.el-popper {
+ --el-popper-border-radius: 6px;
+}
diff --git a/ui/src/views/tool/component/AddInternalFunctionDialog.vue b/ui/src/views/tool/component/AddInternalFunctionDialog.vue
index 2f6514bc4..312fc6e98 100644
--- a/ui/src/views/tool/component/AddInternalFunctionDialog.vue
+++ b/ui/src/views/tool/component/AddInternalFunctionDialog.vue
@@ -1,6 +1,6 @@