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
4fb58291
Commit
4fb58291
authored
Jan 09, 2017
by
yann300
Committed by
GitHub
Jan 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #164 from ethereum/traceFailedToLoad
Display msg if tx not found
parents
e7ef7f4f
61d544dd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
7 deletions
+31
-7
package.json
package.json
+3
-0
DropdownPanel.js
src/ui/DropdownPanel.js
+14
-0
TxBrowser.js
src/ui/TxBrowser.js
+14
-7
No files found.
package.json
View file @
4fb58291
...
@@ -87,5 +87,8 @@
...
@@ -87,5 +87,8 @@
"test/resources/*"
"test/resources/*"
],
],
"parser"
:
"babel-eslint"
"parser"
:
"babel-eslint"
},
"browserify"
:
{
"transform"
:
[
"babelify"
]
}
}
}
}
src/ui/DropdownPanel.js
View file @
4fb58291
...
@@ -81,4 +81,18 @@ DropdownPanel.prototype.toggle = function () {
...
@@ -81,4 +81,18 @@ DropdownPanel.prototype.toggle = function () {
}
}
}
}
DropdownPanel
.
prototype
.
hide
=
function
()
{
if
(
this
.
view
)
{
var
el
=
this
.
view
.
querySelector
(
'.dropdownpanel'
)
el
.
style
.
display
=
'none'
}
}
DropdownPanel
.
prototype
.
show
=
function
()
{
if
(
this
.
view
)
{
var
el
=
this
.
view
.
querySelector
(
'.dropdownpanel'
)
el
.
style
.
display
=
''
}
}
module
.
exports
=
DropdownPanel
module
.
exports
=
DropdownPanel
src/ui/TxBrowser.js
View file @
4fb58291
...
@@ -33,11 +33,16 @@ function TxBrowser (_parent) {
...
@@ -33,11 +33,16 @@ function TxBrowser (_parent) {
// invokation: 0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51
// invokation: 0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51
TxBrowser
.
prototype
.
setDefaultValues
=
function
()
{
TxBrowser
.
prototype
.
setDefaultValues
=
function
()
{
this
.
blockNumber
=
null
this
.
blockNumber
=
''
this
.
txNumber
=
''
this
.
connectInfo
=
''
this
.
connectInfo
=
''
this
.
basicPanel
.
data
=
{}
this
.
basicPanel
.
data
=
{}
this
.
basicPanel
.
update
()
this
.
basicPanel
.
update
()
this
.
basicPanel
.
hide
()
this
.
updateWeb3Url
(
util
.
web3
.
currentProvider
.
host
)
this
.
updateWeb3Url
(
util
.
web3
.
currentProvider
.
host
)
if
(
this
.
view
)
{
yo
.
update
(
this
.
view
,
this
.
render
())
}
}
}
TxBrowser
.
prototype
.
submit
=
function
()
{
TxBrowser
.
prototype
.
submit
=
function
()
{
...
@@ -57,17 +62,17 @@ TxBrowser.prototype.submit = function () {
...
@@ -57,17 +62,17 @@ TxBrowser.prototype.submit = function () {
})
})
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
)
self
.
update
(
e
.
messag
e
)
}
}
}
}
TxBrowser
.
prototype
.
update
=
function
(
error
,
tx
)
{
TxBrowser
.
prototype
.
update
=
function
(
error
,
tx
)
{
if
(
error
)
{
console
.
log
(
error
)
return
}
var
info
=
{}
var
info
=
{}
if
(
error
)
{
this
.
view
.
querySelector
(
'#error'
).
innerHTML
=
error
}
else
{
if
(
tx
)
{
if
(
tx
)
{
this
.
view
.
querySelector
(
'#error'
).
innerHTML
=
''
if
(
!
tx
.
to
)
{
if
(
!
tx
.
to
)
{
tx
.
to
=
traceHelper
.
contractCreationToken
(
'0'
)
tx
.
to
=
traceHelper
.
contractCreationToken
(
'0'
)
}
}
...
@@ -80,7 +85,8 @@ TxBrowser.prototype.update = function (error, tx) {
...
@@ -80,7 +85,8 @@ TxBrowser.prototype.update = function (error, tx) {
info
.
from
=
mes
info
.
from
=
mes
info
.
to
=
mes
info
.
to
=
mes
info
.
hash
=
mes
info
.
hash
=
mes
console
.
log
(
'cannot find '
+
this
.
blockNumber
+
' '
+
this
.
txNumber
)
this
.
view
.
querySelector
(
'#error'
).
innerHTML
=
'Cannot find transaction with reference. Block number: '
+
this
.
blockNumber
+
'. Transaction index/hash: '
+
this
.
txNumber
}
}
}
this
.
basicPanel
.
data
=
info
this
.
basicPanel
.
data
=
info
this
.
basicPanel
.
update
()
this
.
basicPanel
.
update
()
...
@@ -151,6 +157,7 @@ TxBrowser.prototype.render = function () {
...
@@ -151,6 +157,7 @@ TxBrowser.prototype.render = function () {
<button id='load' class='fa fa-play' title='start debugging' onclick=
${
function
()
{
self
.
submit
()
}
} style=
${
ui
.
formatCss
(
style
.
button
)}
>
<button id='load' class='fa fa-play' title='start debugging' onclick=
${
function
()
{
self
.
submit
()
}
} style=
${
ui
.
formatCss
(
style
.
button
)}
>
</button>
</button>
<button id='unload' class='fa fa-stop' title='stop debugging' onclick=
${
function
()
{
self
.
unload
()
}
} style=
${
ui
.
formatCss
(
style
.
button
)}
></button>
<button id='unload' class='fa fa-stop' title='stop debugging' onclick=
${
function
()
{
self
.
unload
()
}
} style=
${
ui
.
formatCss
(
style
.
button
)}
></button>
<span id='error'></span>
<div style=
${
ui
.
formatCss
(
style
.
transactionInfo
)}
id='txinfo'>
<div style=
${
ui
.
formatCss
(
style
.
transactionInfo
)}
id='txinfo'>
${
this
.
basicPanel
.
render
()}
${
this
.
basicPanel
.
render
()}
</div>
</div>
...
...
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