diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue
index 693268767..df3c9ce68 100644
--- a/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue
+++ b/nezha-fronted/src/components/common/bottomBox/tabs/endpointQueryTab.vue
@@ -49,7 +49,43 @@
-
+
+
+
+
+
+
+
+ - metric : {{scope.row.metricTip.metric?scope.row.metricTip.metric:'--'}}
+ - type : {{scope.row.metricTip.type?scope.row.metricTip.type:'unknown'}}
+ - help : {{scope.row.metricTip.help?scope.row.metricTip.help:'--'}}
+ - unit : {{scope.row.metricTip.unit?scope.row.metricTip.unit:'--'}}
+
+
+
+
+
+ <!– {{hideSameLabels?scope.row.simpleElement: scope.row.element}}–>
+
+
+
+
+
+
+ <!– {{hideSameLabels?scope.row.simpleElement: scope.row.element}}–>
-
+ -->
{
- this.loading = false;
- if(response.status==="success"){
- let results = response.data.result;
- this.queryData=JSON.parse(JSON.stringify(results));
- for(let result of results) {
- let metricName = result.metric.__name__;
- let temp = metricName;
- let simpleTemp = metricName;//显示简略信息:隐藏same labels后的结果
- let metricColor = "";
- let bracketsColor = "#eb7b18";//#eb7b18
- let labelColor = "#65bbd1";//#66d9ef
- let valueColor = "#61c261";//#74e680
- let colorTemp = `${metricName}`;
- let colorSimpleTemp = `${metricName}`;
- let metricTip = {};
- let queryInfos = (this.elementMetricDatas.filter((item)=> {
- return item.metric === temp;
- }));
- if(queryInfos && queryInfos.length > 0) {
- metricTip = queryInfos[0];
- } else {
- metricTip.metric=temp;
- }
- delete result.metric.__name__;
- temp += "{";
- simpleTemp += "{";
- colorTemp += `{`;
- colorSimpleTemp += `{`;
- let keys = Object.keys(result.metric);
- for (let index in keys){
- let key = keys[index];
- temp += key + "='" + result.metric[key] + "',";
- colorTemp += `${key}='${result.metric[key]}',`;
- if(!this.sameLabels.some((i)=> {return i == key})) {
- simpleTemp += key + "='" + result.metric[key] + "',";
- colorSimpleTemp += `${key}='${result.metric[key]}',`;
+ setTimeout(() => {
+ this.loading = false;
+ if(response.status==="success"){
+ let results = response.data.result;
+ this.queryData=JSON.parse(JSON.stringify(results));
+ for(let result of results) {
+ let metricName = result.metric.__name__;
+ let temp = metricName;
+ let simpleTemp = metricName;//显示简略信息:隐藏same labels后的结果
+ let metricColor = "";
+ let bracketsColor = "#eb7b18";//#eb7b18
+ let labelColor = "#65bbd1";//#66d9ef
+ let valueColor = "#61c261";//#74e680
+ let colorTemp = `${metricName}`;
+ let colorSimpleTemp = `${metricName}`;
+ let metricTip = {};
+ let queryInfos = (this.elementMetricDatas.filter((item)=> {
+ return item.metric === temp;
+ }));
+ if(queryInfos && queryInfos.length > 0) {
+ metricTip = queryInfos[0];
+ } else {
+ metricTip.metric=temp;
+ }
+ delete result.metric.__name__;
+ temp += "{";
+ simpleTemp += "{";
+ colorTemp += `{`;
+ colorSimpleTemp += `{`;
+ let keys = Object.keys(result.metric);
+ for (let index in keys){
+ let key = keys[index];
+ temp += key + "='" + result.metric[key] + "',";
+ colorTemp += `${key}='${result.metric[key]}',`;
+ if(!this.sameLabels.some((i)=> {return i == key})) {
+ simpleTemp += key + "='" + result.metric[key] + "',";
+ colorSimpleTemp += `${key}='${result.metric[key]}',`;
+ }
+ }
+ if(temp.indexOf(',') != -1){
+ temp = temp.substr(0,temp.length-1);
+ }
+ if(simpleTemp.indexOf(',') != -1){
+ simpleTemp = simpleTemp.substr(0,simpleTemp.length-1);
+ }
+ if(colorTemp.indexOf(',') != -1){
+ colorTemp = colorTemp.substr(0,colorTemp.length-1);
+ }
+ if(colorSimpleTemp.indexOf(',') != -1){
+ colorSimpleTemp = colorSimpleTemp.substr(0,colorSimpleTemp.length-1);
}
- }
- if(temp.indexOf(',') != -1){
- temp = temp.substr(0,temp.length-1);
- }
- if(simpleTemp.indexOf(',') != -1){
- simpleTemp = simpleTemp.substr(0,simpleTemp.length-1);
- }
- if(colorTemp.indexOf(',') != -1){
- colorTemp = colorTemp.substr(0,colorTemp.length-1);
- }
- if(colorSimpleTemp.indexOf(',') != -1){
- colorSimpleTemp = colorSimpleTemp.substr(0,colorSimpleTemp.length-1);
- }
- temp += "}";
- simpleTemp += "}";
- colorTemp += `}`;
- colorSimpleTemp += `}`;
- if(!/.+\{.+\}/.test(simpleTemp)) {
- simpleTemp = simpleTemp.substr(0,simpleTemp.length-2);
- }
+ temp += "}";
+ simpleTemp += "}";
+ colorTemp += `}`;
+ colorSimpleTemp += `}`;
+ if(!/.+\{.+\}/.test(simpleTemp)) {
+ simpleTemp = simpleTemp.substr(0,simpleTemp.length-2);
+ }
- if(!/.+\{<\/span>.+?\}/.test(colorSimpleTemp)){
- let metricReg=new RegExp(""+metricName+"<\/span>")
- colorSimpleTemp=metricReg.exec(colorSimpleTemp)[0];
- }
+ if(!/.+\{<\/span>.+?\}/.test(colorSimpleTemp)){
+ let metricReg=new RegExp(""+metricName+"<\/span>")
+ colorSimpleTemp=metricReg.exec(colorSimpleTemp)[0];
+ }
- let edpQueryData={element:temp,simpleElement:simpleTemp,colorElement:colorTemp,colorSimpleElement:colorSimpleTemp, value:result.value[1],type:(result.metric.type?result.metric.type:'2'),metricTip:metricTip};
- this.tableData.push(edpQueryData);
+ let edpQueryData={element:temp,simpleElement:simpleTemp,colorElement:colorTemp,colorSimpleElement:colorSimpleTemp, value:result.value[1],type:(result.metric.type?result.metric.type:'2'),metricTip:metricTip};
+ this.tableData.push(edpQueryData);
+ }
+ this.tableDataCopy = JSON.stringify(this.tableData);
}
- this.tableDataCopy = JSON.stringify(this.tableData);
- }
+ }, 300);
});
},
clearSelectedMetrics() {
diff --git a/nezha-fronted/src/components/page/project/project.vue b/nezha-fronted/src/components/page/project/project.vue
index f00ac236e..0d417bd51 100644
--- a/nezha-fronted/src/components/page/project/project.vue
+++ b/nezha-fronted/src/components/page/project/project.vue
@@ -1097,7 +1097,7 @@
.table-header-inner{
position: absolute;
z-index: 1;
- top: 40px;
+ top: 38px;
left: 11px;
cursor: pointer;
}