Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
JDChain
Explorer
提交
4be8180c
E
Explorer
项目概览
JDChain
/
Explorer
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
Explorer
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
4be8180c
编写于
9月 28, 2021
作者:
I
imuge
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
show account permission
上级
ecbc5194
变更
15
展开全部
隐藏空白更改
内联
并排
Showing
15 changed file
with
228 addition
and
96 deletion
+228
-96
data-explorer/dist/web/20190101/account.chunk.js
data-explorer/dist/web/20190101/account.chunk.js
+2
-2
data-explorer/dist/web/20190101/app.js
data-explorer/dist/web/20190101/app.js
+1
-1
data-explorer/dist/web/20190101/block.chunk.js
data-explorer/dist/web/20190101/block.chunk.js
+1
-1
data-explorer/dist/web/20190101/contract.chunk.js
data-explorer/dist/web/20190101/contract.chunk.js
+2
-2
data-explorer/dist/web/20190101/event.chunk.js
data-explorer/dist/web/20190101/event.chunk.js
+1
-1
data-explorer/dist/web/20190101/search.chunk.js
data-explorer/dist/web/20190101/search.chunk.js
+1
-1
data-explorer/server/routes/ledgers.js
data-explorer/server/routes/ledgers.js
+77
-10
data-explorer/src/stores/pages/accountStore.js
data-explorer/src/stores/pages/accountStore.js
+6
-6
data-explorer/src/web/components/accountInfo/accountInfo.t.html
...xplorer/src/web/components/accountInfo/accountInfo.t.html
+12
-29
data-explorer/src/web/components/eventInfo/eventInfo.js
data-explorer/src/web/components/eventInfo/eventInfo.js
+12
-3
data-explorer/src/web/components/transactionInfo/transactionInfo.js
...rer/src/web/components/transactionInfo/transactionInfo.js
+26
-0
data-explorer/src/web/pages/account/account.js
data-explorer/src/web/pages/account/account.js
+43
-22
data-explorer/src/web/pages/contract/contract.js
data-explorer/src/web/pages/contract/contract.js
+3
-9
data-explorer/src/web/pages/contract/contract.t.html
data-explorer/src/web/pages/contract/contract.t.html
+15
-3
data-explorer/src/web/pages/event/event.js
data-explorer/src/web/pages/event/event.js
+26
-6
未找到文件。
data-explorer/dist/web/20190101/account.chunk.js
浏览文件 @
4be8180c
此差异已折叠。
点击以展开。
data-explorer/dist/web/20190101/app.js
浏览文件 @
4be8180c
此差异已折叠。
点击以展开。
data-explorer/dist/web/20190101/block.chunk.js
浏览文件 @
4be8180c
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
data-explorer/dist/web/20190101/contract.chunk.js
浏览文件 @
4be8180c
此差异已折叠。
点击以展开。
data-explorer/dist/web/20190101/event.chunk.js
浏览文件 @
4be8180c
此差异已折叠。
点击以展开。
data-explorer/dist/web/20190101/search.chunk.js
浏览文件 @
4be8180c
此差异已折叠。
点击以展开。
data-explorer/server/routes/ledgers.js
浏览文件 @
4be8180c
...
...
@@ -1255,6 +1255,27 @@ router.get('/:ledger/txs/hash/:tx_hash', function (req, res) {
"
transactionContent
"
:
{
"
ledgerHash
"
:
"
j5xJwCmBvsKByY9dpkpV4VNDnS5BeFBQKWXQozjsrpgfJF
"
,
"
operations
"
:
[
{
"
@type
"
:
"
com.jd.blockchain.ledger.AccountPermissionSetOperation
"
,
"
accountType
"
:
"
DATA
"
,
"
address
"
:
"
LdeP2ji8PR1DPsLt5NoFeiBnhpckrLHgCJge6
"
,
"
mode
"
:
770
,
"
role
"
:
"
ROLE
"
},
{
"
@type
"
:
"
com.jd.blockchain.ledger.AccountPermissionSetOperation
"
,
"
accountType
"
:
"
DATA
"
,
"
address
"
:
"
LdeP2ji8PR1DPsLt5NoFeiBnhpckrLHgCJge6
"
,
"
mode
"
:
-
1
,
"
role
"
:
"
ROLE
"
},
{
"
@type
"
:
"
com.jd.blockchain.ledger.AccountPermissionSetOperation
"
,
"
accountType
"
:
"
DATA
"
,
"
address
"
:
"
LdeP2ji8PR1DPsLt5NoFeiBnhpckrLHgCJge6
"
,
"
mode
"
:
770
,
"
role
"
:
""
},
{
"
@type
"
:
"
com.jd.blockchain.ledger.RootCAUpdateOperation
"
,
"
certificatesAdd
"
:
[
...
...
@@ -1461,18 +1482,27 @@ router.get('/:ledger/accounts/address/:address', function (req, res) {
Object
.
assign
(
ret
,
resultData
,
{
"
data
"
:
{
"
address
"
:
"
LdeP2fggAK1icRgsSjPHrtbLawsK947Kr5Wnx
"
,
"
headerRootHash
"
:
"
j5qaaqyBqyb14LKbu3qMrqcv5UFnuYNKGBebE6X5LXKCKs
"
,
"
address
"
:
"
LdeNugLcgRpenj8wtVJuPJPZGpHc5vdjmE5sK
"
,
"
permission
"
:
{
"
role
"
:
""
,
"
owners
"
:
[
"
LdeNyibeafrAQXgHjBxgQxoLbna6hL4BcXZiw
"
],
"
modeBits
"
:
"
-rwxrwxrwx
"
},
"
headerRootHash
"
:
"
j5qwL5hMCJyBmJMyaMsFpEi63nxUe8NgTuqHtpzMPboCEk
"
,
"
iD
"
:
{
"
address
"
:
"
Lde
P2fggAK1icRgsSjPHrtbLawsK947Kr5Wnx
"
,
"
pubKey
"
:
"
7VeR
8t8kECBTJ9hCPwZonEvQYVD74Ko4wQR5soSVdS122pdV
"
"
address
"
:
"
Lde
NugLcgRpenj8wtVJuPJPZGpHc5vdjmE5sK
"
,
"
pubKey
"
:
"
7VeR
NG7stmQ7uJkhuetSu4SsH9heG6EfLKwZiq9sQKPmNGca
"
},
"
dataset
"
:
{
"
readonly
"
:
false
,
"
rootHash
"
:
"
j5uJfAqLw1ptaZYJyKVZm37zZybboqxMPpS6Mv59rNd4xF
"
,
"
updated
"
:
false
,
"
dataCount
"
:
0
}
,
"
dataRootHash
"
:
"
j5uJfAqLw1ptaZYJyKVZm37zZybboqxMPpS6Mv59rNd4xF
"
,
"
pubKey
"
:
"
7VeR8t8kECBTJ9hCPwZonEvQYVD74Ko4wQR5soSVdS122pdV
"
"
dataset
"
:
{
"
readonly
"
:
true
,
"
rootHash
"
:
"
j5vyv6SmvSXQNKyjsEVCQJsyqXxKGZMBU62fKvtdJm2W4y
"
,
"
updated
"
:
false
,
"
dataCount
"
:
1
},
"
dataRootHash
"
:
"
j5vyv6SmvSXQNKyjsEVCQJsyqXxKGZMBU62fKvtdJm2W4y
"
,
"
pubKey
"
:
"
7VeRNG7stmQ7uJkhuetSu4SsH9heG6EfLKwZiq9sQKPmNGca
"
},
"
success
"
:
true
});
...
...
@@ -1864,6 +1894,43 @@ router.get('/:ledger/events/accounts/search', function (req, res) {
res
.
send
(
ret
);
});
// 事件账户查询
// GET /ledgers/{ledger}/events/accounts/search?keyword={keyword}
router
.
get
(
'
/:ledger/events/user/accounts/:address
'
,
function
(
req
,
res
)
{
res
.
type
(
'
json
'
);
let
params
=
req
.
body
,
ret
=
{};
Object
.
assign
(
ret
,
resultData
,
{
"
data
"
:
{
"
address
"
:
"
LdeNugLcgRpenj8wtVJuPJPZGpHc5vdjmE5sK
"
,
"
permission
"
:
{
"
role
"
:
""
,
"
owners
"
:
[
"
LdeNyibeafrAQXgHjBxgQxoLbna6hL4BcXZiw
"
],
"
modeBits
"
:
"
-rwxrwxrwx
"
},
"
headerRootHash
"
:
"
j5qwL5hMCJyBmJMyaMsFpEi63nxUe8NgTuqHtpzMPboCEk
"
,
"
iD
"
:
{
"
address
"
:
"
LdeNugLcgRpenj8wtVJuPJPZGpHc5vdjmE5sK
"
,
"
pubKey
"
:
"
7VeRNG7stmQ7uJkhuetSu4SsH9heG6EfLKwZiq9sQKPmNGca
"
},
"
dataset
"
:
{
"
readonly
"
:
true
,
"
rootHash
"
:
"
j5uJfAqLw1ptaZYJyKVZm37zZybboqxMPpS6Mv59rNd4xF
"
,
"
updated
"
:
false
,
"
dataCount
"
:
0
},
"
dataRootHash
"
:
"
j5uJfAqLw1ptaZYJyKVZm37zZybboqxMPpS6Mv59rNd4xF
"
,
"
pubKey
"
:
"
7VeRNG7stmQ7uJkhuetSu4SsH9heG6EfLKwZiq9sQKPmNGca
"
},
"
success
"
:
true
});
res
.
send
(
ret
);
});
// 指定事件账户下事件列表总数
router
.
get
(
'
/:ledger/events/user/accounts/:address/names/count
'
,
function
(
req
,
res
)
{
res
.
type
(
'
json
'
);
...
...
data-explorer/src/stores/pages/accountStore.js
浏览文件 @
4be8180c
...
...
@@ -18,16 +18,16 @@ const AccountStore = types
self
.
accountcurrent
=
v
;
},
// 数据账户列表
getAccount
(
ledger
,
param
)
{
getAccount
s
(
ledger
,
param
)
{
self
.
ledger
=
ledger
;
return
fetchData
(
`
${
__HOST
}
/ledgers/
${
ledger
}
/accounts`
,
self
.
setAccount
,
param
,
{
self
.
setAccount
s
,
param
,
{
method
:
'
get
'
,
headers
:
{
// accept: 'application/json',
cookie
:
document
.
cookie
,
}
}
}
).
catch
(
error
=>
{
...
...
@@ -37,7 +37,7 @@ const AccountStore = types
getAccountVague
(
ledger
,
param
)
{
self
.
ledger
=
ledger
;
return
fetchData
(
`
${
__HOST
}
/ledgers/
${
ledger
}
/accounts/search`
,
self
.
setAccount
,
self
.
setAccount
s
,
param
,
{
method
:
'
get
'
,
headers
:
{
...
...
@@ -49,7 +49,7 @@ const AccountStore = types
});
},
setAccount
(
result
)
{
setAccount
s
(
result
)
{
if
(
result
&&
result
.
success
)
{
self
.
tableData
=
result
.
data
||
[];
}
...
...
data-explorer/src/web/components/accountInfo/accountInfo.t.html
浏览文件 @
4be8180c
...
...
@@ -2,43 +2,26 @@
<h3>
数据详情
</h3>
<div
class=
"{styles.info}"
>
<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
l=
5
s=
8
xs=
12
>
<
#if
{{
accountData
&&
accountData.headerRootHash
&&
accountData.headerRootHash
}}
>
{accountData.headerRootHash}
<
#elseif
{{
accountData
&&
accountData.address
}}
>
<AccountRootHash
address=
{accountData.address}
hash=
"header"
/>
</
#
elseif>
<
#else
>
''
</
#
else>
</
#
if>
<fj-Col
l=
5
s=
8
xs=
12
>
{accountData
&&
accountData.address
&&
accountData.address || ''}
</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
}}
>
<AccountRootHash
address=
{accountData.address}
hash=
"data"
/>
</
#
elseif>
<
#else
>
''
</
#
else>
</
#
if>
<fj-Col
l=
5
s=
8
xs=
12
>
{accountData
&&
accountData.pubKey
&&
accountData.pubKey || ''}
</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
>
{accountData
&&
accountData.
address
&&
accountData.addres
s || ''}
<fj-Col
l=
5
s=
8
xs=
12
>
{accountData
&&
accountData.
permission
&&
accountData.permission.owner
s || ''}
</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
>
{accountData
&&
accountData.pubKey
&&
accountData.pubKey || ''}
<fj-Col
l=
5
s=
8
xs=
12
>
{accountData
&&
accountData.permission
&&
accountData.permission.role || 'DEFAULT'}
</fj-Col>
<fj-Col
l=
1
s=
4
xs=
12
>
权限值
</fj-Col>
<fj-Col
l=
5
s=
8
xs=
12
>
{accountData
&&
accountData.permission
&&
accountData.permission.modeBits || ''}
</fj-Col>
</fj-Row>
<fj-Row
class=
"{styles.gl}"
>
<fj-Col
l=
1
s=
4
xs=
12
>
KV数量
</fj-Col>
<fj-Col
l=
5
s=
8
xs=
12
><KvCount
address=
{accountData.address}
key=
{accountData.address}
/>
...
...
data-explorer/src/web/components/eventInfo/eventInfo.js
浏览文件 @
4be8180c
...
...
@@ -291,19 +291,28 @@ export default class EventInfo extends Component {
render
()
{
const
{
data
,
store
:
{
event
}
}
=
this
.
props
;
let
latest
=
event
.
dataLatest
&&
{
...
event
.
dataLatest
}
||
{}
console
.
log
(
latest
)
return
(
<
div
>
<
h3
>
账户详情
<
/h3
>
<
div
className
=
{
styles
.
info
}
>
<
Row
className
=
{
styles
.
gl
}
>
<
Col
span
=
{
2
}
xs
=
{
24
}
sm
=
{
8
}
lg
=
{
2
}
>
事件账户
地址
:
<
/Col
>
<
Col
span
=
{
2
}
xs
=
{
24
}
sm
=
{
8
}
lg
=
{
2
}
>
地址
:
<
/Col
>
<
Col
span
=
{
10
}
xs
=
{
24
}
sm
=
{
16
}
lg
=
{
10
}
>
{
data
.
address
&&
data
.
address
||
''
}
<
/Col
>
<
Col
span
=
{
2
}
xs
=
{
24
}
sm
=
{
8
}
lg
=
{
2
}
>
事件账户
公钥
:
<
/Col
>
<
Col
span
=
{
2
}
xs
=
{
24
}
sm
=
{
8
}
lg
=
{
2
}
>
公钥
:
<
/Col
>
<
Col
span
=
{
10
}
xs
=
{
24
}
sm
=
{
16
}
lg
=
{
10
}
>
{
data
.
pubKey
&&
data
.
pubKey
&&
data
.
pubKey
||
''
}
<
/Col
>
<
Col
span
=
{
2
}
xs
=
{
24
}
sm
=
{
8
}
lg
=
{
2
}
>
创建用户
:
<
/Col
>
<
Col
span
=
{
10
}
xs
=
{
24
}
sm
=
{
16
}
lg
=
{
10
}
>
{
data
.
permission
&&
data
.
permission
&&
data
.
permission
.
owners
||
''
}
<
/Col
>
<
Col
span
=
{
2
}
xs
=
{
24
}
sm
=
{
8
}
lg
=
{
2
}
>
所属角色
:
<
/Col
>
<
Col
span
=
{
10
}
xs
=
{
24
}
sm
=
{
16
}
lg
=
{
10
}
>
{
data
.
permission
&&
data
.
permission
&&
data
.
permission
.
role
||
'
DEFAULT
'
}
<
/Col
>
<
/Row
>
<
Row
className
=
{
styles
.
gl
}
>
<
Col
span
=
{
2
}
xs
=
{
24
}
sm
=
{
8
}
lg
=
{
2
}
>
权限值
:
<
/Col
>
<
Col
span
=
{
10
}
xs
=
{
24
}
sm
=
{
16
}
lg
=
{
10
}
>
{
data
.
permission
&&
data
.
permission
&&
data
.
permission
.
modeBits
||
''
}
<
/Col
>
<
/Row
>
<
h3
>
事件列表
<
/h3
>
<
Table
rowKey
=
{
record
=>
record
}
...
...
data-explorer/src/web/components/transactionInfo/transactionInfo.js
浏览文件 @
4be8180c
...
...
@@ -195,6 +195,10 @@ export default class TransactionInfo extends Component {
certificatesRemove
,
userRolesAuthorizations
,
writeSet
,
accountType
,
address
,
mode
,
role
,
}
=
opt
;
console
.
log
(
opt
)
return
[
...
...
@@ -619,6 +623,28 @@ export default class TransactionInfo extends Component {
))
}
<
/BlockCollapsePanel
>
)
||
null
,
(
accountType
&&
mode
)
&&
(
<
BlockCollapsePanel
title
=
"
账户权限配置
"
>
<
table
style
=
{{
lineHeight
:
'
41px
'
,
width
:
'
100%
'
}}
>
<
tr
>
<
td
>
账户类型
:
<
/td
>
<
td
>
{
accountType
||
''
}
<
/td
>
<
/tr
>
<
tr
>
<
td
>
账户地址
:
<
/td
>
<
td
>
{
address
||
''
}
<
/td
>
<
/tr
>
{
role
!=
''
&&
(
<
tr
>
<
td
>
所属角色
:
<
/td
>
<
td
>
{
role
}
<
/td
>
<
/tr>
)
|| null
}
{
mode
>
-
1
&&
(
<
tr
>
<
td
>
权限值
:
<
/td
>
<
td
>
{
mode
}
<
/td
>
<
/tr>
)
|| null
}
<
/table
>
<
/BlockCollapsePanel
>
)
||
null
,
roles
&&
roles
.
length
!=
0
&&
(
<
BlockCollapsePanel
title
=
"
角色配置
"
>
...
...
data-explorer/src/web/pages/account/account.js
浏览文件 @
4be8180c
...
...
@@ -25,6 +25,7 @@ import Message from 'flarej/lib/components/antd/message';
import
Notification
from
'
../../../utils/notification
'
;
import
styles
from
'
./account.m.scss
'
;
import
tmpls
from
'
./account.t.html
'
;
import
{
fetchData
}
from
"
../../../utils/fetchConfig
"
;
//页面容器组件
@
registerTmpl
(
'
Account
'
)
...
...
@@ -81,7 +82,7 @@ export default class Account extends Component {
account
.
getAccountCount
(
leaders
)
]).
then
(()
=>
{
if
(
account
.
accountcount
>
0
)
{
Promise
.
all
([
account
.
getAccount
(
leaders
,
Promise
.
all
([
account
.
getAccount
s
(
leaders
,
param
),
]).
then
(()
=>
{
...
...
@@ -157,11 +158,6 @@ export default class Account extends Component {
this
.
Search
();
}
@
autobind
onShow
(
record
,
index
)
{
this
.
accountData
=
record
;
this
.
show
=
!
this
.
show
;
}
@
computed
get
tableColumns
()
{
return
[{
title
:
'
账户地址
'
,
...
...
@@ -176,21 +172,7 @@ export default class Account extends Component {
render
:
(
text
,
record
,
index
)
=>
nj
`
${
text
}
<br/>算法:
${
tranBase58
(
text
)}
`
()
},
// {
// title: '默克尔树根哈希',
// dataIndex: 'rootHash',
// key: 'rootHash',
// width: '25%',
// render: (text, record, index) => nj`
// <#if ${text}>
// ${text}
// <#else>
// <AccountRootHash address=${record.address}/>
// </#else>
// </#if>
// `()
// },
},
{
title
:
'
KV
'
,
dataIndex
:
'
address
'
,
...
...
@@ -202,11 +184,50 @@ export default class Account extends Component {
{
title
:
'
操作
'
,
render
:
(
text
,
record
,
index
)
=>
nj
`
<a onClick=
${()
=>
this
.
onShow
(
record
,
index
)}
>查看</a>
<a onClick=
${()
=>
this
.
onShow
Account
(
record
,
index
)}
>查看</a>
`
()
}];
}
@
autobind
onShowAccount
(
record
,
index
){
let
ledger
=
this
.
props
.
store
.
common
.
getDefaultLedger
();
Promise
.
all
([
this
.
getAccount
(
ledger
,
record
.
address
)]).
then
(()
=>
{
});
}
// 数据账户
getAccount
(
ledger
,
address
)
{
return
fetchData
(
`
${
__HOST
}
/ledgers/
${
ledger
}
/accounts/address/
${
address
}
`
,
this
.
setAccount
,
{},
{
method
:
'
get
'
,
headers
:
{
cookie
:
document
.
cookie
,
}
}
).
catch
(
error
=>
{
});
};
@
autobind
setAccount
(
result
)
{
if
(
result
&&
result
.
success
)
{
this
.
accountData
=
result
.
data
;
this
.
show
=
!
this
.
show
;
}
else
{
this
.
accountData
=
''
;
}
}
@
autobind
onShow
(
record
,
index
)
{
this
.
accountData
=
record
;
this
.
show
=
!
this
.
show
;
}
render
()
{
const
{
store
:
{
account
}
}
=
this
.
props
;
return
tmpls
.
container
({
...
...
data-explorer/src/web/pages/contract/contract.js
浏览文件 @
4be8180c
...
...
@@ -31,9 +31,7 @@ export default class Contract extends Component {
@
observable
pageSize
=
10
;
@
observable
contractAddress
=
''
;
@
observable
visible
=
false
;
@
observable
contractValue
=
''
;
@
observable
contractState
=
'
NORMAL
'
;
@
observable
chainCodeVersion
=-
1
;
@
observable
contractInfo
=
''
;
constructor
(
props
)
{
super
(
props
);
}
...
...
@@ -168,9 +166,7 @@ export default class Contract extends Component {
Promise
.
all
([
contract
.
getContractsByAddress
(
param
)
]).
then
(
data
=>
{
this
.
contractValue
=
data
[
0
].
chainCode
||
''
;
this
.
contractState
=
data
[
0
].
state
||
''
;
this
.
chainCodeVersion
=
data
[
0
].
chainCodeVersion
;
this
.
contractInfo
=
data
[
0
]
||
''
;
closeLoading
();
});
...
...
@@ -178,9 +174,7 @@ export default class Contract extends Component {
@
autobind
onClose
(){
this
.
visible
=!
this
.
visible
;
this
.
contractValue
=
''
;
this
.
contractState
=
'
NORMAL
'
;
this
.
chainCodeVersion
=-
1
;
this
.
contractInfo
=
''
;
Message
.
destroy
();
}
...
...
data-explorer/src/web/pages/contract/contract.t.html
浏览文件 @
4be8180c
...
...
@@ -32,17 +32,29 @@
<table
style=
"lineHeight:41px"
>
<tr>
<td>
状态:
</td>
<td>
{contract
S
tate}
</td>
<td>
{contract
Info.s
tate}
</td>
</tr>
<tr>
<td>
版本:
</td>
<td>
{chainCodeVersion}
</td>
<td>
{contractInfo.chainCodeVersion}
</td>
</tr>
<tr>
<td>
创建用户:
</td>
<td>
{contractInfo.permission
&&
contractInfo.permission.owners || ''}
</td>
</tr>
<tr>
<td>
所属角色:
</td>
<td>
{contractInfo.permission
&&
contractInfo.permission.role || 'DEFAULT'}
</td>
</tr>
<tr>
<td>
权限值:
</td>
<td>
{contractInfo.permission
&&
contractInfo.permission.modeBits || ''}
</td>
</tr>
</table>
<MonacoEditor
language=
"java"
theme=
"vs-dark"
value=
{contract
Valu
e}
value=
{contract
Info.chainCod
e}
/>
</div>
</ant-Drawer>
...
...
data-explorer/src/web/pages/event/event.js
浏览文件 @
4be8180c
...
...
@@ -20,6 +20,7 @@ import Notification from 'flarej/lib/components/antd/notification';
import
styles
from
'
./event.m.scss
'
;
import
tmpls
from
'
./event.t.html
'
;
import
{
fetchData
}
from
"
../../../utils/fetchConfig
"
;
// 页面容器组件
@
registerTmpl
(
'
Event
'
)
...
...
@@ -119,10 +120,9 @@ export default class Event extends Component {
this
.
onSearch
()
}
}
showEvent
=
(
record
,
index
)
=>
{
showEvent
=
(
record
)
=>
{
const
{
store
:
{
common
,
event
}
}
=
this
.
props
;
let
address
=
record
.
address
&&
record
.
address
||
''
;
let
address
=
record
.
data
&&
record
.
data
.
address
||
''
;
const
closeLoading
=
Message
.
loading
(
'
正在获取数据...
'
,
0
);
...
...
@@ -139,14 +139,14 @@ export default class Event extends Component {
event
.
getEventData
(
common
.
getDefaultLedger
(),
address
,
param
)
]).
then
(()
=>
{
closeLoading
();
this
.
accountData
=
record
;
this
.
accountData
=
record
.
data
;
this
.
show
=
!
this
.
show
;
});
}
else
if
(
event
.
eventTotal
==
0
)
{
closeLoading
();
this
.
accountData
=
record
;
this
.
accountData
=
record
.
data
;
this
.
show
=
!
this
.
show
;
// Notification.error({
...
...
@@ -186,11 +186,31 @@ export default class Event extends Component {
},
{
title
:
'
操作
'
,
render
:
(
text
,
record
,
index
)
=>
nj
`
<a onClick=
${()
=>
this
.
showEvent
(
record
,
index
)}
>查看</a>
<a onClick=
${()
=>
{
let
ledger
=
this
.
props
.
store
.
common
.
getDefaultLedger
();
Promise
.
all
([
this
.
getAccount
(
ledger
,
record
.
address
)]).
then
(()
=>
{
});
}}
>查看</a>
`
()
}]
}
// 数据账户
@
autobind
getAccount
(
ledger
,
address
)
{
return
fetchData
(
`
${
__HOST
}
/ledgers/
${
ledger
}
/events/user/accounts/
${
address
}
`
,
this
.
showEvent
,
{},
{
method
:
'
get
'
,
headers
:
{
cookie
:
document
.
cookie
,
}
}
).
catch
(
error
=>
{
});
};
render
()
{
const
{
store
:
{
event
}
}
=
this
.
props
;
return
tmpls
.
container
(
this
.
state
,
this
.
props
,
this
,
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录