From e295457d80a57dcbd0c0a20707ad331f49309212 Mon Sep 17 00:00:00 2001 From: GuoLiBin6 Date: Wed, 15 Jan 2025 16:58:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=BF=E4=B8=BB=E6=9C=BA=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=B5=84=E6=BA=90=E4=BD=BF=E7=94=A8=E7=8E=87=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E6=9F=A5=E8=AF=A2=E5=8F=82=E6=95=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- containers/Compute/views/host/components/List.vue | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/containers/Compute/views/host/components/List.vue b/containers/Compute/views/host/components/List.vue index b2e52c0ba..4208361f0 100644 --- a/containers/Compute/views/host/components/List.vue +++ b/containers/Compute/views/host/components/List.vue @@ -596,17 +596,20 @@ export default { ] const tags = [] list.map((item, index) => { - const l = { key: 'host_ip', operator: '=', value: '10.127.100.2' } - if (index) { - l.condition = 'OR' + if (item.access_ip) { + const l = { key: 'host_ip', operator: '=', value: item.access_ip } + if (index) { + l.condition = 'OR' + } + tags.push(l) } - tags.push(l) }) const data = { metric_query: [ { model: { measurement: val.fromItem, + database: 'telegraf', select: [select], group_by: [{ type: 'tag', params: ['host_ip'] }], tags, @@ -616,7 +619,7 @@ export default { scope: this.$store.getters.scope, from: '1h', interval: '5m', - unit: true, + soffset: 0, } data.signature = getSignature(data) return data