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
722bbe73
Commit
722bbe73
authored
Jan 11, 2019
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trigger newScenario event and move out dependency
parent
236f26a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
run-tab.js
src/app/tabs/run-tab.js
+8
-1
recorder.js
src/app/tabs/runTab/recorder.js
+6
-7
No files found.
src/app/tabs/run-tab.js
View file @
722bbe73
...
@@ -93,7 +93,14 @@ function runTab (opts, localRegistry) {
...
@@ -93,7 +93,14 @@ function runTab (opts, localRegistry) {
executionContext
.
event
.
register
(
'contextChanged'
,
recorder
.
clearAll
.
bind
(
recorder
))
executionContext
.
event
.
register
(
'contextChanged'
,
recorder
.
clearAll
.
bind
(
recorder
))
self
.
event
.
register
(
'clearInstance'
,
recorder
.
clearAll
.
bind
(
recorder
))
self
.
event
.
register
(
'clearInstance'
,
recorder
.
clearAll
.
bind
(
recorder
))
var
recorderInterface
=
new
RecorderUI
(
recorder
,
self
)
var
recorderInterface
=
new
RecorderUI
(
recorder
,
self
.
_deps
.
logCallback
)
recorderInterface
.
event
.
register
(
'newScenario'
,
(
abi
,
address
,
contractName
)
=>
{
var
noInstancesText
=
this
.
_view
.
noInstancesText
if
(
noInstancesText
.
parentNode
)
{
noInstancesText
.
parentNode
.
removeChild
(
noInstancesText
)
}
this
.
_view
.
instanceContainer
.
appendChild
(
this
.
_deps
.
udappUI
.
renderInstanceFromABI
(
abi
,
address
,
contractName
))
})
recorderInterface
.
render
()
recorderInterface
.
render
()
self
.
_view
.
collapsedView
=
yo
`
self
.
_view
.
collapsedView
=
yo
`
...
...
src/app/tabs/runTab/recorder.js
View file @
722bbe73
var
yo
=
require
(
'yo-yo'
)
var
yo
=
require
(
'yo-yo'
)
var
remixLib
=
require
(
'remix-lib'
)
var
EventManager
=
remixLib
.
EventManager
var
csjs
=
require
(
'csjs-inject'
)
var
csjs
=
require
(
'csjs-inject'
)
var
css
=
require
(
'../styles/run-tab-styles'
)
var
css
=
require
(
'../styles/run-tab-styles'
)
...
@@ -8,10 +10,10 @@ var confirmDialog = require('../../execution/confirmDialog')
...
@@ -8,10 +10,10 @@ var confirmDialog = require('../../execution/confirmDialog')
class
RecorderUI
{
class
RecorderUI
{
constructor
(
recorder
,
parentSelf
)
{
constructor
(
recorder
,
logCallBack
)
{
this
.
recorder
=
recorder
this
.
recorder
=
recorder
this
.
parentSelf
=
parentSelf
this
.
logCallBack
=
logCallBack
this
.
logCallBack
=
this
.
parentSelf
.
_deps
.
logCallback
this
.
event
=
new
EventManager
()
}
}
render
()
{
render
()
{
...
@@ -67,10 +69,7 @@ class RecorderUI {
...
@@ -67,10 +69,7 @@ class RecorderUI {
return
modalDialogCustom
.
alert
(
error
)
return
modalDialogCustom
.
alert
(
error
)
}
}
var
noInstancesText
=
this
.
parentSelf
.
_view
.
noInstancesText
this
.
event
.
trigger
(
'newScenario'
,
[
abi
,
address
,
contractName
])
if
(
noInstancesText
.
parentNode
)
{
noInstancesText
.
parentNode
.
removeChild
(
noInstancesText
)
}
this
.
parentSelf
.
_view
.
instanceContainer
.
appendChild
(
this
.
parentSelf
.
_deps
.
udappUI
.
renderInstanceFromABI
(
abi
,
address
,
contractName
))
})
})
}
}
...
...
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