summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIftekharul Islam <iffy.ryan@ibm.com>2017-09-06 10:49:07 -0500
committerAdriana Kobylak <anoo@us.ibm.com>2017-10-09 14:49:06 -0500
commitec6bcd109c91acf108de15f17aef326ecef2f910 (patch)
treedb6722d1a0091bdee959c15c5d46e79043a5963f
parent6ca92edc6314920316ba08f4bc46ba6947c60d80 (diff)
downloadphosphor-webui-ec6bcd109c91acf108de15f17aef326ecef2f910.tar.gz
phosphor-webui-ec6bcd109c91acf108de15f17aef326ecef2f910.zip
Revisiting log status info in header with better styes
Change-Id: I0b2ee399243f0bc3e5ed44bc578a0d153486ed55 Signed-off-by: Iftekharul Islam <iffy.ryan@ibm.com>
-rw-r--r--app/common/services/api-utils.js12
-rw-r--r--app/common/services/userModel.js2
-rw-r--r--app/common/styles/base/icons.scss6
-rw-r--r--app/common/styles/base/typography.scss2
-rw-r--r--app/common/styles/elements/modals.scss4
-rw-r--r--app/configuration/controllers/firmware-controller.html4
-rw-r--r--app/configuration/styles/firmware.scss5
7 files changed, 24 insertions, 11 deletions
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 @@ window.angular && (function (angular) {
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 @@ window.angular && (function (angular) {
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 @@ window.angular && (function (angular) {
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 @@ window.angular && (function (angular) {
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 @@ h1, .h1 {
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;
}
diff --git a/app/configuration/controllers/firmware-controller.html b/app/configuration/controllers/firmware-controller.html
index a6d8fdd..c671d42 100644
--- a/app/configuration/controllers/firmware-controller.html
+++ b/app/configuration/controllers/firmware-controller.html
@@ -139,7 +139,7 @@
</h1>
</div>
<div class="modal__content">
- <p>Booting to a different firmware image will reset the user settings for the BMC. Choose either the option to reset both the user and network settings or the option to preserve the network settings for the newly active firmware image.</p>
+ <p>Booting to a different firmware image will reset the user settings for the BMC.Choose either the option to reset both the user and network settings or the option to preserve the network for the newly active firmware image..</p>
<form>
<fieldset>
<div class="row column">
@@ -149,7 +149,7 @@
</label>
</div>
<div class="row column">
- <label class="control-radio bold" for="reset-settings">Reset all user and network settings
+ <label class="control-radio bold" for="reset-settings">Reset both user and network settings
<input type="radio" name="reset-settings" id="reset-settings" ng-model="dhcp" ng-value="false"/>
<span class="control__indicator control__indicator-on"></span>
</label>
diff --git a/app/configuration/styles/firmware.scss b/app/configuration/styles/firmware.scss
index 94e0903..1c50dc0 100644
--- a/app/configuration/styles/firmware.scss
+++ b/app/configuration/styles/firmware.scss
@@ -3,7 +3,7 @@
}
.firmware__table {
- margin-top: 0;
+ margin-top: 2.5em;
margin-bottom: 2.5em;
.table__cell {
@@ -36,9 +36,8 @@
.table-header {
font-weight: 700;
- margin: 0;
p {
- margin-bottom: 0;
+ margin-bottom: 0em;
}
}
OpenPOWER on IntegriCloud