[PATCH aeolus-conductor] BZ#790250 Check Build Status on Show Image
Jan Provaznik
jprovazn at redhat.com
Wed Feb 29 10:00:15 UTC 2012
On 02/28/2012 06:37 PM, mtaylor at redhat.com wrote:
> From: Martyn Taylor<mtaylor at redhat.com>
>
> ---
> src/app/views/images/show.html.haml | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
> index 7681cee..8feaeb3 100644
> --- a/src/app/views/images/show.html.haml
> +++ b/src/app/views/images/show.html.haml
> @@ -55,7 +55,7 @@
> %dt
> .build-actions
> %h3= group[:type].name
> - - if @build and b = @builder.find_active_build(@build.id, driver)
> + - if b = @builder.find_active_build_by_imageid(@image.id, driver)
It's little bit more tricky - you can have multiple builds for an image,
and if active build is find only by image id (w/o build id),
then active build status will be displayed even for other/older builds.
@build is set to latest_unpushed or latest_build image's attribute, but
this attribute is not set until first image build is finished. So maybe
condition would look like this:
if (@build and b = @builder.find_active_build(@build.id, driver)) or
(@build.nil? and params[:build].blank? and b =
@builder.find_active_build_by_imageid(@image.id, driver))
this becomes pretty long so should be on some better place than view
> = label_tag b.status
> - elsif timg
> = button_to t('.delete'), image_target_image_path(@image.id, timg.id), :method => :delete
More information about the aeolus-devel
mailing list