feat:新增功能
1.panel图表曲线全屏增加时间查询 2.panel图表的定期刷新 3.panel图表数据获取参数step按时间指定不同值 4.panel图表全屏相关文字国际化 fix:修改BUG 1.panel图表查询2次 2.panel图表列表底部显示多余的滚动条
This commit is contained in:
@@ -7,10 +7,13 @@
|
||||
.noData{
|
||||
text-align: center
|
||||
}
|
||||
.list-width{
|
||||
width:98%;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<div class="list-width">
|
||||
<div class="chartBox" v-for="(item, index) in dataList" :key="item.id">
|
||||
|
||||
<line-chart-block v-if="item.type === 'line' || item.type === 'bar' || item.type === 4" :key="'inner' + item.id"
|
||||
@@ -69,11 +72,6 @@ export default {
|
||||
},
|
||||
// 获取panel详情数据,获取panel下所有chart列表
|
||||
getData(params) {
|
||||
if (this.dataList.length > 0) {
|
||||
this.$refs.editChart.forEach((item) => {
|
||||
//item.showLoad();//之后要实现
|
||||
});
|
||||
}
|
||||
//param 目前没有用
|
||||
const param = {
|
||||
panelId: params.panelId,
|
||||
@@ -92,6 +90,11 @@ export default {
|
||||
}else {
|
||||
this.dataList = response.data;
|
||||
}
|
||||
if (this.dataList.length > 0) {
|
||||
this.$refs.editChart.forEach((item) => {
|
||||
item.showLoad();//之后要实现
|
||||
});
|
||||
}
|
||||
//alert(JSON.stringify(response)); 查着,返回的内容就没有图表表达式了??
|
||||
this.dataSetFirst(this.dataList);
|
||||
}
|
||||
@@ -136,10 +139,11 @@ export default {
|
||||
startTime = this.filter.start_time;
|
||||
endTime = this.filter.end_time;
|
||||
}
|
||||
let step = bus.getStep(startTime,endTime);
|
||||
this.$nextTick(() => {
|
||||
const axiosArr = chartItem.elements.map((ele) => {
|
||||
const filterItem = ele;
|
||||
return this.$get('/prom/api/v1/query_range?query='+filterItem.expression+"&start="+startTime+"&end="+endTime+'&step=3600s');
|
||||
return this.$get('/prom/api/v1/query_range?query='+filterItem.expression+"&start="+startTime+"&end="+endTime+'&step='+step);
|
||||
});
|
||||
// 一个图表的所有element单独获取数据
|
||||
axios.all(axiosArr).then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user