Add fixes for cold reboot
This fixes the cold reboot issue with the following steps
- It applies the command to shut off the chassis.
- Then verify the chassis is off. It checks for every 5 seconds.
During this time the spinner displays. A 5min timeout has been
added.
- Once the chassis is off, it turns on the host.
fixes openbmc/openbmc#2795
Change-Id: I119a1c95e57c10ccee27be1512a1fc38cde307fa
Signed-off-by: Iftekharul Islam <iffy.ryan@ibm.com>
Signed-off-by: CamVan Nguyen <ctnguyen@us.ibm.com>
diff --git a/app/common/services/dataService.js b/app/common/services/dataService.js
index 201e79c..d84821a 100644
--- a/app/common/services/dataService.js
+++ b/app/common/services/dataService.js
@@ -33,6 +33,10 @@
this.hostname = "";
this.mac_address = "";
this.remote_window_active = false;
+
+ this.displayErrorModal = false;
+ this.errorModalDetails = {};
+
this.ignoreHttpError = false;
this.getServerId = function(){
return this.host.replace(/^https?\:\/\//ig,"");
@@ -121,6 +125,25 @@
this.server_health = Constants.SERVER_HEALTH.good;
}
+
+ this.activateErrorModal = function(data){
+ if(data && data.hasOwnProperty('title')){
+ this.errorModalDetails.title = data.title;
+ }else{
+ this.errorModalDetails.title = Constants.MESSAGES.ERROR_MODAL.TITLE;
+ }
+
+ if(data && data.hasOwnProperty('description')){
+ this.errorModalDetails.description = data.description;
+ }else{
+ this.errorModalDetails.description = Constants.MESSAGES.ERROR_MODAL.DESCRIPTION;
+ }
+ this.displayErrorModal = true;
+ }
+
+ this.deactivateErrorModal = function(){
+ this.displayErrorModal = false;
+ }
}]);
})(window.angular);