Skip to content

Commit

Permalink
Merge pull request #7511 from GuoLiBin6/fix/glb-to-3.11/compute
Browse files Browse the repository at this point in the history
fix: 宿主机列表资源使用率监控查询参数错误
  • Loading branch information
GuoLiBin6 authored Jan 15, 2025
2 parents bdd9796 + e295457 commit 8278120
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions containers/Compute/views/host/components/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 8278120

Please sign in to comment.