提交 152915dc 编写于 作者: W wangzhe18

账本信息,新增共识配置和密码算法配置显示

上级 c05a3c95
此差异已折叠。
此差异已折叠。
......@@ -217,4 +217,18 @@ export function consensusProtocolFormat(flag)
}
return str;
}
//字符串转算法
export function numToalgorithm(flag)
{
var str =flag && (flag+"") || "";
switch (str) {
case "8216":
str="SHA256";
break;
default:
break;
}
return str;
}
\ No newline at end of file
......@@ -4,7 +4,7 @@ import { observer, inject } from 'mobx-react';
import { registerTmpl } from 'nornj-react';
import { autobind } from 'core-decorators';
import { Drawer} from 'antd';
import { copyToClipboard,consensusProtocolFormat } from '../.././../utils/util';
import { copyToClipboard,tranBase58,numToalgorithm } from '../.././../utils/util';
import Notification from '../.././../utils/notification';
import Message from 'flarej/lib/components/antd/message';
import 'flarej/lib/components/antd/menu';
......@@ -83,9 +83,29 @@ export default class Header extends Component {
title: '参与方公钥',
dataIndex: 'pubKey.value',
key:'pubKey'
},
{
title: '公钥算法',
dataIndex: 'pubKey.value',
key:'algorithm',
render: (text, record, index) => nj `
${tranBase58(text)}
`()
}];
}
// 交易列表
@computed get tableColumnsOfconfig() {
return [{
title: 'Key',
dataIndex: 'name',
key:'name'
},
{
title: '',
dataIndex: 'value',
key:'value'
}];
}
// 关闭
@autobind
onClose(){
......@@ -101,12 +121,12 @@ export default class Header extends Component {
const { store: { common } } = this.props;
return template( {
components: {
'ant-Drawer': Drawer,
'ant-Drawer': Drawer,
}},this.props, this, {
styles,
common,
headerPic: require('../../images/pic-header.png'),
consensusProtocolFormat
numToalgorithm
});
}
}
......@@ -52,7 +52,7 @@
<fj-Col l=2>共识方式
</fj-Col>
<fj-Col l=4>
{consensusProtocolFormat(common.ledgerinfo.consensusProtocol)}
{common.ledgerinfo.consensusProtocol}
</fj-Col>
<fj-Col l=2>最大成块时间
</fj-Col>
......@@ -72,6 +72,29 @@
</fj-Col>
</fj-Row>
<h2 class="htitle">
共识配置
</h2>
<ant-Table
class="table"
columns={toJS(tableColumnsOfconfig)}
dataSource={toJS(common.ledgerinfo.consensusSettings.systemConfigs)}
bordered />
<h2 class="htitle">
密码算法配置
</h2>
<fj-Row class="gl">
<fj-Col l=2>是否校验Hash
</fj-Col>
<fj-Col l=4>
{common.ledgerinfo.cryptoSetting.autoVerifyHash && '是' || '否'}
</fj-Col>
<fj-Col l=2>Hash算法
</fj-Col>
<fj-Col l=4>
{numToalgorithm(common.ledgerinfo.cryptoSetting.hashAlgorithm)}
</fj-Col>
</fj-Row>
<h2 class="htitle">
参与方
</h2>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册