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
7fad49d8
Commit
7fad49d8
authored
Mar 14, 2018
by
ninabreznik
Committed by
yann300
Apr 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the terminal logs
parent
55875169
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
37 deletions
+18
-37
txLogger.js
src/app/execution/txLogger.js
+18
-37
No files found.
src/app/execution/txLogger.js
View file @
7fad49d8
...
...
@@ -23,7 +23,7 @@ var css = csjs`
opacity: 0.8;
}
.caret {
color:
${
styles
.
terminal
.
icon_Color
}
;
color:
${
styles
.
terminal
.
icon_Color
_Menu
}
;
font-size: 15px;
cursor: pointer;
display: flex;
...
...
@@ -31,21 +31,10 @@ var css = csjs`
left: 7px;
}
.caret:hover {
color:
${
styles
.
terminal
.
icon_HoverColor
}
;
}
.caret {
color:
${
styles
.
terminal
.
icon_Color
}
;
font-size: 15px;
cursor: pointer;
display: flex;
position: absolute;
left: 7px;
}
.caret:hover {
color:
${
styles
.
terminal
.
icon_HoverColor
}
;
color:
${
styles
.
terminal
.
icon_HoverColor_Menu
}
;
}
.txLog {
width:
7
5%;
width:
9
5%;
}
.txItem {
color:
${
styles
.
terminal
.
text_Primary
}
;
...
...
@@ -90,18 +79,16 @@ var css = csjs`
display: flex;
}
.debug {
color:
${
styles
.
terminal
.
text_Title_TransactionLog
}
;
font-weight: bold;
cursor: pointer;
text-weight: bold;
${
styles
.
terminal
.
button_Log_Debug
}
margin-left: 5px;
width: 55px;
min-width: 55px;
min-height: 20px;
max-height: 20px;
font-size: 11px;
}
.debug:hover {
text-decoration: underline
;
opacity: 0.8
;
}
`
/**
...
...
@@ -177,6 +164,15 @@ class TxLogger {
}
}
function
debug
(
e
,
data
,
self
)
{
e
.
stopPropagation
()
if
(
data
.
tx
.
envMode
===
'vm'
)
{
self
.
event
.
trigger
(
'debugRequested'
,
[
data
.
tx
.
hash
])
}
else
{
modalDialog
.
alert
(
'Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.'
)
}
}
function
log
(
self
,
tx
,
api
)
{
var
resolvedTransaction
=
api
.
resolvedTransaction
(
tx
.
hash
)
if
(
resolvedTransaction
)
{
...
...
@@ -192,9 +188,6 @@ function log (self, tx, api) {
}
function
renderKnownTransaction
(
self
,
data
)
{
function
debug
()
{
self
.
event
.
trigger
(
'debugRequested'
,
[
data
.
tx
.
hash
])
}
var
from
=
data
.
tx
.
from
var
to
=
data
.
resolvedData
.
contractName
+
'.'
+
data
.
resolvedData
.
fn
var
obj
=
{
from
,
to
}
...
...
@@ -204,7 +197,7 @@ function renderKnownTransaction (self, data) {
<i class="
${
css
.
caret
}
fa fa-caret-right"></i>
${
context
(
self
,
{
from
,
to
,
data
})}
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
debug
}
onclick=
${
debug
}
>[debug]
</div>
<div class=
${
css
.
debug
}
onclick=
${
(
e
)
=>
debug
(
e
,
data
,
self
)}
>Debug
</div>
</div>
</div>
</span>
...
...
@@ -213,13 +206,6 @@ function renderKnownTransaction (self, data) {
}
function
renderCall
(
self
,
data
)
{
function
debug
()
{
if
(
data
.
tx
.
envMode
===
'vm'
)
{
self
.
event
.
trigger
(
'debugRequested'
,
[
data
.
tx
.
hash
])
}
else
{
modalDialog
.
alert
(
'Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.'
)
}
}
var
to
=
data
.
resolvedData
.
contractName
+
'.'
+
data
.
resolvedData
.
fn
var
from
=
data
.
tx
.
from
?
data
.
tx
.
from
:
' - '
var
input
=
data
.
tx
.
input
?
helper
.
shortenHexData
(
data
.
tx
.
input
)
:
''
...
...
@@ -233,22 +219,17 @@ function renderCall (self, data) {
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>from:</span>
${
from
}
</div>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>to:</span>
${
to
}
</div>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>data:</span>
${
input
}
</div>
<div class=
${
css
.
txItem
}
><span class=
${
css
.
txItemTitle
}
>return:</span>
</span>
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
debug
}
onclick=
${
debug
}
>[debug]
</div>
<div class=
${
css
.
debug
}
onclick=
${
(
e
)
=>
debug
(
e
,
data
,
self
)}
>Debug
</div>
</div>
</div>
<div>
${
JSON
.
stringify
(
typeConversion
.
stringify
(
data
.
resolvedData
.
decodedReturnValue
),
null
,
'
\
t'
)}
</div>
</span>
`
return
tx
}
function
renderUnknownTransaction
(
self
,
data
)
{
function
debug
()
{
self
.
event
.
trigger
(
'debugRequested'
,
[
data
.
tx
.
hash
])
}
var
from
=
data
.
tx
.
from
var
to
=
data
.
tx
.
to
var
obj
=
{
from
,
to
}
...
...
@@ -258,7 +239,7 @@ function renderUnknownTransaction (self, data) {
<div class="
${
css
.
log
}
" onclick=
${
e
=>
txDetails
(
e
,
tx
,
data
,
obj
)}
>
${
context
(
self
,
{
from
,
to
,
data
})}
<div class=
${
css
.
buttons
}
>
<div class=
${
css
.
debug
}
onclick=
${
debug
}
>[debug]
</div>
<div class=
${
css
.
debug
}
onclick=
${
(
e
)
=>
debug
(
e
,
data
,
self
)}
>Debug
</div>
</div>
</div>
</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