fix : cortex 二级页面 config 参数更改

This commit is contained in:
likexuan
2023-01-13 16:35:44 +08:00
parent cb93b22561
commit cb90b6ddd9
3 changed files with 26 additions and 10 deletions

View File

@@ -17,7 +17,8 @@
:loading="tools.loading"
:ringTableData='ringTableData'
:configTableData='configTableData'
:servicesTableData='servicesTableData'>
:servicesTableData='servicesTableData'
@configval='configval'>
</cortexDetailTable>
</template>
</nz-bottom-data-list>
@@ -59,6 +60,7 @@ export default {
data () {
return {
tableId: 'cortexDetail',
configMode: 'defaults',
configTableData: [],
servicesTableData: [],
ringTableData: [],
@@ -68,6 +70,10 @@ export default {
mounted () {
},
methods: {
configval (val) {
this.configMode = val
this.getConfigTableData()
},
async getIngesterTableData () {
const response = await this.$get('agent/' + this.obj.id + '/cortex/ingester/ring')
if (response.code === 200) {
@@ -81,7 +87,7 @@ export default {
}
},
async getConfigTableData () {
const response = await this.$get('agent/' + this.obj.id + '/cortex/config?mode=defaults')
const response = await this.$get('agent/' + this.obj.id + '/cortex/config?mode=' + this.configMode)
if (response.code === 200) {
this.configTableData = response.data.conent.split(/\n/)
this.configTableData.unshift('{')