summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2018-03-01 16:26:50 -0600
committerGunnar Mills <gmills@us.ibm.com>2018-03-05 11:49:46 -0600
commit607a120a7191c6a8122e747ebcc60c6eae890d85 (patch)
treea5646ccd916b14017470778fb08b41c23c348c1f
parent6473a41d6c377667993ee9b82485867c4d6fc21c (diff)
downloadphosphor-webui-607a120a7191c6a8122e747ebcc60c6eae890d85.tar.gz
phosphor-webui-607a120a7191c6a8122e747ebcc60c6eae890d85.zip
Display the version when confirming "Delete"
When confirming an image delete the GUI now displays "Delete firmware v2.0-165-ge571670?" Resolves openbmc/openbmc#2961 Tested: Confirmed text is correct and delete works Change-Id: Iad23908fbafc9514044be7770d269e723b35cb58 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.js4
3 files changed, 6 insertions, 4 deletions
diff --git a/app/common/directives/firmware-list.html b/app/common/directives/firmware-list.html
index ceec160..2afbf0a 100644
--- a/app/common/directives/firmware-list.html
+++ b/app/common/directives/firmware-list.html
@@ -58,7 +58,7 @@
<div class="table__cell">
<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 != 'Functional'" ng-click="delete(firmware.imageId)">Delete</button>
+ <button class="firmware__action-link" ng-show="firmware.activationStatus != 'Functional'" ng-click="delete(firmware.imageId, firmware.Version)">Delete</button>
</div>
</div>
</div>
diff --git a/app/common/directives/firmware-list.js b/app/common/directives/firmware-list.js
index 69a8bdd..0404fe6 100644
--- a/app/common/directives/firmware-list.js
+++ b/app/common/directives/firmware-list.js
@@ -19,8 +19,8 @@ window.angular && (function (angular) {
$scope.$parent.activateImage(imageId);
}
- $scope.delete = function(imageId){
- $scope.$parent.deleteImage(imageId);
+ $scope.delete = function(imageId, imageVersion){
+ $scope.$parent.deleteImage(imageId, imageVersion);
}
$scope.changePriority = function(imageId, imageVersion, from, to){
diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js
index 9416177..d46b6e4 100644
--- a/app/configuration/controllers/firmware-controller.js
+++ b/app/configuration/controllers/firmware-controller.js
@@ -36,6 +36,7 @@ window.angular && (function (angular) {
$scope.reboot_confirm = false;
$scope.preserve_settings_confirm = false;
$scope.delete_image_id = "";
+ $scope.delete_image_version = "";
$scope.activate_image_id = "";
$scope.priority_image_id = "";
$scope.priority_image_version = "";
@@ -167,8 +168,9 @@ window.angular && (function (angular) {
});
$scope.confirm_priority = false;
}
- $scope.deleteImage = function(imageId){
+ $scope.deleteImage = function(imageId, imageVersion){
$scope.delete_image_id = imageId;
+ $scope.delete_image_version = imageVersion;
$scope.confirm_delete = true;
}
$scope.confirmDeleteImage = function(){
OpenPOWER on IntegriCloud