summaryrefslogtreecommitdiffstats
path: root/app/server-control
diff options
context:
space:
mode:
authorbeccabroek <rebecca.shaw@ibm.com>2018-07-24 15:36:33 -0500
committerGunnar Mills <gmills@us.ibm.com>2018-07-27 20:52:07 +0000
commitbfc99907f62e32427ddc3c4135239b56298cd865 (patch)
tree0df13ad2f48a0dda2ecd783eb138d7ea02a23e08 /app/server-control
parentc93b03c2dc30408e9b414aba006c3121aa6e245b (diff)
downloadphosphor-webui-bfc99907f62e32427ddc3c4135239b56298cd865.tar.gz
phosphor-webui-bfc99907f62e32427ddc3c4135239b56298cd865.zip
Add Last Reboot Time
Added last reboot date and time to Reboot BMC Page. Resolves openbmc/openbmc#2956 Tested: Rebooted and verified the date and time were correct. Change-Id: I81cf46f0ad7f4e910cd6645de9830d2952091770 Signed-off-by: beccabroek <rebecca.shaw@ibm.com>
Diffstat (limited to 'app/server-control')
-rw-r--r--app/server-control/controllers/bmc-reboot-controller.html8
-rw-r--r--app/server-control/controllers/bmc-reboot-controller.js8
2 files changed, 8 insertions, 8 deletions
diff --git a/app/server-control/controllers/bmc-reboot-controller.html b/app/server-control/controllers/bmc-reboot-controller.html
index 0d89a6c..afadc1f 100644
--- a/app/server-control/controllers/bmc-reboot-controller.html
+++ b/app/server-control/controllers/bmc-reboot-controller.html
@@ -2,19 +2,13 @@
<div class="row column">
<h1>Reboot BMC</h1>
</div>
-
-
- <!-- TODO: openbmc/openbmc#2956 display correct BMC last reboot time,
- need REST call.
-
<div class="row column">
<div class="page-header">
<p class="inline h4">Current BMC boot status</p>
<div class="float-right bmc-reboot__status-log inline">BMC last reboot at
- <span class="courier-bold">{{dataService.last_updated |date:'h:mm:ss on MMM dd yyyy'}}</span></div>
+ <span class="courier-bold">{{reboot_time | date:'medium'}}</span></div>
</div>
</div>
- -->
<div class="row column">
<div class="bmc-reboot-option" ng-class="{disabled: dataService.server_unreachable || dataService.loading, transitionAll: confirm}">
<p>When you reboot the BMC, your web browser loses contact with the BMC for several minutes. When the BMC is back online, you must log in again. If the Log In button is not available when the BMC is brought back online, close your web browser. Then, reopen the web browser and enter your BMC IP address.</p>
diff --git a/app/server-control/controllers/bmc-reboot-controller.js b/app/server-control/controllers/bmc-reboot-controller.js
index 06097b8..ea50bf3 100644
--- a/app/server-control/controllers/bmc-reboot-controller.js
+++ b/app/server-control/controllers/bmc-reboot-controller.js
@@ -14,6 +14,13 @@ window.angular && (function(angular) {
function($scope, $window, APIUtils, dataService) {
$scope.dataService = dataService;
$scope.confirm = false;
+ APIUtils.getLastRebootTime().then(
+ function(data) {
+ $scope.reboot_time = data.data;
+ },
+ function(error) {
+ console.log(JSON.stringify(error));
+ });
$scope.rebootConfirm = function() {
if ($scope.confirm) {
return;
@@ -30,5 +37,4 @@ window.angular && (function(angular) {
};
}
]);
-
})(angular);
OpenPOWER on IntegriCloud