diff options
author | Takuya Noguchi <takninnovationresearch@gmail.com> | 2018-10-29 14:58:16 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-10-29 14:58:16 +0000 |
commit | 1c4eedd52c52185da5e0091391943756ca67d6c3 (patch) | |
tree | 6666cc8bca29e0bd4f6bc57d9f14bcdea4c71164 /app/views/projects/pipelines | |
parent | 43463869c883c7972ecc03500ab35325eede7a01 (diff) | |
download | gitlab-ce-1c4eedd52c52185da5e0091391943756ca67d6c3.tar.gz |
Remove all tables from Pipeline page when there is no job for the Pipeline
Diffstat (limited to 'app/views/projects/pipelines')
-rw-r--r-- | app/views/projects/pipelines/_with_tabs.html.haml | 33 | ||||
-rw-r--r-- | app/views/projects/pipelines/show.html.haml | 10 |
2 files changed, 22 insertions, 21 deletions
diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index c63ff070f70..95bba47802c 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -19,30 +19,23 @@ #js-pipeline-graph-vue #js-tab-builds.tab-pane - - if pipeline.yaml_errors.present? - .bs-callout.bs-callout-danger - %h4 Found errors in your .gitlab-ci.yml: - %ul - - pipeline.yaml_errors.split(",").each do |error| - %li= error - You can also test your .gitlab-ci.yml in the #{link_to "Lint", project_ci_lint_path(@project)} + - if pipeline.legacy_stages.present? + .table-holder.pipeline-holder + %table.table.ci-table.pipeline + %thead + %tr + %th Status + %th Job ID + %th Name + %th + %th Coverage + %th + = render partial: "projects/stage/stage", collection: pipeline.legacy_stages, as: :stage - - if pipeline.project.builds_enabled? && !pipeline.ci_yaml_file + - elsif pipeline.project.builds_enabled? && !pipeline.ci_yaml_file .bs-callout.bs-callout-warning \.gitlab-ci.yml not found in this commit - .table-holder.pipeline-holder - %table.table.ci-table.pipeline - %thead - %tr - %th Status - %th Job ID - %th Name - %th - %th Coverage - %th - = render partial: "projects/stage/stage", collection: pipeline.legacy_stages, as: :stage - - if @pipeline.failed_builds.present? #js-tab-failures.build-failures.tab-pane.build-page %table.table.responsive-table.ci-table.responsive-table-sm-rounded diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index ff0ed3ed30d..193d437dad1 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -9,6 +9,14 @@ - if @pipeline.commit.present? = render "projects/pipelines/info", commit: @pipeline.commit - = render "projects/pipelines/with_tabs", pipeline: @pipeline + - if @pipeline.builds.empty? && @pipeline.yaml_errors.present? + .bs-callout.bs-callout-danger + %h4 Found errors in your .gitlab-ci.yml: + %ul + - @pipeline.yaml_errors.split(",").each do |error| + %li= error + You can test your .gitlab-ci.yml in #{link_to "CI Lint", project_ci_lint_path(@project)}. + - else + = render "projects/pipelines/with_tabs", pipeline: @pipeline .js-pipeline-details-vue{ data: { endpoint: project_pipeline_path(@project, @pipeline, format: :json) } } |