summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2018-03-21 11:03:35 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-29 13:44:58 +0000
commite7f83970d3038211c9f4a4a288a3335f49c32a03 (patch)
tree06b595b4008af4983cd1e44c4256b60c9ffeeeee
parentf4d9bc487fa0386d0fb9dcf9131a5961d0f84b59 (diff)
downloadphosphor-webui-e7f83970d3038211c9f4a4a288a3335f49c32a03.tar.gz
phosphor-webui-e7f83970d3038211c9f4a4a288a3335f49c32a03.zip
Move from "Preserve settings" to "Confirm Activation"
The "Preserve settings" popup that showed when a user activated an image was not useful and did not do anything. Saving network settings prior to activation is not needed so moved to a "Confirm Activation" modal. This modal will eventually include an "activate BMC firmware and reboot" selection, openbmc/openbmc#3027, for now it only holds the one selection. The "Preserve settings" and now this "Confirm Activation" modal both appear on "server" and "BMC" images, this is a bug that is fixed in a later commit. Tested: Activated an image on a Witherspoon machine. Change-Id: I7176d5a314ea325e6e94606ef07b32786ede64e9 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r--app/common/directives/firmware-list.html2
-rw-r--r--app/common/directives/firmware-list.js4
-rw-r--r--app/configuration/controllers/firmware-controller.html27
-rw-r--r--app/configuration/controllers/firmware-controller.js12
4 files changed, 21 insertions, 24 deletions
diff --git a/app/common/directives/firmware-list.html b/app/common/directives/firmware-list.html
index 375b63c..3c2d826 100644
--- a/app/common/directives/firmware-list.html
+++ b/app/common/directives/firmware-list.html
@@ -57,7 +57,7 @@
</div>
<div class="table__cell firmware__action">
<span class="table__cell-label">Action:</span>
- <button class="firmware__action-link" ng-show="firmware.activationStatus == 'Ready'" ng-click="activate(firmware.imageId)">Activate</button>
+ <button class="firmware__action-link" ng-show="firmware.activationStatus == 'Ready'" ng-click="activate(firmware.imageId, firmware.Version)">Activate</button>
<button class="firmware__action-link" ng-show="firmware.activationStatus != 'Functional'" ng-click="delete(firmware.imageId, firmware.Version)">Delete</button>
</div>
</div>
diff --git a/app/common/directives/firmware-list.js b/app/common/directives/firmware-list.js
index 0404fe6..a4cc58f 100644
--- a/app/common/directives/firmware-list.js
+++ b/app/common/directives/firmware-list.js
@@ -15,8 +15,8 @@ window.angular && (function (angular) {
},
'controller': ['$rootScope', '$scope','dataService', '$location', '$timeout', function($rootScope, $scope, dataService, $location, $timeout){
$scope.dataService = dataService;
- $scope.activate = function(imageId){
- $scope.$parent.activateImage(imageId);
+ $scope.activate = function(imageId, imageVersion){
+ $scope.$parent.activateImage(imageId, imageVersion);
}
$scope.delete = function(imageId, imageVersion){
diff --git a/app/configuration/controllers/firmware-controller.html b/app/configuration/controllers/firmware-controller.html
index cb5fc37..2129e83 100644
--- a/app/configuration/controllers/firmware-controller.html
+++ b/app/configuration/controllers/firmware-controller.html
@@ -124,40 +124,35 @@
</div>
</div>
</section>
-<section class="modal" aria-hidden="true" aria-labelledby="modalTitle" aria-describedby="modalDescription" role="dialog" ng-class="{'active': preserve_settings_confirm}">
- <div class="modal__preserve-settings" role="document">
- <div class="screen-reader-offscreen modal-description">Preserve setting modal</div><!-- accessibility only; used for screen readers -->
+<section class="modal" aria-hidden="true" aria-labelledby="modalTitle" aria-describedby="modalDescription" role="dialog" ng-class="{'active': activate_confirm}">
+ <div class="modal__activate" role="document">
+ <div class="screen-reader-offscreen modal-description">Activate modal</div><!-- accessibility only; used for screen readers -->
<div class="page-header ">
<h1 class="modal-title h4"><span class="icon icon__info"><svg xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 32 32"><path
d="M18 14h-6v2h1v6h-2v2h8v-2h-2z"/><circle cx="16" cy="10" r="2"/><path
d="M16 2C8.269 2 2 8.269 2 16s6.269 14 14 14 14-6.269 14-14S23.731 2 16 2zm0 26C9.383 28 4 22.617 4 16S9.383 4 16 4s12 5.383 12 12-5.383 12-12 12z"/></svg></span>
- Preserve settings
+ Confirm BMC firmware file activation
</h1>
</div>
<div class="modal__content">
- <p>Booting to a different firmware image will reset the user settings for the BMC. Choose either the option to reset both the user and network settings or the option to preserve the network settings for the newly active firmware image.</p>
+ <p>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>
<form>
<fieldset>
<div class="row column">
- <label class="control-radio bold" for="preserve-settings">Preserve network settings
- <input type="radio" name="preserve-settings" id="preserve-settings" ng-checked="true" ng-model="dhcp" ng-value="true" ng-init="dhcp=true"/>
- <span class="control__indicator control__indicator-on"></span>
- </label>
- </div>
- <div class="row column">
- <label class="control-radio bold" for="reset-settings">Reset both user and network settings
- <input type="radio" name="reset-settings" id="reset-settings" ng-model="dhcp" ng-value="false"/>
+ <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"/>
<span class="control__indicator control__indicator-on"></span>
</label>
</div>
+ <!-- TODO: openbmc/openbmc#3027 Add Activate firmware and reboot selection -->
</fieldset>
</form>
</div>
<div class="modal__button-wrapper">
- <button class="inline btn-secondary" ng-click="preserve_settings_confirm=false;">Cancel</button>
- <button class="inline btn-primary" ng-click="preserveSettingsConfirmed()">Continue</button>
+ <button class="inline btn-secondary" ng-click="activate_confirm=false;">Cancel</button>
+ <button class="inline btn-primary" ng-click="activateConfirmed()">Continue</button>
</div>
</div>
</section>
-<div class="modal-overlay" tabindex="-1" ng-class="{'active': (display_error || reboot_confirm || preserve_settings_confirm)}"></div>
+<div class="modal-overlay" tabindex="-1" ng-class="{'active': (display_error || reboot_confirm || activate_confirm)}"></div>
diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js
index b686de8..4c706bf 100644
--- a/app/configuration/controllers/firmware-controller.js
+++ b/app/configuration/controllers/firmware-controller.js
@@ -34,10 +34,11 @@ window.angular && (function (angular) {
$scope.hostActiveVersion = "";
$scope.display_error = false;
$scope.reboot_confirm = false;
- $scope.preserve_settings_confirm = false;
+ $scope.activate_confirm = false;
$scope.delete_image_id = "";
$scope.delete_image_version = "";
$scope.activate_image_id = "";
+ $scope.activate_image_version = "";
$scope.priority_image_id = "";
$scope.priority_image_version = "";
$scope.priority_from = -1;
@@ -53,9 +54,10 @@ window.angular && (function (angular) {
type: "warning"
};
- $scope.activateImage = function(imageId){
+ $scope.activateImage = function(imageId, imageVersion){
$scope.activate_image_id = imageId;
- $scope.preserve_settings_confirm = true;
+ $scope.activate_image_version = imageVersion;
+ $scope.activate_confirm = true;
}
$scope.displayError = function(data){
@@ -63,7 +65,7 @@ window.angular && (function (angular) {
$scope.display_error = true;
}
- $scope.preserveSettingsConfirmed = function(){
+ $scope.activateConfirmed = function(){
$scope.uploading = true;
APIUtils.activateImage($scope.activate_image_id).then(function(response){
$scope.uploading = false;
@@ -78,7 +80,7 @@ window.angular && (function (angular) {
$scope.loadFirmwares();
}
});
- $scope.preserve_settings_confirm = false;
+ $scope.activate_confirm = false;
}
$scope.confirmWarmReboot = function(){
OpenPOWER on IntegriCloud