add app version

This commit is contained in:
liangping 2022-08-25 12:36:20 +08:00
parent 566fae5916
commit 19d44be755
2 changed files with 15 additions and 1 deletions

View File

@ -56,7 +56,7 @@ export default class ChainFetch {
}
async getNodeInfo() {
return this.get('/node_info')
return this.get('/cosmos/base/tendermint/v1beta1/node_info')
}
async getLatestBlock(config = null) {

View File

@ -38,6 +38,12 @@
<parameters-module-component :data="slashing" />
</b-col>
</b-row>
<b-card title="Application Version">
<object-field-component :tablefield="appVersion" />
</b-card>
<b-card title="Node Information">
<object-field-component :tablefield="nodeVersion" />
</b-card>
</div>
</template>
@ -50,6 +56,7 @@ import {
} from '@/libs/utils'
import ParametersModuleComponent from './components/parameters/ParametersModuleComponent.vue'
import ObjectFieldComponent from './components/ObjectFieldComponent.vue'
export default {
components: {
@ -58,6 +65,7 @@ export default {
BAlert,
BCard,
ParametersModuleComponent,
ObjectFieldComponent,
},
data() {
return {
@ -94,6 +102,8 @@ export default {
title: 'Governance Parameters',
items: [],
},
appVersion: null,
nodeVersion: null,
}
},
created() {
@ -161,6 +171,10 @@ export default {
this.$set(this.gov, 'items', items)
})
}
this.$http.getNodeInfo().then(res => {
this.appVersion = res.application_version
this.nodeVersion = res.default_node_info
})
},
methods: {
normalize(data, title) {