diff --git a/nezha-fronted/src/components/charts/chart-detail.vue b/nezha-fronted/src/components/charts/chart-detail.vue
index c2f2cad69..9bf205af6 100644
--- a/nezha-fronted/src/components/charts/chart-detail.vue
+++ b/nezha-fronted/src/components/charts/chart-detail.vue
@@ -42,6 +42,19 @@
{{value == 1 ? $t('asset.createAssetTab.inStock') : $t('asset.createAssetTab.outStock')}}
{{value + ' ' + $t('overall.active')}}
+
+
+
+
+ {{tagItem.value}}
+
+
+
+
+
{{value ? value + 'ms' : ''}}
@@ -197,13 +210,15 @@
import timePicker from '../common/timePicker';
import chartPreview from './chartPreview';
import echarts from 'echarts';
+ import nzAlertTag from '../page/alert/nzAlertTag';
export default {
name: 'chartDetail',
components: {
'loading': loading,
'time-picker': timePicker,
- 'chart-preview': chartPreview
+ 'chart-preview': chartPreview,
+ 'nz-alert-tag': nzAlertTag
},
props: {
// 看板id
@@ -262,7 +277,8 @@
pingStatus: this.$t('asset.tableTitle.assetPing'),
pingLastReply: this.$t('asset.tableTitle.lastReply'),
endpoint: this.$t("asset.tableTitle.modules"),
- alert: this.$t("asset.tableTitle.alerts")
+ alert: this.$t("asset.tableTitle.alerts"),
+ tags: this.$t("overall.tag")
},
projectKey: {
id: "ID",
@@ -386,7 +402,6 @@
// 设置数据, filter区分
setData(chartItem, detail, panelId, filter, area, errorMsg) {
- //this.resize(chartItem);
if(errorMsg && errorMsg !== ''){
this.isError = true;
this.errorContent = errorMsg;
@@ -412,20 +427,11 @@
this.endLoading();
},
initChart(series) {
- let vm = this;
let option = {
- title:{
- show: false,
- },
- tooltip: {
- show: false
- },
- grid: {
- left: 40
- },
- legend: {
- show: false
- },
+ title: {show: false},
+ tooltip: {show: false},
+ grid: {left: 40},
+ legend: {show: false},
xAxis: {
show: false,
type: 'time'
@@ -433,9 +439,7 @@
yAxis: {
type: 'value',
minInterval: 1,
- splitLine: {
- show: false
- },
+ splitLine: {show: false},
axisLabel: {
formatter: function (value, index) {
if (value == 1) {
@@ -445,12 +449,8 @@
}
}
},
- axisTick: {
- show: false
- },
- axisLine: {
- show: false
- }
+ axisTick: {show: false},
+ axisLine: {show: false}
},
useUTC: false,//使用本地时间
series: series
diff --git a/nezha-fronted/src/components/charts/chart.scss b/nezha-fronted/src/components/charts/chart.scss
index 2449f9355..190740bc6 100644
--- a/nezha-fronted/src/components/charts/chart.scss
+++ b/nezha-fronted/src/components/charts/chart.scss
@@ -289,7 +289,7 @@
border-bottom: 1px solid rgb(235, 238, 245);
display: flex;
position: relative;
- .item-tip {
+ .item-tip> {
.item-tip-hide {
display: none;
position: absolute;
@@ -324,9 +324,17 @@
transform: translate(-50%, 10px);
}
}
- .item-tip:hover .item-tip-show {
+ .item-tip:hover>.item-tip-show {
display: block;
}
+ .tag-value:hover .item-tip-show {
+ display: block;
+ }
+ .tag-value {
+ text-overflow: ellipsis;
+ overflow: hidden;
+ white-space: nowrap;
+ }
.content-item-key {
color: #666;
width: 35%;
@@ -335,6 +343,10 @@
overflow: hidden;
white-space: nowrap;
}
+ .content-item-key .no-overflow, .content-item-value .no-overflow {
+ text-overflow: unset;
+ white-space: normal;
+ }
.content-item-value {
.item-value-sub {
padding: 0 3px 0 13px;