更新app列表界面汉化
This commit is contained in:
parent
42df11f299
commit
5ef6682a67
@ -15,7 +15,7 @@ import router from '../router';
|
|||||||
import { getRunningJobs } from '../utils/agentJob';
|
import { getRunningJobs } from '../utils/agentJob';
|
||||||
import { confirmDialog, icon, renderDialog } from '../utils/components';
|
import { confirmDialog, icon, renderDialog } from '../utils/components';
|
||||||
import dayjs from '../utils/dayjs';
|
import dayjs from '../utils/dayjs';
|
||||||
import { bytes, date, userCurrency } from '../utils/format';
|
import { bytes, date, userCurrency, getStatusLabel, getDeployTypeLabel } from '../utils/format';
|
||||||
import { getToastErrorMessage } from '../utils/toast';
|
import { getToastErrorMessage } from '../utils/toast';
|
||||||
import { getDocResource } from '../utils/resource';
|
import { getDocResource } from '../utils/resource';
|
||||||
import { trialDays } from '../utils/site';
|
import { trialDays } from '../utils/site';
|
||||||
@ -917,12 +917,18 @@ export default {
|
|||||||
label: '类型',
|
label: '类型',
|
||||||
fieldname: 'deploy_type',
|
fieldname: 'deploy_type',
|
||||||
width: 0.3,
|
width: 0.3,
|
||||||
|
format(value) {
|
||||||
|
return getDeployTypeLabel(value);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '状态',
|
label: '状态',
|
||||||
fieldname: 'status',
|
fieldname: 'status',
|
||||||
type: 'Badge',
|
type: 'Badge',
|
||||||
width: 0.5,
|
width: 0.5,
|
||||||
|
format(value) {
|
||||||
|
return getStatusLabel(value);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// label: '备份',
|
// label: '备份',
|
||||||
|
|||||||
@ -223,3 +223,36 @@ export function formatValue(value, type) {
|
|||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const statusMap = {
|
||||||
|
'Active': '激活',
|
||||||
|
'Inactive': '未激活',
|
||||||
|
'Suspended': '已暂停',
|
||||||
|
'Broken': '损坏',
|
||||||
|
'Archived': '已归档',
|
||||||
|
'Pending': '待处理',
|
||||||
|
'Installing': '安装中',
|
||||||
|
'Running': '运行中',
|
||||||
|
'Success': '成功',
|
||||||
|
'Failure': '失败'
|
||||||
|
};
|
||||||
|
|
||||||
|
export const deployTypeMap = {
|
||||||
|
'Migrate': '迁移',
|
||||||
|
'Update': '更新',
|
||||||
|
'Install': '安装',
|
||||||
|
'Uninstall': '卸载',
|
||||||
|
'Backup': '备份',
|
||||||
|
'Restore': '恢复',
|
||||||
|
'Upgrade': '升级',
|
||||||
|
'Downgrade': '降级',
|
||||||
|
'Rollback': '回滚',
|
||||||
|
};
|
||||||
|
|
||||||
|
export function getStatusLabel(status) {
|
||||||
|
return statusMap[status] || status;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDeployTypeLabel(type) {
|
||||||
|
return deployTypeMap[type] || type;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user