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
35723866
Commit
35723866
authored
May 09, 2018
by
dominique934
Committed by
yann300
May 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adujusted static analysis warning notification appearance.
parent
e451d5d1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
staticAnalysisView.js
src/app/staticanalysis/staticAnalysisView.js
+1
-1
compile-tab.js
src/app/tabs/compile-tab.js
+2
-2
renderer.js
src/app/ui/renderer.js
+1
-1
renderer-styles.js
src/app/ui/styles/renderer-styles.js
+8
-0
No files found.
src/app/staticanalysis/staticAnalysisView.js
View file @
35723866
...
@@ -90,7 +90,7 @@ staticAnalysisView.prototype.run = function () {
...
@@ -90,7 +90,7 @@ staticAnalysisView.prototype.run = function () {
}
}
warningCount
++
warningCount
++
var
msg
=
yo
`<span>
${
location
}
${
item
.
warning
}
${
item
.
more
?
yo
`<span><br><a href="
${
item
.
more
}
" target="blank">more</a></span>`
:
yo
`<span></span>`
}
</span>`
var
msg
=
yo
`<span>
${
location
}
${
item
.
warning
}
${
item
.
more
?
yo
`<span><br><a href="
${
item
.
more
}
" target="blank">more</a></span>`
:
yo
`<span></span>`
}
</span>`
self
.
appAPI
.
renderWarning
(
msg
,
warningContainer
,
{
type
:
'
w
arning'
,
useSpan
:
true
})
self
.
appAPI
.
renderWarning
(
msg
,
warningContainer
,
{
type
:
'
staticAnalysisW
arning'
,
useSpan
:
true
})
})
})
})
})
if
(
warningContainer
.
html
()
===
''
)
{
if
(
warningContainer
.
html
()
===
''
)
{
...
...
src/app/tabs/compile-tab.js
View file @
35723866
...
@@ -124,8 +124,8 @@ module.exports = class CompileTab {
...
@@ -124,8 +124,8 @@ module.exports = class CompileTab {
})
})
self
.
_events
.
staticAnalysis
.
register
(
'staticAnaysisWarning'
,
(
count
)
=>
{
self
.
_events
.
staticAnalysis
.
register
(
'staticAnaysisWarning'
,
(
count
)
=>
{
if
(
count
)
{
if
(
count
)
{
const
msg
=
`Static Analysis raised
${
count
}
warning(s) that requires your attention.`
const
msg
=
`Static Analysis raised
${
count
}
warning(s) that requires your attention.
Click here to show the warning(s).
`
const
settings
=
{
type
:
'
warning'
,
click
:
()
=>
self
.
_api
.
switchTab
(
'staticanalysisView'
)
}
const
settings
=
{
type
:
'
staticAnalysisWarning'
,
click
:
()
=>
self
.
_api
.
switchTab
(
'staticanalysisView'
),
useSpan
:
true
}
self
.
_opts
.
renderer
.
error
(
msg
,
self
.
_view
.
errorContainer
,
settings
)
self
.
_opts
.
renderer
.
error
(
msg
,
self
.
_view
.
errorContainer
,
settings
)
}
}
})
})
...
...
src/app/ui/renderer.js
View file @
35723866
...
@@ -21,7 +21,7 @@ function Renderer (appAPI) {
...
@@ -21,7 +21,7 @@ function Renderer (appAPI) {
*
*
* @param {String or DOMElement} message
* @param {String or DOMElement} message
* @param {DOMElement} container
* @param {DOMElement} container
* @param {Object} options {useSpan, noAnnotations, click:(Function), type:(warning, error), errFile, errLine, errCol}
* @param {Object} options {useSpan, noAnnotations, click:(Function), type:(warning, error
, staticAnalysisWarning
), errFile, errLine, errCol}
*/
*/
Renderer
.
prototype
.
error
=
function
(
message
,
container
,
opt
)
{
Renderer
.
prototype
.
error
=
function
(
message
,
container
,
opt
)
{
if
(
!
message
)
return
if
(
!
message
)
return
...
...
src/app/ui/styles/renderer-styles.js
View file @
35723866
...
@@ -6,6 +6,7 @@ var styles = styleGuide.chooser()
...
@@ -6,6 +6,7 @@ var styles = styleGuide.chooser()
var
css
=
yo
`<style>
var
css
=
yo
`<style>
.sol.success,
.sol.success,
.sol.error,
.sol.error,
.sol.staticAnalysisWarning,
.sol.warning {
.sol.warning {
word-wrap: break-word;
word-wrap: break-word;
cursor: pointer;
cursor: pointer;
...
@@ -18,6 +19,7 @@ var css = yo`<style>
...
@@ -18,6 +19,7 @@ var css = yo`<style>
.sol.success pre,
.sol.success pre,
.sol.error pre,
.sol.error pre,
.sol.staticAnalysisWarning pre,
.sol.warning pre {
.sol.warning pre {
overflow-y: hidden;
overflow-y: hidden;
background-color: transparent;
background-color: transparent;
...
@@ -29,6 +31,7 @@ var css = yo`<style>
...
@@ -29,6 +31,7 @@ var css = yo`<style>
}
}
.sol.success .close,
.sol.success .close,
.sol.staticAnalysisWarning .close,
.sol.error .close,
.sol.error .close,
.sol.warning .close {
.sol.warning .close {
font-weight: bold;
font-weight: bold;
...
@@ -50,6 +53,11 @@ var css = yo`<style>
...
@@ -50,6 +53,11 @@ var css = yo`<style>
color:
${
styles
.
rightPanel
.
message_Warning_Color
}
;
color:
${
styles
.
rightPanel
.
message_Warning_Color
}
;
}
}
.sol.staticAnalysisWarning {
background-color:
${
styles
.
colors
.
lightViolet
}
;
color:
${
styles
.
colors
.
black
}
;
}
.sol.success {
.sol.success {
background-color:
${
styles
.
rightPanel
.
message_Success_BackgroundColor
}
;
background-color:
${
styles
.
rightPanel
.
message_Success_BackgroundColor
}
;
border: .2em dotted
${
styles
.
rightPanel
.
message_Success_BorderColor
}
;
border: .2em dotted
${
styles
.
rightPanel
.
message_Success_BorderColor
}
;
...
...
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