Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
4814d86d
Commit
4814d86d
authored
Aug 14, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix display status not available if receipt not available
parent
ecceea10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
11 deletions
+19
-11
txLogger.js
src/app/execution/txLogger.js
+19
-11
No files found.
src/app/execution/txLogger.js
View file @
4814d86d
...
@@ -49,6 +49,8 @@ var css = csjs`
...
@@ -49,6 +49,8 @@ var css = csjs`
.failed {
.failed {
color:
${
styles
.
terminal
.
icon_Color_Log_Failed
}
;
color:
${
styles
.
terminal
.
icon_Color_Log_Failed
}
;
}
}
.notavailable {
}
.call {
.call {
font-size: 7px;
font-size: 7px;
background-color:
${
styles
.
terminal
.
icon_BackgroundColor_Log_Call
}
;
background-color:
${
styles
.
terminal
.
icon_BackgroundColor_Log_Call
}
;
...
@@ -282,7 +284,7 @@ function renderUnknownTransaction (self, data) {
...
@@ -282,7 +284,7 @@ function renderUnknownTransaction (self, data) {
var
tx
=
yo
`
var
tx
=
yo
`
<span id="tx
${
data
.
tx
.
hash
}
">
<span id="tx
${
data
.
tx
.
hash
}
">
<div class="
${
css
.
log
}
" onclick=
${
e
=>
txDetails
(
e
,
tx
,
data
,
obj
)}
>
<div class="
${
css
.
log
}
" onclick=
${
e
=>
txDetails
(
e
,
tx
,
data
,
obj
)}
>
${
checkTxStatus
(
data
.
tx
,
txType
)}
${
checkTxStatus
(
data
.
receipt
||
data
.
tx
,
txType
)}
${
context
(
self
,
{
from
,
to
,
data
})}
${
context
(
self
,
{
from
,
to
,
data
})}
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
debug
}
onclick=
${(
e
)
=>
debug
(
e
,
data
,
self
)}
>Debug</div>
<div class=
${
css
.
debug
}
onclick=
${(
e
)
=>
debug
(
e
,
data
,
self
)}
>Debug</div>
...
@@ -307,8 +309,10 @@ function checkTxStatus (tx, type) {
...
@@ -307,8 +309,10 @@ function checkTxStatus (tx, type) {
}
}
if
(
type
===
'call'
||
type
===
'unknownCall'
)
{
if
(
type
===
'call'
||
type
===
'unknownCall'
)
{
return
yo
`<i class="
${
css
.
txStatus
}
${
css
.
call
}
">call</i>`
return
yo
`<i class="
${
css
.
txStatus
}
${
css
.
call
}
">call</i>`
}
else
{
}
else
if
(
tx
.
status
===
'0x0'
)
{
return
yo
`<i class="
${
css
.
txStatus
}
${
css
.
failed
}
fa fa-times-circle"></i>`
return
yo
`<i class="
${
css
.
txStatus
}
${
css
.
failed
}
fa fa-times-circle"></i>`
}
else
{
return
yo
`<i class="
${
css
.
txStatus
}
${
css
.
notavailable
}
fa fa-circle-thin" title='Status not available' ></i>`
}
}
}
}
...
@@ -407,18 +411,22 @@ function txDetails (e, tx, data, obj) {
...
@@ -407,18 +411,22 @@ function txDetails (e, tx, data, obj) {
function
createTable
(
opts
)
{
function
createTable
(
opts
)
{
var
table
=
yo
`<table class="
${
css
.
txTable
}
" id="txTable"></table>`
var
table
=
yo
`<table class="
${
css
.
txTable
}
" id="txTable"></table>`
if
(
opts
.
status
)
{
if
(
!
opts
.
isCall
)
{
var
msg
=
''
var
msg
=
''
if
(
opts
.
status
===
'0x0'
)
{
if
(
opts
.
status
)
{
msg
=
' Transaction mined but execution failed'
if
(
opts
.
status
===
'0x0'
)
{
}
else
if
(
opts
.
status
===
'0x1'
)
{
msg
=
' Transaction mined but execution failed'
msg
=
' Transaction mined and execution succeed'
}
else
if
(
opts
.
status
===
'0x1'
)
{
msg
=
' Transaction mined and execution succeed'
}
}
else
{
msg
=
' Status not available at the moment'
}
}
table
.
appendChild
(
yo
`
table
.
appendChild
(
yo
`
<tr class="
${
css
.
tr
}
">
<tr class="
${
css
.
tr
}
">
<td class="
${
css
.
td
}
"> status </td>
<td class="
${
css
.
td
}
"> status </td>
<td class="
${
css
.
td
}
">
${
opts
.
status
}${
msg
}
</td>
<td class="
${
css
.
td
}
">
${
opts
.
status
}${
msg
}
</td>
</tr>`
)
</tr>`
)
}
}
var
transactionHash
=
yo
`
var
transactionHash
=
yo
`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment