fix: snmp相关参数名格式更改

This commit is contained in:
chenjinsong
2020-06-24 18:23:11 +08:00
parent b9828c8b47
commit 7dec966a6c
5 changed files with 68 additions and 38 deletions

View File

@@ -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

View File

@@ -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) => {
// 将秒改为毫秒

View File

@@ -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)
}
}
}

View File

@@ -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:""
}
});
}

View File

@@ -50,6 +50,9 @@
<el-form-item :label="$t('project.module.community')" prop="params.community">
<el-input size="small" v-model="account.params.community"/>
</el-form-item>
<el-form-item :label="$t('project.module.contextName')" prop="params.contextName">
<el-input size="small" v-model="account.params.contextName"/>
</el-form-item>
<el-form-item :label="$t('project.module.version')" prop="params.version">
<el-radio-group v-model.number="account.params.version" size="small">
<el-radio-button :label="2"></el-radio-button>