Skip to content

Commit

Permalink
Merge pull request #957 from jwforres/pipeline-no-runs
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Nov 30, 2016
2 parents b503ddd + 2e167d3 commit 5a88c56
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 16 deletions.
43 changes: 29 additions & 14 deletions app/views/browse/build-config.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,36 @@ <h1>
<h2>No builds.</h2>

<p>
<span ng-if="!('buildconfigs/instantiate' | canI : 'create')">
Builds will create an image from
<span ng-if="!buildConfig.spec.strategy.jenkinsPipelineStrategy">
<span ng-if="!('buildconfigs/instantiate' | canI : 'create')">
Builds will create an image from
</span>
<span ng-if="'buildconfigs/instantiate' | canI : 'create'">
Start a new build to create an image from
</span>
<span ng-if="buildConfig.spec.source.type === 'Git'">
source repository
<span class="word-break"><osc-git-link
uri="buildConfig.spec.source.git.uri"
ref="buildConfig.spec.source.git.ref"
context-dir="buildConfig.spec.source.contextDir">{{buildConfig.spec.source.git.uri}}</osc-git-link></span>
</span>
<span ng-if="buildConfig.spec.source.type !== 'Git'">
build configuration {{buildConfig.metadata.name}}.
</span>
</span>
<span ng-if="'buildconfigs/instantiate' | canI : 'create'">
Start a new build to create an image from
</span>
<span ng-if="buildConfig.spec.source.type === 'Git'">
source repository
<span class="word-break"><osc-git-link
uri="buildConfig.spec.source.git.uri"
ref="buildConfig.spec.source.git.ref"
context-dir="buildConfig.spec.source.contextDir">{{buildConfig.spec.source.git.uri}}</osc-git-link></span>
</span>
<span ng-if="buildConfig.spec.source.type !== 'Git'">
build configuration {{buildConfig.metadata.name}}.
<span ng-if="buildConfig.spec.strategy.jenkinsPipelineStrategy">
No pipeline builds have run for {{buildConfigName}}.
<br>
<span ng-if="buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfile">
View the <a ng-href="{{(buildConfig | navigateResourceURL) + '?tab=configuration'}}">Jenkinsfile</a> to see what stages will run.
</span>
<span ng-if="buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfilePath">
View the file <code>{{buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfilePath}}</code> in the
<a ng-if="buildConfig | jenkinsfileLink" ng-href="buildConfig | jenkinsfileLink">source repository</a>
<span ng-if="!(buildConfig | jenkinsfileLink)">source repository</span>
to see what stages will run.
</span>
</span>
</p>

Expand Down
13 changes: 12 additions & 1 deletion app/views/pipelines.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,18 @@ <h2>{{buildConfigName}}</h2>
</div>
</div>
<div ng-if="buildsLoaded && !(interestingBuildsByConfig[buildConfigName] | hashSize)">
<em>No pipeline builds have run for {{buildConfigName}}.</em>
<p>
No pipeline builds have run for {{buildConfigName}}.
<span ng-if="buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfile">
View the <a ng-href="{{(buildConfig | navigateResourceURL) + '?tab=configuration'}}">Jenkinsfile</a> to see what stages will run.
</span>
<span ng-if="buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfilePath">
View the file <code>{{buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfilePath}}</code> in the
<a ng-if="buildConfig | jenkinsfileLink" ng-href="buildConfig | jenkinsfileLink">source repository</a>
<span ng-if="!(buildConfig | jenkinsfileLink)">source repository</span>
to see what stages will run.
</span>
</p>
</div>
<div ng-if="interestingBuildsByConfig[buildConfigName] | hashSize">
<div ng-if="!(statsByConfig[buildConfigName].avgDuration | isNil)" class="hidden-xs pull-right text-muted">
Expand Down
28 changes: 27 additions & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -1774,6 +1774,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<div ng-if=\"buildConfig && unfilteredBuilds && (unfilteredBuilds | hashSize) === 0\" class=\"empty-state-message text-center\">\n" +
"<h2>No builds.</h2>\n" +
"<p>\n" +
"<span ng-if=\"!buildConfig.spec.strategy.jenkinsPipelineStrategy\">\n" +
"<span ng-if=\"!('buildconfigs/instantiate' | canI : 'create')\">\n" +
"Builds will create an image from\n" +
"</span>\n" +
Expand All @@ -1787,6 +1788,20 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"<span ng-if=\"buildConfig.spec.source.type !== 'Git'\">\n" +
"build configuration {{buildConfig.metadata.name}}.\n" +
"</span>\n" +
"</span>\n" +
"<span ng-if=\"buildConfig.spec.strategy.jenkinsPipelineStrategy\">\n" +
"No pipeline builds have run for {{buildConfigName}}.\n" +
"<br>\n" +
"<span ng-if=\"buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfile\">\n" +
"View the <a ng-href=\"{{(buildConfig | navigateResourceURL) + '?tab=configuration'}}\">Jenkinsfile</a> to see what stages will run.\n" +
"</span>\n" +
"<span ng-if=\"buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfilePath\">\n" +
"View the file <code>{{buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfilePath}}</code> in the\n" +
"<a ng-if=\"buildConfig | jenkinsfileLink\" ng-href=\"buildConfig | jenkinsfileLink\">source repository</a>\n" +
"<span ng-if=\"!(buildConfig | jenkinsfileLink)\">source repository</span>\n" +
"to see what stages will run.\n" +
"</span>\n" +
"</span>\n" +
"</p>\n" +
"<button class=\"btn btn-primary btn-lg\" ng-click=\"startBuild(buildConfig.metadata.name)\" ng-if=\"'buildconfigs/instantiate' | canI : 'create'\">\n" +
"<span ng-if=\"!(buildConfig | isJenkinsPipelineStrategy)\">\n" +
Expand Down Expand Up @@ -10666,7 +10681,18 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"</div>\n" +
"<div ng-if=\"buildsLoaded && !(interestingBuildsByConfig[buildConfigName] | hashSize)\">\n" +
"<em>No pipeline builds have run for {{buildConfigName}}.</em>\n" +
"<p>\n" +
"No pipeline builds have run for {{buildConfigName}}.\n" +
"<span ng-if=\"buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfile\">\n" +
"View the <a ng-href=\"{{(buildConfig | navigateResourceURL) + '?tab=configuration'}}\">Jenkinsfile</a> to see what stages will run.\n" +
"</span>\n" +
"<span ng-if=\"buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfilePath\">\n" +
"View the file <code>{{buildConfig.spec.strategy.jenkinsPipelineStrategy.jenkinsfilePath}}</code> in the\n" +
"<a ng-if=\"buildConfig | jenkinsfileLink\" ng-href=\"buildConfig | jenkinsfileLink\">source repository</a>\n" +
"<span ng-if=\"!(buildConfig | jenkinsfileLink)\">source repository</span>\n" +
"to see what stages will run.\n" +
"</span>\n" +
"</p>\n" +
"</div>\n" +
"<div ng-if=\"interestingBuildsByConfig[buildConfigName] | hashSize\">\n" +
"<div ng-if=\"!(statsByConfig[buildConfigName].avgDuration | isNil)\" class=\"hidden-xs pull-right text-muted\">\n" +
Expand Down

0 comments on commit 5a88c56

Please sign in to comment.