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
9196b042
Commit
9196b042
authored
Jan 11, 2019
by
Iuri Matias
Committed by
yann300
Jan 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor analysis tab
parent
fd927e66
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
analysis-tab.js
src/app/tabs/analysis-tab.js
+19
-18
No files found.
src/app/tabs/analysis-tab.js
View file @
9196b042
...
...
@@ -2,19 +2,15 @@ var yo = require('yo-yo')
var
csjs
=
require
(
'csjs-inject'
)
var
StaticAnalysis
=
require
(
'../staticanalysis/staticAnalysisView'
)
var
globalRegistry
=
require
(
'../../global/registry'
)
var
EventManager
=
require
(
'../../lib/events'
)
module
.
exports
=
class
AnalysisTab
{
constructor
(
localRegistry
)
{
const
self
=
this
self
.
event
=
new
EventManager
()
self
.
_view
=
{
el
:
null
}
self
.
data
=
{}
self
.
_components
=
{}
self
.
_components
.
registry
=
localRegistry
||
globalRegistry
self
.
_deps
=
{}
class
AnalysisTab
{
constructor
(
registry
)
{
this
.
event
=
new
EventManager
()
this
.
registry
=
registry
}
<<<<<<<
HEAD
profile
()
{
return
{
name
:
'solidity static analysis'
,
...
...
@@ -24,22 +20,25 @@ module.exports = class AnalysisTab {
description
:
' - '
}
}
=======
>>>>>>>
2
b6206e1
...
refactor
analysis
tab
render
()
{
const
self
=
this
var
staticanalysis
=
new
StaticAnalysis
()
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
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
self
.
_view
.
el
=
yo
`
this
.
registry
.
put
({
api
:
staticanalysis
,
name
:
'staticanalysis'
})
if
(
this
.
el
)
return
this
.
el
this
.
el
=
yo
`
<div class="
${
css
.
analysisTabView
}
"id="staticanalysisView">
${
staticanalysis
.
render
()}
</div>`
return
self
.
_view
.
el
return
this
.
el
}
}
const
css
=
csjs
`
...
...
@@ -50,3 +49,5 @@ const css = csjs`
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