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
22106703
Unverified
Commit
22106703
authored
Mar 02, 2018
by
yann300
Committed by
GitHub
Mar 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #712 from ethereum/fixUxInterface
[Debugger] Fix ui
parents
5bc872ad
60c61cfb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
29 deletions
+41
-29
package.json
remix-debugger/package.json
+1
-0
DropdownPanel.js
remix-debugger/src/ui/DropdownPanel.js
+11
-15
SolidityTypeFormatter.js
remix-debugger/src/ui/SolidityTypeFormatter.js
+1
-1
TreeView.js
remix-debugger/src/ui/TreeView.js
+1
-1
vmdebugger.js
remix-debugger/test-browser/test/vmdebugger.js
+17
-5
style-guide.js
remix-lib/src/ui/style-guide.js
+2
-2
internalCallTree.js
remix-solidity/src/decoder/internalCallTree.js
+8
-5
No files found.
remix-debugger/package.json
View file @
22106703
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
"babelify"
:
"^7.3.0"
,
"babelify"
:
"^7.3.0"
,
"browserify"
:
"^13.0.1"
,
"browserify"
:
"^13.0.1"
,
"browserify-livereload"
:
"^1.0.10"
,
"browserify-livereload"
:
"^1.0.10"
,
"clipboard-copy"
:
"^1.2.0"
,
"csjs-inject"
:
"^1.0.1"
,
"csjs-inject"
:
"^1.0.1"
,
"ethereum-common"
:
"0.0.18"
,
"ethereum-common"
:
"0.0.18"
,
"ethereumjs-block"
:
"^1.2.2"
,
"ethereumjs-block"
:
"^1.2.2"
,
...
...
remix-debugger/src/ui/DropdownPanel.js
View file @
22106703
'use strict'
'use strict'
var
yo
=
require
(
'yo-yo'
)
var
yo
=
require
(
'yo-yo'
)
const
copy
=
require
(
'clipboard-copy'
)
var
remixLib
=
require
(
'remix-lib'
)
var
remixLib
=
require
(
'remix-lib'
)
var
TreeView
=
require
(
'./TreeView'
)
var
TreeView
=
require
(
'./TreeView'
)
var
EventManager
=
remixLib
.
EventManager
var
EventManager
=
remixLib
.
EventManager
...
@@ -11,7 +12,7 @@ var styles = styleGuide.chooser()
...
@@ -11,7 +12,7 @@ var styles = styleGuide.chooser()
var
css
=
csjs
`
var
css
=
csjs
`
.title {
.title {
margin-top: 10px;
margin-top: 10px;
${
styles
.
rightPanel
.
debuggerTab
.
dropdown_Debugger
}
${
styles
.
rightPanel
.
debuggerTab
.
dropdown_Debugger
}
;
display: flex;
display: flex;
align-items: center;
align-items: center;
}
}
...
@@ -23,15 +24,13 @@ var css = csjs`
...
@@ -23,15 +24,13 @@ var css = csjs`
margin-right: 5%;
margin-right: 5%;
}
}
.eyeButton {
.eyeButton {
${
styles
.
rightPanel
.
debuggerTab
.
button_Debugger
}
margin: 3px;
margin: 3px;
float: right;
}
}
.eyeButton:hover {
.eyeButton:hover {
color:
${
styles
.
rightPanel
.
debuggerTab
.
button_Debugger_icon_HoverColor
}
;
color:
${
styles
.
rightPanel
.
debuggerTab
.
button_Debugger_icon_HoverColor
}
;
}
}
.dropdownpanel {
.dropdownpanel {
${
styles
.
rightPanel
.
debuggerTab
.
dropdown_Debugger
}
${
styles
.
rightPanel
.
debuggerTab
.
dropdown_Debugger
}
;
width: 100%;
width: 100%;
}
}
.dropdownrawcontent {
.dropdownrawcontent {
...
@@ -94,7 +93,7 @@ DropdownPanel.prototype.update = function (_data, _header) {
...
@@ -94,7 +93,7 @@ DropdownPanel.prototype.update = function (_data, _header) {
this
.
view
.
querySelector
(
'.dropdownpanel .dropdowncontent'
).
style
.
display
=
'block'
this
.
view
.
querySelector
(
'.dropdownpanel .dropdowncontent'
).
style
.
display
=
'block'
this
.
view
.
querySelector
(
'.dropdownpanel .dropdowncontent'
).
style
.
color
=
styles
.
appProperties
.
mainText_Color
this
.
view
.
querySelector
(
'.dropdownpanel .dropdowncontent'
).
style
.
color
=
styles
.
appProperties
.
mainText_Color
this
.
view
.
querySelector
(
'.dropdownpanel .dropdownrawcontent'
).
innerText
=
JSON
.
stringify
(
_data
,
null
,
'
\
t'
)
this
.
view
.
querySelector
(
'.dropdownpanel .dropdownrawcontent'
).
innerText
=
JSON
.
stringify
(
_data
,
null
,
'
\
t'
)
this
.
view
.
querySelector
(
'.
dropdownpanel button
.btn'
).
style
.
display
=
'block'
this
.
view
.
querySelector
(
'.
title div
.btn'
).
style
.
display
=
'block'
this
.
view
.
querySelector
(
'.title span'
).
innerText
=
_header
||
' '
this
.
view
.
querySelector
(
'.title span'
).
innerText
=
_header
||
' '
this
.
message
(
''
)
this
.
message
(
''
)
if
(
this
.
json
)
{
if
(
this
.
json
)
{
...
@@ -130,13 +129,12 @@ DropdownPanel.prototype.render = function (overridestyle) {
...
@@ -130,13 +129,12 @@ DropdownPanel.prototype.render = function (overridestyle) {
to {transform:rotate(359deg);}
to {transform:rotate(359deg);}
}
}
</style>
</style>
<div class="
${
css
.
title
}
title" onclick=
${
function
()
{
self
.
toggle
()
}
}>
<div class="
${
css
.
title
}
title">
<div class="
${
css
.
icon
}
fa fa-caret-right"></div>
<div class="
${
css
.
icon
}
fa fa-caret-right" onclick=
${
function
()
{
self
.
toggle
()
}
} ></div>
<div class="
${
css
.
name
}
">
${
this
.
name
}
</div><span></span>
<div class="
${
css
.
name
}
" onclick=
${
function
()
{
self
.
toggle
()
}
} >
${
this
.
name
}
</div><span onclick=
${
function
()
{
self
.
toggle
()
}
} ></span>
<div onclick=
${
function
()
{
self
.
copyClipboard
()
}
} title='raw' class="
${
css
.
eyeButton
}
btn fa fa-clipboard"></div>
</div>
</div>
<div class='dropdownpanel' style='display:none'>
<div class='dropdownpanel' style='display:none'>
<button onclick=
${
function
()
{
self
.
toggleRaw
()
}
} title='raw' class="
${
css
.
eyeButton
}
btn fa fa-eye" type="button">
</button>
<i class="
${
css
.
refresh
}
fa fa-refresh" aria-hidden="true"></i>
<i class="
${
css
.
refresh
}
fa fa-refresh" aria-hidden="true"></i>
<div class='dropdowncontent'>
${
content
}
</div>
<div class='dropdowncontent'>
${
content
}
</div>
<div class='dropdownrawcontent' style='display:none'></div>
<div class='dropdownrawcontent' style='display:none'></div>
...
@@ -149,11 +147,9 @@ DropdownPanel.prototype.render = function (overridestyle) {
...
@@ -149,11 +147,9 @@ DropdownPanel.prototype.render = function (overridestyle) {
return
view
return
view
}
}
DropdownPanel
.
prototype
.
toggleRaw
=
function
()
{
DropdownPanel
.
prototype
.
copyClipboard
=
function
()
{
var
raw
=
this
.
view
.
querySelector
(
'.dropdownpanel .dropdownrawcontent'
)
var
content
=
this
.
view
.
querySelector
(
'.dropdownpanel .dropdownrawcontent'
)
var
formatted
=
this
.
view
.
querySelector
(
'.dropdownpanel .dropdowncontent'
)
if
(
content
)
copy
(
content
.
innerText
?
content
.
innerText
:
content
.
textContent
)
raw
.
style
.
display
=
raw
.
style
.
display
===
'none'
?
'block'
:
'none'
formatted
.
style
.
display
=
formatted
.
style
.
display
===
'none'
?
'block'
:
'none'
}
}
DropdownPanel
.
prototype
.
toggle
=
function
()
{
DropdownPanel
.
prototype
.
toggle
=
function
()
{
...
...
remix-debugger/src/ui/SolidityTypeFormatter.js
View file @
22106703
...
@@ -48,7 +48,7 @@ function extractData (item, parent, key) {
...
@@ -48,7 +48,7 @@ function extractData (item, parent, key) {
ret
.
isMapping
=
true
ret
.
isMapping
=
true
ret
.
self
=
item
.
type
ret
.
self
=
item
.
type
}
else
{
}
else
{
ret
.
children
=
[]
ret
.
children
=
null
ret
.
self
=
item
.
value
ret
.
self
=
item
.
value
ret
.
type
=
item
.
type
ret
.
type
=
item
.
type
}
}
...
...
remix-debugger/src/ui/TreeView.js
View file @
22106703
...
@@ -175,7 +175,7 @@ class TreeView {
...
@@ -175,7 +175,7 @@ class TreeView {
ret
.
isLeaf
=
false
ret
.
isLeaf
=
false
}
else
{
}
else
{
ret
.
self
=
item
ret
.
self
=
item
ret
.
children
=
[]
ret
.
children
=
null
ret
.
isNode
=
false
ret
.
isNode
=
false
ret
.
isLeaf
=
true
ret
.
isLeaf
=
true
}
}
...
...
remix-debugger/test-browser/test/vmdebugger.js
View file @
22106703
...
@@ -39,8 +39,14 @@ function loadTraceNotFound (browser) {
...
@@ -39,8 +39,14 @@ function loadTraceNotFound (browser) {
.
setValue
(
'#txinput'
,
'0x20ef65b8b186ca942zcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
.
setValue
(
'#txinput'
,
'0x20ef65b8b186ca942zcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
.
click
(
'#load'
)
.
click
(
'#load'
)
.
click
(
'#txinfo .title'
)
.
click
(
'#txinfo .title'
)
.
click
(
'#txinfo .dropdownpanel .btn'
)
.
execute
(
function
()
{
.
expect
.
element
(
'#txinfo .dropdownpanel .dropdownrawcontent'
).
text
.
to
.
contain
(
'<not found>'
)
return
document
.
querySelector
(
'#txinfo .dropdownpanel .dropdownrawcontent'
).
innerHTML
},
[],
function
(
result
)
{
console
.
log
(
result
.
value
)
if
(
result
.
value
.
indexOf
(
'not found'
)
===
-
1
)
{
browser
.
assert
.
fail
(
' txinput panel does not contain <not found> '
,
'info about error'
,
''
)
}
})
return
browser
return
browser
}
}
...
@@ -50,9 +56,15 @@ function loadTrace (browser) {
...
@@ -50,9 +56,15 @@ function loadTrace (browser) {
.
setValue
(
'#txinput'
,
'0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
.
setValue
(
'#txinput'
,
'0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
.
click
(
'#load'
)
.
click
(
'#load'
)
.
click
(
'#txinfo .title'
)
.
click
(
'#txinfo .title'
)
.
click
(
'#txinfo .dropdownpanel .btn'
)
.
execute
(
function
()
{
.
expect
.
element
(
'#txinfo .dropdownpanel .dropdownrawcontent'
).
text
.
to
.
contain
(
'0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
return
document
.
querySelector
(
'#txinfo .dropdownpanel .dropdownrawcontent'
).
innerHTML
browser
.
click
(
'#unload'
)
},
[],
function
(
result
)
{
console
.
log
(
result
.
value
)
if
(
result
.
value
.
indexOf
(
'0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51'
)
===
-
1
)
{
browser
.
assert
.
fail
(
' txinput panel does not contain 0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51 '
,
'info about error'
,
''
)
}
})
.
click
(
'#unload'
)
.
waitForElementNotVisible
(
'#vmdebugger'
,
1000
)
.
waitForElementNotVisible
(
'#vmdebugger'
,
1000
)
return
browser
return
browser
}
}
...
...
remix-lib/src/ui/style-guide.js
View file @
22106703
...
@@ -337,7 +337,7 @@ function styleGuide () {
...
@@ -337,7 +337,7 @@ function styleGuide () {
cursor : pointer;
cursor : pointer;
border-radius : 3px;
border-radius : 3px;
height : 25px;
height : 25px;
width :
250px
;
width :
100%
;
text-align : center;
text-align : center;
overflow : hidden;
overflow : hidden;
word-break : normal;
word-break : normal;
...
@@ -680,7 +680,7 @@ function styleGuide () {
...
@@ -680,7 +680,7 @@ function styleGuide () {
button_Debugger_icon_HoverColor
:
appProperties
.
icon_HoverColor
,
button_Debugger_icon_HoverColor
:
appProperties
.
icon_HoverColor
,
dropdown_Debugger
:
appProperties
.
uiElements
.
dropdown
({
dropdown_Debugger
:
appProperties
.
uiElements
.
dropdown
({
BackgroundColor
:
appProperties
.
dropdown_BackgroundColor
,
BackgroundColor
:
cssProperties
.
colors
.
veryLightGrey
,
BorderColor
:
appProperties
.
dropdown_BorderColor
,
BorderColor
:
appProperties
.
dropdown_BorderColor
,
Color
:
appProperties
.
dropdown_TextColor
Color
:
appProperties
.
dropdown_TextColor
}),
}),
...
...
remix-solidity/src/decoder/internalCallTree.js
View file @
22106703
...
@@ -271,11 +271,14 @@ function extractFunctionDefinitions (ast, astWalker) {
...
@@ -271,11 +271,14 @@ function extractFunctionDefinitions (ast, astWalker) {
function
addParams
(
parameterList
,
tree
,
scopeId
,
states
,
contractName
,
sourceLocation
,
stackLength
,
stackPosition
,
dir
)
{
function
addParams
(
parameterList
,
tree
,
scopeId
,
states
,
contractName
,
sourceLocation
,
stackLength
,
stackPosition
,
dir
)
{
for
(
var
inputParam
in
parameterList
.
children
)
{
for
(
var
inputParam
in
parameterList
.
children
)
{
var
param
=
parameterList
.
children
[
inputParam
]
var
param
=
parameterList
.
children
[
inputParam
]
tree
.
scopes
[
scopeId
].
locals
[
param
.
attributes
.
name
]
=
{
var
stackDepth
=
stackLength
+
(
dir
*
stackPosition
)
name
:
param
.
attributes
.
name
,
if
(
stackDepth
>=
0
)
{
type
:
decodeInfo
.
parseType
(
param
.
attributes
.
type
,
states
,
contractName
),
tree
.
scopes
[
scopeId
].
locals
[
param
.
attributes
.
name
]
=
{
stackDepth
:
stackLength
+
(
dir
*
stackPosition
),
name
:
param
.
attributes
.
name
,
sourceLocation
:
sourceLocation
type
:
decodeInfo
.
parseType
(
param
.
attributes
.
type
,
states
,
contractName
),
stackDepth
:
stackDepth
,
sourceLocation
:
sourceLocation
}
}
}
stackPosition
+=
dir
stackPosition
+=
dir
}
}
...
...
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