[PATCH] BZ 802571 fix to previous patch so that list_for_user works
by Tzu-Mainn Chen
---
src/app/models/pool.rb | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/app/models/pool.rb b/src/app/models/pool.rb
index 57a6caf..e568599 100644
--- a/src/app/models/pool.rb
+++ b/src/app/models/pool.rb
@@ -101,8 +101,9 @@ class Pool < ActiveRecord::Base
max = quota.maximum_running_instances
total = quota.running_instances
avail = max - total unless max.nil?
- failed = (user.nil? || failed_instances.empty? ? failed_instances :
- failed_instances.list_for_user(user, Privilege::VIEW))
+ all_failed = instances.failed
+ failed = (user.nil? || all_failed.empty? ? all_failed :
+ all_failed.list_for_user(user, Privilege::VIEW))
statistics = {
:cloud_providers => instances.includes(:provider_account).collect{|i| i.provider_account}.uniq.count,
:deployments => deployments.size,
@@ -111,7 +112,7 @@ class Pool < ActiveRecord::Base
:instances_pending => pending_instances.count,
:instances_failed => failed,
:instances_failed_visible_count => failed.count,
- :instances_failed_count => failed_instances.count,
+ :instances_failed_count => all_failed.count,
:used_quota => quota.running_instances,
:quota_percent => number_to_percentage(quota.percentage_used,
:precision => 0),
--
1.7.6.5
12 years
[PATCH] BZ 802571 fix to previous patch so that list_for_user works
by Tzu-Mainn Chen
---
src/app/models/pool.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/models/pool.rb b/src/app/models/pool.rb
index 57a6caf..2696a57 100644
--- a/src/app/models/pool.rb
+++ b/src/app/models/pool.rb
@@ -102,7 +102,7 @@ class Pool < ActiveRecord::Base
total = quota.running_instances
avail = max - total unless max.nil?
failed = (user.nil? || failed_instances.empty? ? failed_instances :
- failed_instances.list_for_user(user, Privilege::VIEW))
+ instances.failed.list_for_user(user, Privilege::VIEW))
statistics = {
:cloud_providers => instances.includes(:provider_account).collect{|i| i.provider_account}.uniq.count,
:deployments => deployments.size,
--
1.7.6.5
12 years
[PATCH conductor] BZ807436: Fix login error message on IE8
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=807436
The issue was caused by the jQuery.isEmptyObject() call. As the documentation states it should not be used with strings.
http://api.jquery.com/jQuery.isEmptyObject/
---
src/app/views/user_sessions/new.html.haml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/views/user_sessions/new.html.haml b/src/app/views/user_sessions/new.html.haml
index 6a9d744..bb3eaa9 100644
--- a/src/app/views/user_sessions/new.html.haml
+++ b/src/app/views/user_sessions/new.html.haml
@@ -34,7 +34,7 @@
//we will have to check if status code == 0 in 'complete' callback
$('#error-content').remove();
$('#primary-container').prepend('<div id="error-content" class="error" style="opacity: 0; position: relative;"></div>');
- var text = $.isEmptyObject(response.responseText) ? response.statusText : response.responseText;
+ var text = response.responseText == '' ? response.statusText : response.responseText;
if(response.status !== 401) text = "Internal Server Error";
$('#error-content').html('<p class="text">' + text + '</p>');
$('#error-content').animate({ 'opacity': 1, 'top': -10 },{queue:false,duration:150});
--
1.7.6.5
12 years
[PATCH conductor] BZ807462: Fix filter view detection
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=807462
---
src/app/controllers/application_controller.rb | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index 0fc0094..db471ba 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -126,10 +126,12 @@ class ApplicationController < ActionController::Base
# let's suppose that 'pretty' view is default
def filter_view?
- if @viewstate
- @viewstate.state['view'] == 'filter'
- else
+ if params[:view].present?
params[:view] == 'filter'
+ elsif params[:details_tab].present?
+ true
+ elsif @viewstate
+ @viewstate.state['view'] == 'filter'
end
end
@@ -228,11 +230,14 @@ class ApplicationController < ActionController::Base
end
def clear_breadcrumbs
+ return if request.format == :json
+
session[:breadcrumbs] = []
- session[:viewstates] = {}
end
def save_breadcrumb(path, name = controller_name)
+ return if request.format == :json
+
session[:breadcrumbs] ||= []
breadcrumbs = session[:breadcrumbs]
viewstate = @viewstate ? @viewstate.id : nil
--
1.7.6.5
12 years
[PATCH] BZ 807342 added src/confic/locales/defaults
by Tzu-Mainn Chen
---
aeolus-conductor.spec.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/aeolus-conductor.spec.in b/aeolus-conductor.spec.in
index 76803e2..4e45c9f 100644
--- a/aeolus-conductor.spec.in
+++ b/aeolus-conductor.spec.in
@@ -197,8 +197,8 @@ rhtml="app/views/layouts"
svg="public/images public/images/icons public/javascripts/jquery-svg"
ttf="public/fonts"
txt="public"
-yml="config config/locales config/locales/overrides config/locales/role_definitions \
- config/locales/classnames \
+yml="config config/locales config/locales/defaults config/locales/overrides
+ config/locales/role_definitions config/locales/classnames \
config/locales/overrides/role_definitions"
xml="app/util"
for filetype in builder css feature gif haml html ico jpg js json key opts png \
--
1.7.6.5
12 years
Fwd: New guidelines discussion on next FPC meeting
by Mo Morsi
Hey all, the new Fedora ruby guidelines draft [1] are going to be
discussed / voted on at tomorrow's packaging meeting. There are quite a
few changes included a longer process to build rubygems, so if you want
your say on anything make sure to swing on by (#fedora-meeting-1,
tomorrow @noon EST).
-Mo
[1] https://fedoraproject.org/wiki/User:Toshio/RubyPackagingDraft
-------- Original Message --------
Subject: New guidelines discussion on next FPC meeting
Date: Tue, 27 Mar 2012 03:14:16 -0400 (EDT)
From: Bohuslav Kabrda <bkabrda(a)redhat.com>
Reply-To: Ruby SIG mailing list <ruby-sig(a)lists.fedoraproject.org>
To: Ruby SIG mailing list <ruby-sig(a)lists.fedoraproject.org>
One more email from me:
I don't know if you have been following the discussion about the new Ruby Guidelines at the fpc ticket [1] or at the packaging list (mainly, see last 3 comments, which summarize current state), but this week (wednesday, 17:00 UTC), the fpc is going to finish the draft, vote on it and close it. Please, if anyone of you has something to add, write it to the ticket or come to the meeting, I myself am going to be there to discuss the remaining things.
This is really the last chance to alter something, so I would highly appreciate if more of us could come to the meeting or at least support our opinions at the ticket.
We've been trying hard to carry through as much of our draft as we could, together with Vit (who is now enjoying a well deserved vacation). I hope you will find our opinions on the fpc changes reasonable and will support us. (And if you don't find our opinions reasonable, there is still time to say so, at least.)
Thanks a lot!
--
Regards,
Bohuslav "Slavek" Kabrda.
[1] https://fedorahosted.org/fpc/ticket/134
_______________________________________________
ruby-sig mailing list
ruby-sig(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
12 years
Question suggestions for the upcoming FLOSS Weekly podcast interview
by Tomas Sedovic
Hi all,
Francesco Vollero and I will be interviewed on the FOSS Weekly
podcast[1] next Wednesday (28th March).
For those of you unfamiliar with the show, it's a podcast where they
talk about free and open source projects and interview people involved
with these projects.
We were asked to come up with a handful of questions that the guests
could ask us. Of course, they will ask their own questions as well but
this is an opportunity for us to make sure that the important things get
covered.
If you think of any such question, please post it in this thread. I have
a couple myself and I'll send them all tomorrow (Thursday 22nd March).
Thomas
[1]: http://twit.tv/show/floss-weekly
12 years
[PATCH 0/4 conductor] BZ 802571 - Scalability Testing
by Tzu-Mainn Chen
This patch attempts to address some scalability concerns, primarily through the use of eager loading ('includes'). For example, on the /users/ page, if you had 100 users, you'd have 100 separate queries; eager loading queries them all at once.
There are other minor efficiency fixes as well. However, this isn't really a comprehensive review (I figure that's a 1.1 task), so there are probably other places that could use a tuneup.
Mainn
12 years
[PATCH conductor] BZ803106 added pagination to images list
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/controllers/images_controller.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb
index d3cb780..cad12f9 100644
--- a/src/app/controllers/images_controller.rb
+++ b/src/app/controllers/images_controller.rb
@@ -27,7 +27,7 @@ class ImagesController < ApplicationController
{ :name => t('images.index.architecture'), :sort_attr => :name },
{ :name => t('images.index.last_rebuild'), :sortable => false },
]
- @images = Aeolus::Image::Warehouse::Image.all
+ @images = Aeolus::Image::Warehouse::Image.all.paginate(:page => params[:page], :per_page => PER_PAGE)
respond_to do |format|
format.html
format.js { render :partial => 'list' }
--
1.7.7.6
12 years