Skip to content
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

Merged
merged 41 commits into from
Jan 12, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
17fdec5
bring back blockchain.js
jbibla Jan 8, 2018
a915929
setup pageblock
jbibla Jan 8, 2018
657819e
cleaning up netmon page
jbibla Jan 9, 2018
3a580f3
improve NiDataEmpty to allow for props, improve NiListItem to show links
jbibla Jan 9, 2018
115a08e
show EmptyBlock message when no transaction data
jbibla Jan 9, 2018
aaed2b5
page block title
jbibla Jan 9, 2018
2d70348
add node count to connectivity with TODO
jbibla Jan 9, 2018
e202dc5
got monitor / blockchain stats working
jbibla Jan 9, 2018
53636cd
readded the node ip to the node object
faboweb Jan 9, 2018
057049a
removed proposal mutations as they are not used
faboweb Jan 9, 2018
3debcbd
Merge pull request #339 from cosmos/fabo/336-return-the-nodeip
jbibla Jan 9, 2018
132dea6
added user module tests and refactored
faboweb Jan 9, 2018
50d7220
added notification tests
faboweb Jan 9, 2018
b30f245
reverted change in NiSession
faboweb Jan 9, 2018
ff746e7
fixed sign in tests
faboweb Jan 10, 2018
b2d8f1c
fixed node mock being mutable
faboweb Jan 10, 2018
1e13791
added more test coverage
faboweb Jan 10, 2018
bd01cdd
fixed tests
faboweb Jan 10, 2018
c9e2f23
fixed error in bond page
faboweb Jan 10, 2018
6e8ac23
Added 'delegates' module tests
mappum Jan 11, 2018
a7e5218
Remove some unused code in delegation module
mappum Jan 11, 2018
d9c93a9
Added delegation module tests
mappum Jan 11, 2018
884a353
Add 'filters' module tests
mappum Jan 11, 2018
9f569df
Added vuex module index tests
mappum Jan 11, 2018
50ad96a
Merge pull request #347 from cosmos/matt/327-vuex-tests
jbibla Jan 11, 2018
f5bd78d
Merge branch 'develop' into fabo/325-vuex-tests
jbibla Jan 11, 2018
7cea5a5
Merge pull request #343 from cosmos/fabo/325-vuex-tests
jbibla Jan 11, 2018
8e34853
bring back blockchain.js
jbibla Jan 8, 2018
9e63f10
setup pageblock
jbibla Jan 8, 2018
62aedd8
cleaning up netmon page
jbibla Jan 9, 2018
b0c97cc
improve NiDataEmpty to allow for props, improve NiListItem to show links
jbibla Jan 9, 2018
0a1a47a
show EmptyBlock message when no transaction data
jbibla Jan 9, 2018
efd4b5f
page block title
jbibla Jan 9, 2018
2850095
add node count to connectivity with TODO
jbibla Jan 9, 2018
32172d7
got monitor / blockchain stats working
jbibla Jan 9, 2018
04f94e1
changes to main block page
jbibla Jan 9, 2018
3ecef8a
Merge branch 'jordan/29-netmon' of github.com:cosmos/cosmos-ui into j…
jbibla Jan 11, 2018
069af6a
switch from monitor to blocks
jbibla Jan 11, 2018
7333b17
not just for devMode anymore!
jbibla Jan 11, 2018
4c476a4
tendermint rpc sockets aren't working right now
jbibla Jan 12, 2018
4d156fc
fix tests
jbibla Jan 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/renderer/components/monitor/PageBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ page(:title="pageBlockTitle")

part(title='Transactions')
list-item(v-if="block.header.num_txs > 0" v-for="tx in block.data.txs" :key="tx.id" dt="Transaction" :dd="TODO")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use li-transactions?

Copy link
Collaborator

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.

data-empty(v-if="block.header.num_txs === 0" title="Empty Block" subtitle="No transaction data in this block.")
data-empty(v-if="block.header.num_txs === 0" title="Empty Block" subtitle="There were no transactions in this block.")
</template>

<script>
Expand Down
37 changes: 13 additions & 24 deletions app/src/renderer/components/monitor/PageBlockchain.vue
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')
Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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>

Expand All @@ -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
Expand All @@ -76,11 +70,6 @@ export default {
data: () => ({
moment: moment,
num: num
}),
methods: {
setSearch (bool) {
this.$store.commit('setSearchVisible', ['balances', bool])
},
}
})
}
</script>
23 changes: 9 additions & 14 deletions app/src/renderer/vuex/modules/blockchain.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The 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 }
}