Remove delete plan button if it is not possible to delete a plan
MODIFY
manager/ui/war/plugins/api-manager/html/plan/plan_entity.include
manager/ui/war/plugins/api-manager/html/plan/plan_entity.include
<!-- Dropdown Cog -->
- <ul class="plan-menu pull-right"
- style="list-style-type: none; padding-left: 10px; padding-top: 6px;">
+ <ul class="plan-menu pull-right" style="list-style-type: none; padding-left: 10px; padding-top: 6px;" ng-hide="canNotDelete()">
<li class="dropdown">
<a href="#"
style="text-decoration: none;"

MODIFY
manager/ui/war/plugins/api-manager/ts/plan/plan.ts
manager/ui/war/plugins/api-manager/ts/plan/plan.ts
@@ -96,7 +96,11 @@ module Apiman {
// ----- Delete --------------------->>>>
// Add check for ability to delete, show/hide Delete option
- $scope.canDelete = function() {};
+ $scope.canNotDelete = function () {
+ return ($scope.version && $scope.version.status === 'Locked') || ($scope.versions && $scope.versions.some(function (planItem) {
+ return planItem.status === 'Locked';
+ }));
+ };
// Call delete, open modal
$scope.callDelete = function(size) {

Remove delete plan button if it is not possible to delete a plan (#750)