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() { async getNodeInfo() {
return this.get('/node_info') return this.get('/cosmos/base/tendermint/v1beta1/node_info')
} }
async getLatestBlock(config = null) { async getLatestBlock(config = null) {

View File

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