Skip to content

Commit

Permalink
feat(history): front add clean & encryption status
Browse files Browse the repository at this point in the history
  • Loading branch information
noovertime7 committed Oct 20, 2022
1 parent 11f2566 commit 5f98320
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 32 deletions.
87 changes: 55 additions & 32 deletions agent/proto/bakhistory/bakhistory.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions agent/proto/bakhistory/bakhistory.proto
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ message HistoryListOutItem {
string BakTime = 9;
// @inject_tag: json:"status"
int64 Status = 10;
// @inject_tag: json:"cleaned_status"
int64 CleanedStatus = 11;
// @inject_tag: json:"encryption_status"
int64 EncryptionStatus =12;
}

message HistoryNumInfoOut {
Expand Down
32 changes: 32 additions & 0 deletions front/src/views/cluster/history/mysql/ClusterMysqlHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
<span slot="status" slot-scope="text">
<a-badge :status="text | statusTypeFilter" :text="text | statusFilter" />
</span>
<span slot="clean_status" slot-scope="text">
<a-badge :status="text | cleanStatusTypeFilter" :text="text | cleanStatusFilter" />
</span>
<span slot="action" slot-scope="text, record">
<a @click="deleteHistory(record)">删除</a>
<a-divider type="vertical"/>
Expand Down Expand Up @@ -87,6 +90,17 @@ const statusMap = {
}
}
const cleanStatusMap = {
0: {
status: 'success',
text: '未清理'
},
1: {
status: 'default',
text: '已清理'
}
}
export default {
name: 'ClusterMysqlHistory',
components: {
Expand Down Expand Up @@ -140,6 +154,18 @@ export default {
scopedSlots: { customRender: 'status' },
align: 'center'
},
{
title: '清理状态',
dataIndex: 'cleaned_status',
scopedSlots: { customRender: 'clean_status' },
align: 'center'
},
{
title: '加密状态',
dataIndex: 'encryption_status',
scopedSlots: { customRender: 'status' },
align: 'center'
},
{
title: '备份时间',
dataIndex: 'bak_time',
Expand Down Expand Up @@ -178,6 +204,12 @@ export default {
},
statusTypeFilter (type) {
return statusMap[type].status
},
cleanStatusFilter (type) {
return cleanStatusMap[type].text
},
cleanStatusTypeFilter (type) {
return cleanStatusMap[type].status
}
},
created () {
Expand Down

0 comments on commit 5f98320

Please sign in to comment.