style: 网元版本页面多语言翻译
This commit is contained in:
@@ -630,6 +630,16 @@ export default {
|
|||||||
addTitle: "New Host Commands",
|
addTitle: "New Host Commands",
|
||||||
editTitle: "Edit Host Commands",
|
editTitle: "Edit Host Commands",
|
||||||
},
|
},
|
||||||
|
neVersion: {
|
||||||
|
upgrade: "Upgrade To New Version",
|
||||||
|
upgradeTip: "Are you sure you want to upgrade to the new version?",
|
||||||
|
upgradeTipEmpty: "There is currently no upgrade available",
|
||||||
|
upgradeTipEqual: "The current version is the same as the new version",
|
||||||
|
rollback: 'Rollback To Previous Version',
|
||||||
|
rollbackTip: "Are you sure you want to roll back to the previous version?",
|
||||||
|
rollbackTipEmpty: "There is currently no rollback available",
|
||||||
|
rollbackTipEqual: 'The current version is the same as the previous version',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
neUser: {
|
neUser: {
|
||||||
auth: {
|
auth: {
|
||||||
|
|||||||
@@ -630,6 +630,16 @@ export default {
|
|||||||
addTitle: "新增主机命令",
|
addTitle: "新增主机命令",
|
||||||
editTitle: "编辑主机命令",
|
editTitle: "编辑主机命令",
|
||||||
},
|
},
|
||||||
|
neVersion: {
|
||||||
|
upgrade: "升级到新版本",
|
||||||
|
upgradeTip: "确认要升级到新版本吗?",
|
||||||
|
upgradeTipEmpty: "当前没有可用的升级",
|
||||||
|
upgradeTipEqual: "当前版本与新版本相同",
|
||||||
|
rollback: '回滚到以前的版本',
|
||||||
|
rollbackTip: "确认要回滚到上一版本吗?",
|
||||||
|
rollbackTipEmpty: "目前没有可用的回滚",
|
||||||
|
rollbackTipEqual: '当前版本与之前版本相同',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
neUser: {
|
neUser: {
|
||||||
auth: {
|
auth: {
|
||||||
|
|||||||
@@ -265,36 +265,33 @@ function fnRecordVersion(
|
|||||||
action: 'upgrade' | 'rollback',
|
action: 'upgrade' | 'rollback',
|
||||||
row: Record<string, any>
|
row: Record<string, any>
|
||||||
) {
|
) {
|
||||||
|
let contentTip = `${action} version packages?`;
|
||||||
if (action === 'upgrade') {
|
if (action === 'upgrade') {
|
||||||
|
contentTip = t('views.ne.neVersion.upgradeTip')
|
||||||
if (row.newVersion === '' || row.newVersion === '-') {
|
if (row.newVersion === '' || row.newVersion === '-') {
|
||||||
message.warning('There are currently no upgraded versions available', 3);
|
message.warning(t('views.ne.neVersion.upgradeTipEmpty'), 3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (row.newVersion === row.version) {
|
if (row.newVersion === row.version) {
|
||||||
message.warning(
|
message.warning(t('views.ne.neVersion.upgradeTipEqual'), 3);
|
||||||
'The current version is the same as the previous version',
|
|
||||||
3
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (action === 'rollback') {
|
if (action === 'rollback') {
|
||||||
|
contentTip = t('views.ne.neVersion.rollbackTip')
|
||||||
if (row.preVersion === '' || row.preVersion === '-') {
|
if (row.preVersion === '' || row.preVersion === '-') {
|
||||||
message.warning('There are currently no rollback versions available', 3);
|
message.warning(t('views.ne.neVersion.rollbackTipEmpty'), 3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (row.preVersion === row.version) {
|
if (row.preVersion === row.version) {
|
||||||
message.warning(
|
message.warning(t('views.ne.neVersion.rollbackTipEqual'), 3);
|
||||||
'The current version is the same as the previous version',
|
|
||||||
3
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: `${action} version packages?`,
|
content: contentTip,
|
||||||
onOk() {
|
onOk() {
|
||||||
if (modalState.confirmLoading) return;
|
if (modalState.confirmLoading) return;
|
||||||
modalState.confirmLoading = true;
|
modalState.confirmLoading = true;
|
||||||
@@ -324,7 +321,6 @@ function fnRecordVersion(
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fnGetList(1);
|
fnGetList(1);
|
||||||
console.log(res);
|
|
||||||
} else {
|
} else {
|
||||||
message.error(res.msg, 3);
|
message.error(res.msg, 3);
|
||||||
}
|
}
|
||||||
@@ -592,8 +588,10 @@ onMounted(() => {
|
|||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'id'">
|
<template v-if="column.key === 'id'">
|
||||||
<a-space :size="8" align="center">
|
<a-space :size="8" align="center">
|
||||||
<a-tooltip>
|
<a-tooltip placement="topRight">
|
||||||
<template #title>Upgrade To Previous version</template>
|
<template #title>
|
||||||
|
{{ t('views.ne.neVersion.upgrade') }}
|
||||||
|
</template>
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnRecordVersion('upgrade', record)"
|
@click.prevent="fnRecordVersion('upgrade', record)"
|
||||||
@@ -601,8 +599,10 @@ onMounted(() => {
|
|||||||
<template #icon><ThunderboltOutlined /></template>
|
<template #icon><ThunderboltOutlined /></template>
|
||||||
</a-button>
|
</a-button>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<a-tooltip>
|
<a-tooltip placement="topRight">
|
||||||
<template #title>Rollback To New Version</template>
|
<template #title>
|
||||||
|
{{ t('views.ne.neVersion.rollback') }}
|
||||||
|
</template>
|
||||||
<a-button
|
<a-button
|
||||||
type="link"
|
type="link"
|
||||||
@click.prevent="fnRecordVersion('rollback', record)"
|
@click.prevent="fnRecordVersion('rollback', record)"
|
||||||
|
|||||||
Reference in New Issue
Block a user