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
9cdbea29
Commit
9cdbea29
authored
Sep 24, 2020
by
ioedeveloper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collapse empty panels and display no data available message
parent
06e7e3f5
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
34 additions
and
24 deletions
+34
-24
calldata-panel.tsx
...mix-ui/debugger-ui/src/lib/vm-debugger/calldata-panel.tsx
+1
-1
callstack-panel.tsx
...ix-ui/debugger-ui/src/lib/vm-debugger/callstack-panel.tsx
+1
-1
dropdown-panel.tsx
...mix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx
+14
-4
full-storages-changes.tsx
...debugger-ui/src/lib/vm-debugger/full-storages-changes.tsx
+1
-1
function-panel.tsx
...mix-ui/debugger-ui/src/lib/vm-debugger/function-panel.tsx
+1
-1
memory-panel.tsx
...remix-ui/debugger-ui/src/lib/vm-debugger/memory-panel.tsx
+1
-1
solidity-locals.tsx
...ix-ui/debugger-ui/src/lib/vm-debugger/solidity-locals.tsx
+1
-1
solidity-state.tsx
...mix-ui/debugger-ui/src/lib/vm-debugger/solidity-state.tsx
+1
-1
stack-panel.tsx
.../remix-ui/debugger-ui/src/lib/vm-debugger/stack-panel.tsx
+1
-1
step-detail.tsx
.../remix-ui/debugger-ui/src/lib/vm-debugger/step-detail.tsx
+1
-1
storage-panel.tsx
...emix-ui/debugger-ui/src/lib/vm-debugger/storage-panel.tsx
+2
-2
vm-debugger-head.tsx
...x-ui/debugger-ui/src/lib/vm-debugger/vm-debugger-head.tsx
+3
-3
vm-debugger.tsx
.../remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger.tsx
+6
-6
No files found.
libs/remix-ui/debugger-ui/src/lib/vm-debugger/calldata-panel.tsx
View file @
9cdbea29
...
...
@@ -4,7 +4,7 @@ import DropdownPanel from './dropdown-panel'
export
const
CalldataPanel
=
({
calldata
})
=>
{
return
(
<
div
id=
'calldatapanel'
>
<
DropdownPanel
dropdownName=
'Call Data'
calldata=
{
calldata
}
/>
<
DropdownPanel
dropdownName=
'Call Data'
calldata=
{
calldata
||
{}
}
/>
</
div
>
)
}
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/callstack-panel.tsx
View file @
9cdbea29
...
...
@@ -4,7 +4,7 @@ import DropdownPanel from './dropdown-panel'
export
const
CallstackPanel
=
({
calldata
})
=>
{
return
(
<
div
id=
'callstackpanel'
>
<
DropdownPanel
dropdownName=
'Call Stack'
calldata=
{
calldata
}
/>
<
DropdownPanel
dropdownName=
'Call Stack'
calldata=
{
calldata
||
{}
}
/>
</
div
>
)
}
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/dropdown-panel.tsx
View file @
9cdbea29
...
...
@@ -12,10 +12,10 @@ export const DropdownPanel = (props: DropdownPanelProps) => {
const
data
=
useExtractData
(
calldata
,
extractFunc
)
const
[
state
,
setState
]
=
useState
({
header
:
''
,
toggleDropdown
:
tru
e
,
toggleDropdown
:
fals
e
,
message
:
{
innerText
:
''
,
display
:
'
none
'
innerText
:
'
No data available.
'
,
display
:
'
block
'
},
dropdownContent
:
{
innerText
:
''
,
...
...
@@ -83,6 +83,11 @@ export const DropdownPanel = (props: DropdownPanelProps) => {
}
const
update
=
function
(
calldata
)
{
let
isEmpty
=
!
calldata
?
true
:
false
if
(
calldata
&&
Array
.
isArray
(
calldata
)
&&
calldata
.
length
===
0
)
isEmpty
=
true
else
if
(
calldata
&&
Object
.
keys
(
calldata
).
length
===
0
&&
calldata
.
constructor
===
Object
)
isEmpty
=
true
setState
(
prevState
=>
{
return
{
...
prevState
,
...
...
@@ -91,7 +96,12 @@ export const DropdownPanel = (props: DropdownPanelProps) => {
display
:
'block'
},
copiableContent
:
JSON
.
stringify
(
calldata
,
null
,
'
\
t'
),
updating
:
false
message
:
{
innerText
:
isEmpty
?
'No data available'
:
''
,
display
:
isEmpty
?
'block'
:
'none'
},
updating
:
false
,
toggleDropdown
:
!
isEmpty
}
})
}
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/full-storages-changes.tsx
View file @
9cdbea29
...
...
@@ -4,7 +4,7 @@ import { DropdownPanel } from './dropdown-panel'
export
const
FullStoragesChanges
=
({
calldata
})
=>
{
return
(
<
div
id=
'fullstorageschangespanel'
>
<
DropdownPanel
dropdownName=
'Full Storages Changes'
calldata=
{
calldata
}
/>
<
DropdownPanel
dropdownName=
'Full Storages Changes'
calldata=
{
calldata
||
{}
}
/>
</
div
>
)
}
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/function-panel.tsx
View file @
9cdbea29
...
...
@@ -4,7 +4,7 @@ import DropdownPanel from './dropdown-panel'
export
const
FunctionPanel
=
({
calldata
})
=>
{
return
(
<
div
id=
"FunctionPanel"
>
<
DropdownPanel
dropdownName=
'Function Stack'
calldata=
{
calldata
}
/>
<
DropdownPanel
dropdownName=
'Function Stack'
calldata=
{
calldata
||
{}
}
/>
</
div
>
)
}
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/memory-panel.tsx
View file @
9cdbea29
...
...
@@ -3,7 +3,7 @@ import DropdownPanel from './dropdown-panel'
export
const
MemoryPanel
=
({
calldata
})
=>
{
return
(
<
DropdownPanel
dropdownName=
'Memory'
calldata=
{
calldata
}
/>
<
DropdownPanel
dropdownName=
'Memory'
calldata=
{
calldata
||
{}
}
/>
)
}
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-locals.tsx
View file @
9cdbea29
...
...
@@ -36,7 +36,7 @@ export const SolidityLocals = ({ calldata, message }) => {
return
(
<
div
id=
'soliditylocals'
data
-
id=
"solidityLocals"
>
<
DropdownPanel
dropdownName=
'Solidity Locals'
dropdownMessage=
{
message
}
calldata=
{
calldata
}
extractFunc=
{
extractData
}
formatSelfFunc=
{
formatSelf
}
/>
<
DropdownPanel
dropdownName=
'Solidity Locals'
calldata=
{
calldata
||
{}
}
extractFunc=
{
extractData
}
formatSelfFunc=
{
formatSelf
}
/>
</
div
>
)
}
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/solidity-state.tsx
View file @
9cdbea29
...
...
@@ -36,7 +36,7 @@ export const SolidityState = ({ calldata, message }) => {
return
(
<
div
id=
'soliditylocals'
data
-
id=
'solidityLocals'
>
{
<
DropdownPanel
dropdownName=
'Solidity State'
dropdownMessage=
{
message
}
calldata=
{
calldata
}
formatSelfFunc=
{
formatSelf
}
extractFunc=
{
extractData
}
/>
<
DropdownPanel
dropdownName=
'Solidity State'
calldata=
{
calldata
||
{}
}
formatSelfFunc=
{
formatSelf
}
extractFunc=
{
extractData
}
/>
}
</
div
>
)
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/stack-panel.tsx
View file @
9cdbea29
...
...
@@ -4,7 +4,7 @@ import DropdownPanel from './dropdown-panel'
export
const
StackPanel
=
({
calldata
})
=>
{
return
(
<
div
id=
"stackpanel"
>
<
DropdownPanel
dropdownName=
'Stack'
calldata=
{
calldata
}
/>
<
DropdownPanel
dropdownName=
'Stack'
calldata=
{
calldata
||
{}
}
/>
</
div
>
)
}
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/step-detail.tsx
View file @
9cdbea29
...
...
@@ -50,7 +50,7 @@ export const StepDetail = (props: StepDetailProps) => {
return
(
<
div
id=
'stepdetail'
data
-
id=
"stepdetail"
>
<
DropdownPanel
dropdownName=
'Step details'
calldata=
{
detail
}
/>
<
DropdownPanel
dropdownName=
'Step details'
calldata=
{
detail
||
{}
}
/>
</
div
>
)
}
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/storage-panel.tsx
View file @
9cdbea29
import
React
from
'react'
import
DropdownPanel
from
'./dropdown-panel'
export
const
StoragePanel
=
({
storage
,
header
})
=>
{
export
const
StoragePanel
=
({
calldata
,
header
})
=>
{
return
(
<
div
id=
'storagepanel'
>
<
DropdownPanel
dropdownName=
'Storage'
calldata=
{
storage
}
header=
{
header
}
/>
<
DropdownPanel
dropdownName=
'Storage'
calldata=
{
calldata
||
{}
}
header=
{
header
}
/>
</
div
>
)
}
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger-head.tsx
View file @
9cdbea29
...
...
@@ -89,9 +89,9 @@ export const VmDebuggerHead = ({ vmDebuggerLogic, ready }) => {
<
div
id=
"vmheadView"
className=
"mt-1 px-0"
>
<
div
className=
"d-flex flex-column"
>
<
div
className=
"w-100"
>
<
FunctionPanel
calldata=
{
functionPanel
||
{}
}
/>
<
SolidityLocals
calldata=
{
solidityLocals
.
calldata
||
{}
}
message=
{
solidityLocals
.
message
}
/>
<
SolidityState
calldata=
{
solidityState
.
calldata
||
{}
}
message=
{
solidityState
.
message
}
/>
<
FunctionPanel
calldata=
{
functionPanel
}
/>
<
SolidityLocals
calldata=
{
solidityLocals
.
calldata
}
message=
{
solidityLocals
.
message
}
/>
<
SolidityState
calldata=
{
solidityState
.
calldata
}
message=
{
solidityState
.
message
}
/>
</
div
>
<
div
className=
"w-100"
><
CodeListView
asm=
{
asm
}
/></
div
>
<
div
className=
"w-100"
><
StepDetail
stepDetail=
{
stepDetail
}
/></
div
>
...
...
libs/remix-ui/debugger-ui/src/lib/vm-debugger/vm-debugger.tsx
View file @
9cdbea29
...
...
@@ -52,13 +52,13 @@ export const VmDebugger = ({ vmDebuggerLogic, ready }) => {
return
(
<
div
id=
"vmdebugger"
className=
"px-2"
>
<
div
>
<
StackPanel
calldata=
{
stackPanel
||
{}
}
/>
<
MemoryPanel
calldata=
{
memoryPanel
||
{}
}
/>
<
StoragePanel
storage=
{
storagePanel
.
calldata
||
{}
}
header=
{
storagePanel
.
header
}
/>
<
CallstackPanel
calldata=
{
callStackPanel
||
{}
}
/>
<
CalldataPanel
calldata=
{
calldataPanel
||
{}
}
/>
<
StackPanel
calldata=
{
stackPanel
}
/>
<
MemoryPanel
calldata=
{
memoryPanel
}
/>
<
StoragePanel
calldata=
{
storagePanel
.
calldata
}
header=
{
storagePanel
.
header
}
/>
<
CallstackPanel
calldata=
{
callStackPanel
}
/>
<
CalldataPanel
calldata=
{
calldataPanel
}
/>
<
ReturnValuesPanel
dropdownName=
"Return Value"
calldata=
{
returnValuesPanel
||
{}
}
/>
<
FullStoragesChangesPanel
calldata=
{
fullStoragesChangesPanel
||
{}
}
/>
<
FullStoragesChangesPanel
calldata=
{
fullStoragesChangesPanel
}
/>
</
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