summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/configuration/controllers/firmware-controller.html11
-rw-r--r--app/configuration/controllers/firmware-controller.js12
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 @@
</div>
<div class="modal__content">
<div ng-switch on="activate_image_type">
- <p ng-switch-when="BMC">When you activate the BMC firmware file, {{activate_image_version}}, the BMC must be rebooted before it will operate with the new firmware code.</p>
+ <p ng-switch-when="BMC">When you activate the BMC firmware file, {{activate_image_version}}, the BMC must be rebooted before it will operate with the new firmware code. Note that when you reboot the BMC, the BMC will be unavailable for several minutes and you must log in again.</p>
<p ng-switch-when="Host">When you activate server firmware file, {{activate_image_version}}, the new firmware will not operate until the next time the server boots.</p>
</div>
<form ng-if="activate_image_type == 'BMC'">
<fieldset>
<div class="row column">
<label class="control-radio bold" for="activate-without-reboot">Activate firmware file without rebooting BMC
- <input type="radio" name="activate-without-reboot" id="activate-without-reboot" ng-checked="true" ng-model="dhcp" ng-value="true" ng-init="dhcp=true"/>
+ <input type="radio" name="activate-without-reboot" id="activate-without-reboot" ng-model="activate.reboot" ng-value="false"/>
+ <span class="control__indicator control__indicator-on"></span>
+ </label>
+ </div>
+ <div class="row column">
+ <label class="control-radio bold" for="activate-with-reboot">Activate firmware file and automatically reboot BMC
+ <input type="radio" name="activate-with-reboot" id="activate-with-reboot" ng-model="activate.reboot" ng-value="true"/>
<span class="control__indicator control__indicator-on"></span>
</label>
</div>
- <!-- TODO: openbmc/openbmc#3027 Add Activate firmware and reboot selection -->
</fieldset>
</form>
</div>
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;
OpenPOWER on IntegriCloud