diff --git a/agent/proto/bakhistory/bakhistory.pb.go b/agent/proto/bakhistory/bakhistory.pb.go index 38a8610..c31a183 100644 --- a/agent/proto/bakhistory/bakhistory.pb.go +++ b/agent/proto/bakhistory/bakhistory.pb.go @@ -347,6 +347,10 @@ type HistoryListOutItem struct { BakTime string `protobuf:"bytes,9,opt,name=BakTime,proto3" json:"bak_time"` // @inject_tag: json:"status" Status int64 `protobuf:"varint,10,opt,name=Status,proto3" json:"status"` + // @inject_tag: json:"cleaned_status" + CleanedStatus int64 `protobuf:"varint,11,opt,name=CleanedStatus,proto3" json:"cleaned_status"` + // @inject_tag: json:"encryption_status" + EncryptionStatus int64 `protobuf:"varint,12,opt,name=EncryptionStatus,proto3" json:"encryption_status"` } func (x *HistoryListOutItem) Reset() { @@ -451,6 +455,20 @@ func (x *HistoryListOutItem) GetStatus() int64 { return 0 } +func (x *HistoryListOutItem) GetCleanedStatus() int64 { + if x != nil { + return x.CleanedStatus + } + return 0 +} + +func (x *HistoryListOutItem) GetEncryptionStatus() int64 { + if x != nil { + return x.EncryptionStatus + } + return 0 +} + type HistoryNumInfoOut struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -561,7 +579,7 @@ var file_bakhistory_proto_rawDesc = []byte{ 0x73, 0x74, 0x4f, 0x75, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x50, 0x61, 0x67, 0x65, 0x4e, 0x6f, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x92, 0x02, + 0x01, 0x28, 0x03, 0x52, 0x08, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xe4, 0x02, 0x0a, 0x12, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, @@ -579,39 +597,44 @@ var file_bakhistory_proto_rawDesc = []byte{ 0x12, 0x18, 0x0a, 0x07, 0x42, 0x61, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x42, 0x61, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x11, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x75, - 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x57, 0x65, 0x65, 0x6b, - 0x4e, 0x75, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x57, 0x65, 0x65, 0x6b, - 0x4e, 0x75, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x6c, 0x6c, 0x4e, 0x75, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x41, 0x6c, 0x6c, 0x4e, 0x75, 0x6d, 0x73, 0x12, 0x20, - 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x41, 0x6c, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x32, 0xdd, 0x02, 0x0a, 0x07, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x73, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, - 0x63, 0x72, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x62, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4c, - 0x69, 0x73, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, - 0x63, 0x72, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x62, 0x61, 0x63, 0x6b, - 0x75, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4c, - 0x69, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x00, 0x12, 0x70, 0x0a, 0x0d, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2c, 0x2e, 0x67, - 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, - 0x6f, 0x72, 0x79, 0x49, 0x44, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x2e, + 0x75, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x6c, 0x65, 0x61, 0x6e, 0x65, 0x64, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x43, 0x6c, 0x65, 0x61, 0x6e, + 0x65, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x45, 0x6e, 0x63, 0x72, + 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x10, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x11, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4e, 0x75, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x57, 0x65, + 0x65, 0x6b, 0x4e, 0x75, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x57, 0x65, + 0x65, 0x6b, 0x4e, 0x75, 0x6d, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x6c, 0x6c, 0x4e, 0x75, 0x6d, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x41, 0x6c, 0x6c, 0x4e, 0x75, 0x6d, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x41, 0x6c, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x41, 0x6c, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x46, 0x61, 0x69, 0x6c, 0x4e, 0x75, 0x6d, 0x32, 0xdd, 0x02, 0x0a, + 0x07, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x73, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x48, + 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x2e, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x4f, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x75, 0x6d, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, - 0x72, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, - 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x75, - 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x4f, 0x75, 0x74, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, - 0x3b, 0x62, 0x61, 0x6b, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x79, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x2e, + 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x62, 0x61, + 0x63, 0x6b, 0x75, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x79, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0x00, 0x12, 0x70, 0x0a, + 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x2c, + 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, + 0x73, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x44, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, 0x2f, 0x2e, 0x67, + 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, + 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x4f, 0x6e, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x00, 0x12, + 0x6b, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x75, 0x6d, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x2f, 0x2e, 0x67, 0x6f, 0x2e, 0x6d, + 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x62, 0x61, 0x63, + 0x6b, 0x75, 0x70, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, + 0x4e, 0x75, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x4f, 0x75, 0x74, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, + 0x2e, 0x2f, 0x3b, 0x62, 0x61, 0x6b, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/agent/proto/bakhistory/bakhistory.proto b/agent/proto/bakhistory/bakhistory.proto index 2f6acf4..a9d0b96 100644 --- a/agent/proto/bakhistory/bakhistory.proto +++ b/agent/proto/bakhistory/bakhistory.proto @@ -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 { diff --git a/front/src/views/cluster/history/mysql/ClusterMysqlHistory.vue b/front/src/views/cluster/history/mysql/ClusterMysqlHistory.vue index dead4d2..4d05038 100644 --- a/front/src/views/cluster/history/mysql/ClusterMysqlHistory.vue +++ b/front/src/views/cluster/history/mysql/ClusterMysqlHistory.vue @@ -42,6 +42,9 @@ + + + 删除 @@ -87,6 +90,17 @@ const statusMap = { } } +const cleanStatusMap = { + 0: { + status: 'success', + text: '未清理' + }, + 1: { + status: 'default', + text: '已清理' + } +} + export default { name: 'ClusterMysqlHistory', components: { @@ -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', @@ -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 () {