Skip to content

Commit

Permalink
Merge pull request #2829 from benjaminapetersen/trello/api-groups/inc…
Browse files Browse the repository at this point in the history
…lude/list-row-empty-state

Automatic merge from submit-queue.

Update _list-row-empty-state.html include to use getPreferredVersion for canI check

....Almost done with the includes.

picks off one in `/overview/_list-row-content.html` as well.
  • Loading branch information
openshift-merge-robot authored Mar 6, 2018
2 parents 57086c9 + da6d7c6 commit 95d495c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions app/scripts/directives/overview/listRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
var isBinaryBuild = $filter('isBinaryBuild');
var enableTechPreviewFeature = $filter('enableTechPreviewFeature');

row.deploymentConfigsInstantiateVersion = APIService.getPreferredVersion('deploymentconfigs/instantiate');
row.replicationControllersVersion = APIService.getPreferredVersion('replicationcontrollers');
row.serviceBindingsVersion = APIService.getPreferredVersion('servicebindings');
row.deploymentConfigsVersion = APIService.getPreferredVersion('deploymentconfigs');
row.deploymentConfigsInstantiateVersion = APIService.getPreferredVersion('deploymentconfigs/instantiate');
Expand Down
2 changes: 1 addition & 1 deletion app/views/overview/_list-row-content.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h3>
</span>
</span>
<a ng-href="project/{{row.apiObject.metadata.namespace}}/browse/events">View Events</a>
<span ng-if="'replicationcontrollers' | canI : 'update'">
<span ng-if="row.replicationControllersVersion | canI : 'update'">
<span class="action-divider">|</span>
<a href="" ng-click="row.cancelDeployment()" role="button">Cancel</a>
</span>
Expand Down
2 changes: 1 addition & 1 deletion app/views/overview/_list-row-empty-state.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h2>No deployments.</h2>
</div>
</div>
<div ng-if="!row.pipelines.length">
<button ng-if="'deploymentconfigs/instantiate' | canI : 'create'"
<button ng-if="row.deploymentConfigsInstantiateVersion | canI : 'create'"
class="btn btn-primary"
ng-click="row.startDeployment()">
Start Deployment
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -14039,7 +14039,7 @@ controller: [ "$filter", "$uibModal", "APIService", "BuildsService", "CatalogSer
var l = this;
_.extend(l, i.ui);
var u = e("canI"), d = e("deploymentIsInProgress"), m = e("isBinaryBuild"), p = e("enableTechPreviewFeature");
l.serviceBindingsVersion = n.getPreferredVersion("servicebindings"), l.deploymentConfigsVersion = n.getPreferredVersion("deploymentconfigs"), l.deploymentConfigsInstantiateVersion = n.getPreferredVersion("deploymentconfigs/instantiate"), l.deploymentConfigsLogVersion = n.getPreferredVersion("deploymentconfigs/log"), l.podsVersion = n.getPreferredVersion("pods"), l.podsLogVersion = n.getPreferredVersion("pods/log");
l.deploymentConfigsInstantiateVersion = n.getPreferredVersion("deploymentconfigs/instantiate"), l.replicationControllersVersion = n.getPreferredVersion("replicationcontrollers"), l.serviceBindingsVersion = n.getPreferredVersion("servicebindings"), l.deploymentConfigsVersion = n.getPreferredVersion("deploymentconfigs"), l.deploymentConfigsInstantiateVersion = n.getPreferredVersion("deploymentconfigs/instantiate"), l.deploymentConfigsLogVersion = n.getPreferredVersion("deploymentconfigs/log"), l.podsVersion = n.getPreferredVersion("pods"), l.podsLogVersion = n.getPreferredVersion("pods/log");
var f = function(e) {
var t = _.get(e, "spec.triggers");
_.isEmpty(t) || (l.imageChangeTriggers = _.filter(t, function(e) {
Expand Down
4 changes: 2 additions & 2 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -12307,7 +12307,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</span>\n" +
"</span>\n" +
"<a ng-href=\"project/{{row.apiObject.metadata.namespace}}/browse/events\">View Events</a>\n" +
"<span ng-if=\"'replicationcontrollers' | canI : 'update'\">\n" +
"<span ng-if=\"row.replicationControllersVersion | canI : 'update'\">\n" +
"<span class=\"action-divider\">|</span>\n" +
"<a href=\"\" ng-click=\"row.cancelDeployment()\" role=\"button\">Cancel</a>\n" +
"</span>\n" +
Expand Down Expand Up @@ -12380,7 +12380,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"</div>\n" +
"<div ng-if=\"!row.pipelines.length\">\n" +
"<button ng-if=\"'deploymentconfigs/instantiate' | canI : 'create'\" class=\"btn btn-primary\" ng-click=\"row.startDeployment()\">\n" +
"<button ng-if=\"row.deploymentConfigsInstantiateVersion | canI : 'create'\" class=\"btn btn-primary\" ng-click=\"row.startDeployment()\">\n" +
"Start Deployment\n" +
"</button>\n" +
"</div>\n" +
Expand Down

0 comments on commit 95d495c

Please sign in to comment.