Skip to content

Commit

Permalink
Fix binding ready logic
Browse files Browse the repository at this point in the history
The binding ready logic was flipped in the service-binding component, so
the View Secret link was showing up at the wrong time.
  • Loading branch information
spadgett committed Sep 25, 2017
1 parent c1a0186 commit 88343c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/directives/_service-binding.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h3>
project-name="{{$ctrl.binding.metadata.namespace}}"
stay-on-current-page="true">
</delete-link>
<a ng-if="('secrets' | canI : 'get') && !($ctrl.binding | isBindingFailed) && !(binding | isBindingReady)"
<a ng-if="('secrets' | canI : 'get') && ($ctrl.binding | isBindingReady)"
ng-href="{{$ctrl.binding.spec.secretName | navigateResourceURL : 'Secret' : $ctrl.namespace}}">
View Secret
</a>
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -5636,7 +5636,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<div class=\"service-binding-actions\" ng-if=\"!ctrl.binding.metadata.deletionTimestamp\">\n" +
"<delete-link ng-if=\"({resource: 'serviceinstancecredentials', group: 'servicecatalog.k8s.io'} | canI : 'delete')\" kind=\"ServiceInstanceCredential\" group=\"servicecatalog.k8s.io\" type-display-name=\"binding\" resource-name=\"{{$ctrl.binding.metadata.name}}\" project-name=\"{{$ctrl.binding.metadata.namespace}}\" stay-on-current-page=\"true\">\n" +
"</delete-link>\n" +
"<a ng-if=\"('secrets' | canI : 'get') && !($ctrl.binding | isBindingFailed) && !(binding | isBindingReady)\" ng-href=\"{{$ctrl.binding.spec.secretName | navigateResourceURL : 'Secret' : $ctrl.namespace}}\">\n" +
"<a ng-if=\"('secrets' | canI : 'get') && ($ctrl.binding | isBindingReady)\" ng-href=\"{{$ctrl.binding.spec.secretName | navigateResourceURL : 'Secret' : $ctrl.namespace}}\">\n" +
"View Secret\n" +
"</a>\n" +
"</div>\n" +
Expand Down

0 comments on commit 88343c9

Please sign in to comment.