-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implemented blocks page #337
Changes from 1 commit
17fdec5
a915929
657819e
3a580f3
115a08e
aaed2b5
2d70348
e202dc5
53636cd
057049a
3debcbd
132dea6
50d7220
b30f245
ff746e7
b2d8f1c
1e13791
bd01cdd
c9e2f23
6e8ac23
a7e5218
d9c93a9
884a353
9f569df
50ad96a
f5bd78d
7cea5a5
8e34853
9e63f10
62aedd8
b0c97cc
0a1a47a
efd4b5f
2850095
32172d7
04f94e1
3ecef8a
069af6a
7333b17
4c476a4
4d156fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,18 @@ | ||
<template lang="pug"> | ||
page(title='Blockchain') | ||
page(title='Monitor') | ||
div(slot="menu"): tool-bar | ||
a(@click='setSearch(true)') | ||
i.material-icons search | ||
.label Search | ||
|
||
template(v-if="blockchain") | ||
part(title='Metadata') | ||
list-item(dt='Network Name' :dd='status.node_info.network') | ||
list-item(dt='App Version' :dd='version') | ||
list-item(dt='Tendermint Version' :dd='status.node_info.version') | ||
part(title='Versions') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'd like to remove this section and turn this page into a block explorer |
||
list-item(dt='Network Name' :dd='lastHeader.chain_id') | ||
list-item(dt='ABCI Version' :dd='abciVersion') | ||
list-item(dt='Tendermint Version' :dd='tendermintVersion') | ||
|
||
part(title='Block') | ||
part(title='Latest Block') | ||
list-item(dt='Block Height' :dd='num.prettyInt(status.latest_block_height)' | ||
:to="{ name: 'block', params: { block: status.latest_block_height} }") | ||
list-item(dt='Latest Block Time' :dd='latestBlockTime') | ||
list-item(dt='Latest Block Hash' :dd='status.latest_block_hash') | ||
|
||
part(title='Nodes') | ||
list-item(dt='Active Nodes' :dd='validators.length') | ||
|
||
data-error(v-else) | ||
</template> | ||
|
||
|
@@ -42,14 +35,15 @@ export default { | |
ToolBar | ||
}, | ||
computed: { | ||
...mapGetters(['blockchain', 'config', 'validators']), | ||
...mapGetters(['blockchain', 'validators', 'lastHeader']), | ||
status () { | ||
console.log(this.config) | ||
console.log(this.validators) | ||
return this.blockchain.status | ||
}, | ||
version () { | ||
return this.blockchain.abciInfo.response.data.substring(10, this.blockchain.abciInfo.response.length) | ||
abciVersion () { | ||
return this.blockchain.abciInfo.response.data.substring(6, this.blockchain.abciInfo.response.length) | ||
}, | ||
tendermintVersion () { | ||
return this.status.node_info.version.substring(0, 6) | ||
}, | ||
currentRate () { | ||
let txs = 0 | ||
|
@@ -76,11 +70,6 @@ export default { | |
data: () => ({ | ||
moment: moment, | ||
num: num | ||
}), | ||
methods: { | ||
setSearch (bool) { | ||
this.$store.commit('setSearchVisible', ['balances', bool]) | ||
}, | ||
} | ||
}) | ||
} | ||
</script> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,27 +19,22 @@ export default ({ commit }) => { | |
}, | ||
getStatus (state) { | ||
let url = state.urlPrefix + state.blockchainName + state.urlSuffix | ||
console.log(url + '/status') | ||
axios(url + '/status').then((err, res) => { | ||
if (err) { | ||
return console.error('err', err) | ||
} | ||
console.log('status', JSON.stringify(res.body.result, null, 2)) | ||
state.status = res.body.result | ||
axios(url + '/status').then((res) => { | ||
state.status = res.data.result | ||
}) | ||
}, | ||
getAbciInfo (state) { | ||
let url = state.urlPrefix + state.blockchainName + state.urlSuffix | ||
console.log(url + '/abci_info') | ||
axios(url + '/abci_info').then((err, res) => { | ||
if (err) { | ||
return console.error('err', err) | ||
} | ||
console.log('abci_info', JSON.stringify(res.body.result, null, 2)) | ||
state.abciInfo = res.body.result.response | ||
axios(url + '/abci_info').then((res) => { | ||
state.abciInfo = res.data.result | ||
}) | ||
} | ||
} | ||
|
||
setTimeout(() => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't know how to tell if i can use sockets despite @mappum sharing this link... https://github.com/tendermint/tendermint/blob/master/types/events.go#L12-L32 |
||
mutations.getStatus(state) | ||
mutations.getAbciInfo(state) | ||
}, 3000) | ||
|
||
return { state, mutations } | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use
li-transactions
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should probably show more information at some point, but so should the information in the transactions list.