fix : cortex,loki 页面增加 compactor 接口

This commit is contained in:
likexuan
2023-02-03 10:26:25 +08:00
parent 5cf765905c
commit aafeb5bbf7
5 changed files with 73 additions and 2 deletions

View File

@@ -52,6 +52,7 @@ export default {
await this.getReadyTableData()
await this.getIngesterTableData()
await this.getStoreGatewayTableData()
await this.getCompactorTableData()
await this.getConfigTableData()
this.getservicesTableData()
}
@@ -86,6 +87,12 @@ export default {
this.ringTableData.push(response.data.list)
}
},
async getCompactorTableData () {
const response = await this.$get('agent/' + this.obj.id + '/cortex/compactor/ring')
if (response.code === 200) {
this.ringTableData.push(response.data.list)
}
},
async getConfigTableData () {
const response = await this.$get('agent/' + this.obj.id + '/cortex/config?mode=' + this.configMode)
if (response.code === 200) {

View File

@@ -15,6 +15,7 @@
<loki-status-table
v-my-loading="tools.loading"
:loading="tools.loading"
:ringTableData='ringTableData'
:configTableData='configTableData'
:servicesTableData='servicesTableData'
@configval='configval'>
@@ -50,6 +51,7 @@ export default {
async handler (n) {
await this.getReadyTableData()
await this.getConfigTableData()
await this.getCompactorTableData()
this.getservicesTableData()
}
}
@@ -60,6 +62,7 @@ export default {
configMode: 'defaults',
configTableData: [],
servicesTableData: [],
ringTableData: [],
readyTableData: ''
}
},
@@ -76,6 +79,12 @@ export default {
this.configTableData = response.data.content.split(/\n/)
}
},
async getCompactorTableData () {
const response = await this.$get('agent/' + this.obj.id + '/loki/compactor/ring')
if (response.code === 200) {
this.ringTableData = response.data.list
}
},
async getReadyTableData () {
const response = await this.$get('agent/' + this.obj.id + '/loki/ready')
if (response.code === 200) {