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
46944c93
Commit
46944c93
authored
Sep 06, 2017
by
yann300
Committed by
GitHub
Sep 06, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #769 from ethereum/terminalFilter
add terminal menu bar with clear/filter/..
parents
a7e14ad1
3762100a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
19 deletions
+67
-19
txLogger.js
src/app/execution/txLogger.js
+15
-9
file-explorer.js
src/app/files/file-explorer.js
+0
-1
editor-panel.js
src/app/panels/editor-panel.js
+50
-7
terminal.js
src/app/panels/terminal.js
+0
-0
compiling.js
test-browser/tests/compiling.js
+2
-2
No files found.
src/app/execution/txLogger.js
View file @
46944c93
...
...
@@ -16,19 +16,25 @@ class TxLogger {
constructor
(
opts
=
{})
{
this
.
event
=
new
EventManager
()
this
.
opts
=
opts
opts
.
api
.
editorpanel
.
registerLogType
(
'knownTransaction'
,
(
data
)
=>
{
return
renderKnownTransaction
(
this
,
data
)
this
.
logKnownTX
=
opts
.
api
.
editorpanel
.
registerCommand
(
'knownTransaction'
,
(
args
,
cmds
,
append
)
=>
{
var
data
=
args
[
0
]
var
el
=
renderKnownTransaction
(
this
,
data
)
append
(
el
)
})
opts
.
api
.
editorpanel
.
registerLogType
(
'unknownTransaction'
,
(
data
)
=>
{
return
renderUnknownTransaction
(
this
,
data
)
this
.
logUnknownTX
=
opts
.
api
.
editorpanel
.
registerCommand
(
'unknownTransaction'
,
(
args
,
cmds
,
append
)
=>
{
var
data
=
args
[
0
]
var
el
=
renderUnknownTransaction
(
this
,
data
)
append
(
el
)
})
opts
.
api
.
editorpanel
.
registerLogType
(
'emptyBlock'
,
(
data
)
=>
{
return
renderEmptyBlock
(
this
,
data
)
this
.
logEmptyBlock
=
opts
.
api
.
editorpanel
.
registerCommand
(
'emptyBlock'
,
(
args
,
cmds
,
append
)
=>
{
var
data
=
args
[
0
]
var
el
=
renderEmptyBlock
(
this
,
data
)
append
(
el
)
})
opts
.
events
.
txListener
.
register
(
'newBlock'
,
(
block
)
=>
{
if
(
!
block
.
transactions
.
length
)
{
opts
.
api
.
editorpanel
.
log
({
type
:
'emptyBlock'
,
value
:
{
block
:
block
}
})
this
.
logEmptyBlock
({
block
:
block
})
}
})
...
...
@@ -43,12 +49,12 @@ function log (self, tx, api) {
if
(
resolvedTransaction
)
{
api
.
parseLogs
(
tx
,
resolvedTransaction
.
contractName
,
api
.
compiledContracts
(),
(
error
,
logs
)
=>
{
if
(
!
error
)
{
api
.
editorpanel
.
log
({
type
:
'knownTransaction'
,
value
:
{
tx
:
tx
,
resolvedData
:
resolvedTransaction
,
logs
:
logs
}
})
self
.
logKnownTX
({
tx
:
tx
,
resolvedData
:
resolvedTransaction
,
logs
:
logs
})
}
})
}
else
{
// contract unknown - just displaying raw tx.
api
.
editorpanel
.
log
({
type
:
'unknownTransaction'
,
value
:
{
tx
:
tx
}
})
self
.
logUnknownTX
({
tx
:
tx
})
}
}
...
...
src/app/files/file-explorer.js
View file @
46944c93
...
...
@@ -70,7 +70,6 @@ function fileExplorer (appAPI, files) {
}
})
var
self
=
this
var
fileEvents
=
files
.
event
var
treeView
=
new
Treeview
({
extractData
:
function
(
value
,
tree
,
key
)
{
...
...
src/app/panels/editor-panel.js
View file @
46944c93
...
...
@@ -157,7 +157,49 @@ class EditorPanel {
context
()
{
return
self
.
_api
.
context
()
}
}
},
banner
:
`
/******************************************************************************
...........................................
.....................:.....................
....................o:;....................
...................oo:;;...................
..................ooo:;;;..................
.................oooo:;;;;.................
................ooooo:;;;;;................
...............oooooo:;;;;;;...............
..............ooooooo:;;;;;;;..............
.............ooooooo;:';;;;;;;.............
............ooooo;;;;:'''';;;;;............
...........oo;;;;;;;;:'''''''';;...........
..........;;;;;;;;;;;:'''''''''''..........
..............;;;;;;;:'''''''..............
...........oo...;;;;;:'''''...;;...........
............oooo...;;:''...;;;;............
..............oooo...:...;;;;..............
...............oooooo:;;;;;;...............
................ooooo:;;;;;................
.................oooo:;;;;.................
..................ooo:;;;..................
...................oo:;;...................
....................o:;....................
.....................:.....................
...........................................
######## ######## ## ## #### ## ##
## ## ## ### ### ## ## ##
## ## ## #### #### ## ## ##
######## ###### ## ### ## ## ###
## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ##
## ## ######## ## ## #### ## ##
welcome to browser solidity
******************************************************************************/
`
})
}
self
.
_components
.
terminal
.
event
.
register
(
'resize'
,
delta
=>
self
.
_adjustLayout
(
'top'
,
delta
))
...
...
@@ -194,6 +236,11 @@ class EditorPanel {
var
self
=
this
self
.
_view
.
tabs
.
onmouseenter
()
}
log
(
data
=
{})
{
var
self
=
this
var
command
=
self
.
_components
.
terminal
.
commands
[
data
.
type
]
if
(
typeof
command
===
'function'
)
command
(
data
.
value
)
}
render
()
{
var
self
=
this
if
(
self
.
_view
.
el
)
return
self
.
_view
.
el
...
...
@@ -215,13 +262,9 @@ class EditorPanel {
self
.
_adjustLayout
(
'top'
,
self
.
data
.
_layout
.
top
.
offset
)
return
self
.
_view
.
el
}
registerLogType
(
typename
,
template
)
{
var
self
=
this
self
.
_components
.
terminal
.
registerType
(
typename
,
template
)
}
log
()
{
registerCommand
(
name
,
command
)
{
var
self
=
this
self
.
_components
.
terminal
.
_output
.
apply
(
self
.
_components
.
terminal
,
arguments
)
return
self
.
_components
.
terminal
.
registerCommand
(
name
,
command
)
}
_renderTabsbar
()
{
var
self
=
this
...
...
src/app/panels/terminal.js
View file @
46944c93
This diff is collapsed.
Click to expand it.
test-browser/tests/compiling.js
View file @
46944c93
...
...
@@ -32,8 +32,8 @@ function runTests (browser) {
.
click
(
'#runTabView div[class^="create"]'
)
.
waitForElementPresent
(
'.instance button[title="f - transact (not payable)"]'
)
.
click
(
'.instance button[title="f - transact (not payable)"]'
)
.
waitForElementPresent
(
'#editor-container div[class^="terminal"]
.knownTransaction
span[id="tx0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc"]'
)
.
assert
.
containsText
(
'#editor-container div[class^="terminal"]
.knownTransaction
span[id="tx0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc"]'
,
'(vm): from:0xca3...a733c, to:0x692...77b3a, browser/Untitled.sol:TestContract.f(), value:0 wei, data:0x261...21ff0, 0 logs, hash:0xa17...523bc,DetailsDebug'
)
.
waitForElementPresent
(
'#editor-container div[class^="terminal"] span[id="tx0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc"]'
)
.
assert
.
containsText
(
'#editor-container div[class^="terminal"] span[id="tx0xa178c603400a184ce5fedbcfab392d9b77822f6ffa7facdec693aded214523bc"]'
,
'(vm): from:0xca3...a733c, to:0x692...77b3a, browser/Untitled.sol:TestContract.f(), value:0 wei, data:0x261...21ff0, 0 logs, hash:0xa17...523bc,DetailsDebug'
)
.
end
()
/*
@TODO: need to check now the return value of the function
...
...
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