From 6d9ef5ac6c345930c5695634118fc783ab4717ef Mon Sep 17 00:00:00 2001 From: Gunnar Mills Date: Mon, 26 Mar 2018 15:34:31 -0500 Subject: Add Activate firmware and reboot button Added a radio button to activate firmware and reboot the BMC. If the "Activate firmware and reboot" option is selected, reboot the BMC after activating the firmware. The user is then logged out. Resolves openbmc/openbmc#3027 Tested: When "Activate firmware and reboot" option is selected, the BMC reboots after activating. When it is not selected, the BMC image just activates. Change-Id: I07293dc8a6ddfac4cf58ba2c1d1352c9afd6fa8d Signed-off-by: Gunnar Mills --- app/configuration/controllers/firmware-controller.html | 11 ++++++++--- app/configuration/controllers/firmware-controller.js | 12 ++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/app/configuration/controllers/firmware-controller.html b/app/configuration/controllers/firmware-controller.html index 92a0083..dc85606 100644 --- a/app/configuration/controllers/firmware-controller.html +++ b/app/configuration/controllers/firmware-controller.html @@ -116,18 +116,23 @@ diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js index 8fe0e83..127a7c2 100644 --- a/app/configuration/controllers/firmware-controller.js +++ b/app/configuration/controllers/firmware-controller.js @@ -48,6 +48,7 @@ window.angular && (function (angular) { $scope.confirm_priority = false; $scope.file_empty = true; $scope.uploading = false; + $scope.activate = { reboot: true }; var pollActivationTimer = undefined; @@ -119,6 +120,17 @@ window.angular && (function (angular) { desc: JSON.stringify(error.data), type: 'Error' }); + }).then(function(state){ + if($scope.activate.reboot){ + APIUtils.bmcReboot(function(response){}, function(error){ + $scope.displayError({ + modal_title: 'Error during BMC reboot', + title: 'Error during BMC reboot', + desc: JSON.stringify(error.data), + type: 'Error' + }); + }); + } }); }); $scope.activate_confirm = false; -- cgit v1.2.1