diff --git a/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue b/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue index 574817f..5b75ac1 100644 --- a/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue +++ b/src/views/abnormalAlarm/serverMonitor/instances/cpu.vue @@ -231,7 +231,6 @@ export default { }, methods: { getTheData() { - console.log(this.serverOptions) let hostId = this.serverOptions.find((item) => { return item.value == this.currId }).hostId @@ -278,7 +277,6 @@ export default { totalCpu.push(item) } }) - console.log(totalCpu) this.cpuDiff_xData = totalCpu[0].list.map((item) => { return dateFormat(new Date(item.date * 1000), 'hh:mm') }) @@ -357,14 +355,17 @@ export default { onServerChange(val) { this.currId = val.key this.currLabel = val.label + this.getTheData() }, onTimeChange(val) { this.getBeforeHours(val) + this.getTheData() }, onRangeDateChange(date, dateString) { this.queryParams.timer = 0 this.queryParams.startDate = dateString[0] this.queryParams.endDate = dateString[1] + this.getTheData() }, drawChart1() { let myLine = echarts.init(document.getElementById('chart1')) @@ -754,6 +755,11 @@ export default { data: item.data, } }) + option.legend.type = 'scroll' + option.legend.pageIconColor = '#9ab1bc' + option.legend.pageTextStyle = { + color: '#9ab1bc', + } this.drawLine(option) } else { this.drawLine(option) diff --git a/src/views/abnormalAlarm/serverMonitor/instances/details.vue b/src/views/abnormalAlarm/serverMonitor/instances/details.vue index 2313a9f..45063fd 100644 --- a/src/views/abnormalAlarm/serverMonitor/instances/details.vue +++ b/src/views/abnormalAlarm/serverMonitor/instances/details.vue @@ -15,7 +15,7 @@ :class="{ 'ant-list-item-active': index === currIndex }" slot="renderItem" slot-scope="item, index" - @click="handleBasicItem(index)" + @click="handleBasicItem(index, item)" >
{{ item.sourceName }}
@@ -512,7 +512,6 @@ export default { methods: { // Echarts (时间线) EchartsTimeline() { - console.log(3456789) const params = { itemId: '37550', itemType: 0, @@ -647,7 +646,6 @@ export default { } getAction('/systemMonitor/queryItemHistoryData', params).then((res) => { const arr = res.result.map((x) => x.value) - console.log(Math.max(...arr), Math.min(...arr)) this.cpuData.max = Math.max(...arr).toFixed(2) this.cpuData.min = Math.min(...arr).toFixed(2) let sum = arr.reduce((tatal, num) => tatal + num, 0) @@ -743,8 +741,12 @@ export default { } } }, - handleBasicItem(i) { + handleBasicItem(i, item) { this.currIndex = i + this.currItemId = item.cpuUsedItemId + this.getBasiclnfo(item.hostId) + this.getCpuUtilizationData() + this.getTimeLineData() }, getServerAlarmHistory(callBack) { this.loading = true diff --git a/src/views/abnormalAlarm/serverMonitor/instances/serviceProcess.vue b/src/views/abnormalAlarm/serverMonitor/instances/serviceProcess.vue index 1e32ea8..43a213a 100644 --- a/src/views/abnormalAlarm/serverMonitor/instances/serviceProcess.vue +++ b/src/views/abnormalAlarm/serverMonitor/instances/serviceProcess.vue @@ -333,7 +333,6 @@ export default { let oneHourAgo = moment().subtract(num, 'hours') this.queryParams.startDate = oneHourAgo.format('YYYY-MM-DD HH:mm:ss') this.queryParams.endDate = currentTime.format('YYYY-MM-DD HH:mm:ss') - console.log(this.queryParams) }, moment, onRangeDateChange(date, dateString) {