Skip to content
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
11 changes: 10 additions & 1 deletion app/views/directives/build-hooks.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Use `dl-horizontal left` style unless there's a script.
Otherwise use the default `dl` style because it looks strange with the block editor.
-->
<dl ng-class="{ 'dl-horizontal left': !build.spec.postCommit.script }">
<dl ng-class="{ 'dl-horizontal left': !build.spec.postCommit.script || !(build.spec.postCommit.script | isMultiline)}">
<dt ng-if-start="build.spec.postCommit.command">Command:</dt>
<dd ng-if-end>
<code class="command">
Expand All @@ -17,7 +17,16 @@
</dd>
<dt ng-if-start="build.spec.postCommit.script">Script:</dt>
<dd ng-if-end>
<code ng-if="!(build.spec.postCommit.script | isMultiline)" class="command">
<truncate-long-text
content="build.spec.postCommit.script"
limit="80"
expandable="true"
use-word-boundary="false">
</truncate-long-text>
</code>
<div
ng-if="build.spec.postCommit.script | isMultiline"
ui-ace="{
mode: 'sh',
theme: 'eclipse',
Expand Down
8 changes: 6 additions & 2 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -6058,7 +6058,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(


$templateCache.put('views/directives/build-hooks.html',
" <dl ng-class=\"{ 'dl-horizontal left': !build.spec.postCommit.script }\">\n" +
" <dl ng-class=\"{ 'dl-horizontal left': !build.spec.postCommit.script || !(build.spec.postCommit.script | isMultiline)}\">\n" +
"<dt ng-if-start=\"build.spec.postCommit.command\">Command:</dt>\n" +
"<dd ng-if-end>\n" +
"<code class=\"command\">\n" +
Expand All @@ -6068,7 +6068,11 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</dd>\n" +
"<dt ng-if-start=\"build.spec.postCommit.script\">Script:</dt>\n" +
"<dd ng-if-end>\n" +
"<div ui-ace=\"{\n" +
"<code ng-if=\"!(build.spec.postCommit.script | isMultiline)\" class=\"command\">\n" +
"<truncate-long-text content=\"build.spec.postCommit.script\" limit=\"80\" expandable=\"true\" use-word-boundary=\"false\">\n" +
"</truncate-long-text>\n" +
"</code>\n" +
"<div ng-if=\"build.spec.postCommit.script | isMultiline\" ui-ace=\"{\n" +
" mode: 'sh',\n" +
" theme: 'eclipse',\n" +
" rendererOptions: {\n" +
Expand Down