perf: 优化云同步列表显示

This commit is contained in:
“huailei000”
2023-02-16 14:49:13 +08:00
committed by huailei
parent 02bf964622
commit c661177de8
6 changed files with 25 additions and 10 deletions

View File

@@ -1936,6 +1936,7 @@
"False": "False",
"NewCount": "New count",
"UnSyncCount": "Unsync count",
"NewSyncCount": "New synced count",
"SyncedCount": "Synced count",
"ReleasedCount": "Released count",
"DateSync": "Date sync",

View File

@@ -1932,6 +1932,7 @@
"False": "いいえ",
"NewCount": "新規追加",
"UnSyncCount": "同期されていない",
"NewSyncCount": "新しい同期",
"SyncedCount": "同期済み",
"ReleasedCount": "リリース済",
"DateSync": "同期日",

View File

@@ -1854,6 +1854,7 @@
"NewCount": "新增",
"UnSyncCount": "未同步",
"SyncedCount": "已同步",
"NewSyncCount": "新同步",
"ReleasedCount": "已释放",
"DateSync": "同步日期",
"Status": "状态",

View File

@@ -45,17 +45,22 @@ export default {
columns: [
'instance_id',
{
prop: 'asset_display',
label: this.$t('xpack.Asset')
},
{
prop: 'asset_ip',
prop: 'asset',
label: this.$t('xpack.ip')
},
'region',
{
prop: 'status_display',
label: this.$t('xpack.Cloud.Status')
prop: 'status',
label: this.$t('xpack.Cloud.Status'),
formatter: row => {
const status = {
0: this.$t('xpack.Cloud.UnSyncCount'),
1: this.$t('xpack.Cloud.SyncedCount'),
2: this.$t('xpack.Cloud.NewSyncCount'),
3: this.$t('xpack.Cloud.ReleasedCount')
}
return <el-tag type='primary' size='mini'>{status[row.status]}</el-tag>
}
},
{
prop: 'date_sync',

View File

@@ -48,8 +48,15 @@ export default {
label: this.$t('xpack.Cloud.ReleasedCount')
},
{
prop: 'status_display',
label: this.$t('xpack.Cloud.Status')
prop: 'status',
label: this.$t('xpack.Cloud.Status'),
formatter: row => {
if (row.status === 1) {
return <el-tag type='primary' size='mini'>{this.$t('common.Success')}</el-tag>
} else {
return <el-tag type='danger' size='mini'>{this.$t('common.Failed')}</el-tag>
}
}
},
{
prop: 'date_sync',

View File

@@ -40,7 +40,7 @@ export default {
account: {
label: this.$t('xpack.Cloud.Account'),
formatter: function(row) {
return <span>{ row.account.name }</span>
return <span>{ row.account?.name }</span>
}
},
periodic_display: {