diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index a8d9b93e..57a17069 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -591,6 +591,7 @@ export default { neTypeTip: 'Fill in the type of network element to be created, e.g. SMF.', neId: 'NE ID', neIdPlease: 'Please enter the network element identification', + neIdTip: 'Fill in the unique identifier of the network element binding', rmUid: 'Resource Unique ID', rmUidPlease: 'Please enter a resource unique ID', rmUidTip: "Tagging for data reporting of network element logs, alarms, metrics, etc.", @@ -670,7 +671,7 @@ export default { delTip: "Confirm that you want to delete the host number [{num}]?", addTitle: "Add Host Connection", editTitle: "Edit Host Connection", - test: "Test Connection To Host", + test: "Test Connection", testOk: "Test Connection Successful", authRSA: 'Secret Authorization', authRSATip: "Do I have to configure secret-free authorization?", @@ -732,6 +733,52 @@ export default { sync: 'Sync to NE', syncNe: 'Select NE', }, + neQuickSetup: { + stepPrev: 'Previous', + stepPrevTip: 'Confirm that you want to abandon the current change and return to the previous step?', + stepNext: 'Next', + stepSave: 'Save', + startTitle: 'Service Terminal Environment', + startDesc: 'Test connectivity to network element services', + startStepNext: 'Confirm that you want to proceed to the next step to configure the network element information?', + addr: 'Terminal IP', + kernelName: 'System', + kernelRelease: 'Kernel', + machine: 'Framework', + prettyName: 'Platform', + prettyNameTip: 'Support Ubuntu', + nodename: 'Node Name', + auth: 'Competence Grant', + sudo: 'sudo', + sudoErr: 'To ensure that you have permission to install packages, configure to grant the current user permission to allow passwordless sudo privileges.', + sshLink: 'confidentiality', + configTitle: "Configuring Network Elements", + configDesc: "Fill in the basic information of the network element", + configAddTitle: 'New Tips', + configAddTip: 'Is it added as new network element information and continue?', + configUpdateTitle: 'Update Tips', + configUpdateTip: 'Does it update to the already existing network element information and continue?', + configStepNext: 'Confirm that you want to proceed to the next step for the Net Element software installation?', + installTitle: "Network Element Installation", + installDesc: "Installation to Service Terminal", + installConfirmTip: 'Are you sure you want to install package [{name}]?', + installStepNext: 'Confirm that you want to proceed to the next step for network element authorization?', + installSource: 'Software Source', + installSourceOption: 'Uploaded', + installSourceUpload: 'New Upload', + installSelect: 'Select Record', + installUpload: 'Upload file', + installText: 'Installed', + licenseTitle: "Licenses", + licenseDesc: "Network element service authorization certification", + licenseResultTitle: "Whether to authorize activation immediately", + licenseResultTitleOk: 'Successful Activation', + licenseUpload: 'License', + licenseEnd: 'Finish', + licenseCheack: 'Waiting for network element validation', + licenseTip1: '1. Click [License] to get the license activation code, and then contact the network element vendor for activation.', + licenseTip2: '2. Clicking [Finish] will end the installation process.', + }, }, neUser: { auth: { diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index 45353bf6..5c3e8493 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -591,6 +591,7 @@ export default { neTypeTip: '填写创建的网元类型,如:SMF', neId: '网元标识', neIdPlease: '请输入网元标识', + neIdTip: '填写网元绑定的唯一标识', rmUid: '资源唯一标识', rmUidPlease: '请输入资源唯一标识', rmUidTip: "用于网元日志、告警、指标等数据上报的标记", @@ -732,6 +733,52 @@ export default { sync: '同步到网元', syncNe: '选择网元', }, + neQuickSetup: { + stepPrev: '上一步', + stepPrevTip: '确认要放弃当前变更返回上一步吗?', + stepNext: '下一步', + stepSave: '保存信息', + startTitle: '服务终端环境', + startDesc: '测试连接网元服务', + startStepNext: '确认要下一步进行配置网元信息?', + addr: '终端IP', + kernelName: '系统', + kernelRelease: '内核', + machine: '架构', + prettyName: '平台', + prettyNameTip: '支持 Ubuntu', + nodename: '主机名', + auth: '权限授予', + sudo: '提权', + sudoErr: '确保有权限进行软件包安装,请配置授予当前用户允许无密码 sudo 权限。', + sshLink: '免密直连', + configTitle: "配置网元", + configDesc: "填写网元基础信息", + configAddTitle: '新增提示', + configAddTip: '是否新增为新的网元信息并继续?', + configUpdateTitle: '更新提示', + configUpdateTip: '是否更新到已存在网元信息并继续?', + configStepNext: '确认要下一步进行网元软件安装?', + installTitle: "网元安装", + installDesc: "安装到服务终端", + installConfirmTip: '确认要安装软件包【{name}】吗?', + installStepNext: '确认要下一步进行网元授权吗?', + installSource: '软件来源', + installSourceOption: '已上传', + installSourceUpload: '新上传', + installSelect: '选择记录', + installUpload: '上传文件', + installText: '安装', + licenseTitle: "授权许可", + licenseDesc: "网元服务授权认证", + licenseResultTitle: "是否立即授权激活", + licenseResultTitleOk: '成功激活', + licenseUpload: '许可证', + licenseEnd: '结束', + licenseCheack: '等待网元验证', + licenseTip1: '1. 点击【许可证】可获取许可激活码,随后联系网元厂商进行激活', + licenseTip2: '2. 点击【结束】将结束安装过程', + }, }, neUser: { auth: { diff --git a/src/views/ne/neInfo/components/EditModal.vue b/src/views/ne/neInfo/components/EditModal.vue index ccef9a92..d2baf84a 100644 --- a/src/views/ne/neInfo/components/EditModal.vue +++ b/src/views/ne/neInfo/components/EditModal.vue @@ -428,7 +428,16 @@ onMounted(() => { allow-clear :placeholder="t('common.inputPlease')" :maxlength="32" - > + > + + + + {{ t('views.ne.common.neIdTip') }} + + + + + diff --git a/src/views/ne/neQuickSetup/components/NeInfoConfig.vue b/src/views/ne/neQuickSetup/components/NeInfoConfig.vue index 83803cc6..a0c61d58 100644 --- a/src/views/ne/neQuickSetup/components/NeInfoConfig.vue +++ b/src/views/ne/neQuickSetup/components/NeInfoConfig.vue @@ -2,7 +2,6 @@ import { Form, Modal, message } from 'ant-design-vue/lib'; import { onMounted, reactive, toRaw } from 'vue'; import { addNeInfo, getNeInfoByTypeAndID, updateNeInfo } from '@/api/ne/neInfo'; -import { neHostAuthorizedRSA, testNeHost } from '@/api/ne/neHost'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import { NE_TYPE_LIST } from '@/constants/ne-constants'; import { regExpIPv4, regExpIPv6 } from '@/utils/regular-utils'; @@ -79,9 +78,9 @@ let modalState: ModalStateType = reactive({ title: 'Telnet_NE_4100', addr: '', port: 4100, - user: 'user', + user: 'admin', authMode: '0', - password: 'user', + password: 'admin', remark: '', }, ], @@ -96,13 +95,13 @@ const modalStateFrom = Form.useForm( neType: [ { required: true, - message: '请输入网元类型', + message: t('views.ne.common.neTypePlease'), }, ], neId: [ { required: true, - message: '请输入网元标识', + message: t('views.ne.common.neIdPlease'), }, ], ip: [ @@ -111,12 +110,6 @@ const modalStateFrom = Form.useForm( validator: modalStateFromEqualIPV4AndIPV6, }, ], - port: [ - { - required: true, - message: '请输入网元IP端口', - }, - ], }) ); @@ -142,60 +135,6 @@ function modalStateFromEqualIPV4AndIPV6( return Promise.resolve(); } -/** - * 测试主机连接 - */ -function fnHostTest(row: Record) { - if (modalState.confirmLoading || !row.addr) 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: `${row.addr}:${row.port} ${t('views.ne.neHost.testOk')}`, - duration: 2, - }); - } else { - message.error({ - content: `${row.addr}:${row.port} ${res.msg}`, - duration: 2, - }); - } - }) - .finally(() => { - hide(); - modalState.confirmLoading = false; - }); -} - -/**测试主机连接-免密直连 */ -function fnHostAuthorized(row: Record) { - if (modalState.confirmLoading) return; - - Modal.confirm({ - title: '提示', - content: '是否要配置免密直连?', - onOk: () => { - modalState.confirmLoading = true; - neHostAuthorizedRSA(row).then(res => { - modalState.confirmLoading = false; - if (res.code === RESULT_CODE_SUCCESS) { - message.success({ - content: `操作成功`, - duration: 2, - }); - } else { - message.error({ - content: `操作失败`, - duration: 2, - }); - } - }); - }, - }); -} - /** * 对话框弹出确认执行函数 * 进行表达规则校验 @@ -230,11 +169,11 @@ function fnModalOk() { } }) .then(isUpdate => { - let confirmTitle = '新增提示'; - let confirmContent = `是否新增为新的网元信息并继续?`; + let confirmTitle = t('views.ne.neQuickSetup.configAddTitle'); + let confirmContent = t('views.ne.neQuickSetup.configAddTip'); if (isUpdate) { - confirmTitle = '更新提示'; - confirmContent = `是否更新到已存在网元信息并继续?`; + confirmTitle = t('views.ne.neQuickSetup.configUpdateTitle'); + confirmContent = t('views.ne.neQuickSetup.configUpdateTip'); } Modal.confirm({ title: confirmTitle, @@ -266,7 +205,7 @@ function fnModalOk() { modalState.stepNext = true; // 开启下一步 } else { message.error({ - content: `${t('common.operateErr')}`, + content: res.msg, duration: 3, }); } @@ -304,9 +243,9 @@ function fnNeTypeChange(v: any) { title: 'Telnet_NE_5002', addr: modalState.from.ip, port: 5002, - user: 'user', + user: 'admin', authMode: '0', - password: 'user', + password: 'admin', remark: '', }); } @@ -327,7 +266,7 @@ function fnNeIPChange(e: any) { function fnStepPrev() { Modal.confirm({ title: t('common.tipTitle'), - content: '确认要放弃当前变更返回上一步吗?', + content: t('views.ne.neQuickSetup.stepPrevTip'), onOk() { fnRestStepState(); fnToStepName('Start'); @@ -340,7 +279,7 @@ function fnStepNext() { if (!modalState.stepNext) return; Modal.confirm({ title: t('common.tipTitle'), - content: '确认要下一步进行网元软件安装?', + content: t('views.ne.neQuickSetup.configStepNext'), onOk() { fnToStepName('NeInfoSoftwareInstall'); }, @@ -390,9 +329,9 @@ onMounted(() => { :labelWrap="true" > - + @@ -411,7 +350,7 @@ onMounted(() => { - {{ t('views.configManage.neManage.neTypeTip') }} + {{ t('views.ne.common.neTypeTip') }} @@ -420,9 +359,9 @@ onMounted(() => { - + @@ -435,7 +374,7 @@ onMounted(() => { - {{ t('views.configManage.neManage.neIdTip') }} + {{ t('views.ne.common.neIdTip') }} @@ -446,9 +385,9 @@ onMounted(() => { - + @@ -464,7 +403,7 @@ onMounted(() => { - {{ t('views.ne.neInfo.ipAddr') }} + {{ t('views.ne.common.ipAddrTip') }} @@ -473,9 +412,9 @@ onMounted(() => { - + @@ -490,7 +429,7 @@ onMounted(() => { - {{ t('views.configManage.neManage.portTip') }} + {{ t('views.ne.common.portTip') }} @@ -499,173 +438,29 @@ onMounted(() => { - - - {{ t('views.ne.neInfo.hostConfig') }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 免密授权 - - - - - 上一步 - - - 保存信息 + + {{ t('views.ne.neQuickSetup.stepPrev') }} + {{ t('views.ne.neQuickSetup.stepSave') }} + + + - 下一步 + {{ t('views.ne.neQuickSetup.stepNext') }} @@ -674,10 +469,15 @@ onMounted(() => {