diff --git a/nezha-fronted/src/components/charts/chart-detail.vue b/nezha-fronted/src/components/charts/chart-detail.vue index 80bb6a4c8..92d604bc3 100644 --- a/nezha-fronted/src/components/charts/chart-detail.vue +++ b/nezha-fronted/src/components/charts/chart-detail.vue @@ -211,6 +211,7 @@ import chartPreview from './chartPreview'; import echarts from 'echarts'; import nzAlertTag from '../page/alert/nzAlertTag'; + import bus from '../../libs/bus'; export default { name: 'chartDetail', @@ -429,28 +430,46 @@ initChart(series) { let option = { title: {show: false}, - tooltip: {show: false}, grid: {left: 40}, + tooltip: { + show: true, + trigger: "axis", + extraCssText: 'z-index:3100;', + position: [0, '50%'], + formatter: function(param) { + let time = param[0].data[0]; + time = bus.computeTimezone(time); + let date = new Date(time); + let hour = date.getHours(); + hour = hour > 9 ? hour : "0" + hour; //加0补充为两位数字 + let minute = date.getMinutes(); + minute = minute > 9 ? minute : "0" + minute; //如果分钟小于10,则在前面加0补充为两位数字 + + let value = param[0].data[1]; + if (value == "1") { + value = "up"; + } else { + value = "down"; + } + return [date.getFullYear(), date.getMonth() + 1, date.getDate()].join("/") + " " + [hour, minute].join(":") + "\n" + value; + } + }, legend: {show: false}, xAxis: { show: false, type: 'time' }, + /*visualMap: { + show: false, + dimension: 1, + pieces: [], + outOfRange: { + color: 'green' + } + },*/ yAxis: { type: 'value', - minInterval: 1, - splitLine: {show: false}, - axisLabel: { - formatter: function (value, index) { - if (value == 1) { - return "up"; - } else { - return "down"; - } - } - }, - axisTick: {show: false}, - axisLine: {show: false} + show: false }, useUTC: false,//使用本地时间 series: series diff --git a/nezha-fronted/src/components/charts/chart-list.vue b/nezha-fronted/src/components/charts/chart-list.vue index 56027fc10..0263a5cdf 100644 --- a/nezha-fronted/src/components/charts/chart-list.vue +++ b/nezha-fronted/src/components/charts/chart-list.vue @@ -25,7 +25,7 @@ cursor: se-resize; box-sizing: border-box; user-select: none; - z-index: 2000; + z-index: 99; } .vue-resizable-handle:after { border-right: 2px solid #acb6bf; @@ -550,6 +550,20 @@ //endpoint单独处理 if (param.from == "endpoint") { this.dataList = []; + this.dataList.push({ + id: -8, + panelId: 0, + title: this.$t("alert.alertList"), + span: 12, + height: 350, + type: "alertList", + prev: -9, + next: -1, + buildIn: 1, + draggable: false, + resizable: false, + editable: false, + }); this.dataList.push({ id: -10, panelId: 0, @@ -582,20 +596,6 @@ resizable: false, editable: false, }); - this.dataList.push({ - id: -8, - panelId: 0, - title: this.$t("alert.alertList"), - span: 4, - height: 350, - type: "alertList", - prev: -9, - next: -1, - buildIn: 1, - draggable: false, - resizable: false, - editable: false, - }); this.$nextTick(() => { this.dataList.forEach((item,index) => { this.$set(item, "from", params.from); @@ -1219,6 +1219,15 @@ width: 1, opacity: 0.9 }, + itemStyle: { + color: function(params) { + if (params.data[1] == "1") { + return "#50d050"; + } else { + return "#d64f40"; + } + } + } }; response.data.result.forEach((queryItem, resInnerPos) => { // 将秒改为毫秒 diff --git a/nezha-fronted/src/components/common/pagination.vue b/nezha-fronted/src/components/common/pagination.vue index 32e43952e..6309bf9bc 100644 --- a/nezha-fronted/src/components/common/pagination.vue +++ b/nezha-fronted/src/components/common/pagination.vue @@ -52,7 +52,6 @@ export default { }, methods: { popperVisible:function(visible){ - console.log('fixed') if(visible==true){ this.$nextTick(()=>{ if(this.popClass&&this.popClass==='out-popper-fix'){ @@ -143,7 +142,7 @@ export default { popClass:{ immediate:true, handler(n,o){ - console.log(n) + //console.log(n) } } } diff --git a/nezha-fronted/src/components/common/rightBox/assetBox.vue b/nezha-fronted/src/components/common/rightBox/assetBox.vue index df3557463..7945441e4 100644 --- a/nezha-fronted/src/components/common/rightBox/assetBox.vue +++ b/nezha-fronted/src/components/common/rightBox/assetBox.vue @@ -576,13 +576,13 @@ params: { version:2, community:"public", - security_name:"", - security_level:"", - auth_password:"", - priv_password:"", - auth_protocol:"", - priv_protocol:"", - context_name:"" + securityName:"", + securityLevel:"", + password:"", + privPassword:"", + authProtocol:"", + privProtocol:"", + contextName:"" } }); } diff --git a/nezha-fronted/src/components/page/asset/accountConfig.vue b/nezha-fronted/src/components/page/asset/accountConfig.vue index 3d54fc104..4dd7f41ad 100644 --- a/nezha-fronted/src/components/page/asset/accountConfig.vue +++ b/nezha-fronted/src/components/page/asset/accountConfig.vue @@ -50,6 +50,9 @@ + + +