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
b36fe448
Commit
b36fe448
authored
Jan 17, 2017
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make dropdownlist use treeview
parent
5dc187e5
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
37 additions
and
47 deletions
+37
-47
CalldataPanel.js
src/ui/CalldataPanel.js
+1
-1
CallstackPanel.js
src/ui/CallstackPanel.js
+1
-1
CodeListView.js
src/ui/CodeListView.js
+2
-3
DropdownPanel.js
src/ui/DropdownPanel.js
+24
-33
FullStoragesChanges.js
src/ui/FullStoragesChanges.js
+1
-1
MemoryPanel.js
src/ui/MemoryPanel.js
+1
-1
SolidityLocals.js
src/ui/SolidityLocals.js
+1
-1
SolidityState.js
src/ui/SolidityState.js
+1
-1
StackPanel.js
src/ui/StackPanel.js
+1
-1
StepDetail.js
src/ui/StepDetail.js
+1
-1
StoragePanel.js
src/ui/StoragePanel.js
+1
-1
TxBrowser.js
src/ui/TxBrowser.js
+1
-1
VmDebugger.js
src/ui/VmDebugger.js
+1
-1
No files found.
src/ui/CalldataPanel.js
View file @
b36fe448
...
...
@@ -5,7 +5,7 @@ var yo = require('yo-yo')
function
CalldataPanel
(
_parent
,
_traceManager
)
{
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Call Data'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Call Data'
,
{
json
:
true
}
)
this
.
init
()
}
...
...
src/ui/CallstackPanel.js
View file @
b36fe448
...
...
@@ -5,7 +5,7 @@ var yo = require('yo-yo')
function
CallstackPanel
(
_parent
,
_traceManager
)
{
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Call Stack'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Call Stack'
,
{
json
:
true
}
)
this
.
init
()
}
...
...
src/ui/CodeListView.js
View file @
b36fe448
...
...
@@ -11,7 +11,7 @@ function CodeListView (_parent, _codeManager) {
this
.
address
this
.
codeView
this
.
itemSelected
this
.
basicPanel
=
new
DropdownPanel
(
'Instructions'
,
true
)
this
.
basicPanel
=
new
DropdownPanel
(
'Instructions'
,
{
json
:
false
}
)
this
.
init
()
}
...
...
@@ -51,8 +51,7 @@ CodeListView.prototype.changed = function (code, address, index) {
this
.
code
=
code
this
.
address
=
address
this
.
codeView
=
this
.
renderAssemblyItems
()
this
.
basicPanel
.
data
=
this
.
codeView
this
.
basicPanel
.
update
()
this
.
basicPanel
.
setContent
(
this
.
codeView
)
}
this
.
indexChanged
(
index
)
}
...
...
src/ui/DropdownPanel.js
View file @
b36fe448
...
...
@@ -3,49 +3,40 @@ var yo = require('yo-yo')
var
ui
=
require
(
'../helpers/ui'
)
var
styleDropdown
=
require
(
'./styles/dropdownPanel'
)
var
basicStyles
=
require
(
'./styles/basicStyles'
)
var
TreeView
=
require
(
'./TreeView'
)
function
DropdownPanel
(
_name
,
_raw
)
{
this
.
data
function
DropdownPanel
(
_name
,
_opts
)
{
if
(
!
_opts
)
{
_opts
=
{}
}
this
.
name
=
_name
this
.
json
=
_opts
.
json
if
(
this
.
json
)
{
this
.
treeView
=
new
TreeView
(
_opts
)
}
this
.
view
_raw
=
_raw
===
undefined
?
false
:
_raw
this
.
raw
=
_raw
}
DropdownPanel
.
prototype
.
update
=
function
(
_data
)
{
if
(
!
this
.
view
)
{
return
}
if
(
_data
)
{
this
.
data
=
_data
}
this
.
view
.
querySelector
(
'.dropdownpanel div.dropdowncontent'
).
innerHTML
=
''
if
(
!
this
.
raw
)
{
var
data
=
JSON
.
stringify
(
this
.
data
,
null
,
'
\
t'
)
if
(
!
this
.
data
||
data
===
'[]'
||
data
===
'{}'
)
{
this
.
data
=
[
'Empty'
]
}
var
div
=
document
.
createElement
(
'div'
)
if
(
Array
.
isArray
(
this
.
data
))
{
this
.
data
.
map
(
function
(
item
,
i
)
{
div
.
appendChild
(
yo
`<div>
${
item
}
</div>`
)
})
}
else
{
for
(
var
k
in
this
.
data
)
{
var
content
=
typeof
this
.
data
[
k
]
===
'string'
?
this
.
data
[
k
]
:
JSON
.
stringify
(
this
.
data
[
k
])
div
.
appendChild
(
yo
`<div><div title=
${
k
}
style=
${
ui
.
formatCss
(
basicStyles
.
truncate
,
{
display
:
'inline-block'
,
'width'
:
'10%'
})}
>
${
k
}
</div><div title=
${
content
}
style=
${
ui
.
formatCss
(
basicStyles
.
truncate
,
{
display
:
'inline-block'
,
'width'
:
'78%'
})}
>
${
content
}
</div></div>`
)
}
}
this
.
view
.
querySelector
(
'.dropdownpanel div.dropdowncontent'
).
appendChild
(
div
)
if
(
this
.
view
)
{
this
.
view
.
querySelector
(
'.dropdownpanel .dropdownrawcontent'
).
innerText
=
JSON
.
stringify
(
_data
,
null
,
'
\
t'
)
this
.
view
.
querySelector
(
'.dropdownpanel button.btn'
).
style
.
display
=
'block'
this
.
view
.
querySelector
(
'.dropdownpanel .dropdownrawcontent'
).
innerText
=
data
}
else
{
this
.
view
.
querySelector
(
'.dropdownpanel div.dropdowncontent'
).
appendChild
(
this
.
data
)
this
.
view
.
querySelector
(
'.dropdownpanel button.btn'
).
style
.
display
=
'none'
if
(
this
.
json
)
{
this
.
treeView
.
update
(
_data
)
}
}
}
DropdownPanel
.
prototype
.
setContent
=
function
(
node
)
{
var
parent
=
this
.
view
.
querySelector
(
'.dropdownpanel div.dropdowncontent'
)
parent
.
replaceChild
(
node
,
parent
.
firstElementChild
)
}
DropdownPanel
.
prototype
.
render
=
function
(
overridestyle
)
{
var
content
=
yo
`<div>Empty</div>`
if
(
this
.
json
)
{
content
=
this
.
treeView
.
render
({})
}
overridestyle
===
undefined
?
{}
:
overridestyle
var
self
=
this
var
view
=
yo
`<div>
...
...
@@ -55,7 +46,7 @@ DropdownPanel.prototype.render = function (overridestyle) {
<div class='dropdownpanel' style=
${
ui
.
formatCss
(
styleDropdown
.
content
)}
style='display:none'>
<button onclick=
${
function
()
{
self
.
toggleRaw
()
}
} style=
${
ui
.
formatCss
(
basicStyles
.
button
,
styleDropdown
.
copyBtn
)}
title='raw' class="btn fa fa-eye" type="button">
</button>
<div style=
${
ui
.
formatCss
(
styleDropdown
.
inner
,
overridestyle
)}
class='dropdowncontent'>
<div>Empty</div>
</div>
<div style=
${
ui
.
formatCss
(
styleDropdown
.
inner
,
overridestyle
)}
class='dropdowncontent'>
${
content
}
</div>
<div style=
${
ui
.
formatCss
(
styleDropdown
.
inner
,
overridestyle
)}
class='dropdownrawcontent' style='display:none'></div>
</div>
</div>`
...
...
src/ui/FullStoragesChanges.js
View file @
b36fe448
...
...
@@ -8,7 +8,7 @@ function FullStoragesChanges (_parent, _traceManager) {
this
.
addresses
=
[]
this
.
view
this
.
traceLength
this
.
basicPanel
=
new
DropdownPanel
(
'Full Storages Changes'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Full Storages Changes'
,
{
json
:
true
}
)
this
.
init
()
}
...
...
src/ui/MemoryPanel.js
View file @
b36fe448
...
...
@@ -6,7 +6,7 @@ var yo = require('yo-yo')
function
MemoryPanel
(
_parent
,
_traceManager
)
{
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Memory'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Memory'
,
{
json
:
true
}
)
this
.
init
()
}
...
...
src/ui/SolidityLocals.js
View file @
b36fe448
...
...
@@ -9,7 +9,7 @@ class SolidityLocals {
this
.
parent
=
_parent
this
.
internalTreeCall
=
internalTreeCall
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Solidity Locals'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Solidity Locals'
,
{
json
:
true
}
)
this
.
init
()
}
...
...
src/ui/SolidityState.js
View file @
b36fe448
...
...
@@ -8,7 +8,7 @@ function SolidityState (_parent, _traceManager, _codeManager, _solidityProxy) {
this
.
traceManager
=
_traceManager
this
.
codeManager
=
_codeManager
this
.
solidityProxy
=
_solidityProxy
this
.
basicPanel
=
new
DropdownPanel
(
'Solidity State'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Solidity State'
,
{
json
:
true
}
)
this
.
init
()
}
...
...
src/ui/StackPanel.js
View file @
b36fe448
...
...
@@ -6,7 +6,7 @@ var yo = require('yo-yo')
function
StackPanel
(
_parent
,
_traceManager
)
{
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Stack'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Stack'
,
{
json
:
true
}
)
this
.
init
()
}
...
...
src/ui/StepDetail.js
View file @
b36fe448
...
...
@@ -6,7 +6,7 @@ function StepDetail (_parent, _traceManager) {
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Step detail'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Step detail'
,
{
json
:
true
}
)
this
.
detail
=
initDetail
()
this
.
view
...
...
src/ui/StoragePanel.js
View file @
b36fe448
...
...
@@ -5,7 +5,7 @@ var yo = require('yo-yo')
function
StoragePanel
(
_parent
,
_traceManager
,
_address
)
{
this
.
parent
=
_parent
this
.
traceManager
=
_traceManager
this
.
basicPanel
=
new
DropdownPanel
(
'Storage Changes'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Storage Changes'
,
{
json
:
true
}
)
this
.
address
=
_address
this
.
init
()
this
.
disabled
=
false
...
...
src/ui/TxBrowser.js
View file @
b36fe448
...
...
@@ -14,7 +14,7 @@ function TxBrowser (_parent) {
this
.
txNumber
this
.
view
this
.
displayConnectionSetting
=
true
this
.
basicPanel
=
new
DropdownPanel
(
'Transaction'
)
this
.
basicPanel
=
new
DropdownPanel
(
'Transaction'
,
{
json
:
true
}
)
this
.
basicPanel
.
data
=
{}
var
self
=
this
_parent
.
event
.
register
(
'providerChanged'
,
this
,
function
(
provider
)
{
...
...
src/ui/VmDebugger.js
View file @
b36fe448
...
...
@@ -24,7 +24,7 @@ function VmDebugger (_parent, _traceManager, _codeManager, _solidityProxy, _call
this
.
solidityLocals
=
new
SolidityLocals
(
_parent
,
_traceManager
,
_callTree
)
/* Return values - */
this
.
returnValuesPanel
=
new
DropdownPanel
(
'Return Value'
)
this
.
returnValuesPanel
=
new
DropdownPanel
(
'Return Value'
,
{
json
:
true
}
)
this
.
returnValuesPanel
.
data
=
{}
_parent
.
event
.
register
(
'indexChanged'
,
this
.
returnValuesPanel
,
function
(
index
)
{
var
self
=
this
...
...
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