diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-11-17 00:23:05 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-11-17 00:23:05 +0100 |
commit | d6e00f5373e24deaa7f143f5445ae9461ef5f615 (patch) | |
tree | 59d784dd10d349d54fda8924d00a79946bf1bfdb /app/views/projects/builds/show.html.haml | |
parent | 2b8292cd49dbc68b02f46f865b7115191bf2de07 (diff) | |
download | gitlab-ce-d6e00f5373e24deaa7f143f5445ae9461ef5f615.tar.gz |
Improve specs and add missing cases that were not supported
Diffstat (limited to 'app/views/projects/builds/show.html.haml')
-rw-r--r-- | app/views/projects/builds/show.html.haml | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 488688a7d59..d799671058d 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -26,26 +26,29 @@ = link_to namespace_project_runners_path(@build.project.namespace, @build.project) do Runners page - - if @build.deployable? + - if @build.environment.present? && @build.starts_environment? .prepend-top-default .environment-information - - if @build.status == 'success' && (!@build.last_deployment.try(:last?)) + - if @build.outdated_deployment? = ci_icon_for_status('success_with_warnings') - else = ci_icon_for_status(@build.status) - - last_deployment = @build.last_deployment - - if @build.complete? - - if @build.success? - - if last_deployment.try(:last?) - This build is the most recent deployment to #{environment_link_for_build(@build.project, @build)}. - - else - This build is an out-of-date deployment to #{environment_link_for_build(@build.project, @build)}. View the most recent deployment #{deployment_link(@project, last_deployment)}. + - environment = environment_for_build(@build.project, @build) + - if @build.success? && @build.last_deployment.present? + - if @build.last_deployment.last? + This build is the most recent deployment to #{environment_link_for_build(@build.project, @build)}. - else - The deployment of this build to #{environment_link_for_build(@build.project, @build)} did not complete. + This build is an out-of-date deployment to #{environment_link_for_build(@build.project, @build)}. + - if environment.last_deployment + View the most recent deployment #{deployment_link(environment.last_deployment)}. + - elsif @build.complete? && !@build.success? + The deployment of this build to #{environment_link_for_build(@build.project, @build)} did not complete. - else - This build is creating a deployment to #{environment_link_for_build(@build.project, @build)} and will overwrite the | - = link_to "latest deployment.", deployment_link(@project, last_deployment) | + This build is creating a deployment to #{environment_link_for_build(@build.project, @build)} + - if environment.last_deployment + and will overwrite the + = link_to 'latest deployment', deployment_link(environment.last_deployment) .prepend-top-default - if @build.erased? |