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>
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 @@
$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 @@
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 @@
$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 @@
$scope.loadFirmwares();
}
});
- $scope.preserve_settings_confirm = false;
+ $scope.activate_confirm = false;
}
$scope.confirmWarmReboot = function(){