提交 93ebc3d6 编写于 作者: H huanghaiquan

Merge branch 'feature/jira-557-events-search' into 'release/1.4.0'

Feature/jira 557 events search

See merge request jd-blockchain/explorer!2
...@@ -15,171 +15,188 @@ router.get('/:ledgerHash/settings', function(req, res) { ...@@ -15,171 +15,188 @@ router.get('/:ledgerHash/settings', function(req, res) {
Object.assign(ret, resultData,{ Object.assign(ret, resultData,{
"data": { "data": {
"consensusProtocol": 1, "consensusProtocol": "com.jd.blockchain.consensus.bftsmart.BftsmartConsensusProvider",
"consensusSettings": { "consensusSettings": {
"commitBlockSettings": { "nodes": [{
"maxDelayMilliSecondsPerBlock": 500, "address": "LdeNxy22cbRuohUTWWcdsx7dq7fawh7yAVwJR",
"txSizePerBlock": 15 "id": 0,
}, "networkAddress": {
"nodes": [{ "host": "127.0.0.1",
"address": "LdeP1fLeUnmrQHr4ryGmoQ4ubzAvcrgayUK8U", "port": 10080,
"id": 0, "secure": false
"networkAddress": { },
"host": "127.0.0.1", "pubKey": "7VeRJtmGhWZJKmjxHaKVdSUxSrYwumCHvdR4dKdWu8xpmcwZ"
"port": 8910, }, {
"secure": false "address": "LdeNjeSZfY2stPYiSwaW6ScpdvSJvJa9VQmhb",
}, "id": 1,
"pubKey": { "networkAddress": {
"value": "7VeRBxpPoCzAS6AavVoe1HGpJsz68kcZEYzN1fkg3GgASvkb" "host": "127.0.0.1",
} "port": 10082,
}, { "secure": false
"address": "LdeP2xKyNFeYhgzDGn5Vq2dndCUNCeLYLyh1k", },
"id": 1, "pubKey": "7VeRLj8MzLLhXfPsZd2giUJNhKu6oxs5Ucm1o6DJBPLt7TVR"
"networkAddress": { }, {
"host": "127.0.0.1", "address": "LdeNgyuxXGUwEFCuuPL1wb5RJroqhJdTsyCTW",
"port": 8920, "id": 2,
"secure": false "networkAddress": {
}, "host": "127.0.0.1",
"pubKey": { "port": 10084,
"value": "7VeRJ9PiL7sCGKc56uckEwvKZnxqk9VfMedanGoKtM4CQ3yM" "secure": false
} },
}, { "pubKey": "7VeRLuzSAiKBNDhYB7AaYfvfgTjVTUCaXHLdJ2BWZSLn8po4"
"address": "LdeNrvP3Q4NDjjeidcaqKGz3cWotf4qmTZmeK", }, {
"id": 2, "address": "LdeNkSbfPR5BhfoTdnDBzJ9DZ8kMmGxrKj2Ug",
"networkAddress": { "id": 3,
"host": "127.0.0.1", "networkAddress": {
"port": 8930, "host": "127.0.0.1",
"secure": false "port": 10086,
}, "secure": false
"pubKey": { },
"value": "7VeRG8n49ocQYEvievU971e7uJMhRPTkLS3qJr4NJBahysYY" "pubKey": "7VeRHTYKbj1Ua6To2zjozUL8xpwrbiTqgWPJmaCzfVN7ioPr"
} }],
}, { "systemConfigs": [{
"address": "LdeNisAU3fBAtEfTrdH7fXSYidAbAmBZBeP5c", "name": "system.bft",
"id": 3, "value": "true"
"networkAddress": { }, {
"host": "127.0.0.1", "name": "system.communication.defaultkeys",
"port": 8940, "value": "true"
"secure": false }, {
}, "name": "system.communication.inQueueSize",
"pubKey": { "value": "500000"
"value": "7VeRFzWif8yGXa8GRYri7jFLevqryxZTJ6m9NiEUSfUNqKy8" }, {
} "name": "system.communication.outQueueSize",
}], "value": "500000"
"systemConfigs": [{ }, {
"name": "system.bft", "name": "system.communication.useMACs",
"value": "true" "value": "1"
}, { }, {
"name": "system.communication.defaultkeys", "name": "system.communication.useSenderThread",
"value": "true" "value": "true"
}, { }, {
"name": "system.communication.inQueueSize", "name": "system.communication.useSignatures",
"value": "500000" "value": "0"
}, { }, {
"name": "system.communication.outQueueSize", "name": "system.debug",
"value": "500000" "value": "0"
}, { }, {
"name": "system.communication.useMACs", "name": "system.initial.view",
"value": "1" "value": "0,1,2,3"
}, { }, {
"name": "system.communication.useSenderThread", "name": "system.servers.f",
"value": "true" "value": "1"
}, { }, {
"name": "system.communication.useSignatures", "name": "system.servers.num",
"value": "0" "value": "4"
}, { }, {
"name": "system.debug", "name": "system.shutdownhook",
"value": "0" "value": "true"
}, {
"name": "system.servers.num",
"value": "4"
}, {
"name": "system.shutdownhook",
"value": "true"
}, {
"name": "system.totalordermulticast.checkpoint_period",
"value": "1000"
}, {
"name": "system.totalordermulticast.checkpoint_to_disk",
"value": "false"
}, {
"name": "system.totalordermulticast.global_checkpoint_period",
"value": "120000"
}, {
"name": "system.totalordermulticast.highMark",
"value": "10000"
}, {
"name": "system.totalordermulticast.log",
"value": "true"
}, {
"name": "system.totalordermulticast.log_parallel",
"value": "false"
}, {
"name": "system.totalordermulticast.log_to_disk",
"value": "false"
}, {
"name": "system.totalordermulticast.maxbatchsize",
"value": "400"
}, {
"name": "system.totalordermulticast.nonces",
"value": "10"
}, {
"name": "system.totalordermulticast.revival_highMark",
"value": "10"
}, {
"name": "system.totalordermulticast.state_transfer",
"value": "true"
}, {
"name": "system.totalordermulticast.sync_ckp",
"value": "false"
}, {
"name": "system.totalordermulticast.sync_log",
"value": "false"
}, {
"name": "system.totalordermulticast.timeout",
"value": "2000"
}, {
"name": "system.totalordermulticast.timeout_highMark",
"value": "200"
}, {
"name": "system.totalordermulticast.verifyTimestamps",
"value": "false"
}, {
"name": "system.ttp.id",
"value": "7002"
}]
},
"cryptoSetting": {
"autoVerifyHash": true,
"hashAlgorithm": 8216
},
"ledgerStructureVersion": 0,
"participantNodes": [{
"address": "LdeP1fLeUnmrQHr4ryGmoQ4ubzAvcrgayUK8U",
"id": 0,
"name": "jd.com",
"pubKey": "7VeRBxpPoCzAS6AavVoe1HGpJsz68kcZEYzN1fkg3GgASvkb"
}, { }, {
"address": "LdeP2xKyNFeYhgzDGn5Vq2dndCUNCeLYLyh1k", "name": "system.totalordermulticast.checkpoint_period",
"id": 1, "value": "1000"
"name": "at.com",
"pubKey": "7VeRJ9PiL7sCGKc56uckEwvKZnxqk9VfMedanGoKtM4CQ3yM"
}, { }, {
"address": "LdeNrvP3Q4NDjjeidcaqKGz3cWotf4qmTZmeK", "name": "system.totalordermulticast.checkpoint_to_disk",
"id": 2, "value": "false"
"name": "bt.com",
"pubKey": "7VeRG8n49ocQYEvievU971e7uJMhRPTkLS3qJr4NJBahysYY"
}, { }, {
"address": "LdeNisAU3fBAtEfTrdH7fXSYidAbAmBZBeP5c", "name": "system.totalordermulticast.global_checkpoint_period",
"id": 3, "value": "120000"
"name": "xt.com", }, {
"pubKey": "7VeRFzWif8yGXa8GRYri7jFLevqryxZTJ6m9NiEUSfUNqKy8" "name": "system.totalordermulticast.highMark",
"value": "10000"
}, {
"name": "system.totalordermulticast.log",
"value": "true"
}, {
"name": "system.totalordermulticast.log_parallel",
"value": "false"
}, {
"name": "system.totalordermulticast.log_to_disk",
"value": "false"
}, {
"name": "system.totalordermulticast.maxbatchsize",
"value": "2000"
}, {
"name": "system.totalordermulticast.nonces",
"value": "10"
}, {
"name": "system.totalordermulticast.revival_highMark",
"value": "10"
}, {
"name": "system.totalordermulticast.state_transfer",
"value": "true"
}, {
"name": "system.totalordermulticast.sync_ckp",
"value": "false"
}, {
"name": "system.totalordermulticast.sync_log",
"value": "false"
}, {
"name": "system.totalordermulticast.timeout",
"value": "60000"
}, {
"name": "system.totalordermulticast.timeout_highMark",
"value": "200"
}, {
"name": "system.totalordermulticast.verifyTimestamps",
"value": "false"
}, {
"name": "system.ttp.id",
"value": "7002"
}], }],
// "participantsHash": { "viewId": 0
// "value": "j5vDDASBGRAynVmopq2q4obNPZmbJMwGnDWsHnSgz9nuS9" },
// }, "cryptoSetting": {
"participantsHash": "j5vDDASBGRAynVmopq2q4obNPZmbJMwGnDWsHnSgz9nuS9", "autoVerifyHash": false,
"seed": "932dfe23-fe23232f-283f32fa-dd32aa76-8322ca2f-56236cda-7136b322-cb323ffe" "hashAlgorithm": 8216,
"supportedProviders": [{
"algorithms": [{
"code": -32230,
"name": "AES"
}, null, null, null, null, null, null],
"name": "com.jd.blockchain.crypto.service.classic.ClassicCryptoService"
}, {
"algorithms": [null, {
"code": 8195,
"name": "SM3"
}, null],
"name": "com.jd.blockchain.crypto.service.sm.SMCryptoService"
}]
},
"ledgerStructureVersion": 0,
"participantNodes": [{
"address": {
"value": "LdeNkSbfPR5BhfoTdnDBzJ9DZ8kMmGxrKj2Ug"
},
"id": 3,
"name": "3",
"participantNodeState": "CONSENSUS",
"pubKey": "7VeRHTYKbj1Ua6To2zjozUL8xpwrbiTqgWPJmaCzfVN7ioPr"
}, {
"address": {
"value": "LdeNxy22cbRuohUTWWcdsx7dq7fawh7yAVwJR"
},
"id": 0,
"name": "0",
"participantNodeState": "CONSENSUS",
"pubKey": "7VeRJtmGhWZJKmjxHaKVdSUxSrYwumCHvdR4dKdWu8xpmcwZ"
}, {
"address": {
"value": "LdeNgyuxXGUwEFCuuPL1wb5RJroqhJdTsyCTW"
},
"id": 2,
"name": "2",
"participantNodeState": "CONSENSUS",
"pubKey": "7VeRLuzSAiKBNDhYB7AaYfvfgTjVTUCaXHLdJ2BWZSLn8po4"
}, {
"address": {
"value": "LdeNjeSZfY2stPYiSwaW6ScpdvSJvJa9VQmhb"
},
"id": 1,
"name": "1",
"participantNodeState": "CONSENSUS",
"pubKey": "7VeRLj8MzLLhXfPsZd2giUJNhKu6oxs5Ucm1o6DJBPLt7TVR"
}],
"participantsHash": "j5pWhURErZQe3t2dwBq6W29MoYXvzFtHiQpeFLqAVdkNZ6",
"seed": "de9ae189-c938934b-f7483ec3-4b990aea-da183d91-425ba5f1-6baaff15-47a33564"
}, },
"success": true "success": true
}); });
...@@ -1262,12 +1279,26 @@ router.get('/:ledger/accounts/address/:address', function(req, res) { ...@@ -1262,12 +1279,26 @@ router.get('/:ledger/accounts/address/:address', function(req, res) {
Object.assign(ret, resultData,{ Object.assign(ret, resultData,{
"data": { "data": {
"address": { "address":
"value": "5Sm4gWXrNpDWW9Boi4xZCzZMHboRvEDm29Fa"
{ "value": "LdeP2fggAK1icRgsSjPHrtbLawsK947Kr5Wnx" }
,
"headerRootHash": "j5qaaqyBqyb14LKbu3qMrqcv5UFnuYNKGBebE6X5LXKCKs",
"iD": {
"address":
{ "value": "LdeP2fggAK1icRgsSjPHrtbLawsK947Kr5Wnx" }
,
"pubKey": "7VeR8t8kECBTJ9hCPwZonEvQYVD74Ko4wQR5soSVdS122pdV"
}, },
"rootHash": "6GiAH2PBRLnoE724ia83bKVijkKsNuNU5danA4AAi5qMM", "dataset":
"pubKey": "mavweXqvKGUAJzSxE9S15pV7c7qe9bgUn5R1HwpqmXVTUs"
{ "readonly": false, "rootHash": "j5uJfAqLw1ptaZYJyKVZm37zZybboqxMPpS6Mv59rNd4xF", "updated": false, "dataCount": 0 }
,
"dataRootHash": "j5uJfAqLw1ptaZYJyKVZm37zZybboqxMPpS6Mv59rNd4xF",
"pubKey": "7VeR8t8kECBTJ9hCPwZonEvQYVD74Ko4wQR5soSVdS122pdV"
}, },
"success": true
}); });
res.send(ret); res.send(ret);
......
...@@ -2,30 +2,44 @@ ...@@ -2,30 +2,44 @@
<h3>数据详情</h3> <h3>数据详情</h3>
<div class="{styles.info}"> <div class="{styles.info}">
<fj-Row class="{styles.gl}"> <fj-Row class="{styles.gl}">
<fj-Col l=1 s=4 xs=12>数据账户根哈希 <fj-Col l=1 s=4 xs=12>根哈希
</fj-Col> </fj-Col>
<fj-Col l=5 s=8 xs=12> <fj-Col l=5 s=8 xs=12>
<#if {{accountData && accountData.rootHash && accountData.rootHash}}> <#if {{accountData && accountData.headerRootHash && accountData.headerRootHash}}>
{accountData.rootHash} {accountData.headerRootHash}
<#elseif {{accountData && accountData.address && accountData.address.value}}> <#elseif {{accountData && accountData.address && accountData.address.value}}>
<AccountRootHash address={accountData.address.value}/> <AccountRootHash address={accountData.address.value} hash="header"/>
</#elseif> </#elseif>
<#else> <#else>
'' ''
</#else> </#else>
</#if> </#if>
</fj-Col> </fj-Col>
<fj-Col l=1 s=4 xs=12>数据账户地址 <fj-Col l=1 s=4 xs=12>数据根哈希
</fj-Col>
<fj-Col l=5 s=8 xs=12>
<#if {{accountData && accountData.dataRootHash && accountData.dataRootHash}}>
{accountData.dataRootHash}
<#elseif {{accountData && accountData.address && accountData.address.value}}>
<AccountRootHash address={accountData.address.value} hash="data"/>
</#elseif>
<#else>
''
</#else>
</#if>
</fj-Col>
<fj-Col l=1 s=4 xs=12>数据账户地址
</fj-Col> </fj-Col>
<fj-Col l=5 s=8 xs=12>{accountData && accountData.address && accountData.address.value || ''} <fj-Col l=5 s=8 xs=12>{accountData && accountData.address && accountData.address.value || ''}
</fj-Col> </fj-Col>
</fj-Row>
<fj-Row class="{styles.gl}">
<fj-Col l=1 s=4 xs=12>数据账户公钥 <fj-Col l=1 s=4 xs=12>数据账户公钥
</fj-Col> </fj-Col>
<fj-Col l=5 s=8 xs=12>{accountData && accountData.pubKey && accountData.pubKey || ''} <fj-Col l=5 s=8 xs=12>{accountData && accountData.pubKey && accountData.pubKey || ''}
</fj-Col> </fj-Col>
<fj-Col l=1 s=4 xs=12>KV数量 </fj-Row>
<fj-Row class="{styles.gl}">
<fj-Col l=1 s=4 xs=12>KV数量
</fj-Col> </fj-Col>
<fj-Col l=5 s=8 xs=12><KvCount address={accountData.address.value} key={accountData.address.value} /> <fj-Col l=5 s=8 xs=12><KvCount address={accountData.address.value} key={accountData.address.value} />
</fj-Col> </fj-Col>
......
...@@ -16,13 +16,19 @@ export default class AccountRootHash extends Component { ...@@ -16,13 +16,19 @@ export default class AccountRootHash extends Component {
@observable roothash='-'; @observable roothash='-';
componentDidMount() { componentDidMount() {
const { store: { account, common },address } = this.props; const { store: { account, common },address, hash } = this.props;
let ledger =this.props.store.common.getDefaultLedger(); let ledger =this.props.store.common.getDefaultLedger();
let param={ledger:ledger,address:address}; let param={ledger:ledger,address:address};
Promise.all([ Promise.all([
account.getAccountInfo(param), account.getAccountInfo(param),
]).then((success) => { ]).then((success) => {
this.roothash=success[0].rootHash.value||'-'; console.log(success)
if (hash == 'data') {
this.roothash=success[0].dataRootHash||'-';
} else {
this.roothash=success[0].headerRootHash||'-';
}
// this.roothash=success[0].rootHash.value||'-';
}); });
} }
render() { render() {
......
...@@ -87,7 +87,7 @@ export default class Header extends Component { ...@@ -87,7 +87,7 @@ export default class Header extends Component {
// 交易列表 // 交易列表
@computed get tableColumns() { @computed get tableColumns() {
return [{ return [{
title: '参与方序号', title: '参与方ID',
dataIndex: 'id', dataIndex: 'id',
key:'id' key:'id'
}, },
...@@ -98,7 +98,7 @@ export default class Header extends Component { ...@@ -98,7 +98,7 @@ export default class Header extends Component {
}, },
{ {
title: '参与方地址', title: '参与方地址',
dataIndex: 'address', dataIndex: 'address.value',
key:'address' key:'address'
}, },
{ {
......
...@@ -176,20 +176,21 @@ export default class Account extends Component { ...@@ -176,20 +176,21 @@ export default class Account extends Component {
render: (text, record, index) => nj` render: (text, record, index) => nj`
${text}<br/>算法:${tranBase58(text)} ${text}<br/>算法:${tranBase58(text)}
`() `()
}, { },
title: '默克尔树根哈希', // {
dataIndex: 'rootHash', // title: '默克尔树根哈希',
key: 'rootHash', // dataIndex: 'rootHash',
width: '25%', // key: 'rootHash',
render: (text, record, index) => nj` // width: '25%',
<#if ${text}> // render: (text, record, index) => nj`
${text} // <#if ${text}>
<#else> // ${text}
<AccountRootHash address=${record.address}/> // <#else>
</#else> // <AccountRootHash address=${record.address}/>
</#if> // </#else>
`() // </#if>
}, // `()
// },
{ {
title: 'KV', title: 'KV',
dataIndex: 'address.value', dataIndex: 'address.value',
......
...@@ -131,19 +131,21 @@ export default class Contract extends Component { ...@@ -131,19 +131,21 @@ export default class Contract extends Component {
render: (text, record, index) => nj ` render: (text, record, index) => nj `
${text}<br/>算法:${tranBase58(text)} ${text}<br/>算法:${tranBase58(text)}
`() `()
}, { },
title: '合约根哈希', // {
dataIndex: 'rootHash', // title: '合约根哈希',
key:'rootHash', // dataIndex: 'rootHash',
render: (text, record, index) => nj ` // key:'rootHash',
<#if ${text}> // render: (text, record, index) => nj `
${text} // <#if ${text}>
<#else> // ${text}
<ContractsRootHash address=${record.address.value}/> // <#else>
</#else> // <ContractsRootHash address=${record.address.value}/>
</#if> // </#else>
`() // </#if>
},{ // `()
// },
{
title: '操作', title: '操作',
dataIndex: 'address.value', dataIndex: 'address.value',
key:'chainCode', key:'chainCode',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册