feat:新增功能

1.指标预览->预览图表功能
2.指标预览->单图展示的创建看板和选择已有看板
3.指标预览->单图展示和多图展示的切换及对应曲线展示
说明:多图展示的创建看板和选择已有看板未实现,国际化未实现,样式需要进一步调整,图表展示中tip信息显示位置需要调整
fix:修改BUG
1.dashboard无需分页pageSize为-1
2.panel图表line类型曲线设置为平滑
3.panel图表y轴数据格式化
This commit is contained in:
hanyuxia
2020-01-14 21:20:30 +08:00
parent 92a9ef2afd
commit 65646c0fb3
14 changed files with 1913 additions and 80 deletions

View File

@@ -354,6 +354,7 @@
}
},
// 格式化tag为字符串表达式
/*
tagsToString(metric,arr) {
let str = metric;
let sepStr = '';
@@ -385,6 +386,7 @@
}
return str;
},
*/
// 新建图表
addCharts(params) {
this.$post('panel/'+this.panelId+'/charts', params).then(response => {
@@ -429,7 +431,7 @@
const elements = [];
this.elementTarget.forEach((elem,index) => {
if(elem.type==='normal'){
const metricStr = this.tagsToString(elem.metric,elem.selectedTagList);
const metricStr = bus.tagsToString(elem.metric,elem.selectedTagList);
elements.push({
//id:index+1,
//metric: elem.metric,//指标名称
@@ -469,7 +471,7 @@
// 获取metric列表
getSuggestMetric() {
this.$get('metric', {pageNo: 1, pageSize: 9999}).then(response => {
this.$get('metric', {pageNo: 1, pageSize: -1}).then(response => {
if (response.code === 200) {
this.metricList = response.data.list;
}else {