Skip to content

Commit fd71f96

Browse files
Merge pull request #2351 from rhamilto/bz1505255
Automatic merge from submit-queue. Fix bug where blank space appears in dc config page Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1505255 exact case listed in the bz: ![localhost-9000-dev-console-project-bz1505255-browse-dc-database-tab configuration 3](https://user-images.githubusercontent.com/895728/31906613-8ad2a4d0-b7ff-11e7-9420-734eabe3116f.png) ![localhost-9000-dev-console-project-bz1505255-browse-dc-database-tab configuration 4](https://user-images.githubusercontent.com/895728/31906614-8ae58a6e-b7ff-11e7-98f1-b9461b2811b1.png) another dc for comparison ![localhost-9000-dev-console-project-myproject-browse-dc-django-psql-persistent-tab configuration 1](https://user-images.githubusercontent.com/895728/31906648-a26a00ac-b7ff-11e7-9399-e96d5c2ca775.png)
2 parents 6c32d53 + b200d7c commit fd71f96

File tree

2 files changed

+84
-95
lines changed

2 files changed

+84
-95
lines changed

app/views/browse/deployment-config.html

+51-58
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,39 @@ <h3>Volumes</h3>
247247
<span class="action-divider" aria-hidden="true">|</span>
248248
<a ng-href="project/{{project.metadata.name}}/add-config-volume?kind=DeploymentConfig&name={{deploymentConfig.metadata.name}}">Add Config Files</a>
249249
</p>
250+
<h3>Triggers</h3>
251+
<dl class="dl-horizontal left">
252+
<dt>Manual (CLI):
253+
<a href="{{'deployment-operations' | helpLink}}" target="_blank">
254+
<span class="learn-more-block">Learn More&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></span>
255+
</a>
256+
</dt>
257+
<dd>
258+
<copy-to-clipboard clipboard-text="'oc rollout latest dc/' + deploymentConfig.metadata.name + ' -n ' + project.metadata.name"></copy-to-clipboard>
259+
</dd>
260+
<div ng-repeat="trigger in deploymentConfig.spec.triggers">
261+
<span ng-switch="trigger.type">
262+
<span ng-switch-default>{{trigger.type}}</span>
263+
<span ng-switch-when="ImageChange" ng-if="trigger.imageChangeParams.from">
264+
<dt>New Image For:</dt>
265+
<dd>
266+
{{trigger.imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}
267+
<small ng-if="!trigger.imageChangeParams.automatic" class="text-muted">(disabled)</small>
268+
</dd>
269+
</span>
270+
<span ng-switch-when="ConfigChange">
271+
<dt>Change Of:</dt>
272+
<dd>Config</dd>
273+
</span>
274+
</span>
275+
</div>
276+
</dl>
277+
<!-- Service Bindings -->
278+
<resource-service-bindings
279+
project="project"
280+
project-context="projectContext"
281+
api-object="deploymentConfig">
282+
</resource-service-bindings>
250283
</div>
251284

252285
<!-- Autoscaling -->
@@ -277,68 +310,28 @@ <h3>Autoscaling</h3>
277310
<div ng-repeat="hpa in autoscalers">
278311
<hpa hpa="hpa" project="project" show-scale-target="false" alerts="alerts"></hpa>
279312
</div>
280-
</div>
281313

282-
<div class="col-lg-6" ng-if="deploymentConfig.spec.strategy.type !== 'Custom'">
283-
<h3>
284-
Hooks
285-
<span class="learn-more-inline">
286-
<a ng-href="{{'lifecycle_hooks' | helpLink}}" target="_blank">Learn More&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></a>
287-
</span>
288-
</h3>
289-
<div ng-if="strategyParams.pre">
290-
<lifecycle-hook deployment-config="deploymentConfig" type="pre"></lifecycle-hook>
291-
</div>
292-
<div ng-if="strategyParams.mid">
293-
<lifecycle-hook deployment-config="deploymentConfig" type="mid"></lifecycle-hook>
294-
</div>
295-
<div ng-if="strategyParams.post">
296-
<lifecycle-hook deployment-config="deploymentConfig" type="post"></lifecycle-hook>
297-
</div>
298-
<div ng-if="!strategyParams.pre && !strategyParams.mid && !strategyParams.post">
299-
none
300-
</div>
301-
</div>
302-
303-
<div class="col-lg-6">
304-
<h3>Triggers</h3>
305-
<dl class="dl-horizontal left">
306-
<dt>Manual (CLI):
307-
<a href="{{'deployment-operations' | helpLink}}" target="_blank">
308-
<span class="learn-more-block">Learn More&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></span>
309-
</a>
310-
</dt>
311-
<dd>
312-
<copy-to-clipboard clipboard-text="'oc rollout latest dc/' + deploymentConfig.metadata.name + ' -n ' + project.metadata.name"></copy-to-clipboard>
313-
</dd>
314-
<div ng-repeat="trigger in deploymentConfig.spec.triggers">
315-
<span ng-switch="trigger.type">
316-
<span ng-switch-default>{{trigger.type}}</span>
317-
<span ng-switch-when="ImageChange" ng-if="trigger.imageChangeParams.from">
318-
<dt>New Image For:</dt>
319-
<dd>
320-
{{trigger.imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}
321-
<small ng-if="!trigger.imageChangeParams.automatic" class="text-muted">(disabled)</small>
322-
</dd>
323-
</span>
324-
<span ng-switch-when="ConfigChange">
325-
<dt>Change Of:</dt>
326-
<dd>Config</dd>
327-
</span>
314+
<div ng-if="deploymentConfig.spec.strategy.type !== 'Custom'">
315+
<h3>
316+
Hooks
317+
<span class="learn-more-inline">
318+
<a ng-href="{{'lifecycle_hooks' | helpLink}}" target="_blank">Learn More&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></a>
328319
</span>
320+
</h3>
321+
<div ng-if="strategyParams.pre">
322+
<lifecycle-hook deployment-config="deploymentConfig" type="pre"></lifecycle-hook>
329323
</div>
330-
</dl>
331-
</div>
332-
333-
<!-- Service Bindings -->
334-
<div class="col-lg-6">
335-
<resource-service-bindings
336-
project="project"
337-
project-context="projectContext"
338-
api-object="deploymentConfig">
339-
</resource-service-bindings>
324+
<div ng-if="strategyParams.mid">
325+
<lifecycle-hook deployment-config="deploymentConfig" type="mid"></lifecycle-hook>
326+
</div>
327+
<div ng-if="strategyParams.post">
328+
<lifecycle-hook deployment-config="deploymentConfig" type="post"></lifecycle-hook>
329+
</div>
330+
<p ng-if="!strategyParams.pre && !strategyParams.mid && !strategyParams.post">
331+
none
332+
</p>
333+
</div>
340334
</div>
341-
342335
</div>
343336
<annotations annotations="deploymentConfig.metadata.annotations"></annotations>
344337
</div>

dist/scripts/templates.js

+33-37
Original file line numberDiff line numberDiff line change
@@ -2476,6 +2476,36 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
24762476
"<span class=\"action-divider\" aria-hidden=\"true\">|</span>\n" +
24772477
"<a ng-href=\"project/{{project.metadata.name}}/add-config-volume?kind=DeploymentConfig&name={{deploymentConfig.metadata.name}}\">Add Config Files</a>\n" +
24782478
"</p>\n" +
2479+
"<h3>Triggers</h3>\n" +
2480+
"<dl class=\"dl-horizontal left\">\n" +
2481+
"<dt>Manual (CLI):\n" +
2482+
"<a href=\"{{'deployment-operations' | helpLink}}\" target=\"_blank\">\n" +
2483+
"<span class=\"learn-more-block\">Learn More&nbsp;<i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></span>\n" +
2484+
"</a>\n" +
2485+
"</dt>\n" +
2486+
"<dd>\n" +
2487+
"<copy-to-clipboard clipboard-text=\"'oc rollout latest dc/' + deploymentConfig.metadata.name + ' -n ' + project.metadata.name\"></copy-to-clipboard>\n" +
2488+
"</dd>\n" +
2489+
"<div ng-repeat=\"trigger in deploymentConfig.spec.triggers\">\n" +
2490+
"<span ng-switch=\"trigger.type\">\n" +
2491+
"<span ng-switch-default>{{trigger.type}}</span>\n" +
2492+
"<span ng-switch-when=\"ImageChange\" ng-if=\"trigger.imageChangeParams.from\">\n" +
2493+
"<dt>New Image For:</dt>\n" +
2494+
"<dd>\n" +
2495+
"{{trigger.imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}\n" +
2496+
"<small ng-if=\"!trigger.imageChangeParams.automatic\" class=\"text-muted\">(disabled)</small>\n" +
2497+
"</dd>\n" +
2498+
"</span>\n" +
2499+
"<span ng-switch-when=\"ConfigChange\">\n" +
2500+
"<dt>Change Of:</dt>\n" +
2501+
"<dd>Config</dd>\n" +
2502+
"</span>\n" +
2503+
"</span>\n" +
2504+
"</div>\n" +
2505+
"</dl>\n" +
2506+
"\n" +
2507+
"<resource-service-bindings project=\"project\" project-context=\"projectContext\" api-object=\"deploymentConfig\">\n" +
2508+
"</resource-service-bindings>\n" +
24792509
"</div>\n" +
24802510
"\n" +
24812511
"<div class=\"col-lg-6\">\n" +
@@ -2498,8 +2528,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
24982528
"<div ng-repeat=\"hpa in autoscalers\">\n" +
24992529
"<hpa hpa=\"hpa\" project=\"project\" show-scale-target=\"false\" alerts=\"alerts\"></hpa>\n" +
25002530
"</div>\n" +
2501-
"</div>\n" +
2502-
"<div class=\"col-lg-6\" ng-if=\"deploymentConfig.spec.strategy.type !== 'Custom'\">\n" +
2531+
"<div ng-if=\"deploymentConfig.spec.strategy.type !== 'Custom'\">\n" +
25032532
"<h3>\n" +
25042533
"Hooks\n" +
25052534
"<span class=\"learn-more-inline\">\n" +
@@ -2515,44 +2544,11 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
25152544
"<div ng-if=\"strategyParams.post\">\n" +
25162545
"<lifecycle-hook deployment-config=\"deploymentConfig\" type=\"post\"></lifecycle-hook>\n" +
25172546
"</div>\n" +
2518-
"<div ng-if=\"!strategyParams.pre && !strategyParams.mid && !strategyParams.post\">\n" +
2547+
"<p ng-if=\"!strategyParams.pre && !strategyParams.mid && !strategyParams.post\">\n" +
25192548
"none\n" +
2549+
"</p>\n" +
25202550
"</div>\n" +
25212551
"</div>\n" +
2522-
"<div class=\"col-lg-6\">\n" +
2523-
"<h3>Triggers</h3>\n" +
2524-
"<dl class=\"dl-horizontal left\">\n" +
2525-
"<dt>Manual (CLI):\n" +
2526-
"<a href=\"{{'deployment-operations' | helpLink}}\" target=\"_blank\">\n" +
2527-
"<span class=\"learn-more-block\">Learn More&nbsp;<i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></span>\n" +
2528-
"</a>\n" +
2529-
"</dt>\n" +
2530-
"<dd>\n" +
2531-
"<copy-to-clipboard clipboard-text=\"'oc rollout latest dc/' + deploymentConfig.metadata.name + ' -n ' + project.metadata.name\"></copy-to-clipboard>\n" +
2532-
"</dd>\n" +
2533-
"<div ng-repeat=\"trigger in deploymentConfig.spec.triggers\">\n" +
2534-
"<span ng-switch=\"trigger.type\">\n" +
2535-
"<span ng-switch-default>{{trigger.type}}</span>\n" +
2536-
"<span ng-switch-when=\"ImageChange\" ng-if=\"trigger.imageChangeParams.from\">\n" +
2537-
"<dt>New Image For:</dt>\n" +
2538-
"<dd>\n" +
2539-
"{{trigger.imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}\n" +
2540-
"<small ng-if=\"!trigger.imageChangeParams.automatic\" class=\"text-muted\">(disabled)</small>\n" +
2541-
"</dd>\n" +
2542-
"</span>\n" +
2543-
"<span ng-switch-when=\"ConfigChange\">\n" +
2544-
"<dt>Change Of:</dt>\n" +
2545-
"<dd>Config</dd>\n" +
2546-
"</span>\n" +
2547-
"</span>\n" +
2548-
"</div>\n" +
2549-
"</dl>\n" +
2550-
"</div>\n" +
2551-
"\n" +
2552-
"<div class=\"col-lg-6\">\n" +
2553-
"<resource-service-bindings project=\"project\" project-context=\"projectContext\" api-object=\"deploymentConfig\">\n" +
2554-
"</resource-service-bindings>\n" +
2555-
"</div>\n" +
25562552
"</div>\n" +
25572553
"<annotations annotations=\"deploymentConfig.metadata.annotations\"></annotations>\n" +
25582554
"</div>\n" +

0 commit comments

Comments
 (0)