[PATCH] No matching HWP found fix bz714935
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
.../controllers/hardware_profiles_controller.rb | 2 +-
src/app/views/hardware_profiles/_form.haml | 3 ++-
src/app/views/hardware_profiles/new.haml | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/app/controllers/hardware_profiles_controller.rb b/src/app/controllers/hardware_profiles_controller.rb
index 9051de8..281fba5 100644
--- a/src/app/controllers/hardware_profiles_controller.rb
+++ b/src/app/controllers/hardware_profiles_controller.rb
@@ -69,7 +69,7 @@ class HardwareProfilesController < ApplicationController
redirect_to hardware_profiles_path
else
params.delete :commit
- render :action => 'create'
+ render :action => 'new'
end
else
matching_provider_hardware_profiles
diff --git a/src/app/views/hardware_profiles/_form.haml b/src/app/views/hardware_profiles/_form.haml
index a17894d..4a2a9a5 100644
--- a/src/app/views/hardware_profiles/_form.haml
+++ b/src/app/views/hardware_profiles/_form.haml
@@ -1,3 +1,4 @@
+=hwp_form.error_messages
=hwp_form.label :name
=hwp_form.text_field :name
%table
@@ -15,4 +16,4 @@
-else
=hwpp_form.text_field(:value)
= hwp_form.submit 'Check Matches', :class => "submit button"
-= hwp_form.submit 'Save', :class => 'submit button'
\ No newline at end of file
+= hwp_form.submit 'Save', :class => 'submit button'
diff --git a/src/app/views/hardware_profiles/new.haml b/src/app/views/hardware_profiles/new.haml
index 7f12554..6f2b1be 100644
--- a/src/app/views/hardware_profiles/new.haml
+++ b/src/app/views/hardware_profiles/new.haml
@@ -9,4 +9,4 @@
-form_for @hardware_profile, :url => hardware_profiles_path, :html => { :multipart => true } do |hwp_form|
= render :partial => "form", :locals => { :hwp_form => hwp_form }
- = render :partial => 'matching_provider_hardware_profiles'
+ = render :partial => 'matching_provider_hardware_profiles' if params[:commit] == "Check Matches"
--
1.7.4.2
12 years, 11 months
[PATCH] Validate uniqueness of realm name BZ714927
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/models/frontend_realm.rb | 1 +
src/features/realm.feature | 9 +++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/app/models/frontend_realm.rb b/src/app/models/frontend_realm.rb
index 4ae303c..adf135e 100644
--- a/src/app/models/frontend_realm.rb
+++ b/src/app/models/frontend_realm.rb
@@ -42,4 +42,5 @@ class FrontendRealm < ActiveRecord::Base
has_many :backend_providers, :through => :realm_backend_targets, :source => :provider, :conditions => "realm_backend_targets.realm_or_provider_type = 'Provider'"
validates_presence_of :name
+ validates_uniqueness_of :name
end
diff --git a/src/features/realm.feature b/src/features/realm.feature
index 79779e6..641f202 100644
--- a/src/features/realm.feature
+++ b/src/features/realm.feature
@@ -17,6 +17,15 @@ Feature: Manage Realms
And I press "Save"
Then I should see "Realm was added."
+ Scenario: Validate unique frontend realm name
+ Given I am on the realms page
+ And there is a realm "testrealm1"
+ When I follow "New Realm"
+ Then I should see "Create a new Realm"
+ When I fill in "frontend_realm[name]" with "testrealm1"
+ And I press "Save"
+ Then I should see "Name has already been taken"
+
Scenario: Add realm mapping
Given I am on the realms page
And there is a realm "testrealm1"
--
1.7.4.2
12 years, 11 months
[oz] [PATCH] Warn early about invalid Fedora install images
by Pádraig Brady
I was checking what happened when one gives a Fedora live image
to oz, and noticed the error could have been indicated much earlier.
The attached patch addresses this.
Note the attached patch can be applied with `git am` rather than this mail.
cheers,
Pádraig.
12 years, 11 months
[PATCH] fix admin_header in role#show
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/views/roles/show.haml | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/app/views/roles/show.haml b/src/app/views/roles/show.haml
index 9ed3e20..a7804e3 100644
--- a/src/app/views/roles/show.haml
+++ b/src/app/views/roles/show.haml
@@ -1,3 +1,4 @@
+= render :partial => 'layouts/admin_header'
%header.page-header
%h1{:class => controller.controller_name}= @role.name
#obj_actions.button-container
@@ -15,4 +16,4 @@
.content
%div#view
- = render :partial => 'properties'
\ No newline at end of file
+ = render :partial => 'properties'
--
1.7.4.2
12 years, 11 months
[PATCH] align pretty/filter toggle with other buttons
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/views/deployments/_header_show.haml | 3 ++-
src/app/views/pools/_header_index.haml | 2 +-
src/app/views/pools/_header_show.haml | 2 +-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/app/views/deployments/_header_show.haml b/src/app/views/deployments/_header_show.haml
index 0cf8729..76206e8 100644
--- a/src/app/views/deployments/_header_show.haml
+++ b/src/app/views/deployments/_header_show.haml
@@ -1,5 +1,6 @@
%header.page-header
%h1.deployments
= [@deployment.name, "Deployment"].join(' ')
- = pretty_filter_toggle(deployment_path(@deployment, :view => 'pretty'), deployment_path(@deployment, :view => 'filter'))
+ #obj_actions.button-container
+ = pretty_filter_toggle(deployment_path(@deployment, :view => 'pretty'), deployment_path(@deployment, :view => 'filter'))
.corner
diff --git a/src/app/views/pools/_header_index.haml b/src/app/views/pools/_header_index.haml
index fe2895d..0549b9a 100644
--- a/src/app/views/pools/_header_index.haml
+++ b/src/app/views/pools/_header_index.haml
@@ -5,4 +5,4 @@
= link_to "New Pool", new_pool_path, { :class => 'button primary' }
.corner
-= render :partial => 'scoreboard_index'
\ No newline at end of file
+= render :partial => 'scoreboard_index'
diff --git a/src/app/views/pools/_header_show.haml b/src/app/views/pools/_header_show.haml
index 374dad8..2f93d8a 100644
--- a/src/app/views/pools/_header_show.haml
+++ b/src/app/views/pools/_header_show.haml
@@ -1,8 +1,8 @@
%header.page-header
%h1.pools
= [@pool.name, "Pool"].join(' ')
- = pretty_filter_toggle(pool_path(@pool, :view => 'pretty'), pool_path(@pool, :view => 'filter'))
#obj_actions.button-container
+ = pretty_filter_toggle(pool_path(@pool, :view => 'pretty'), pool_path(@pool, :view => 'filter'))
= link_to 'New Deployment', launch_new_deployments_path(:pool_id => @pool.id), :class => 'button primary', :id => 'new_deployment_button'
-# ditch form_for since it doesn't allow specification of a CSS class.
%form.button-group{:action => pool_url(@pool), :method => 'POST'}
--
1.7.4.2
12 years, 11 months