From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=781482
---
src/app/stylesheets/layout.scss | 1 +
src/app/views/images/show.html.haml | 9 ++++++++-
src/config/locales/en.yml | 6 ++++++
3 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index 8588e2b..dbe2509 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -2862,6 +2862,7 @@ ul.image_builds{
text-decoration: underline;
&:hover{ text-decoration: none; }
}
+ .light{ color: #666;}
}
dd{
padding: 10px;
diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index 0766e65..ffb9599 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -40,6 +40,10 @@
= button_to t('.delete'), image_target_image_path((a)image.id,
timg.id), :method => :delete
- elsif @build and @build.id == @latest_build
= button_to t('.build'), image_target_images_path((a)image.id,
:target => driver, :build_id => @build ? @build.id : nil), :method => :post
+ - failed_build_count = @builder.failed_build_count((a)build.id, driver)
+ - if failed_build_count > 0
+ .light
+ = t('images.show.failed_build_attemts', :count =>
failed_build_count)
- else
%dd
@@ -62,11 +66,14 @@
= account.provider.name
%td.light
= pimg ? pimg.target_identifier : ''
- %td.image_controls
+ %td.image_controls.light
- if timg and b = @builder.find_active_push(timg.id,
account.provider.name, account.credentials_hash['username'])
= label_tag b.status
- elsif timg and not pimg and @build and @build.id ==
@latest_build
= button_to t('.upload'),
image_provider_images_path((a)image.id, :build_id => @build.id, :target_image_id =>
timg.id, :account_id => account.id), :method => :post, :class =>
'upload_image'
+ - failed_push_count = @builder.failed_push_count(timg.id,
account.provider.name, account.credentials_hash['username'])
+ - if failed_push_count > 0
+ = t('images.show.failed_push_attemts', :count =>
failed_push_count )
- elsif pimg
= button_to "", image_provider_image_path((a)image.id,
pimg.id), :method => :delete, :class => 'delete_image'
- else
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index cc67125..a0c557c 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -732,6 +732,12 @@ en:
can_not_build_imported_image: "Imported image can't be built or
pushed"
select_build: Select
template_xml: View Template XML
+ failed_build_attemts:
+ one: '1 failed build attempt'
+ other: '%{count} failed build attempts'
+ failed_push_attemts:
+ one: '1 failed push attempt'
+ other: '%{count} failed push attempts'
flash:
notice:
deleted: Image Deleted
--
1.7.6.5