diff --git a/nezha-fronted/src/components/common/bottomBox/tabs/scrapeEndpoint.vue b/nezha-fronted/src/components/common/bottomBox/tabs/scrapeEndpoint.vue index c3737618a..802c43c2e 100644 --- a/nezha-fronted/src/components/common/bottomBox/tabs/scrapeEndpoint.vue +++ b/nezha-fronted/src/components/common/bottomBox/tabs/scrapeEndpoint.vue @@ -141,7 +141,17 @@ export default { this.$set(this.searchLabel, 'type', this.obj.type) this.$get(this.url, { ...this.searchLabel }).then(response => { this.tools.loading = false - this.tableData = response.data.activeTargets + this.tableData = response.data.activeTargets.map(item => { + const buildIn = ['asset', 'endpoint', 'module', 'cpu', 'datacenter', 'project', 'parent_asset', 'user'] + buildIn.forEach(label => { + item[label] = { + id: item.labels[label + '_id'], + position: {}, + loading: false + } + }) + return item + }) // this.tableData = scrapeEndpoints[0].data.activeTargets this.detailViewRightObj = this.tableData[0] this.inputDateQuery = this.handlerTableData(this.tableData) @@ -173,6 +183,7 @@ export default { lastError = e.lastError || '' tableDateAll = endpoint + labelsType + lastScrape + lastScrapeDuration + health + lastError + tableDateAll const tableData = { endpoint, labelsType, lastScrape, lastScrapeDuration, health, lastError, tableDateAll } + console.log(tableData) tableDates.push(tableData) }) return tableDates diff --git a/nezha-fronted/src/components/common/table/settings/scrapeEndpointTable.vue b/nezha-fronted/src/components/common/table/settings/scrapeEndpointTable.vue index be9847f0a..bff52bd26 100644 --- a/nezha-fronted/src/components/common/table/settings/scrapeEndpointTable.vue +++ b/nezha-fronted/src/components/common/table/settings/scrapeEndpointTable.vue @@ -39,8 +39,8 @@
{{scope.row[item.prop]}}
+ @mouseenter="labelHover(scope.row, item.label, true, $event)" + @mouseleave="labelHover(scope.row, item.label, false)">