From f085e6a67bc2cce0085151c34c77658b4b78ae09 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Wed, 31 Mar 2021 16:45:29 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E5=8E=BB=E9=99=A4=E6=8C=89?= =?UTF-8?q?=E9=92=AEhover=E6=A0=B7=E5=BC=8F=20=E4=BB=A5=E5=8F=8A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=8D=95=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nezha-fronted/src/assets/stylus/main.scss | 4 ++-- .../components/charts/line-chart-block.vue | 8 +++---- .../bottomBox/tabs/endpointQueryTab.vue | 4 ++-- .../src/components/common/language/en.js | 22 +++++++++---------- .../page/dashboard/overview/chart.vue | 6 ++--- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 795541836..4f2e3214e 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -267,11 +267,11 @@ li{ padding: 4px 6px; } .nz-btn.nz-btn-style-light:hover:not(.nz-btn-disabled) { - background-image: $btn-light-background-color-hover; + //background-image: $btn-light-background-color-hover; } .nz-btn.nz-btn-style-normal:hover:not(.nz-btn-disabled) { background-image: none; - background-color: $btn-normal-background-color-hover; + //background-color: $btn-normal-background-color-hover; } .nz-btn.nz-btn-style-pure-white:hover:not(.nz-btn-disabled) { background-color: #dedede; diff --git a/nezha-fronted/src/components/charts/line-chart-block.vue b/nezha-fronted/src/components/charts/line-chart-block.vue index 8991c045b..53698648c 100644 --- a/nezha-fronted/src/components/charts/line-chart-block.vue +++ b/nezha-fronted/src/components/charts/line-chart-block.vue @@ -730,14 +730,14 @@ export default { params.forEach((item, i) => { const tip = legend[item.seriesIndex] const color = self.bgColorList[item.seriesIndex] - if (i === 0) { + if (i === 0 && tip.alias.indexOf('Previous ') === -1) { const value = item.data[0] const tData = new Date(value) str += '
' str += bus.timeFormate(tData) str += '
' } - if (tip.alias.indexOf('process_') !== -1 && minusFlag) { + if (tip.alias.indexOf('Previous ') !== -1 && minusFlag) { const value = item.data[0] - minusTime const tData = new Date(value) str += '
' @@ -1585,8 +1585,8 @@ export default { alias = host } if (pos >= this.data.elements.length) { - legend.push({ name: 'process_' + host + '-' + elements.id + '-' + innerPos, alias: 'process_' + alias }) - seriesItem.theData.name = 'process_' + host + '-' + elements.id + '-' + innerPos + legend.push({ name: 'Previous ' + host + '-' + elements.id + '-' + innerPos, alias: 'Previous ' + alias }) + seriesItem.theData.name = 'Previous ' + host + '-' + elements.id + '-' + innerPos seriesItem.metric_name = seriesItem.theData.name } else { legend.push({ name: host + '-' + elements.id + '-' + innerPos, alias: alias }) diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue index 95e8c4ded..4a7589ade 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue @@ -501,9 +501,9 @@ export default { isGray: false } if (promIndex >= this.selectedEndpoints.length) { - legend.name = 'process_' + legend.name + legend.name = 'Previous ' + legend.name chartData.name = legend.name - legend.alias = 'process_' + legend.alias + legend.alias = 'Previous ' + legend.alias } this.legend.push(legend) chartData.data = queryData.values.map((dpsItem, dpsIndex) => { diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index 9cfd1004a..6fadd15ca 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -304,17 +304,17 @@ const en = { lastTwoDay: 'Last 2 days', lastSevenDay: 'Last 7 days', lastThirtyDay: 'Last 30 days', - beforeFiveMin: 'Before 5 minutes', - beforeFifteenMin: 'Before 15 minutes', - beforeThirtyMin: 'Before 30 minutes', - beforeOneHour: 'Before 1 hour', - beforeThreeHour: 'Before 3 hours', - beforeSixHour: 'Before 6 hours', - beforeTwelveHour: 'Before 12 hours', - beforeTwentyFourHour: 'Before 24 hours', - beforeTwoDay: 'Before 2 days', - beforeSevenDay: 'Before 7 days', - beforeThirtyDay: 'Before 30 days', + beforeFiveMin: 'Previous 5 minutes', + beforeFifteenMin: 'Previous 15 minutes', + beforeThirtyMin: 'Previous 30 minutes', + beforeOneHour: 'Previous 1 hour', + beforeThreeHour: 'Previous 3 hours', + beforeSixHour: 'Previous 6 hours', + beforeTwelveHour: 'Previous 12 hours', + beforeTwentyFourHour: 'Previous 24 hours', + beforeTwoDay: 'Previous 2 days', + beforeSevenDay: 'Previous 7 days', + beforeThirtyDay: 'Previous 30 days', refreshInterval: { never: 'Off', // '从不' oneMinute: '1 minute', // 1 minute diff --git a/nezha-fronted/src/components/page/dashboard/overview/chart.vue b/nezha-fronted/src/components/page/dashboard/overview/chart.vue index 4fbf45ae3..08d948365 100644 --- a/nezha-fronted/src/components/page/dashboard/overview/chart.vue +++ b/nezha-fronted/src/components/page/dashboard/overview/chart.vue @@ -413,15 +413,15 @@ export default { let minusFlag = true let str = '
' params.forEach((item, i) => { - if (i === 0) { + const alias = this.queryAlias(i) + if (i === 0 && alias.indexOf('Previous ') === -1) { const value = item.data[0] const tData = new Date(value) str += [tData.getFullYear(), tData.getMonth() + 1, tData.getDate()].join('-') + ' ' + [tData.getHours(), tData.getMinutes(), tData.getSeconds()].join(':') str += '
' } - const alias = this.queryAlias(i) - if (alias.indexOf('process_') !== -1 && minusFlag) { + if (alias.indexOf('Previous ') !== -1 && minusFlag) { const value = item.data[0] - this.minusTime const tData = new Date(value) str += [tData.getFullYear(), tData.getMonth() + 1, tData.getDate()].join('-') + ' ' +