Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where blank space appears in dc config page #2351

Merged
merged 1 commit into from
Oct 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 51 additions & 58 deletions app/views/browse/deployment-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,39 @@ <h3>Volumes</h3>
<span class="action-divider" aria-hidden="true">|</span>
<a ng-href="project/{{project.metadata.name}}/add-config-volume?kind=DeploymentConfig&name={{deploymentConfig.metadata.name}}">Add Config Files</a>
</p>
<h3>Triggers</h3>
<dl class="dl-horizontal left">
<dt>Manual (CLI):
<a href="{{'deployment-operations' | helpLink}}" target="_blank">
<span class="learn-more-block">Learn More&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></span>
</a>
</dt>
<dd>
<copy-to-clipboard clipboard-text="'oc rollout latest dc/' + deploymentConfig.metadata.name + ' -n ' + project.metadata.name"></copy-to-clipboard>
</dd>
<div ng-repeat="trigger in deploymentConfig.spec.triggers">
<span ng-switch="trigger.type">
<span ng-switch-default>{{trigger.type}}</span>
<span ng-switch-when="ImageChange" ng-if="trigger.imageChangeParams.from">
<dt>New Image For:</dt>
<dd>
{{trigger.imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}
<small ng-if="!trigger.imageChangeParams.automatic" class="text-muted">(disabled)</small>
</dd>
</span>
<span ng-switch-when="ConfigChange">
<dt>Change Of:</dt>
<dd>Config</dd>
</span>
</span>
</div>
</dl>
<!-- Service Bindings -->
<resource-service-bindings
project="project"
project-context="projectContext"
api-object="deploymentConfig">
</resource-service-bindings>
</div>

<!-- Autoscaling -->
Expand Down Expand Up @@ -277,68 +310,28 @@ <h3>Autoscaling</h3>
<div ng-repeat="hpa in autoscalers">
<hpa hpa="hpa" project="project" show-scale-target="false" alerts="alerts"></hpa>
</div>
</div>

<div class="col-lg-6" ng-if="deploymentConfig.spec.strategy.type !== 'Custom'">
<h3>
Hooks
<span class="learn-more-inline">
<a ng-href="{{'lifecycle_hooks' | helpLink}}" target="_blank">Learn More&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></a>
</span>
</h3>
<div ng-if="strategyParams.pre">
<lifecycle-hook deployment-config="deploymentConfig" type="pre"></lifecycle-hook>
</div>
<div ng-if="strategyParams.mid">
<lifecycle-hook deployment-config="deploymentConfig" type="mid"></lifecycle-hook>
</div>
<div ng-if="strategyParams.post">
<lifecycle-hook deployment-config="deploymentConfig" type="post"></lifecycle-hook>
</div>
<div ng-if="!strategyParams.pre && !strategyParams.mid && !strategyParams.post">
none
</div>
</div>

<div class="col-lg-6">
<h3>Triggers</h3>
<dl class="dl-horizontal left">
<dt>Manual (CLI):
<a href="{{'deployment-operations' | helpLink}}" target="_blank">
<span class="learn-more-block">Learn More&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></span>
</a>
</dt>
<dd>
<copy-to-clipboard clipboard-text="'oc rollout latest dc/' + deploymentConfig.metadata.name + ' -n ' + project.metadata.name"></copy-to-clipboard>
</dd>
<div ng-repeat="trigger in deploymentConfig.spec.triggers">
<span ng-switch="trigger.type">
<span ng-switch-default>{{trigger.type}}</span>
<span ng-switch-when="ImageChange" ng-if="trigger.imageChangeParams.from">
<dt>New Image For:</dt>
<dd>
{{trigger.imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}
<small ng-if="!trigger.imageChangeParams.automatic" class="text-muted">(disabled)</small>
</dd>
</span>
<span ng-switch-when="ConfigChange">
<dt>Change Of:</dt>
<dd>Config</dd>
</span>
<div ng-if="deploymentConfig.spec.strategy.type !== 'Custom'">
<h3>
Hooks
<span class="learn-more-inline">
<a ng-href="{{'lifecycle_hooks' | helpLink}}" target="_blank">Learn More&nbsp;<i class="fa fa-external-link" aria-hidden="true"></i></a>
</span>
</h3>
<div ng-if="strategyParams.pre">
<lifecycle-hook deployment-config="deploymentConfig" type="pre"></lifecycle-hook>
</div>
</dl>
</div>

<!-- Service Bindings -->
<div class="col-lg-6">
<resource-service-bindings
project="project"
project-context="projectContext"
api-object="deploymentConfig">
</resource-service-bindings>
<div ng-if="strategyParams.mid">
<lifecycle-hook deployment-config="deploymentConfig" type="mid"></lifecycle-hook>
</div>
<div ng-if="strategyParams.post">
<lifecycle-hook deployment-config="deploymentConfig" type="post"></lifecycle-hook>
</div>
<p ng-if="!strategyParams.pre && !strategyParams.mid && !strategyParams.post">
none
</p>
</div>
</div>

</div>
<annotations annotations="deploymentConfig.metadata.annotations"></annotations>
</div>
Expand Down
70 changes: 33 additions & 37 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -2476,6 +2476,36 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<span class=\"action-divider\" aria-hidden=\"true\">|</span>\n" +
"<a ng-href=\"project/{{project.metadata.name}}/add-config-volume?kind=DeploymentConfig&name={{deploymentConfig.metadata.name}}\">Add Config Files</a>\n" +
"</p>\n" +
"<h3>Triggers</h3>\n" +
"<dl class=\"dl-horizontal left\">\n" +
"<dt>Manual (CLI):\n" +
"<a href=\"{{'deployment-operations' | helpLink}}\" target=\"_blank\">\n" +
"<span class=\"learn-more-block\">Learn More&nbsp;<i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></span>\n" +
"</a>\n" +
"</dt>\n" +
"<dd>\n" +
"<copy-to-clipboard clipboard-text=\"'oc rollout latest dc/' + deploymentConfig.metadata.name + ' -n ' + project.metadata.name\"></copy-to-clipboard>\n" +
"</dd>\n" +
"<div ng-repeat=\"trigger in deploymentConfig.spec.triggers\">\n" +
"<span ng-switch=\"trigger.type\">\n" +
"<span ng-switch-default>{{trigger.type}}</span>\n" +
"<span ng-switch-when=\"ImageChange\" ng-if=\"trigger.imageChangeParams.from\">\n" +
"<dt>New Image For:</dt>\n" +
"<dd>\n" +
"{{trigger.imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}\n" +
"<small ng-if=\"!trigger.imageChangeParams.automatic\" class=\"text-muted\">(disabled)</small>\n" +
"</dd>\n" +
"</span>\n" +
"<span ng-switch-when=\"ConfigChange\">\n" +
"<dt>Change Of:</dt>\n" +
"<dd>Config</dd>\n" +
"</span>\n" +
"</span>\n" +
"</div>\n" +
"</dl>\n" +
"\n" +
"<resource-service-bindings project=\"project\" project-context=\"projectContext\" api-object=\"deploymentConfig\">\n" +
"</resource-service-bindings>\n" +
"</div>\n" +
"\n" +
"<div class=\"col-lg-6\">\n" +
Expand All @@ -2498,8 +2528,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<div ng-repeat=\"hpa in autoscalers\">\n" +
"<hpa hpa=\"hpa\" project=\"project\" show-scale-target=\"false\" alerts=\"alerts\"></hpa>\n" +
"</div>\n" +
"</div>\n" +
"<div class=\"col-lg-6\" ng-if=\"deploymentConfig.spec.strategy.type !== 'Custom'\">\n" +
"<div ng-if=\"deploymentConfig.spec.strategy.type !== 'Custom'\">\n" +
"<h3>\n" +
"Hooks\n" +
"<span class=\"learn-more-inline\">\n" +
Expand All @@ -2515,44 +2544,11 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<div ng-if=\"strategyParams.post\">\n" +
"<lifecycle-hook deployment-config=\"deploymentConfig\" type=\"post\"></lifecycle-hook>\n" +
"</div>\n" +
"<div ng-if=\"!strategyParams.pre && !strategyParams.mid && !strategyParams.post\">\n" +
"<p ng-if=\"!strategyParams.pre && !strategyParams.mid && !strategyParams.post\">\n" +
"none\n" +
"</p>\n" +
"</div>\n" +
"</div>\n" +
"<div class=\"col-lg-6\">\n" +
"<h3>Triggers</h3>\n" +
"<dl class=\"dl-horizontal left\">\n" +
"<dt>Manual (CLI):\n" +
"<a href=\"{{'deployment-operations' | helpLink}}\" target=\"_blank\">\n" +
"<span class=\"learn-more-block\">Learn More&nbsp;<i class=\"fa fa-external-link\" aria-hidden=\"true\"></i></span>\n" +
"</a>\n" +
"</dt>\n" +
"<dd>\n" +
"<copy-to-clipboard clipboard-text=\"'oc rollout latest dc/' + deploymentConfig.metadata.name + ' -n ' + project.metadata.name\"></copy-to-clipboard>\n" +
"</dd>\n" +
"<div ng-repeat=\"trigger in deploymentConfig.spec.triggers\">\n" +
"<span ng-switch=\"trigger.type\">\n" +
"<span ng-switch-default>{{trigger.type}}</span>\n" +
"<span ng-switch-when=\"ImageChange\" ng-if=\"trigger.imageChangeParams.from\">\n" +
"<dt>New Image For:</dt>\n" +
"<dd>\n" +
"{{trigger.imageChangeParams.from | imageObjectRef : deploymentConfig.metadata.namespace}}\n" +
"<small ng-if=\"!trigger.imageChangeParams.automatic\" class=\"text-muted\">(disabled)</small>\n" +
"</dd>\n" +
"</span>\n" +
"<span ng-switch-when=\"ConfigChange\">\n" +
"<dt>Change Of:</dt>\n" +
"<dd>Config</dd>\n" +
"</span>\n" +
"</span>\n" +
"</div>\n" +
"</dl>\n" +
"</div>\n" +
"\n" +
"<div class=\"col-lg-6\">\n" +
"<resource-service-bindings project=\"project\" project-context=\"projectContext\" api-object=\"deploymentConfig\">\n" +
"</resource-service-bindings>\n" +
"</div>\n" +
"</div>\n" +
"<annotations annotations=\"deploymentConfig.metadata.annotations\"></annotations>\n" +
"</div>\n" +
Expand Down