diff options
| author | Jayashankar Padath <jayashankar.padath@in.ibm.com> | 2018-04-27 18:44:13 +0530 |
|---|---|---|
| committer | Gunnar Mills <gmills@us.ibm.com> | 2018-06-28 13:53:03 +0000 |
| commit | a4ec46799be5c1181210762df8ff0b3c00448780 (patch) | |
| tree | 37e12ea476c2ba05a5b88a2aecca380111bc8e43 /app/server-control | |
| parent | 119ae125f0afa4c65bf1305a313beed2d2a37433 (diff) | |
| download | phosphor-webui-a4ec46799be5c1181210762df8ff0b3c00448780.tar.gz phosphor-webui-a4ec46799be5c1181210762df8ff0b3c00448780.zip | |
Update the server power state dynamically in GUI
This uses websocket mechanism to retrieve the server power state and
update the same.
Resolves openbmc/openbmc#3102
Tested: Running GUI locally and verified the following scenarios:
- Power on operation from GUI and host command line
- Power off operation from host command line
- Warm reboot operation from GUI
- Cold reboot operation from GUI
- Immediate shutdown operation from GUI
- Orderly shutdown operation from GUI
In all of the above scenarios state change is notified to GUI at right time.
Change-Id: I1c97ae10419078dfe16a1d097082580c29827fb7
Signed-off-by: Jayashankar Padath <jayashankar.padath@in.ibm.com>
Diffstat (limited to 'app/server-control')
| -rw-r--r-- | app/server-control/controllers/power-operations-controller.js | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/app/server-control/controllers/power-operations-controller.js b/app/server-control/controllers/power-operations-controller.js index 4ae732f..f3955e6 100644 --- a/app/server-control/controllers/power-operations-controller.js +++ b/app/server-control/controllers/power-operations-controller.js @@ -68,16 +68,6 @@ window.angular && (function(angular) { $scope.power_confirm = true; }; - function setHostState(state) { - if (state == Constants.HOST_STATE_TEXT.off_code) { - dataService.setPowerOffState(); - } else if (state == Constants.HOST_STATE_TEXT.on_code) { - dataService.setPowerOnState(); - } else { - dataService.setErrorState(); - } - } - function pollChassisStatusTillOff() { var deferred = $q.defer(); pollChassisStatusTimer = $interval(function() { @@ -119,7 +109,6 @@ window.angular && (function(angular) { } APIUtils.getHostState() .then(function(state) { - setHostState(state); if (state === Constants.HOST_STATE_TEXT.on_code) { $interval.cancel(pollHostStatusTimer); pollHostStatusTimer = undefined; @@ -154,7 +143,6 @@ window.angular && (function(angular) { } APIUtils.getHostState() .then(function(state) { - setHostState(state); if (state === Constants.HOST_STATE_TEXT.off_code) { $interval.cancel(pollHostStatusTimer); pollHostStatusTimer = undefined; |

