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
875a4988
Commit
875a4988
authored
May 10, 2018
by
ninabreznik
Committed by
yann300
May 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing a recorder
parent
64383e17
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
run-tab.js
src/app/tabs/run-tab.js
+8
-7
universal-dapp-styles.js
src/universal-dapp-styles.js
+2
-1
No files found.
src/app/tabs/run-tab.js
View file @
875a4988
...
@@ -24,13 +24,14 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) {
...
@@ -24,13 +24,14 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) {
--------------------------- */
--------------------------- */
var
self
=
this
var
self
=
this
var
event
=
new
EventManager
()
var
event
=
new
EventManager
()
appEvents
.
eventManager
=
event
self
.
_view
=
{}
self
.
_view
=
{}
self
.
data
=
{
self
.
data
=
{
count
:
0
,
count
:
0
,
text
:
`All transactions (deployed contracts and function executions)
text
:
`All transactions (deployed contracts and function executions)
in this environment can be saved and replayed in
in this environment can be saved and replayed in
another environment. i.e. Transactions created in
another environment. i.e. Transactions created in
Javascript VM can be replayed in the
Ropsten network
.`
Javascript VM can be replayed in the
Injected Web3
.`
}
}
self
.
_view
.
recorderCount
=
yo
`<span>0</span>`
self
.
_view
.
recorderCount
=
yo
`<span>0</span>`
...
@@ -51,7 +52,7 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) {
...
@@ -51,7 +52,7 @@ function runTab (appAPI = {}, appEvents = {}, opts = {}) {
</div>`
</div>`
var
container
=
yo
`<div class="
${
css
.
runTabView
}
" id="runTabView" ></div>`
var
container
=
yo
`<div class="
${
css
.
runTabView
}
" id="runTabView" ></div>`
var
recorderInterface
=
makeRecorder
(
event
,
appAPI
,
appEvents
,
opts
,
self
)
var
recorderInterface
=
makeRecorder
(
appAPI
,
appEvents
,
opts
,
self
)
self
.
_view
.
collapsedView
=
yo
`
self
.
_view
.
collapsedView
=
yo
`
<div class=
${
css
.
recorderCollapsedView
}
>
<div class=
${
css
.
recorderCollapsedView
}
>
...
@@ -186,12 +187,12 @@ function updateAccountBalances (container, appAPI) {
...
@@ -186,12 +187,12 @@ function updateAccountBalances (container, appAPI) {
/* ------------------------------------------------
/* ------------------------------------------------
RECORDER
RECORDER
------------------------------------------------ */
------------------------------------------------ */
function
makeRecorder
(
events
,
appAPI
,
appEvents
,
opts
,
self
)
{
function
makeRecorder
(
appAPI
,
appEvents
,
opts
,
self
)
{
var
recorder
=
new
Recorder
(
opts
.
compiler
,
{
var
recorder
=
new
Recorder
(
opts
.
compiler
,
{
events
:
{
events
:
{
udapp
:
appEvents
.
udapp
,
udapp
:
appEvents
.
udapp
,
executioncontext
:
executionContext
.
event
,
executioncontext
:
executionContext
.
event
,
runtab
:
events
runtab
:
appEvents
.
eventManager
},
},
api
:
appAPI
api
:
appAPI
})
})
...
@@ -241,8 +242,8 @@ function makeRecorder (events, appAPI, appEvents, opts, self) {
...
@@ -241,8 +242,8 @@ function makeRecorder (events, appAPI, appEvents, opts, self) {
var
obj
=
JSON
.
parse
(
json
)
var
obj
=
JSON
.
parse
(
json
)
var
txArray
=
obj
.
transactions
||
[]
var
txArray
=
obj
.
transactions
||
[]
var
accounts
=
obj
.
accounts
||
[]
var
accounts
=
obj
.
accounts
||
[]
var
options
=
obj
.
options
var
options
=
obj
.
options
||
{}
var
abis
=
obj
.
abis
var
abis
=
obj
.
abis
||
{}
var
linkReferences
=
obj
.
linkReferences
||
{}
var
linkReferences
=
obj
.
linkReferences
||
{}
}
catch
(
e
)
{
}
catch
(
e
)
{
return
modalDialogCustom
.
alert
(
'Invalid Scenario File, please try again'
)
return
modalDialogCustom
.
alert
(
'Invalid Scenario File, please try again'
)
...
@@ -250,7 +251,7 @@ function makeRecorder (events, appAPI, appEvents, opts, self) {
...
@@ -250,7 +251,7 @@ function makeRecorder (events, appAPI, appEvents, opts, self) {
if
(
txArray
.
length
)
{
if
(
txArray
.
length
)
{
var
noInstancesText
=
self
.
_view
.
noInstancesText
var
noInstancesText
=
self
.
_view
.
noInstancesText
if
(
noInstancesText
.
parentNode
)
{
noInstancesText
.
parentNode
.
removeChild
(
noInstancesText
)
}
if
(
noInstancesText
.
parentNode
)
{
noInstancesText
.
parentNode
.
removeChild
(
noInstancesText
)
}
recorder
.
run
(
txArray
,
accounts
,
options
,
abis
,
linkReferences
,
(
abi
,
address
,
contractName
)
=>
{
recorder
.
run
(
txArray
,
accounts
,
options
,
abis
,
linkReferences
,
opts
.
udapp
,
(
abi
,
address
,
contractName
)
=>
{
self
.
_view
.
instanceContainer
.
appendChild
(
opts
.
udappUI
.
renderInstanceFromABI
(
abi
,
address
,
contractName
))
self
.
_view
.
instanceContainer
.
appendChild
(
opts
.
udappUI
.
renderInstanceFromABI
(
abi
,
address
,
contractName
))
})
})
}
}
...
...
src/universal-dapp-styles.js
View file @
875a4988
...
@@ -22,7 +22,7 @@ var css = csjs`
...
@@ -22,7 +22,7 @@ var css = csjs`
margin-bottom: 10px;
margin-bottom: 10px;
}
}
.noInstancesText {
.noInstancesText {
}
}
.titleLine {
.titleLine {
display: flex;
display: flex;
...
@@ -84,6 +84,7 @@ var css = csjs`
...
@@ -84,6 +84,7 @@ var css = csjs`
cursor: pointer;
cursor: pointer;
margin-left: 5px;
margin-left: 5px;
}
}
.udapp {}
.udappClose {
.udappClose {
display: flex;
display: flex;
justify-content: flex-end;
justify-content: flex-end;
...
...
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