Revisiting log status info in header with better styes
Change-Id: I0b2ee399243f0bc3e5ed44bc578a0d153486ed55
Signed-off-by: Iftekharul Islam <iffy.ryan@ibm.com>
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index bec96b1..67a0641 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -369,14 +369,18 @@
var data = [];
var severityCode = '';
var priority = '';
+ var health = '';
var relatedItems = [];
for(var key in content.data){
if(content.data.hasOwnProperty(key) && content.data[key].hasOwnProperty('Id')){
var severityFlags = {low: false, medium: false, high: false};
+ var healthFlags = {critical: false, warning: false, good: false};
severityCode = content.data[key].Severity.split(".").pop();
priority = Constants.SEVERITY_TO_PRIORITY_MAP[severityCode];
severityFlags[priority.toLowerCase()] = true;
+ health = Constants.SEVERITY_TO_HEALTH_MAP[severityCode];
+ healthFlags[health.toLowerCase()] = true;
relatedItems = [];
content.data[key].associations.forEach(function(item){
relatedItems.push(item[2]);
@@ -388,6 +392,7 @@
priority: priority,
severity_code: severityCode,
severity_flags: severityFlags,
+ health_flags: healthFlags,
additional_data: content.data[key].AdditionalData.join("\n"),
selected: false,
search_text: ("#" + content.data[key].Id + " " + severityCode + " " + content.data[key].Severity + " " + content.data[key].AdditionalData.join(" ")).toLowerCase(),
@@ -427,11 +432,12 @@
function getScaledValue(value, scale){
scale = scale + "";
- var power = parseInt(scale.replace(/[\s\t\+\-]/g,''),10);
+ scale = parseInt(scale, 10);
+ var power = Math.abs(parseInt(scale,10));
- if(scale.indexOf("+") > -1){
+ if(scale > 0){
value = value * Math.pow(10, power);
- }else if(scale.indexOf("-") > -1){
+ }else if(scale < 0){
value = value / Math.pow(10, power);
}
return value;
diff --git a/app/common/services/userModel.js b/app/common/services/userModel.js
index dba607d..747b288 100644
--- a/app/common/services/userModel.js
+++ b/app/common/services/userModel.js
@@ -41,6 +41,8 @@
response.status == APIUtils.API_RESPONSE.SUCCESS_STATUS){
sessionStorage.removeItem('LOGIN_ID');
callback(true);
+ }else if(response.status == APIUtils.API_RESPONSE.ERROR_STATUS){
+ callback(false);
}else{
callback(false, error);
}
diff --git a/app/common/styles/base/icons.scss b/app/common/styles/base/icons.scss
index 43586b0..ab0446f 100644
--- a/app/common/styles/base/icons.scss
+++ b/app/common/styles/base/icons.scss
@@ -61,6 +61,7 @@
width: 16px;
height: 16px;
margin-right: .4em;
+ margin-left: .3em;
}
.icon__warning {
@@ -68,6 +69,11 @@
background-image: url(/assets/images/icon-warning.svg);
}
+.modal .icon__warning {
+ width: 30px;
+ height: 30px;
+}
+
.icon__critical {
@include status-icon;
background-image: url(/assets/images/icon-critical.svg);
diff --git a/app/common/styles/base/typography.scss b/app/common/styles/base/typography.scss
index c335557..3135e7a 100644
--- a/app/common/styles/base/typography.scss
+++ b/app/common/styles/base/typography.scss
@@ -26,7 +26,7 @@
font-size: 3rem;
font-weight: 500;
padding-top: .5rem;
- margin-bottom: .3em;
+ margin-bottom: .6em;
}
h2, .h2 {
diff --git a/app/common/styles/elements/modals.scss b/app/common/styles/elements/modals.scss
index 8c24e02..3ca3092 100644
--- a/app/common/styles/elements/modals.scss
+++ b/app/common/styles/elements/modals.scss
@@ -3,18 +3,18 @@
height:100%;
z-index:-1;
background-color:#000;
- opacity:0;
position:fixed;
top:0;
left:0;
margin:0;
padding:0;
- @include fastTransition-all;
+ opacity: 0;
}
.modal-overlay.active{
z-index:100;
opacity: .5;
+ display: block;
@include fastTransition-all;
}