diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 0980b29fa..043d4d73f 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -726,6 +726,10 @@ const message = { }, monitor: { monitor: 'Monitor', + globalFilter: 'Global Filter', + enableMonitor: 'Enable', + storeDays: 'Expiration days', + cleanMonitor: 'Clearing monitoring records', setting: 'Setting', avgLoad: 'Average load', loadDetail: 'Load detail', @@ -1125,11 +1129,6 @@ const message = { source: 'Download source', hasNewVersion: 'New version Available', - monitor: 'Monitor', - enableMonitor: 'Enable', - storeDays: 'Expiration days', - cleanMonitor: 'Clearing monitoring records', - message: 'Message', messageType: 'Message type', email: 'Email', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index d3d96dca9..df5211b77 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -714,6 +714,10 @@ const message = { }, monitor: { monitor: '监控', + globalFilter: '全局过滤', + enableMonitor: '监控状态', + storeDays: '保存天数', + cleanMonitor: '清空监控记录', setting: '设置', avgLoad: '平均负载', loadDetail: '负载详情', @@ -1087,11 +1091,6 @@ const message = { primaryKey: '密钥', certificate: '证书', - monitor: '监控', - enableMonitor: '监控状态', - storeDays: '保存天数', - cleanMonitor: '清空监控记录', - message: '通知', messageType: '通知方式', email: '邮箱', diff --git a/frontend/src/views/host/monitor/monitor/index.vue b/frontend/src/views/host/monitor/monitor/index.vue index 06c2ed501..7b3241d4b 100644 --- a/frontend/src/views/host/monitor/monitor/index.vue +++ b/frontend/src/views/host/monitor/monitor/index.vue @@ -2,6 +2,22 @@
+ @@ -157,6 +173,7 @@ const mobile = computed(() => { const zoomStart = ref(); const monitorBase = ref(); +const timeRangeGlobal = ref<[Date, Date]>([new Date(new Date().setHours(0, 0, 0, 0)), new Date()]); const timeRangeLoad = ref<[Date, Date]>([new Date(new Date().setHours(0, 0, 0, 0)), new Date()]); const timeRangeCpu = ref<[Date, Date]>([new Date(new Date().setHours(0, 0, 0, 0)), new Date()]); const timeRangeMemory = ref<[Date, Date]>([new Date(new Date().setHours(0, 0, 0, 0)), new Date()]); @@ -215,6 +232,19 @@ const searchInfo = reactive({ endTime: new Date(), }); +const searchGlobal = () => { + timeRangeLoad.value = timeRangeGlobal.value; + timeRangeCpu.value = timeRangeGlobal.value; + timeRangeMemory.value = timeRangeGlobal.value; + timeRangeIO.value = timeRangeGlobal.value; + timeRangeNetwork.value = timeRangeGlobal.value; + search('load'); + search('cpu'); + search('memory'); + search('io'); + search('network'); +}; + const search = async (param: string) => { searchInfo.param = param; switch (param) { @@ -740,6 +770,12 @@ onBeforeUnmount(() => {