[PATCH 0/2] remove imagefactory-console dependency
by Jason Guiditta
We dont use this gem anymore, and it is cause problems for folks who
are attempting to bundle install, as the last gem never made it to
rubygems.org. Removing this cause no errors for my, but would like
to see someone else verify the results (ie, everything still generally
works, installs, tests pass, etc)
-j
12 years, 2 months
Documenting Deploable XML
by Dan Macpherson
Hi everyone,
I'm trying to document the deployable XML document structure. Based on the RelaxNG file in conductor, I've put together a mock deployable template (see attached).
I haven't indicated which elements/attribs are optional yet (nor in some cases, which elements allow for more than one), but how accurate is the basic hierarchy?
Dan Macpherson
Content Author
Engineering Content Services
Red Hat Asia Pacific Pty Ltd
Brisbane, Australia
e: dmacpher(a)redhat.com
12 years, 2 months
[PATCH conductor] provider realms search fix BZ770087
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/controllers/provider_realms_controller.rb | 2 +-
src/app/views/provider_realms/_list.html.haml | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/controllers/provider_realms_controller.rb b/src/app/controllers/provider_realms_controller.rb
index 6253a17..66f29ea 100644
--- a/src/app/controllers/provider_realms_controller.rb
+++ b/src/app/controllers/provider_realms_controller.rb
@@ -53,7 +53,7 @@ class ProviderRealmsController < ApplicationController
end
def filter
- redirect_to_original({"provider_realms_preset_filter" => params[:realms_preset_filter], "realms_search" => params[:provider_realms_search]})
+ redirect_to_original({"provider_realms_preset_filter" => params[:provider_realms_preset_filter], "provider_realms_search" => params[:provider_realms_search]})
end
protected
diff --git a/src/app/views/provider_realms/_list.html.haml b/src/app/views/provider_realms/_list.html.haml
index cea3e77..b88054e 100644
--- a/src/app/views/provider_realms/_list.html.haml
+++ b/src/app/views/provider_realms/_list.html.haml
@@ -2,11 +2,11 @@
%li
= label_tag :provider_realms_preset_filter, t('filter_table.viewing')
= hidden_field_tag :current_path, request.fullpath
- = select_tag(:provider_realms_preset_filter, preset_filters_options_for_select(Realm::PRESET_FILTERS_OPTIONS, params[:realms_preset_filter]), :include_blank => t("realms.preset_filters.all_realms"), :disabled => true)
+ = select_tag(:provider_realms_preset_filter, preset_filters_options_for_select(Realm::PRESET_FILTERS_OPTIONS, params[:provider_realms_preset_filter]), :include_blank => t("realms.preset_filters.all_realms"), :disabled => true)
= restful_submit_tag t("filter_table.apply_filters"), "index", filter_provider_realms_path, 'POST', :class => 'button', :id => 'apply_provider_realms_preset_filter'
%span.label.badge.dark= @realms.count
%li.table-search-filter
- = text_field_tag :realms_search, params[:provider_realms_search], :placeholder => t("filter_table.search")
+ = text_field_tag :provider_realms_search, params[:provider_realms_search], :placeholder => t("filter_table.search")
= restful_submit_tag "", "index", filter_provider_realms_path, 'POST', :class => 'button', :id => 'apply_provider_realms_search'
:javascript
--
1.7.7.6
12 years, 2 months
[PATCH conductor] BZ 750504 Editing/Deleting backend Hardware Profiles
by Tomas Sedovic
From: Tomas Sedovic <tomas(a)sedovic.cz>
https://bugzilla.redhat.com/show_bug.cgi?id=750504
The UI used to allow the users to edit or delete backend HWPs.
This hides the Edit and Delete buttons from the UI for the Provider Hardware
Profiles and makes sure that they can't be deleted by issuing rogue HTTP
request, etc.
Additionally, we no longer show matching profiles for backend HWPs as that
doesn't make much sense.
We may want to show all the *frontend* profiles that match a given backend one,
but that's not part of this patch.
---
.../controllers/hardware_profiles_controller.rb | 10 ++++++++++
src/app/views/hardware_profiles/show.html.haml | 16 +++++++++-------
src/config/locales/en.yml | 3 +++
src/features/hardware_profile.feature | 13 +++++++++++++
.../step_definitions/hardware_profile_steps.rb | 10 ++++++++++
5 files changed, 45 insertions(+), 7 deletions(-)
diff --git a/src/app/controllers/hardware_profiles_controller.rb b/src/app/controllers/hardware_profiles_controller.rb
index 2d408bf..c15b3dc 100644
--- a/src/app/controllers/hardware_profiles_controller.rb
+++ b/src/app/controllers/hardware_profiles_controller.rb
@@ -90,6 +90,11 @@ class HardwareProfilesController < ApplicationController
def destroy
hardware_profile = HardwareProfile.find(params[:id])
require_privilege(Privilege::MODIFY, hardware_profile)
+ if hardware_profile.provider_hardware_profile?
+ flash[:warning] = t "hardware_profiles.flash.warning.cannot_delete_backend_hwp"
+ redirect_to hardware_profile_path(hardware_profile)
+ return
+ end
if hardware_profile.destroy
flash[:notice] = t "hardware_profiles.flash.notice.deleted"
else
@@ -103,6 +108,11 @@ class HardwareProfilesController < ApplicationController
@hardware_profile = HardwareProfile.find(params[:id])
end
require_privilege(Privilege::MODIFY, @hardware_profile)
+ if @hardware_profile.provider_hardware_profile?
+ flash[:warning] = t "hardware_profiles.flash.warning.cannot_edit_backend_hwp"
+ redirect_to hardware_profile_path(@hardware_profile)
+ return
+ end
matching_provider_hardware_profiles
end
diff --git a/src/app/views/hardware_profiles/show.html.haml b/src/app/views/hardware_profiles/show.html.haml
index 6c0dd03..bcda4d3 100644
--- a/src/app/views/hardware_profiles/show.html.haml
+++ b/src/app/views/hardware_profiles/show.html.haml
@@ -4,15 +4,17 @@
#obj_actions.button-container
= link_to t('hardware_profiles.list.new_hardware'), new_hardware_profile_url, :class => 'button primary', :id => 'new_role_button'
.button-group
- = link_to t('edit'), edit_hardware_profile_path(@hardware_profile), :class => 'button pill', :id => 'edit_button'
- = button_to t('delete'), hardware_profile_path(@hardware_profile), :method => :delete, :confirm => "Are you sure you want to delete?", :class => 'button pill danger'
+ - unless @hardware_profile.provider_hardware_profile?
+ = link_to t('edit'), edit_hardware_profile_path(@hardware_profile), :class => 'button pill', :id => 'edit_button'
+ = button_to t('delete'), hardware_profile_path(@hardware_profile), :method => :delete, :confirm => "Are you sure you want to delete?", :class => 'button pill danger'
%section.admin-content-section.hardware_profile
%header
%h2=t 'properties'
.content
= render :partial => 'properties'
-%section.admin-content-section.hardware_profile
- %header
- %h2=t'hardware_profiles.show.matching_hwp'
- .content
- = render :partial => 'matching_provider_hardware_profiles'
+- unless @hardware_profile.provider_hardware_profile?
+ %section.admin-content-section.hardware_profile
+ %header
+ %h2=t'hardware_profiles.show.matching_hwp'
+ .content
+ = render :partial => 'matching_provider_hardware_profiles'
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index bbb5f98..0a83548 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -513,6 +513,9 @@ en:
error:
not_deleted: "Hardware profile was not deleted!"
more_not_deleted: Could not deleted these Hardware Profiles
+ warning:
+ cannot_edit_backend_hwp: "Cannot modify Provider Hardware Profiles"
+ cannot_delete_backend_hwp: "Cannot delete Provider Hardware Profiles"
preset_filters:
all_hardware_profiles: "All Hardware Profiles"
x86_64architecture: "x86_64 architecture"
diff --git a/src/features/hardware_profile.feature b/src/features/hardware_profile.feature
index c7b77db..41c72b5 100644
--- a/src/features/hardware_profile.feature
+++ b/src/features/hardware_profile.feature
@@ -174,3 +174,16 @@ Feature: Manage Hardware Profiles
And I press "apply_hardware_profiles_search"
Then I should see "myhardware_profile"
And I should not see "somehardware_profile"
+
+ Scenario: Prevent modification of Backend Hardware Profiles
+ Given there are the following conductor hardware profiles:
+ | name | memory | cpu |storage | architecture |
+ | m1-small | 1740 | 2 | 160 | i386 |
+ And the Hardare Profile "m1-small" has the following Provider Hardware Profiles:
+ | name | memory | cpu |storage | architecture |
+ | b1-small | 1740 | 2 | 160 | i386 |
+ And I am on the hardware profiles page
+ When I follow "m1-small"
+ And I follow "b1-small"
+ Then I should not see the edit button
+ And I should not see the delete button
diff --git a/src/features/step_definitions/hardware_profile_steps.rb b/src/features/step_definitions/hardware_profile_steps.rb
index dda2220..be3c4a8 100644
--- a/src/features/step_definitions/hardware_profile_steps.rb
+++ b/src/features/step_definitions/hardware_profile_steps.rb
@@ -83,3 +83,13 @@ Then /^I should see the hardware profiles table$/ do
localized_text_present 'hardware_profiles.index.storage'
localized_text_present 'hardware_profiles.index.architecture'
end
+
+Then /^I should not see the edit button$/ do
+ page.should have_no_selector('#edit_button')
+end
+
+Then /^I should not see the delete button$/ do
+ within('#obj_actions') do
+ page.should have_no_selector('input[value=delete]')
+ end
+end
--
1.7.6.5
12 years, 2 months
[PATCH conductor 1/2] IE: Add the border to the User details card
by Tomas Sedovic
From: Tomas Sedovic <tomas(a)sedovic.cz>
---
src/public/stylesheets/layout_ie7.css | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/public/stylesheets/layout_ie7.css b/src/public/stylesheets/layout_ie7.css
index 63eb1e3..b8290e1 100644
--- a/src/public/stylesheets/layout_ie7.css
+++ b/src/public/stylesheets/layout_ie7.css
@@ -50,3 +50,8 @@ table.pool_families{
zoom: 1;
display: inline;
}
+
+/* fix the user box border */
+#user_card {
+ border: 1px solid #b1b1b1;
+}
--
1.7.6.5
12 years, 2 months
Self-acking vs patch review
by Jason Guiditta
At the suggestion of jclift, I am resending this email as its own
thread in the hopes that more people will notice it.
I am a bit disconcerted by the number of 'self-acks' I have been
seeing on list lately. I know there were some complaints about speed
of reviews a while back, which led (I thought) to the community
agreeing that if you had a trivial fix/patch that you were confident
broke nothing, you could go ahead and push. This was not meant, in my
estimation anyway, to give everyone open license to just push whatever
they want with no review. We should still be reviewing and testing
patches properly, and if you have something that has been sitting on
list waiting for review (like, ahem, my mysql-fixing patch, someone
please look at it!), it is up to you to make a nuisance of yourself in
whatever way you want until you get a reviewer to work with you.
This is not directed at anyone specific, there have just been too many
of late, and I could not sit quietly and watch them go by anymore.
-j
12 years, 2 months