[PATCH conductor] BZ#795911 added cancel button to poolfamilies#new
by Tomas Hrcka
https://bugzilla.redhat.com/show_bug.cgi?id=795911
---
src/app/views/pool_families/_form.html.haml | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/app/views/pool_families/_form.html.haml b/src/app/views/pool_families/_form.html.haml
index 537562b..7a37c88 100644
--- a/src/app/views/pool_families/_form.html.haml
+++ b/src/app/views/pool_families/_form.html.haml
@@ -11,4 +11,5 @@
= quota_form.text_field :maximum_running_instances
%fieldset.options
+ = link_to t('cancel'), pool_families_path, :class => 'button danger pill'
= form.submit t(:save), :class => "submit button pill"
--
1.7.1
12 years, 3 months
[PATCH conductor] BZ790825: fix view inconsistencies between haml and jquery-template in images#show (rebased)
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=790825
---
src/app/views/images/show.html.haml | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index 82c00f5..631dad1 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -134,6 +134,11 @@
#{t('images.show.failed_build_attempts', :count => 1 )}
</div>
{{/if}}
+ {{else !build}}
+ #{path = image_target_images_path('replace_image_id', :target => 'replace_driver')
+ path = path.sub('replace_image_id', '${image[\'uuid\']}')
+ path = path.sub('replace_driver', '${driver}')
+ button_to(t('images.show.build'), path, :method => :post)}
{{else}}
{{/if}}
--
1.7.6.5
12 years, 3 months
[PATCH conductor] BZ790830: "Disable" upload button after it has been pressed on images#show (rebased)
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=790830
In some cases when a user pushes an image and the page reload happens even before
imagefactory would start the pushing operation and the Upload button displayed
incorrectly. This patch solves this issue by displaying a label for notification.
---
src/app/controllers/images_controller.rb | 3 +++
src/app/controllers/provider_images_controller.rb | 4 +++-
src/app/views/images/show.html.haml | 12 ++++++++----
src/config/locales/en.yml | 1 +
4 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb
index f37d117..0c6b350 100644
--- a/src/app/controllers/images_controller.rb
+++ b/src/app/controllers/images_controller.rb
@@ -38,6 +38,9 @@ class ImagesController < ApplicationController
def show
@image = Aeolus::Image::Warehouse::Image.find(params[:id])
@environment = PoolFamily.where('name' => @image.environment).first
+ @push_started = params[:push_started] == 'true'
+ @pushed_target_image_id = params[:pushed_target_image_id]
+
if @image.imported?
begin
# For an imported image, we only want to show the actual provider account
diff --git a/src/app/controllers/provider_images_controller.rb b/src/app/controllers/provider_images_controller.rb
index 54094dc..60fabe5 100644
--- a/src/app/controllers/provider_images_controller.rb
+++ b/src/app/controllers/provider_images_controller.rb
@@ -29,6 +29,7 @@ class ProviderImagesController < ApplicationController
begin
if @provider_image.save
flash[:notice] = t('provider_images.flash.notice.upload_start')
+ @push_started = true
else
flash[:warning] = t('provider_images.flash.warning.upload_failed')
end
@@ -36,7 +37,8 @@ class ProviderImagesController < ApplicationController
logger.error "Caught exception importing image: #{e.message}"
flash[:warning] = t('provider_images.flash.warning.upload_failed')
end
- redirect_to image_path(params[:image_id], :build => params[:build_id])
+ redirect_to image_path(params[:image_id], :build => params[:build_id], :push_started => @push_started,
+ :pushed_target_image_id => @push_started ? @provider_image.target_image_id : nil)
end
def destroy
diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index 82c00f5..c462772 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -85,10 +85,14 @@
- 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('.push'), 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_attempts', :count => failed_push_count )
+ - if @push_started && @pushed_target_image_id == timg.id
+ .light
+ = t('images.show.push_started')
+ - else
+ = 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_attempts', :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 addb68e..fdbb2aa 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -773,6 +773,7 @@ en:
failed_push_attempts:
one: '1 failed push attempt'
other: '%{count} failed push attempts'
+ push_started: 'Push is about to start'
flash:
notice:
deleted: Image Deleted
--
1.7.6.5
12 years, 3 months
[PATCH conductor] Middle align section-controls content
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/stylesheets/layout.scss | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index b067af2..76fba14 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -1722,6 +1722,7 @@ section.admin-content-section{
right: 0px;
bottom: 4px;
@include display_inline_block;
+ vertical-align: middle;
font-size: 11px;
a.collapse{
--
1.7.7.6
12 years, 3 months
[PATCH conductor] BZ786535: display failures for instances
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=786535
---
src/app/controllers/deployments_controller.rb | 8 ++++++++
src/app/models/task.rb | 5 +++++
src/app/stylesheets/layout.scss | 1 +
src/config/locales/en.yml | 1 +
4 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
index b858723..e567738 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -188,6 +188,14 @@ class DeploymentsController < ApplicationController
if params[:details_tab]
@view = @details_tab[:view]
end
+
+ failures = []
+ @deployment.instances.each do |instance|
+ last_task = instance.tasks.last
+ failures << I18n.t('deployments.flash.warning.failure_on_instance', :name => instance.name, :message => last_task.message) if last_task.present? && last_task.failed?
+ end
+ flash.now[:warning] = failures.to_sentence if failures.any?
+
respond_to do |format|
format.html { render :action => 'show'}
format.js { render :partial => @details_tab[:view] }
diff --git a/src/app/models/task.rb b/src/app/models/task.rb
index 86d966c..3825105 100644
--- a/src/app/models/task.rb
+++ b/src/app/models/task.rb
@@ -143,4 +143,9 @@ class Task < ActiveRecord::Base
errors.add("time_ended", "Tasks ends before it's started") unless time_ended.nil? or time_started.nil? or time_ended >= time_started
errors.add("time_started", "Tasks starts before it's created") unless time_started.nil? or created_at.nil? or time_started >= created_at
end
+
+ def failed?
+ state == STATE_FAILED
+ end
+
end
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index fa8def9..f40339f 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -1020,6 +1020,7 @@ Alert Flash -- v.0.0.1 [flash] (flash.scss)
font-size: 12px;
padding-left: 8px;
list-style: none;
+ width: 880px;
li + li{
margin-top: 6px;
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index fbacbc0..4e222d7 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -256,6 +256,7 @@ en:
disabled_pool: "Cannot launch a Deployment in this Pool. The pool has been disabled."
failed_to_launch: "Deployment launch failed!"
deployable_not_selected: "You need to select deployable"
+ failure_on_instance: "Failure reported on %{name}: %{message}"
error:
not_launched: "Some assemblies will not be launched:"
failed_to_launch_assemblies: "Failed to launch following assemblies:"
--
1.7.6.5
12 years, 3 months
[PATCH conductor] BZ#790832 Don't filter out stopped instances from list view
by Tomas Sedovic
From: Tomas Sedovic <tomas(a)sedovic.cz>
https://bugzilla.redhat.com/show_bug.cgi?id=790832
---
src/app/controllers/deployments_controller.rb | 2 +-
src/app/controllers/pools_controller.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
index e36c483..717bb82 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -181,7 +181,7 @@ class DeploymentsController < ApplicationController
@failed_instances = @deployment.failed_instances
if filter_view?
@view = 'instances/list'
- params[:instances_preset_filter] = "other_than_stopped" unless params[:instances_preset_filter]
+ params[:instances_preset_filter] = "" unless params[:instances_preset_filter]
@instances = Instance.apply_filters(:preset_filter_id => params[:instances_preset_filter], :search_filter => params[:instances_search]).list(sort_column(Instance), sort_direction).where("instances.deployment_id" => @deployment.id)
else
@view = 'pretty_view_show'
diff --git a/src/app/controllers/pools_controller.rb b/src/app/controllers/pools_controller.rb
index cb5b1d7..3447e4b 100644
--- a/src/app/controllers/pools_controller.rb
+++ b/src/app/controllers/pools_controller.rb
@@ -47,7 +47,7 @@ class PoolsController < ApplicationController
when 'pools'
@pools = Pool.apply_filters(:preset_filter_id => params[:pools_preset_filter], :search_filter => params[:pools_search]).list_for_user(current_user, Privilege::VIEW).list(sort_column(Pool), sort_direction)
when 'instances'
- params[:instances_preset_filter] = "other_than_stopped" unless params[:instances_preset_filter]
+ params[:instances_preset_filter] = "" unless params[:instances_preset_filter]
@instances = Instance.apply_filters(:preset_filter_id => params[:instances_preset_filter], :search_filter => params[:instances_search]).list_for_user(current_user, Privilege::VIEW).list(sort_column(Instance), sort_direction)
when 'deployments'
@deployments = Deployment.apply_filters(:preset_filter_id => params[:deployments_preset_filter], :search_filter => params[:deployments_search]).list_for_user(current_user, Privilege::VIEW).list(sort_column(Deployment), sort_direction)
--
1.7.6.5
12 years, 3 months
[PATCH conductor] Add test for file exists before copy in aeolus-configure.spec.in
by steve linabery
We previously added an empty directory at config/locales/overrides which
caused the existing file copying to fail when no config/locales/overrides/*.yml
was present. This fix tests to see if a file is present before attempting to copy.
---
aeolus-conductor.spec.in | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/aeolus-conductor.spec.in b/aeolus-conductor.spec.in
index c899190..eb19c82 100644
--- a/aeolus-conductor.spec.in
+++ b/aeolus-conductor.spec.in
@@ -178,7 +178,9 @@ for filetype in builder css feature gif haml html ico jpg js json key opts png \
for dir in $dirs; do
%{__mkdir} -p %{buildroot}%{app_root}/$dir
- %{__cp} src/$dir/*.$filetype %{buildroot}%{app_root}/$dir
+ for i in $(echo src/$dir/*.$filetype); do
+ test -e "$i" && %{__cp} $i %{buildroot}%{app_root}/$dir
+ done
done
done
%{__rm} %{buildroot}%{app_root}/config/initializers/secret_token.rb
--
1.7.6.5
12 years, 3 months