diff --git a/app/scripts/controllers/overview.js b/app/scripts/controllers/overview.js index b248c5bc14..03f2b01ce1 100644 --- a/app/scripts/controllers/overview.js +++ b/app/scripts/controllers/overview.js @@ -1101,6 +1101,7 @@ function OverviewController($scope, // - API objects by binding name state.bindingsByApplicationUID = {}; state.applicationsByBinding = {}; + state.deleteableBindingsByApplicationUID = {}; // If there are no bindings, nothing to do. if (_.isEmpty(state.bindings)) { @@ -1139,6 +1140,7 @@ function OverviewController($scope, // pod preset covers the selector. var applicationSelector = new LabelSelector(_.get(apiObject, 'spec.selector')); state.bindingsByApplicationUID[applicationUID] = []; + state.deleteableBindingsByApplicationUID[applicationUID] = []; // Look at each pod preset selector to see if it covers this API object selector. _.each(podPresetSelectors, function(podPresetSelector, bindingName) { @@ -1147,6 +1149,9 @@ function OverviewController($scope, // the target. We want to show bindings both in the "application" // object rows and the service instance rows. state.bindingsByApplicationUID[applicationUID].push(state.bindings[bindingName]); + if (!_.get(state.bindings[bindingName], 'metadata.deletionTimestamp')) { + state.deleteableBindingsByApplicationUID[applicationUID].push(state.bindings[bindingName]); + } state.applicationsByBinding[bindingName] = state.applicationsByBinding[bindingName] || []; state.applicationsByBinding[bindingName].push(apiObject); } diff --git a/app/scripts/directives/overview/serviceInstanceRow.js b/app/scripts/directives/overview/serviceInstanceRow.js index 91577e6563..71d9f24f08 100644 --- a/app/scripts/directives/overview/serviceInstanceRow.js +++ b/app/scripts/directives/overview/serviceInstanceRow.js @@ -43,6 +43,12 @@ row.description = getDescription(); }; + row.$onChanges = function(changes) { + if (changes.bindings) { + row.deleteableBindings = _.reject(row.bindings, 'metadata.deletionTimestamp'); + } + }; + row.getSecretForBinding = function(binding) { return binding && _.get(row, ['state', 'secrets', binding.spec.secretName]); }; diff --git a/app/views/overview/_list-row-actions.html b/app/views/overview/_list-row-actions.html index 684c5dfdd1..e641698cd3 100644 --- a/app/views/overview/_list-row-actions.html +++ b/app/views/overview/_list-row-actions.html @@ -25,10 +25,10 @@ -