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>
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 @@
$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){