Skip to content

Commit e3e7ba7

Browse files
author
OpenShift Bot
authoredJul 12, 2017
Merge pull request #1839 from spadgett/apps-group-edit-yaml
Merged by openshift-bot
2 parents 8f90090 + 688fae4 commit e3e7ba7

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed
 

‎app/scripts/filters/canI.js

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ angular
1717
],
1818
'deployments': [
1919
{group: 'autoscaling', resource: 'horizontalpodautoscalers', verbs: ['create', 'update']},
20+
{group: 'apps', resource: 'deployments', verbs: ['update']},
2021
{group: 'extensions', resource: 'deployments', verbs: ['create', 'update']}
2122
],
2223
'deploymentConfigs': [

‎app/views/browse/deployment.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,13 @@ <h1 class="contains-actions">
4747
<li ng-if="{ group: 'extensions', resource: 'deployments' } | canI : 'update'">
4848
<a ng-href="{{healthCheckURL}}" role="button">Edit Health Checks</a>
4949
</li>
50-
<li ng-if="{ group: 'extensions', resource: 'deployments' } | canI : 'update'">
51-
<a ng-href="{{deployment | editYamlURL}}" role="button">Edit YAML</a>
50+
<!--
51+
Edit YAML of `apps` group so that the user can modify the latest API fields.
52+
This can be switched back to use the `editYamlURL` filter when we've migrated
53+
the rest of the web console to use the `apps` group for deployments.
54+
-->
55+
<li ng-if="{ group: 'apps', resource: 'deployments' } | canI : 'update'">
56+
<a ng-href="project/{{projectName}}/edit/yaml?kind=Deployment&group=apps&name={{deployment.metadata.name}}" role="button">Edit YAML</a>
5257
</li>
5358
<li class="divider" ng-if="{ group: 'extensions', resource: 'deployments' } | canI : 'update'"></li>
5459
<li ng-if="{ group: 'extensions', resource: 'deployments' } | canI : 'delete'">

‎dist/scripts/scripts.js

+4
Original file line numberDiff line numberDiff line change
@@ -14506,6 +14506,10 @@ group:"autoscaling",
1450614506
resource:"horizontalpodautoscalers",
1450714507
verbs:[ "create", "update" ]
1450814508
}, {
14509+
group:"apps",
14510+
resource:"deployments",
14511+
verbs:[ "update" ]
14512+
}, {
1450914513
group:"extensions",
1451014514
resource:"deployments",
1451114515
verbs:[ "create", "update" ]

‎dist/scripts/templates.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -2677,8 +2677,9 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
26772677
"<li ng-if=\"{ group: 'extensions', resource: 'deployments' } | canI : 'update'\">\n" +
26782678
"<a ng-href=\"{{healthCheckURL}}\" role=\"button\">Edit Health Checks</a>\n" +
26792679
"</li>\n" +
2680-
"<li ng-if=\"{ group: 'extensions', resource: 'deployments' } | canI : 'update'\">\n" +
2681-
"<a ng-href=\"{{deployment | editYamlURL}}\" role=\"button\">Edit YAML</a>\n" +
2680+
"\n" +
2681+
"<li ng-if=\"{ group: 'apps', resource: 'deployments' } | canI : 'update'\">\n" +
2682+
"<a ng-href=\"project/{{projectName}}/edit/yaml?kind=Deployment&group=apps&name={{deployment.metadata.name}}\" role=\"button\">Edit YAML</a>\n" +
26822683
"</li>\n" +
26832684
"<li class=\"divider\" ng-if=\"{ group: 'extensions', resource: 'deployments' } | canI : 'update'\"></li>\n" +
26842685
"<li ng-if=\"{ group: 'extensions', resource: 'deployments' } | canI : 'delete'\">\n" +

0 commit comments

Comments
 (0)
Please sign in to comment.