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
2b6206e1
Commit
2b6206e1
authored
Jan 11, 2019
by
Iuri Matias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor analysis tab
parent
70cc7550
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
19 deletions
+17
-19
app.js
src/app.js
+1
-1
analysis-tab.js
src/app/tabs/analysis-tab.js
+16
-18
No files found.
src/app.js
View file @
2b6206e1
...
@@ -436,7 +436,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
...
@@ -436,7 +436,7 @@ Please make a backup of your contracts and start using http://remix.ethereum.org
registry
.
get
(
'compilersartefacts'
).
api
registry
.
get
(
'compilersartefacts'
).
api
),
),
settings
:
new
SettingsTab
(
self
.
_components
.
registry
),
settings
:
new
SettingsTab
(
self
.
_components
.
registry
),
analysis
:
new
AnalysisTab
(
self
.
_components
.
registry
),
analysis
:
new
AnalysisTab
(
registry
),
debug
:
new
DebuggerTab
(
self
.
_components
.
registry
),
debug
:
new
DebuggerTab
(
self
.
_components
.
registry
),
support
:
new
SupportTab
(
self
.
_components
.
registry
),
support
:
new
SupportTab
(
self
.
_components
.
registry
),
test
:
new
TestTab
(
self
.
_components
.
registry
,
compileTab
)
test
:
new
TestTab
(
self
.
_components
.
registry
,
compileTab
)
...
...
src/app/tabs/analysis-tab.js
View file @
2b6206e1
...
@@ -2,35 +2,31 @@ var yo = require('yo-yo')
...
@@ -2,35 +2,31 @@ var yo = require('yo-yo')
var
csjs
=
require
(
'csjs-inject'
)
var
csjs
=
require
(
'csjs-inject'
)
var
StaticAnalysis
=
require
(
'../staticanalysis/staticAnalysisView'
)
var
StaticAnalysis
=
require
(
'../staticanalysis/staticAnalysisView'
)
var
globalRegistry
=
require
(
'../../global/registry'
)
var
EventManager
=
require
(
'../../lib/events'
)
var
EventManager
=
require
(
'../../lib/events'
)
module
.
exports
=
class
AnalysisTab
{
class
AnalysisTab
{
constructor
(
localRegistry
)
{
const
self
=
this
constructor
(
registry
)
{
self
.
event
=
new
EventManager
()
this
.
event
=
new
EventManager
()
self
.
_view
=
{
el
:
null
}
this
.
registry
=
registry
self
.
data
=
{}
self
.
_components
=
{}
self
.
_components
.
registry
=
localRegistry
||
globalRegistry
self
.
_deps
=
{}
}
}
render
()
{
render
()
{
const
self
=
this
var
staticanalysis
=
new
StaticAnalysis
()
var
staticanalysis
=
new
StaticAnalysis
()
staticanalysis
.
event
.
register
(
'staticAnaysisWarning'
,
(
count
)
=>
{
staticanalysis
.
event
.
register
(
'staticAnaysisWarning'
,
(
count
)
=>
{
if
(
count
>
0
)
{
if
(
count
<=
0
)
return
const
msg
=
`Static Analysis raised
${
count
}
warning(s) that requires your attention. Check Solidity Static Analysis Module for more information.`
const
msg
=
`Static Analysis raised
${
count
}
warning(s) that requires your attention. Check Solidity Static Analysis Module for more information.`
const
settings
=
{
type
:
'staticAnalysisWarning'
,
useSpan
:
true
}
const
settings
=
{
type
:
'staticAnalysisWarning'
,
useSpan
:
true
}
self
.
event
.
trigger
(
'newStaticAnaysisWarningMessage'
,
[
msg
,
settings
])
this
.
event
.
trigger
(
'newStaticAnaysisWarningMessage'
,
[
msg
,
settings
])
}
})
})
self
.
_components
.
registry
.
put
({
api
:
staticanalysis
,
name
:
'staticanalysis'
})
if
(
self
.
_view
.
el
)
return
self
.
_view
.
el
this
.
registry
.
put
({
api
:
staticanalysis
,
name
:
'staticanalysis'
})
self
.
_view
.
el
=
yo
`
if
(
this
.
el
)
return
this
.
el
this
.
el
=
yo
`
<div class="
${
css
.
analysisTabView
}
"id="staticanalysisView">
${
staticanalysis
.
render
()}
</div>`
<div class="
${
css
.
analysisTabView
}
"id="staticanalysisView">
${
staticanalysis
.
render
()}
</div>`
return
self
.
_view
.
el
return
this
.
el
}
}
}
}
const
css
=
csjs
`
const
css
=
csjs
`
...
@@ -41,3 +37,5 @@ const css = csjs`
...
@@ -41,3 +37,5 @@ const css = csjs`
flex-direction: column;
flex-direction: column;
}
}
`
`
module
.
exports
=
AnalysisTab
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