Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
JDChain
Explorer
提交
d5a0d4f5
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,发现更多精彩内容 >>
提交
d5a0d4f5
编写于
3月 18, 2020
作者:
H
huanghaiquan
浏览文件
操作
浏览文件
下载
差异文件
Merge commit '
cc563455
'
上级
b4c7fcb1
cc563455
变更
25
展开全部
隐藏空白更改
内联
并排
Showing
25 changed file
with
364 addition
and
123 deletion
+364
-123
data-explorer/Bundle.js
data-explorer/Bundle.js
+7
-1
data-explorer/app-web.js
data-explorer/app-web.js
+2
-0
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
+2
-2
data-explorer/dist/web/20190101/block.chunk.js
data-explorer/dist/web/20190101/block.chunk.js
+2
-2
data-explorer/dist/web/20190101/contract.chunk.js
data-explorer/dist/web/20190101/contract.chunk.js
+1
-1
data-explorer/dist/web/20190101/search.chunk.js
data-explorer/dist/web/20190101/search.chunk.js
+2
-2
data-explorer/dist/web/20190101/user.chunk.js
data-explorer/dist/web/20190101/user.chunk.js
+1
-1
data-explorer/dist/web/css/20190101/app.css
data-explorer/dist/web/css/20190101/app.css
+1
-1
data-explorer/dist/web/index.html
data-explorer/dist/web/index.html
+154
-1
data-explorer/index.template-web.nj.html
data-explorer/index.template-web.nj.html
+152
-1
data-explorer/pom.xml
data-explorer/pom.xml
+1
-1
data-explorer/routes-web.js
data-explorer/routes-web.js
+5
-1
data-explorer/server/routes/ledgers.js
data-explorer/server/routes/ledgers.js
+1
-90
data-explorer/src/stores/pages/contractStore.js
data-explorer/src/stores/pages/contractStore.js
+2
-2
data-explorer/src/stores/rootStore.js
data-explorer/src/stores/rootStore.js
+7
-0
data-explorer/src/utils/util.js
data-explorer/src/utils/util.js
+1
-1
data-explorer/src/web/components/blockInfo/blockInfo.js
data-explorer/src/web/components/blockInfo/blockInfo.js
+1
-1
data-explorer/src/web/components/transactionInfo/transactionInfo.js
...rer/src/web/components/transactionInfo/transactionInfo.js
+0
-2
data-explorer/src/web/components/transactionInfo/transactionInfo.t.html
...src/web/components/transactionInfo/transactionInfo.t.html
+1
-1
data-explorer/src/web/pages/search/search.js
data-explorer/src/web/pages/search/search.js
+9
-0
data-explorer/src/web/pages/search/search.t.html
data-explorer/src/web/pages/search/search.t.html
+5
-5
data-explorer/webpack.config.js
data-explorer/webpack.config.js
+3
-3
manager-explorer/pom.xml
manager-explorer/pom.xml
+1
-1
pom.xml
pom.xml
+1
-1
未找到文件。
data-explorer/Bundle.js
浏览文件 @
d5a0d4f5
...
...
@@ -17,6 +17,7 @@ class Bundle extends Component {
notification
.
destroy
();
// 初始化全局数据
const
{
store
:{
common
,
header
}
}
=
this
.
props
;
this
.
props
.
store
.
setLoading
(
true
);
// 设置菜单高亮
if
(
common
&&
common
.
ledgers
.
length
==
0
)
{
Promise
.
all
([
...
...
@@ -77,8 +78,13 @@ class Bundle extends Component {
});
});
}
componentWillUnmount
(){
const
{
store
}
=
this
.
props
;
store
.
setLoading
(
true
);
}
render
()
{
const
{
store
}
=
this
.
props
;
store
.
setLoading
(
false
);
return
this
.
state
.
mod
?
this
.
props
.
children
(
this
.
state
.
mod
)
:
null
;
}
}
...
...
data-explorer/app-web.js
浏览文件 @
d5a0d4f5
...
...
@@ -27,6 +27,8 @@ import moment from 'moment';
import
'
moment/locale/zh-cn
'
;
moment
.
locale
(
'
zh-cn
'
);
import
Notification
from
'
flarej/lib/components/antd/notification
'
;
import
'
flarej/lib/components/antd/icon
'
;
import
'
flarej/lib/components/antd/spin
'
;
import
{
LocaleProvider
}
from
'
antd
'
;
import
zhCN
from
'
antd/lib/locale-provider/zh_CN
'
;
import
{
createNotification
}
from
'
./src/utils/notification
'
;
...
...
data-explorer/dist/web/20190101/account.chunk.js
浏览文件 @
d5a0d4f5
此差异已折叠。
点击以展开。
data-explorer/dist/web/20190101/app.js
浏览文件 @
d5a0d4f5
此差异已折叠。
点击以展开。
data-explorer/dist/web/20190101/block.chunk.js
浏览文件 @
d5a0d4f5
此差异已折叠。
点击以展开。
data-explorer/dist/web/20190101/contract.chunk.js
浏览文件 @
d5a0d4f5
此差异已折叠。
点击以展开。
data-explorer/dist/web/20190101/search.chunk.js
浏览文件 @
d5a0d4f5
此差异已折叠。
点击以展开。
data-explorer/dist/web/20190101/user.chunk.js
浏览文件 @
d5a0d4f5
此差异已折叠。
点击以展开。
data-explorer/dist/web/css/20190101/app.css
浏览文件 @
d5a0d4f5
此差异已折叠。
点击以展开。
data-explorer/dist/web/index.html
浏览文件 @
d5a0d4f5
...
...
@@ -13,7 +13,160 @@
<script
src=
"web/js/es6-promise.auto.min.js"
></script>
<link
href=
"web/css/20190101/app.css"
rel=
"stylesheet"
></head>
<body>
<div
id=
"app"
style=
"position:relative;"
></div>
<div
id=
"app"
style=
"position:relative;"
>
<style>
.page-loading-warp
{
padding
:
120px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.ant-spin
{
-webkit-box-sizing
:
border-box
;
box-sizing
:
border-box
;
margin
:
0
;
padding
:
0
;
color
:
rgba
(
0
,
0
,
0
,
0.65
);
font-size
:
14px
;
font-variant
:
tabular-nums
;
line-height
:
1.5
;
list-style
:
none
;
-webkit-font-feature-settings
:
'tnum'
;
font-feature-settings
:
'tnum'
;
position
:
absolute
;
display
:
none
;
color
:
#1890ff
;
text-align
:
center
;
vertical-align
:
middle
;
opacity
:
0
;
-webkit-transition
:
-webkit-transform
0.3s
cubic-bezier
(
0.78
,
0.14
,
0.15
,
0.86
);
transition
:
-webkit-transform
0.3s
cubic-bezier
(
0.78
,
0.14
,
0.15
,
0.86
);
transition
:
transform
0.3s
cubic-bezier
(
0.78
,
0.14
,
0.15
,
0.86
);
transition
:
transform
0.3s
cubic-bezier
(
0.78
,
0.14
,
0.15
,
0.86
),
-webkit-transform
0.3s
cubic-bezier
(
0.78
,
0.14
,
0.15
,
0.86
);
}
.ant-spin-spinning
{
position
:
static
;
display
:
inline-block
;
opacity
:
1
;
}
.ant-spin-dot
{
position
:
relative
;
display
:
inline-block
;
font-size
:
20px
;
width
:
20px
;
height
:
20px
;
}
.ant-spin-dot-item
{
position
:
absolute
;
display
:
block
;
width
:
9px
;
height
:
9px
;
background-color
:
#1890ff
;
border-radius
:
100%
;
-webkit-transform
:
scale
(
0.75
);
-ms-transform
:
scale
(
0.75
);
transform
:
scale
(
0.75
);
-webkit-transform-origin
:
50%
50%
;
-ms-transform-origin
:
50%
50%
;
transform-origin
:
50%
50%
;
opacity
:
0.3
;
-webkit-animation
:
antSpinMove
1s
infinite
linear
alternate
;
animation
:
antSpinMove
1s
infinite
linear
alternate
;
}
.ant-spin-dot-item
:nth-child
(
1
)
{
top
:
0
;
left
:
0
;
}
.ant-spin-dot-item
:nth-child
(
2
)
{
top
:
0
;
right
:
0
;
-webkit-animation-delay
:
0.4s
;
animation-delay
:
0.4s
;
}
.ant-spin-dot-item
:nth-child
(
3
)
{
right
:
0
;
bottom
:
0
;
-webkit-animation-delay
:
0.8s
;
animation-delay
:
0.8s
;
}
.ant-spin-dot-item
:nth-child
(
4
)
{
bottom
:
0
;
left
:
0
;
-webkit-animation-delay
:
1.2s
;
animation-delay
:
1.2s
;
}
.ant-spin-dot-spin
{
-webkit-transform
:
rotate
(
45deg
);
-ms-transform
:
rotate
(
45deg
);
transform
:
rotate
(
45deg
);
-webkit-animation
:
antRotate
1.2s
infinite
linear
;
animation
:
antRotate
1.2s
infinite
linear
;
}
.ant-spin-lg
.ant-spin-dot
{
font-size
:
32px
;
width
:
32px
;
height
:
32px
;
}
.ant-spin-lg
.ant-spin-dot
i
{
width
:
14px
;
height
:
14px
;
}
@media
all
and
(
-ms-high-contrast
:
none
),
(
-ms-high-contrast
:
active
)
{
.ant-spin-blur
{
background
:
#fff
;
opacity
:
0.5
;
}
}
@-webkit-keyframes
antSpinMove
{
to
{
opacity
:
1
;
}
}
@keyframes
antSpinMove
{
to
{
opacity
:
1
;
}
}
@-webkit-keyframes
antRotate
{
to
{
-webkit-transform
:
rotate
(
405deg
);
transform
:
rotate
(
405deg
);
}
}
@keyframes
antRotate
{
to
{
-webkit-transform
:
rotate
(
405deg
);
transform
:
rotate
(
405deg
);
}
}
</style>
<div
class=
"page-loading-warp"
>
<div
class=
"ant-spin ant-spin-lg ant-spin-spinning"
>
<span
class=
"ant-spin-dot ant-spin-dot-spin"
>
<i
class=
"ant-spin-dot-item"
></i>
<i
class=
"ant-spin-dot-item"
></i>
<i
class=
"ant-spin-dot-item"
></i>
<i
class=
"ant-spin-dot-item"
></i>
</span>
</div>
</div>
</div>
<script
src=
"web/js/jquery-3.1.1.min.js"
></script>
<script
src=
"web/js/babelHelpers.min.js"
></script>
<script
type=
"text/javascript"
src=
"web/20190101/vendors.min.js"
></script><script
type=
"text/javascript"
src=
"web/20190101/app.js"
></script></body>
...
...
data-explorer/index.template-web.nj.html
浏览文件 @
d5a0d4f5
...
...
@@ -12,7 +12,158 @@
<script
src=
"{{ path }}js/es6-promise.auto.min.js"
></script>
</head>
<body>
<div
id=
"app"
style=
"position:relative;"
></div>
<div
id=
"app"
style=
"position:relative;"
>
<style>
.page-loading-warp
{
padding
:
120px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.ant-spin
{
-webkit-box-sizing
:
border-box
;
box-sizing
:
border-box
;
margin
:
0
;
padding
:
0
;
color
:
rgba
(
0
,
0
,
0
,
0.65
);
font-size
:
14px
;
font-variant
:
tabular-nums
;
line-height
:
1.5
;
list-style
:
none
;
-webkit-font-feature-settings
:
'tnum'
;
font-feature-settings
:
'tnum'
;
position
:
absolute
;
display
:
none
;
color
:
#1890ff
;
text-align
:
center
;
vertical-align
:
middle
;
opacity
:
0
;
-webkit-transition
:
-webkit-transform
0.3s
cubic-bezier
(
0.78
,
0.14
,
0.15
,
0.86
);
transition
:
-webkit-transform
0.3s
cubic-bezier
(
0.78
,
0.14
,
0.15
,
0.86
);
transition
:
transform
0.3s
cubic-bezier
(
0.78
,
0.14
,
0.15
,
0.86
);
transition
:
transform
0.3s
cubic-bezier
(
0.78
,
0.14
,
0.15
,
0.86
),
-webkit-transform
0.3s
cubic-bezier
(
0.78
,
0.14
,
0.15
,
0.86
);
}
.ant-spin-spinning
{
position
:
static
;
display
:
inline-block
;
opacity
:
1
;
}
.ant-spin-dot
{
position
:
relative
;
display
:
inline-block
;
font-size
:
20px
;
width
:
20px
;
height
:
20px
;
}
.ant-spin-dot-item
{
position
:
absolute
;
display
:
block
;
width
:
9px
;
height
:
9px
;
background-color
:
#1890ff
;
border-radius
:
100%
;
-webkit-transform
:
scale
(
0.75
);
-ms-transform
:
scale
(
0.75
);
transform
:
scale
(
0.75
);
-webkit-transform-origin
:
50%
50%
;
-ms-transform-origin
:
50%
50%
;
transform-origin
:
50%
50%
;
opacity
:
0.3
;
-webkit-animation
:
antSpinMove
1s
infinite
linear
alternate
;
animation
:
antSpinMove
1s
infinite
linear
alternate
;
}
.ant-spin-dot-item
:nth-child
(
1
)
{
top
:
0
;
left
:
0
;
}
.ant-spin-dot-item
:nth-child
(
2
)
{
top
:
0
;
right
:
0
;
-webkit-animation-delay
:
0.4s
;
animation-delay
:
0.4s
;
}
.ant-spin-dot-item
:nth-child
(
3
)
{
right
:
0
;
bottom
:
0
;
-webkit-animation-delay
:
0.8s
;
animation-delay
:
0.8s
;
}
.ant-spin-dot-item
:nth-child
(
4
)
{
bottom
:
0
;
left
:
0
;
-webkit-animation-delay
:
1.2s
;
animation-delay
:
1.2s
;
}
.ant-spin-dot-spin
{
-webkit-transform
:
rotate
(
45deg
);
-ms-transform
:
rotate
(
45deg
);
transform
:
rotate
(
45deg
);
-webkit-animation
:
antRotate
1.2s
infinite
linear
;
animation
:
antRotate
1.2s
infinite
linear
;
}
.ant-spin-lg
.ant-spin-dot
{
font-size
:
32px
;
width
:
32px
;
height
:
32px
;
}
.ant-spin-lg
.ant-spin-dot
i
{
width
:
14px
;
height
:
14px
;
}
@media
all
and
(
-ms-high-contrast
:
none
),
(
-ms-high-contrast
:
active
)
{
.ant-spin-blur
{
background
:
#fff
;
opacity
:
0.5
;
}
}
@-webkit-keyframes
antSpinMove
{
to
{
opacity
:
1
;
}
}
@keyframes
antSpinMove
{
to
{
opacity
:
1
;
}
}
@-webkit-keyframes
antRotate
{
to
{
-webkit-transform
:
rotate
(
405deg
);
transform
:
rotate
(
405deg
);
}
}
@keyframes
antRotate
{
to
{
-webkit-transform
:
rotate
(
405deg
);
transform
:
rotate
(
405deg
);
}
}
</style>
<div
class=
"page-loading-warp"
>
<div
class=
"ant-spin ant-spin-lg ant-spin-spinning"
>
<span
class=
"ant-spin-dot ant-spin-dot-spin"
><i
class=
"ant-spin-dot-item"
></i><i
class=
"ant-spin-dot-item"
></i
><i
class=
"ant-spin-dot-item"
></i><i
class=
"ant-spin-dot-item"
></i
></span>
</div>
</div>
</div>
<script
src=
"{{ path }}js/jquery-3.1.1.min.js"
></script>
<script
src=
"{{ path }}js/babelHelpers.min.js"
></script>
</body>
...
...
data-explorer/pom.xml
浏览文件 @
d5a0d4f5
...
...
@@ -5,7 +5,7 @@
<parent>
<groupId>
com.jd.blockchain
</groupId>
<artifactId>
explorer
</artifactId>
<version>
1.1.
2
.RELEASE
</version>
<version>
1.1.
3
.RELEASE
</version>
</parent>
<artifactId>
data-explorer
</artifactId>
<packaging>
jar
</packaging>
...
...
data-explorer/routes-web.js
浏览文件 @
d5a0d4f5
...
...
@@ -106,7 +106,11 @@ const Contract = inject('store')(
const
PageWrap
=
inject
(
'
store
'
)(
observer
(({
store
,
children
})
=>
t
`
<div id="page-wrap">
${
children
}
<ant-Spin size="large" spinning=
${
store
.
loading
}
>
<div style="width:100%;min-height:300px;">
${
children
}
</div>
</ant-Spin>
</div>
`
)
);
...
...
data-explorer/server/routes/ledgers.js
浏览文件 @
d5a0d4f5
...
...
@@ -605,96 +605,7 @@ router.get('/:ledger/txs/hash/:tx_hash', function(req, res) {
let
params
=
req
.
body
,
ret
=
{};
Object
.
assign
(
ret
,
resultData
,{
"
data
"
:
{
"
blockHeight
"
:
1
,
"
executionState
"
:
"
SUCCESS
"
,
"
transactionContent
"
:
{
"
ledgerHash
"
:
{
"
value
"
:
"
657TQAw6ssVoeKniWGwbovk7njvCTvikPambM9eBv6ezs
"
},
"
operations
"
:
[
{
"
userID
"
:
{
"
address
"
:
{
"
value
"
:
"
5SmBgzsrnY6u9Y7DgSSkXfTkCgp83hiFin3v
"
},
"
pubKey
"
:
{
"
value
"
:
"
mb5kukaqjWtXyAerfHU1JDtVwabSeBU5c3khMZbNh7R8VJ
"
}
}
},
{
"
accountID
"
:
{
"
address
"
:
{
"
value
"
:
"
5SmA98VknTbZ1Z7fmbNPHBuN2pbD89ogy8Ha
"
},
"
pubKey
"
:
{
"
value
"
:
"
mbC8hzmYBz2SsLLqwoBXAJiGeHrCnByBEvcaUZWscAiPqR
"
}
}
},
{
"
contractID
"
:
{
"
address
"
:
{
"
value
"
:
"
5SmA98VknTbZ1Z7fmbNPHBuN2pbD89ogy8Ha
"
},
"
pubKey
"
:
{
"
value
"
:
"
mbC8hzmYBz2SsLLqwoBXAJiGeHrCnByBEvcaUZWscAiPqR
"
}
},
"
chainCode
"
:
"
----------
"
},
{
"
contractAddress
"
:
{
"
value
"
:
"
mbC8hzmYBz2SsLLqwoBXAJiGeHrCnByBEvcaUZWscAiPqR
"
},
"
event
"
:
"
----------
"
,
"
args
"
:
"
----------
"
},
{
"
writeSet
"
:
[{
"
key
"
:
"
jdchain
"
,
"
value
"
:
{
"
type
"
:
"
TEXT
"
,
"
value
"
:
{
"
value
"
:
"
----------
"
}
},
"
expectedVersion
"
:
0
}],
"
accountAddress
"
:
{
"
value
"
:
"
mbC8hzmYBz2SsLLqwoBXAJiGeHrCnByBEvcaUZWscAiPqR
"
}
}
],
"
hash
"
:
{
"
value
"
:
"
6BLtM1agb7ERKoN5AJgZKiTjzdS7BpjgzQNYK8ZeDqotA
"
}
},
"
endpointSignatures
"
:
[
{
"
digest
"
:
{
"
value
"
:
"
42pbfM5YKnf39Gitr4UsjTCzhhnJjwNyi8MnLFYgP4VKewTLzHitzArHEMrCt3hZYUe5ex9XvqtmiCoWpeAbdc31F
"
},
"
pubKey
"
:
{
"
value
"
:
"
mb5kbwzACnhK9P1dVxgMPB2ySJLFyJKQbHpH7T9oRK3LpS
"
}
}
],
"
nodeSignatures
"
:
[
{
"
digest
"
:
{
"
value
"
:
"
66SQ95SbDaApAJhN2NsFx5sfAQTxsWhMW26D5iPqXc1jZU9rJEhRnqT1nzt62ZAcCvsfrjEsay3MxqXYA5tWPoA2U
"
},
"
pubKey
"
:
{
"
value
"
:
"
mb5kbwzACnhK9P1dVxgMPB2ySJLFyJKQbHpH7T9oRK3LpS
"
}
}
]
},
"
success
"
:
true
});
Object
.
assign
(
ret
,
resultData
,{
"
data
"
:{
"
blockHeight
"
:
2
,
"
operationResults
"
:[],
"
userAccountSetHash
"
:{
"
value
"
:
"
j5nyfcUoZ1YgfnQCV5U6iHQZPQ4aqCp5sx1Vf9UPqiBc56
"
},
"
executionState
"
:
"
SUCCESS
"
,
"
transactionContent
"
:{
"
ledgerHash
"
:{
"
value
"
:
"
j5s3Xx2djijUi7NewerfPtRTta3EAa9ErNcBsHgzkDND7g
"
},
"
operations
"
:[{
"
accountID
"
:{
"
address
"
:{
"
value
"
:
"
LdeNkb56uxHjqz4HJaDGtbGqaHd2D73nz5dGo
"
},
"
pubKey
"
:{
"
value
"
:
"
7VeR9CqbpKb6EnWrobskY8JBTh5ZS3MjhLFgw8cp6ZBntJa6
"
}}},{
"
writeSet
"
:[{
"
expectedVersion
"
:
-
1
,
"
value
"
:{
"
bytes
"
:{
"
value
"
:
"
21x71Vecp
"
},
"
type
"
:
"
TEXT
"
},
"
key
"
:
"
key1
"
}],
"
accountAddress
"
:{
"
value
"
:
"
LdeNkb56uxHjqz4HJaDGtbGqaHd2D73nz5dGo
"
}}],
"
hash
"
:{
"
value
"
:
"
j5gTM121tKdm3GTC6ET2XDr2aKivDEM5Tp9XFWsxKPxLxG
"
},
"
timestamp
"
:
1583142977001
},
"
endpointSignatures
"
:[{
"
digest
"
:{
"
value
"
:
"
SMHunDZXh7GUUUmdCwL1RybD2QD9wxDmCuF6Xy7up7Acv8NTi2X9QwuSdMgbGtuvXXMssXreTZZvygxMTkaGxtSTjg
"
},
"
pubKey
"
:{
"
value
"
:
"
7VeRPKizLbSmqNEBF6VsJEgwN84pEk1WZck5pLgL5N2E7xhJ
"
}}],
"
adminAccountHash
"
:{
"
value
"
:
"
j5t6rn6W4b89CymyvYbXyx8MtLN7RCvPd94C53BeYaqPJa
"
},
"
dataAccountSetHash
"
:{
"
value
"
:
"
j5gtK7Q4WMNbu47EucgELFNBvZxQZMuDnmVejCf5QSg2C9
"
},
"
nodeSignatures
"
:[{
"
digest
"
:{
"
value
"
:
"
SMHunDZXh7GUUUmdCwL1RybD2QD9wxDmCuF6Xy7up7Acv8NTi2X9QwuSdMgbGtuvXXMssXreTZZvygxMTkaGxtSTjg
"
},
"
pubKey
"
:{
"
value
"
:
"
7VeRPKizLbSmqNEBF6VsJEgwN84pEk1WZck5pLgL5N2E7xhJ
"
}}]},
"
success
"
:
true
});
res
.
send
(
ret
);
});
...
...
data-explorer/src/stores/pages/contractStore.js
浏览文件 @
d5a0d4f5
...
...
@@ -109,7 +109,7 @@ const ContractStore = types
}
},
// 根据合约地址查询详细信息
getContractsByAddress
(
param
)
{
debugger
getContractsByAddress
(
param
)
{
return
fetchData
(
`
${
__HOST
}
/ledgers/
${
param
.
ledger
}
/contracts/address/
${
param
.
address
}
`
,
self
.
setContractsByAddress
,
''
,
{
...
...
@@ -123,7 +123,7 @@ const ContractStore = types
console
.
log
(
error
);
});
},
setContractsByAddress
(
result
)
{
debugger
setContractsByAddress
(
result
)
{
if
(
result
&&
result
.
success
)
{
return
result
.
data
||
[];
}
...
...
data-explorer/src/stores/rootStore.js
浏览文件 @
d5a0d4f5
...
...
@@ -10,6 +10,7 @@ import ContractStore from './pages/contractStore';
// prettier-ignore
const
RootStore
=
types
.
model
(
'
RootStore
'
,
{
loading
:
true
,
common
:
types
.
optional
(
CommonStore
,
{}),
header
:
types
.
optional
(
HeaderStore
,
{
...
...
@@ -21,6 +22,12 @@ const RootStore = types.model('RootStore', {
block
:
types
.
optional
(
BlockStore
,
{}),
contract
:
types
.
optional
(
ContractStore
,
{}),
//{pageStore}//
}).
actions
(
self
=>
{
return
{
setLoading
(
v
){
self
.
loading
=
v
;
},
}
});
export
default
RootStore
;
\ No newline at end of file
data-explorer/src/utils/util.js
浏览文件 @
d5a0d4f5
...
...
@@ -41,7 +41,7 @@ export function tranBase58(value) {
for
(
i
=
0
;
i
<
value
.
length
;
i
++
)
{
let
c
=
value
[
i
];
// c是不是ALPHABET_MAP的key
if
(
!
(
c
in
ALPHABET_MAP
))
throw
new
Error
(
'
Non-base58 character
'
)
;
if
(
!
(
c
in
ALPHABET_MAP
))
return
value
;
for
(
j
=
0
;
j
<
bytes
.
length
;
j
++
)
bytes
[
j
]
*=
BASE
;
bytes
[
0
]
+=
ALPHABET_MAP
[
c
];
let
carry
=
0
;
...
...
data-explorer/src/web/components/blockInfo/blockInfo.js
浏览文件 @
d5a0d4f5
...
...
@@ -34,7 +34,7 @@ export default class BlockInfo extends Component {
// 跳转到前置区块
@
autobind
goBlock
(
e
){
debugger
;
goBlock
(
e
){
const
{
goPrev
}
=
this
.
props
;
if
(
goPrev
)
{
goPrev
(
e
.
target
.
innerText
);
...
...
data-explorer/src/web/components/transactionInfo/transactionInfo.js
浏览文件 @
d5a0d4f5
...
...
@@ -38,7 +38,6 @@ export default class TransactionInfo extends Component {
result
=
byteToString
(
text
);
break
;
case
'
JSON
'
:
debugger
let
json
=
stringToBase58
(
data
);
result
=
byteToString
(
json
);
break
;
...
...
@@ -74,7 +73,6 @@ export default class TransactionInfo extends Component {
render
()
{
const
{
data
,
visible
}
=
this
.
props
;
console
.
log
(
this
)
return
tmpls
.
container
({
components
:
{
'
ant-Drawer
'
:
Drawer
,
...
...
data-explorer/src/web/components/transactionInfo/transactionInfo.t.html
浏览文件 @
d5a0d4f5
...
...
@@ -49,7 +49,7 @@
</fj-Row>
<
#each
{{
this.writeSet
}}
>
<BlockCollapseSmall
title=
"键:{{this.key}}"
>
值:{{formatData(this.value.type,this.value.
value
)}}
<br>
值:{{formatData(this.value.type,this.value.
bytes
)}}
<br>
预期版本:{{this.expectedVersion}}
<br>
类型:{{this.value.type}}
</BlockCollapseSmall>
...
...
data-explorer/src/web/pages/search/search.js
浏览文件 @
d5a0d4f5
...
...
@@ -67,6 +67,15 @@ export default class Search extends Component {
return
String
(
content
).
replace
(
this
.
searchParamInput
,
'
<i>
'
+
this
.
searchParamInput
+
'
</i>
'
);
}
// 文字动态大小
scientificCount
=
(
number
)
=>
{
let
length
=
number
.
toString
().
length
;
if
(
length
>
5
)
{
return
<
p
class
=
{
styles
.
data
}
style
=
{{
fontSize
:(
36
-
(
length
-
6
)
*
3
)
+
'
px
'
}}
>
{
number
}
<
/p>
;
}
return
<
p
class
=
{
styles
.
data
}
>
{
number
}
<
/p>
;
}
componentDidMount
()
{
const
{
store
:
{
search
,
header
}
}
=
this
.
props
;
header
.
setSelectMenu
([
'
search
'
]);
...
...
data-explorer/src/web/pages/search/search.t.html
浏览文件 @
d5a0d4f5
...
...
@@ -20,7 +20,7 @@
区块高度
</p>
<p
class=
"{styles.data}"
>
{search.blockHeight || 0}
</p>
{scientificCount(search.blockHeight || 0)}
</div>
<div
class=
"{styles.right}"
>
<div
class=
"{styles.logo} {styles.logoBH}"
>
...
...
@@ -35,7 +35,7 @@
<div
class=
"{styles.span}"
>
<div
class=
"{styles.left}"
>
<p
class=
"{styles.title}"
>
交易总数
</p>
<p
class=
"{styles.data}"
>
{search.transactionTotal || 0}
</p>
{scientificCount(search.transactionTotal || 0)}
</div>
<div
class=
"{styles.right}"
>
<div
class=
"{styles.logo} {styles.logoTR}"
>
...
...
@@ -50,7 +50,7 @@
<div
class=
"{styles.span}"
>
<div
class=
"{styles.left}"
>
<p
class=
"{styles.title}"
>
用户总数
</p>
<p
class=
"{styles.data}"
>
{search.userTotal || 0}
</p>
{scientificCount(search.userTotal || 0)}
</div>
<div
class=
"{styles.right}"
>
<div
class=
"{styles.logo} {styles.logoUS}"
>
...
...
@@ -65,7 +65,7 @@
<div
class=
"{styles.span}"
>
<div
class=
"{styles.left}"
>
<p
class=
"{styles.title}"
>
数据账户总数
</p>
<p
class=
"{styles.data}"
>
{search.dataLedgersTotal || 0}
</p>
{scientificCount(search.dataLedgersTotal || 0)}
</div>
<div
class=
"{styles.right}"
>
<div
class=
"{styles.logo} {styles.logoLE}"
>
...
...
@@ -80,7 +80,7 @@
<div
class=
"{styles.span}"
>
<div
class=
"{styles.left}"
>
<p
class=
"{styles.title}"
>
合约总数
</p>
<p
class=
"{styles.data}"
>
{search.contractTotal || 0}
</p>
{scientificCount(search.contractTotal || 0)}
</div>
<div
class=
"{styles.right}"
>
<div
class=
"{styles.logo} {styles.logoCO}"
>
...
...
data-explorer/webpack.config.js
浏览文件 @
d5a0d4f5
...
...
@@ -10,7 +10,7 @@
const
isProd
=
process
.
env
.
NODE_ENV
==
'
production
'
;
const
isTest
=
process
.
env
.
NODE_ENV
==
'
test
'
;
const
isLocal
=
process
.
env
.
Project
==
'
local
'
;
const
isSelf
=
tru
e
;
// true使用代理服务,false不使用
const
isSelf
=
fals
e
;
// true使用代理服务,false不使用
const
pxToRem
=
require
(
'
postcss-pxtorem
'
);
const
VERSION
=
'
20190101
'
;
const
modifyVars
=
Object
.
assign
({});
...
...
@@ -228,11 +228,11 @@ module.exports = {
proxy
:
[
{
context
:
[
'
/ledgers
'
],
target
:
'
http://
192.168.151.39:8081
'
,
target
:
'
http://
jdchain-cloud4-8080.jdfmgt.com
'
,
},
{
context
:
[
'
/schema
'
,],
target
:
'
http://
192.168.151.39:8081
'
,
target
:
'
http://
jdchain-cloud4-8080.jdfmgt.com
'
,
}
],
}
...
...
manager-explorer/pom.xml
浏览文件 @
d5a0d4f5
...
...
@@ -6,7 +6,7 @@
<parent>
<groupId>
com.jd.blockchain
</groupId>
<artifactId>
explorer
</artifactId>
<version>
1.1.
2
.RELEASE
</version>
<version>
1.1.
3
.RELEASE
</version>
</parent>
<artifactId>
manager-explorer
</artifactId>
<packaging>
jar
</packaging>
...
...
pom.xml
浏览文件 @
d5a0d4f5
...
...
@@ -10,7 +10,7 @@
<groupId>
com.jd.blockchain
</groupId>
<artifactId>
explorer
</artifactId>
<version>
1.1.
2
.RELEASE
</version>
<version>
1.1.
3
.RELEASE
</version>
<packaging>
pom
</packaging>
<modules>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录