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
f2cea2c6
Commit
f2cea2c6
authored
Jan 25, 2018
by
ninabreznik
Committed by
yann300
Apr 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create log titles bold
parent
20a01579
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
5 deletions
+50
-5
txLogger.js
src/app/execution/txLogger.js
+50
-5
No files found.
src/app/execution/txLogger.js
View file @
f2cea2c6
...
@@ -23,6 +23,14 @@ var css = csjs`
...
@@ -23,6 +23,14 @@ var css = csjs`
.txLog {
.txLog {
width: 75%;
width: 75%;
}
}
.txItem {
color:
${
styles
.
terminal
.
text_Primary
}
;
margin-right: 5px;
float: left;
}
.txItemTitle {
font-weight: bold;
}
.tx {
.tx {
color:
${
styles
.
terminal
.
text_Title_TransactionLog
}
;
color:
${
styles
.
terminal
.
text_Title_TransactionLog
}
;
font-weight: bold;
font-weight: bold;
...
@@ -206,7 +214,14 @@ function renderCall (self, data) {
...
@@ -206,7 +214,14 @@ function renderCall (self, data) {
var
tx
=
yo
`
var
tx
=
yo
`
<span id="tx
${
data
.
tx
.
hash
}
">
<span id="tx
${
data
.
tx
.
hash
}
">
<div class="
${
css
.
log
}
">
<div class="
${
css
.
log
}
">
<span class=
${
css
.
txLog
}
><span class=
${
css
.
tx
}
>[call]</span> from:
${
from
}
, to:
${
to
}
, data:
${
input
}
, return: </span>
<span class=
${
css
.
txLog
}
>
<span class=
${
css
.
tx
}
>[call]</span>
<br>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>from:</span>
${
from
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>to:</span>
${
to
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>data:</span>
${
input
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>return:</span>
</span>
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
buttons
}
>
<button class=
${
css
.
details
}
onclick=
${
txDetails
}
>Details</button>
<button class=
${
css
.
details
}
onclick=
${
txDetails
}
>Details</button>
<button class=
${
css
.
debug
}
onclick=
${
debug
}
>Debug</button>
<button class=
${
css
.
debug
}
onclick=
${
debug
}
>Debug</button>
...
@@ -284,7 +299,10 @@ function renderUnknownTransaction (self, data) {
...
@@ -284,7 +299,10 @@ function renderUnknownTransaction (self, data) {
}
}
function
renderEmptyBlock
(
self
,
data
)
{
function
renderEmptyBlock
(
self
,
data
)
{
return
yo
`<span class=
${
css
.
txLog
}
><span class='
${
css
.
tx
}
'>[block:
${
data
.
block
.
number
}
- 0 transactions]</span></span>`
return
yo
`
<span class=
${
css
.
txLog
}
>
<span class='
${
css
.
tx
}
'><div class=
${
css
.
txItem
}
>[<span class=
${
css
.
txItemTitle
}
>block:
${
data
.
block
.
number
}
- </span> 0 transactions]</span></span>
</span>`
}
}
function
context
(
self
,
opts
)
{
function
context
(
self
,
opts
)
{
...
@@ -300,13 +318,40 @@ function context (self, opts) {
...
@@ -300,13 +318,40 @@ function context (self, opts) {
var
i
=
data
.
tx
.
transactionIndex
var
i
=
data
.
tx
.
transactionIndex
var
value
=
val
?
typeConversion
.
toInt
(
val
)
:
0
var
value
=
val
?
typeConversion
.
toInt
(
val
)
:
0
if
(
executionContext
.
getProvider
()
===
'vm'
)
{
if
(
executionContext
.
getProvider
()
===
'vm'
)
{
return
yo
`<span class=
${
css
.
txLog
}
><span class=
${
css
.
tx
}
>[vm]</span> from:
${
from
}
, to:
${
to
}
, value:
${
value
}
wei, data:
${
input
}
,
${
logs
}
logs, hash:
${
hash
}
</span>`
return
yo
`
<span class=
${
css
.
txLog
}
>
<span class=
${
css
.
tx
}
>[vm]</span>
<br>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>from:</span>
${
from
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>to:</span>
${
to
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>value:</span>
${
value
}
wei</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>data:</span>
${
input
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>logs:</span>
${
logs
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>hash:</span>
${
hash
}
</span>
</span>`
}
else
if
(
executionContext
.
getProvider
()
!==
'vm'
&&
data
.
resolvedData
)
{
}
else
if
(
executionContext
.
getProvider
()
!==
'vm'
&&
data
.
resolvedData
)
{
return
yo
`<span class=
${
css
.
txLog
}
><span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span> from:
${
from
}
, to:
${
to
}
, value:
${
value
}
wei,
${
logs
}
logs, data:
${
input
}
, hash:
${
hash
}
</span>`
return
yo
`
<span class=
${
css
.
txLog
}
>
<span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span>
<br>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>from:</span>
${
from
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>to:</span>
${
to
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>value:</span>
${
value
}
wei</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>data:</span>
${
input
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>logs:</span>
${
logs
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>hash:</span>
${
hash
}
</span>
</span>`
}
else
{
}
else
{
to
=
helper
.
shortenHexData
(
to
)
to
=
helper
.
shortenHexData
(
to
)
hash
=
helper
.
shortenHexData
(
data
.
tx
.
blockHash
)
hash
=
helper
.
shortenHexData
(
data
.
tx
.
blockHash
)
return
yo
`<span class=
${
css
.
txLog
}
><span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span> from:
${
from
}
, to:
${
to
}
, value:
${
value
}
wei</span>`
return
yo
`
<span class=
${
css
.
txLog
}
>
<span class='
${
css
.
tx
}
'>[block:
${
block
}
txIndex:
${
i
}
]</span>
<br>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>from:</span>
${
from
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>to:</span>
${
to
}
</span>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>value:</span>
${
value
}
wei</span>
</span>`
}
}
}
}
...
...
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