@@ -92,6 +121,11 @@
border-bottom: 1px solid var(--color-text-n8);
}
}
+ .ms-drawer {
+ .arco-scrollbar-track-direction-vertical {
+ right: -12px;
+ }
+ }
.ms-drawer-no-mask {
left: auto;
.arco-drawer {
diff --git a/frontend/src/components/pure/ms-drawer/locale/en-US.ts b/frontend/src/components/pure/ms-drawer/locale/en-US.ts
new file mode 100644
index 0000000000..fb71ee1f37
--- /dev/null
+++ b/frontend/src/components/pure/ms-drawer/locale/en-US.ts
@@ -0,0 +1,4 @@
+export default {
+ 'ms.drawer.cancel': 'Cancel',
+ 'ms.drawer.ok': 'Confirm',
+};
diff --git a/frontend/src/components/pure/ms-drawer/locale/zh-CN.ts b/frontend/src/components/pure/ms-drawer/locale/zh-CN.ts
new file mode 100644
index 0000000000..10d992fecb
--- /dev/null
+++ b/frontend/src/components/pure/ms-drawer/locale/zh-CN.ts
@@ -0,0 +1,4 @@
+export default {
+ 'ms.drawer.cancel': '取消',
+ 'ms.drawer.ok': '确认',
+};
diff --git a/frontend/src/locale/en-US/index.ts b/frontend/src/locale/en-US/index.ts
index 24d8bd39fe..1ee5c2e177 100644
--- a/frontend/src/locale/en-US/index.ts
+++ b/frontend/src/locale/en-US/index.ts
@@ -36,6 +36,7 @@ export default {
'menu.settings.system.resourcePool': 'Resource Pool',
'menu.settings.system.resourcePoolDetail': 'Add resource pool',
'menu.settings.system.resourcePoolEdit': 'Edit resource pool',
+ 'menu.settings.system.parameter': 'System parameter',
'navbar.action.locale': 'Switch to English',
...sys,
...localeSettings,
diff --git a/frontend/src/locale/zh-CN/index.ts b/frontend/src/locale/zh-CN/index.ts
index 07f063bf12..280db4668d 100644
--- a/frontend/src/locale/zh-CN/index.ts
+++ b/frontend/src/locale/zh-CN/index.ts
@@ -36,6 +36,7 @@ export default {
'menu.settings.system.resourcePool': '资源池',
'menu.settings.system.resourcePoolDetail': '添加资源池',
'menu.settings.system.resourcePoolEdit': '编辑资源池',
+ 'menu.settings.system.parameter': '系统参数',
'navbar.action.locale': '切换为中文',
...sys,
...localeSettings,
diff --git a/frontend/src/models/setting/config.ts b/frontend/src/models/setting/config.ts
new file mode 100644
index 0000000000..9aae0a1632
--- /dev/null
+++ b/frontend/src/models/setting/config.ts
@@ -0,0 +1,38 @@
+// 基础信息配置
+export interface BaseConfig {
+ url: string;
+ prometheusHost: string;
+}
+
+// 邮箱信息配置
+export interface EmailConfig {
+ host: string; // 主机
+ port: string; // 端口
+ account: string; // 账户
+ from: string; // 发件人
+ password: string; // 密码
+ ssl: string;
+ tsl: string;
+ recipient: string; // 收件人
+}
+
+interface ParamItem {
+ paramKey: string; // 参数的 key
+ paramValue: string; // 参数的值
+ type: string; // 参数类型,一般是 string
+}
+
+// 保存基础信息、邮箱信息接口入参
+export type SaveInfoParams = ParamItem[];
+
+// 测试邮箱连接接口入参
+export interface TestEmailParams {
+ 'smtp.host': string;
+ 'smtp.port': string;
+ 'smtp.account': string;
+ 'smtp.password': string;
+ 'smtp.from': string;
+ 'smtp.ssl': string;
+ 'smtp.tsl': string;
+ 'smtp.recipient': string;
+}
diff --git a/frontend/src/router/routes/modules/setting.ts b/frontend/src/router/routes/modules/setting.ts
index 20a9841c85..3c295e7949 100644
--- a/frontend/src/router/routes/modules/setting.ts
+++ b/frontend/src/router/routes/modules/setting.ts
@@ -89,6 +89,16 @@ const Setting: AppRouteRecordRaw = {
isTopMenu: true,
},
},
+ {
+ path: 'parameter',
+ name: 'settingSystemParameter',
+ component: () => import('@/views/setting/system/config/index.vue'),
+ meta: {
+ locale: 'menu.settings.system.parameter',
+ roles: ['*'],
+ isTopMenu: true,
+ },
+ },
],
},
{
diff --git a/frontend/src/utils/index.ts b/frontend/src/utils/index.ts
index 08ac9249d5..11e6925d76 100644
--- a/frontend/src/utils/index.ts
+++ b/frontend/src/utils/index.ts
@@ -120,3 +120,16 @@ export function formatFileSize(fileSize: number): string {
return `${formattedSize} ${unit}`;
}
+
+/**
+ * 字符串脱敏
+ * @param str 需要脱敏的字符串
+ * @returns 脱敏后的字符串
+ */
+export function desensitize(str: string): string {
+ if (!str || typeof str !== 'string') {
+ return '';
+ }
+
+ return str.replace(/./g, '*');
+}
diff --git a/frontend/src/views/setting/system/config/components/baseConfig.vue b/frontend/src/views/setting/system/config/components/baseConfig.vue
new file mode 100644
index 0000000000..b3a37b2510
--- /dev/null
+++ b/frontend/src/views/setting/system/config/components/baseConfig.vue
@@ -0,0 +1,491 @@
+
+
+
+
+
{{ t('system.config.baseInfo') }}
+
+ {{ t('system.config.update') }}
+
+
+
+
+
+
+
{{ t('system.config.emailConfig') }}
+
+ {{ t('system.config.update') }}
+
+
+
+
+
+
+ {{
+ t('system.config.email.open')
+ }}
+
+
+
+ {{ t('system.config.email.close') }}
+
+
+
+
+ {{ item.value }}
+
+
+
+ {{ desensitize(item.value as string) }}
+
+
+
+ {{ item.value?.toString() === '' ? '-' : item.value }}
+
+
+
+ {{ t('system.config.email.test') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('system.config.email.test') }}
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/setting/system/config/index.vue b/frontend/src/views/setting/system/config/index.vue
new file mode 100644
index 0000000000..28c218dedc
--- /dev/null
+++ b/frontend/src/views/setting/system/config/index.vue
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/setting/system/config/locale/en-US.ts b/frontend/src/views/setting/system/config/locale/en-US.ts
new file mode 100644
index 0000000000..645086c31f
--- /dev/null
+++ b/frontend/src/views/setting/system/config/locale/en-US.ts
@@ -0,0 +1,6 @@
+export default {
+ 'system.config.parameterConfig': 'System Parameters Configuration',
+ 'system.config.baseConfig': 'Basic Settings',
+ 'system.config.pageConfig': 'Interface settings',
+ 'system.config.authConfig': 'Authentication Settings',
+};
diff --git a/frontend/src/views/setting/system/config/locale/zh-CN.ts b/frontend/src/views/setting/system/config/locale/zh-CN.ts
new file mode 100644
index 0000000000..78fdeabb3a
--- /dev/null
+++ b/frontend/src/views/setting/system/config/locale/zh-CN.ts
@@ -0,0 +1,48 @@
+export default {
+ 'system.config.parameterConfig': '系统参数配置',
+ 'system.config.baseConfig': '基础设置',
+ 'system.config.pageConfig': '界面设置',
+ 'system.config.authConfig': '认证设置',
+ 'system.config.baseInfo': '基本信息',
+ 'system.config.update': '更新',
+ 'system.config.pageUrl': '当前站点 URL',
+ 'system.config.prometheus': 'Prometheus',
+ 'system.config.emailConfig': '邮件设置',
+ 'system.config.email.host': 'SMTP 主机',
+ 'system.config.email.port': 'SMTP 端口',
+ 'system.config.email.account': 'SMTP 账户',
+ 'system.config.email.password': 'SMTP 密码',
+ 'system.config.email.from': '指定发件人',
+ 'system.config.email.recipient': '测试收件人',
+ 'system.config.email.ssl': 'SSL',
+ 'system.config.email.tsl': 'TSL',
+ 'system.config.email.open': '开启',
+ 'system.config.email.close': '关闭',
+ 'system.config.email.test': '测试连接',
+ 'system.config.baseInfo.updateTitle': '更新基本信息',
+ 'system.config.baseInfo.update': '更新',
+ 'system.config.baseInfo.updateSuccess': '更新成功',
+ 'system.config.baseInfo.pageUrlSub': '例如:{url}',
+ 'system.config.baseInfo.pageUrlRequired': '站点 URL 不能为空',
+ 'system.config.baseInfo.pageUrlPlaceholder': '请输入当前站点 URL',
+ 'system.config.baseInfo.prometheusSub': '例如:{prometheus}',
+ 'system.config.baseInfo.prometheusRequired': 'prometheus 不能为空',
+ 'system.config.baseInfo.prometheusPlaceholder': ' 请输入 prometheus',
+ 'system.config.email.updateTitle': '更新邮件设置',
+ 'system.config.email.update': '更新',
+ 'system.config.email.hostRequired': 'SMTP 主机不能为空',
+ 'system.config.email.hostPlaceholder': '请输入SMTP 主机地址',
+ 'system.config.email.portRequired': 'SMTP 端口不能为空',
+ 'system.config.email.portPlaceholder': '请输入SMTP 端口',
+ 'system.config.email.accountRequired': 'SMTP 账户不能为空',
+ 'system.config.email.accountPlaceholder': '请输入SMTP 账户',
+ 'system.config.email.passwordRequired': 'SMTP 密码不能为空',
+ 'system.config.email.passwordPlaceholder': '请输入SMTP 密码',
+ 'system.config.email.fromPlaceholder': '请输入指定发件人邮箱',
+ 'system.config.email.recipientPlaceholder': '请输入测试收件人邮箱',
+ 'system.config.email.sslTip': '若 SMTP 端口是 465,需要启用 SSL',
+ 'system.config.email.tslTip': '若 SMTP 端口是 587,需要启用 TSL',
+ 'system.config.email.emailErrTip': '邮箱格式错误,请重新输入',
+ 'system.config.email.updateSuccess': '更新成功',
+ 'system.config.email.testSuccess': '邮箱连接成功',
+};
diff --git a/frontend/src/views/setting/system/pluginManager/components/scriptDetailDrawer.vue b/frontend/src/views/setting/system/pluginManager/components/scriptDetailDrawer.vue
index 3dde1107ce..464f2ff2b2 100644
--- a/frontend/src/views/setting/system/pluginManager/components/scriptDetailDrawer.vue
+++ b/frontend/src/views/setting/system/pluginManager/components/scriptDetailDrawer.vue
@@ -1,7 +1,7 @@
-
-
-
-
- {{ t('system.resourcePool.createPool') }}
-
-
-
-
-
- {{ record.name }}
-
-
-
-
- {{ t('system.resourcePool.tableEnable') }}
-
-
-
- {{ t('system.resourcePool.tableDisable') }}
-
-
-
- {{ t('system.resourcePool.editPool') }}
- {{
- t('system.resourcePool.tableDisable')
- }}
- {{ t('system.resourcePool.tableEnable') }}
-
-
-
-
-
-
-
- {{ t('system.resourcePool.editPool') }}
-
+
+
+
+ {{ t('system.resourcePool.createPool') }}
+
+
+
+
+
+ {{ record.name }}
-
-
-
+
+
+
+ {{ t('system.resourcePool.tableEnable') }}
+
+
+
+ {{ t('system.resourcePool.tableDisable') }}
+
+
+
+ {{ t('system.resourcePool.editPool') }}
+ {{
+ t('system.resourcePool.tableDisable')
+ }}
+ {{ t('system.resourcePool.tableEnable') }}
+
+
+
+
+
+
+
+ {{ t('system.resourcePool.editPool') }}
+
+
+
+