From 79809b56e970cdc18ea8c0c0174caa928ff93953 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 6 Mar 2024 09:57:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BD=91=E5=85=83=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A4=9A=E8=AF=AD=E8=A8=80=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/locales/en-US.ts | 19 +++ src/i18n/locales/zh-CN.ts | 19 +++ src/views/ne/neHost/index.vue | 1 + src/views/ne/neInfo/components/EditModal.vue | 124 ++++++++----------- src/views/ne/neInfo/index.vue | 69 ++++++++--- 5 files changed, 141 insertions(+), 91 deletions(-) diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index ad9b9841..c0821f7c 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -574,6 +574,24 @@ export default { }, }, ne: { + neInfo: { + version: "Version", + serialNum: 'Serial Number', + expiryDate: 'Expiry Date', + state: "State", + serviceState: "Service Status", + normalcy: "Normal", + exceptions: "Abnormal", + info: 'Status Message', + resourceInfo: 'Resource Situation', + sysMem: "SYS Mem", + sysCpu: "SYS CPU", + sysDisk: "SYS Store", + neCpu: "NE CPU", + hostConfig: "Connection Configuration", + rmUID: "Data resource location identifiers are used for data tagging such as logging, alarm reporting, etc.", + ipAddr: "Support IPV4/IPV6, synchronize the change of the configuration address of the following configuration", + }, neHost: { hostType: "Type", groupId: "Group", @@ -587,6 +605,7 @@ export default { authMode: "Auth Mode", password: "Password", privateKey: "Private Key", + privateKeyPlease: "Please fill in the private key characters correctly ~/.ssh/id_rsa", passPhrase: "Private Key Cipher", remark: "Remark", createTime: "Time", diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 06b27e3b..921e5b91 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -574,6 +574,24 @@ export default { }, }, ne: { + neInfo: { + version: "网元版本", + serialNum: '序列号', + expiryDate: '许可证到期日期', + state: "网元状态", + serviceState: "服务状态", + normalcy: "正常", + exceptions: "异常", + info: '状态信息', + resourceInfo: '资源情况', + sysMem: "系统内存", + sysCpu: "系统CPU", + sysDisk: "系统存储", + neCpu: "网元CPU", + hostConfig: "终端连接配置", + rmUID: "数据资源定位标识符用于日志、告警上报等数据标记", + ipAddr: "支持IPV4/IPV6,同步变更下方配置的配置地址", + }, neHost: { hostType: "主机类型", groupId: "分组", @@ -587,6 +605,7 @@ export default { authMode: "认证模式", password: "密码", privateKey: "私钥", + privateKeyPlease: "请正确填写私钥字符内容 ~/.ssh/id_rsa", passPhrase: "私钥密码", remark: "备注信息", createTime: "创建时间", diff --git a/src/views/ne/neHost/index.vue b/src/views/ne/neHost/index.vue index 7d540b8b..6348ea2b 100644 --- a/src/views/ne/neHost/index.vue +++ b/src/views/ne/neHost/index.vue @@ -727,6 +727,7 @@ onMounted(() => { :auto-size="{ minRows: 4, maxRows: 6 }" :maxlength="3000" :show-count="true" + :placeholder="t('views.ne.neHost.privateKeyPlease')" /> diff --git a/src/views/ne/neInfo/components/EditModal.vue b/src/views/ne/neInfo/components/EditModal.vue index d2b2a054..23939020 100644 --- a/src/views/ne/neInfo/components/EditModal.vue +++ b/src/views/ne/neInfo/components/EditModal.vue @@ -39,22 +39,26 @@ let dict: { /** * 对话框弹出测试连接 */ -function fnModalTest() { - testNeHost({}) +function fnModalTest(row: Record) { + if (modalState.confirmLoading) return; + modalState.confirmLoading = true; + const hide = message.loading(t('common.loading'), 0); + testNeHost(row) .then(res => { if (res.code === RESULT_CODE_SUCCESS) { message.success({ - content: t('views.ne.neHost.testOk'), + content: `${row.addr}:${row.port} ${t('views.ne.neHost.testOk')}`, duration: 2, }); } else { message.error({ - content: `${res.msg}`, + content: `${row.addr}:${row.port} ${res.msg}`, duration: 2, }); } }) .finally(() => { + hide(); modalState.confirmLoading = false; }); } @@ -276,7 +280,6 @@ function fnNeIPChange(e: any) { watch( () => props.visible, val => { - console.log(val); if (val) fnModalVisibleByEdit(props.editId); } ); @@ -304,6 +307,7 @@ onMounted(() => {