[PATCH conductor 1/2] BZ805909: fix filter view detection and prevent breadcrumb management on json requests
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=805909
---
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, 1 month
[PATCH configure] BZ #805537 - allow configuration of admin username / password
by Mo Morsi
---
conf/default_configure | 2 ++
conf/ec2_configure | 2 ++
conf/mock_configure | 2 ++
conf/rhevm_configure | 2 ++
conf/vsphere_configure | 2 ++
recipes/aeolus/manifests/conductor.pp | 2 --
recipes/aeolus/manifests/init.pp | 3 +++
recipes/aeolus/manifests/profiles/conductor.pp | 6 +++---
recipes/aeolus/manifests/profiles/default.pp | 6 +++---
recipes/aeolus/manifests/profiles/ec2.pp | 6 +++---
recipes/aeolus/manifests/profiles/mock.pp | 6 +++---
recipes/aeolus/manifests/profiles/rhevm.pp | 6 +++---
recipes/aeolus/manifests/profiles/vsphere.pp | 6 +++---
13 files changed, 31 insertions(+), 20 deletions(-)
diff --git a/conf/default_configure b/conf/default_configure
index db33897..b8a3ca0 100644
--- a/conf/default_configure
+++ b/conf/default_configure
@@ -15,6 +15,8 @@
#
---
parameters:
+ admin_username: admin
+ admin_password: password
enable_https: true
enable_security: false
package_provider: rpm
diff --git a/conf/ec2_configure b/conf/ec2_configure
index 142887f..69e07fb 100644
--- a/conf/ec2_configure
+++ b/conf/ec2_configure
@@ -1,6 +1,8 @@
# ec2 setup configuration.
---
parameters:
+ admin_username: admin
+ admin_password: password
enable_https: true
enable_security: false
package_provider: rpm
diff --git a/conf/mock_configure b/conf/mock_configure
index 087c329..3c0df7c 100644
--- a/conf/mock_configure
+++ b/conf/mock_configure
@@ -1,6 +1,8 @@
# mock setup configuration.
---
parameters:
+ admin_username: admin
+ admin_password: password
enable_https: true
enable_security: false
package_provider: rpm
diff --git a/conf/rhevm_configure b/conf/rhevm_configure
index 6668a33..7c07114 100644
--- a/conf/rhevm_configure
+++ b/conf/rhevm_configure
@@ -1,5 +1,7 @@
---
parameters:
+ admin_username: admin
+ admin_password: password
enable_https: true
enable_security: false
package_provider: rpm
diff --git a/conf/vsphere_configure b/conf/vsphere_configure
index ca5bffe..2450497 100644
--- a/conf/vsphere_configure
+++ b/conf/vsphere_configure
@@ -1,5 +1,7 @@
---
parameters:
+ admin_username: admin
+ admin_password: password
enable_https: true
enable_security: false
package_provider: rpm
diff --git a/recipes/aeolus/manifests/conductor.pp b/recipes/aeolus/manifests/conductor.pp
index f06ae16..dd4c385 100644
--- a/recipes/aeolus/manifests/conductor.pp
+++ b/recipes/aeolus/manifests/conductor.pp
@@ -218,8 +218,6 @@ define aeolus::conductor::login($password){
define aeolus::conductor::logout(){
web_request{ "$name-conductor-logout":
post => 'https://localhost/conductor/logout',
- parameters => { 'login' => "admin", 'password' => "password",
- 'commit' => 'submit' },
returns => '200',
follow => true,
use_cookies_at => "/tmp/aeolus-$name",
diff --git a/recipes/aeolus/manifests/init.pp b/recipes/aeolus/manifests/init.pp
index 9551cc8..a04fe3d 100644
--- a/recipes/aeolus/manifests/init.pp
+++ b/recipes/aeolus/manifests/init.pp
@@ -42,6 +42,9 @@ if $aeolus_enable_security == "true" or $aeolus_enable_security == "1" {
$enable_security = false
}
+$admin_username = $aeolus_admin_username
+$admin_password = $aeolus_admin_password
+
# Base aeolus class
class aeolus {
package{'curl':
diff --git a/recipes/aeolus/manifests/profiles/conductor.pp b/recipes/aeolus/manifests/profiles/conductor.pp
index 03bef43..a1f743e 100644
--- a/recipes/aeolus/manifests/profiles/conductor.pp
+++ b/recipes/aeolus/manifests/profiles/conductor.pp
@@ -14,13 +14,13 @@
class aeolus::profiles::conductor {
- aeolus::conductor::site_admin{"admin":
+ aeolus::conductor::site_admin{$admin_username:
email => 'root(a)localhost.localdomain',
- password => "password",
+ password => $admin_password,
first_name => 'Administrator',
last_name => ''}
- aeolus::conductor::login{"admin": password => "password",
+ aeolus::conductor::login{$admin_username: password => $admin_password,
require => Aeolus::Conductor::Site_admin['admin']}
aeolus::conductor::provider{"mock":
diff --git a/recipes/aeolus/manifests/profiles/default.pp b/recipes/aeolus/manifests/profiles/default.pp
index 5bb3119..542604e 100644
--- a/recipes/aeolus/manifests/profiles/default.pp
+++ b/recipes/aeolus/manifests/profiles/default.pp
@@ -16,13 +16,13 @@ class aeolus::profiles::default {
aeolus::create_bucket{"aeolus":}
- aeolus::conductor::site_admin{"admin":
+ aeolus::conductor::site_admin{$admin_username:
email => 'root(a)localhost.localdomain',
- password => "password",
+ password => $admin_password,
first_name => 'Administrator',
last_name => ''}
- aeolus::conductor::login{"admin": password => "password",
+ aeolus::conductor::login{$admin_username: password => $admin_password,
require => Aeolus::Conductor::Site_admin['admin']}
aeolus::conductor::hwp{"small-x86_64":
diff --git a/recipes/aeolus/manifests/profiles/ec2.pp b/recipes/aeolus/manifests/profiles/ec2.pp
index 3f63f70..3bfe0c4 100644
--- a/recipes/aeolus/manifests/profiles/ec2.pp
+++ b/recipes/aeolus/manifests/profiles/ec2.pp
@@ -17,13 +17,13 @@ class aeolus::profiles::ec2 {
aeolus::create_bucket{"aeolus":}
- aeolus::conductor::site_admin{"admin":
+ aeolus::conductor::site_admin{$admin_username:
email => 'root(a)localhost.localdomain',
- password => "password",
+ password => $admin_password,
first_name => 'Administrator',
last_name => ''}
- aeolus::conductor::login{"admin": password => "password",
+ aeolus::conductor::login{$admin_username: password => $admin_password,
require => Aeolus::Conductor::Site_admin['admin']}
aeolus::conductor::provider{"ec2-us-east-1":
diff --git a/recipes/aeolus/manifests/profiles/mock.pp b/recipes/aeolus/manifests/profiles/mock.pp
index c68829c..9135d5c 100644
--- a/recipes/aeolus/manifests/profiles/mock.pp
+++ b/recipes/aeolus/manifests/profiles/mock.pp
@@ -16,13 +16,13 @@ class aeolus::profiles::mock {
aeolus::create_bucket{"aeolus":}
- aeolus::conductor::site_admin{"admin":
+ aeolus::conductor::site_admin{$admin_username:
email => 'root(a)localhost.localdomain',
- password => "password",
+ password => $admin_password,
first_name => 'Administrator',
last_name => ''}
- aeolus::conductor::login{"admin": password => "password",
+ aeolus::conductor::login{$admin_username: password => $admin_password,
require => Aeolus::Conductor::Site_admin['admin']}
aeolus::conductor::provider{"mock":
diff --git a/recipes/aeolus/manifests/profiles/rhevm.pp b/recipes/aeolus/manifests/profiles/rhevm.pp
index 547d7a9..94e5ea1 100644
--- a/recipes/aeolus/manifests/profiles/rhevm.pp
+++ b/recipes/aeolus/manifests/profiles/rhevm.pp
@@ -24,13 +24,13 @@ class aeolus::profiles::rhevm ($instances) {
aeolus::create_bucket{"aeolus":}
- aeolus::conductor::site_admin{"admin":
+ aeolus::conductor::site_admin{$admin_username:
email => 'root(a)localhost.localdomain',
- password => "password",
+ password => $admin_password,
first_name => 'Administrator',
last_name => ''}
- aeolus::conductor::login{"admin": password => "password",
+ aeolus::conductor::login{$admin_username: password => $admin_password,
require => Aeolus::Conductor::Site_admin['admin']}
aeolus::conductor::hwp{"small-x86_64":
diff --git a/recipes/aeolus/manifests/profiles/vsphere.pp b/recipes/aeolus/manifests/profiles/vsphere.pp
index dcca15b..74258d5 100644
--- a/recipes/aeolus/manifests/profiles/vsphere.pp
+++ b/recipes/aeolus/manifests/profiles/vsphere.pp
@@ -24,13 +24,13 @@ class aeolus::profiles::vsphere ($instances) {
mode => 640,
require => Package['aeolus-conductor-daemons'] }
- aeolus::conductor::site_admin{"admin":
+ aeolus::conductor::site_admin{$admin_username:
email => 'root(a)localhost.localdomain',
- password => "password",
+ password => $admin_password,
first_name => 'Administrator',
last_name => ''}
- aeolus::conductor::login{"admin": password => "password",
+ aeolus::conductor::login{$admin_username: password => $admin_password,
require => Aeolus::Conductor::Site_admin['admin']}
aeolus::conductor::hwp{"small-x86_64":
--
1.7.6.5
12 years, 1 month
[PATCH conductor] Fix render_pagination
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
---
src/app/helpers/application_helper.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/helpers/application_helper.rb b/src/app/helpers/application_helper.rb
index 651f55c..8cb9c05 100644
--- a/src/app/helpers/application_helper.rb
+++ b/src/app/helpers/application_helper.rb
@@ -164,7 +164,7 @@ module ApplicationHelper
end
def render_pagination(collection)
- will_paginate(@collection, :previous_label => t('will_paginate.previous_label'), :next_label => t('will_paginate.next_label'))
+ will_paginate(collection, :previous_label => t('will_paginate.previous_label'), :next_label => t('will_paginate.next_label'))
end
module_function :count_uptime
--
1.7.6.5
12 years, 1 month
aeolus-configure -p rhevm fails if the admin password is not the default one
by Javier Pena
Hi,
I have been tinkering around with the CloudForms beta 1, and found something I feel is a bug. If I do the following:
1. yum install aeolus-all
2. aeolus-configure (note that no provider is setup)
3. Login to the web portal, change the admin password as any recommended
4. Setup my rhevm provider in /etc/aeolus-configure/nodes/rhevm_configure (file name might be different, speaking from memory)
5. aeolus-configure -p rhevm
I see the script failing when trying to push the changes to Conductor. Some further research showed that the script is assuming the admin password is still the default one, so if I change it and try again it works.
Is it the expected behaviour that providers should only be configured during the installation, or should I file a bug?
Regards,
Javier
----
Javier Peña, RHCA email: javier.pena(a)redhat.com
Senior Architect cell : +34 662 330080
EMEA Infrastructure Practice
12 years, 1 month
[PATCH conductor] BZ803955 set min-width to user_stats li, to get more controll on breaking lines here
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 f2671b0..3d65cc4 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -1914,6 +1914,7 @@ dl.user_stats{
list-style-type: none;
display: table-cell;
padding: 10px;
+ min-width: 160px;
}
dd{
--
1.7.7.6
12 years, 1 month
qpid dependency removed from conductor and configure
by Richard Su
Hello,
I just pushed a change that removes qpid as a imagefactory dependency in
configure and removes qpid-cpp-server from aeolus-all spec in conductor.
This is one of those situations where if you don't have both changes
locally, you will see problems when you run aeolus-configure.
Also, if you happen to install an older version of imagefactory, say
1.0.0rc3-1.fc16 on the testing repo, that will also pull in qpid again.
Later versions of imagefactory like rc9 don't do this.
Just a heads up if you run into these situations.
- Richard
12 years, 1 month
[PATCH configure] BZ 802847 - cleanup hardware profiles and fix provider ordering effects
by Richard Su
This revised patch removes the i386 hwp.
https://bugzilla.redhat.com/show_bug.cgi?id=802847
Reverted the hwp1 memory change. Setting the memory to 7500 is incompatible with vsphere. vsphere provider hwp memory range is 512-2048.
Setting memory back to 512m for the default profile. Once the conductor and deltacloud changes described in this patch is in.
https://fedorahosted.org/pipermail/aeolus-devel/2012-March/009611.html
We will be able to start using the small instances in ec2.
hwp1 has also been renamed to small-x86_64.
---
recipes/aeolus/manifests/profiles/default.pp | 6 +++---
recipes/aeolus/manifests/profiles/ec2.pp | 13 +++----------
recipes/aeolus/manifests/profiles/mock.pp | 4 ++--
recipes/aeolus/manifests/profiles/rhevm.pp | 4 ++--
recipes/aeolus/manifests/profiles/vsphere.pp | 4 ++--
5 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/recipes/aeolus/manifests/profiles/default.pp b/recipes/aeolus/manifests/profiles/default.pp
index 909f871..5bb3119 100644
--- a/recipes/aeolus/manifests/profiles/default.pp
+++ b/recipes/aeolus/manifests/profiles/default.pp
@@ -24,8 +24,8 @@ class aeolus::profiles::default {
aeolus::conductor::login{"admin": password => "password",
require => Aeolus::Conductor::Site_admin['admin']}
-
- aeolus::conductor::hwp{"hwp1":
+
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
@@ -33,6 +33,6 @@ class aeolus::profiles::default {
require => Aeolus::Conductor::Login["admin"] }
aeolus::conductor::logout{"admin":
- require => Aeolus::Conductor::Hwp['hwp1']}
+ require => Aeolus::Conductor::Hwp['small-x86_64']}
}
diff --git a/recipes/aeolus/manifests/profiles/ec2.pp b/recipes/aeolus/manifests/profiles/ec2.pp
index 0dc97f2..3f63f70 100644
--- a/recipes/aeolus/manifests/profiles/ec2.pp
+++ b/recipes/aeolus/manifests/profiles/ec2.pp
@@ -68,22 +68,15 @@ class aeolus::profiles::ec2 {
url => 'http://localhost:3002/api',
require => Aeolus::Conductor::Login["admin"] }
- aeolus::conductor::hwp{"hwp1":
- memory => "7500",
+ aeolus::conductor::hwp{"small-x86_64":
+ memory => "512",
cpu => "1",
storage => "",
architecture => "x86_64",
require => Aeolus::Conductor::Login["admin"] }
- aeolus::conductor::hwp{"small":
- memory => "500",
- cpu => "1",
- storage => "",
- architecture => "i386",
- require => Aeolus::Conductor::Login["admin"] }
-
Aeolus::Conductor::Provider <| |> -> Aeolus::Conductor::Logout <| |>
aeolus::conductor::logout{"admin":
- require => [Aeolus::Conductor::Hwp['hwp1'], Aeolus::Conductor::Hwp['small']] }
+ require => Aeolus::Conductor::Hwp['small-x86_64'] }
}
diff --git a/recipes/aeolus/manifests/profiles/mock.pp b/recipes/aeolus/manifests/profiles/mock.pp
index 1e34c3a..c68829c 100644
--- a/recipes/aeolus/manifests/profiles/mock.pp
+++ b/recipes/aeolus/manifests/profiles/mock.pp
@@ -37,7 +37,7 @@ class aeolus::profiles::mock {
password => 'mockpassword',
require => Aeolus::Conductor::Provider["mock"] }
- aeolus::conductor::hwp{"hwp1":
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
@@ -47,5 +47,5 @@ class aeolus::profiles::mock {
aeolus::conductor::logout{"admin":
require => [Aeolus::Conductor::Provider['mock'],
Aeolus::Conductor::Provider::Account['mock'],
- Aeolus::Conductor::Hwp['hwp1']] }
+ Aeolus::Conductor::Hwp['small-x86_64']] }
}
diff --git a/recipes/aeolus/manifests/profiles/rhevm.pp b/recipes/aeolus/manifests/profiles/rhevm.pp
index 5d56f80..547d7a9 100644
--- a/recipes/aeolus/manifests/profiles/rhevm.pp
+++ b/recipes/aeolus/manifests/profiles/rhevm.pp
@@ -33,7 +33,7 @@ class aeolus::profiles::rhevm ($instances) {
aeolus::conductor::login{"admin": password => "password",
require => Aeolus::Conductor::Site_admin['admin']}
- aeolus::conductor::hwp{"hwp1":
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
@@ -41,7 +41,7 @@ class aeolus::profiles::rhevm ($instances) {
require => Aeolus::Conductor::Login["admin"] }
aeolus::conductor::logout{"admin":
- require => Aeolus::Conductor::Hwp['hwp1']}
+ require => Aeolus::Conductor::Hwp['small-x86_64']}
Aeolus::Conductor::Provider<| |> -> Aeolus::Conductor::Logout["admin"]
# TODO: create a realm and mappings
diff --git a/recipes/aeolus/manifests/profiles/vsphere.pp b/recipes/aeolus/manifests/profiles/vsphere.pp
index 4d17c1c..dcca15b 100644
--- a/recipes/aeolus/manifests/profiles/vsphere.pp
+++ b/recipes/aeolus/manifests/profiles/vsphere.pp
@@ -33,7 +33,7 @@ class aeolus::profiles::vsphere ($instances) {
aeolus::conductor::login{"admin": password => "password",
require => Aeolus::Conductor::Site_admin['admin']}
- aeolus::conductor::hwp{"hwp1":
+ aeolus::conductor::hwp{"small-x86_64":
memory => "512",
cpu => "1",
storage => "",
@@ -41,7 +41,7 @@ class aeolus::profiles::vsphere ($instances) {
require => Aeolus::Conductor::Login["admin"] }
aeolus::conductor::logout{"admin":
- require => Aeolus::Conductor::Hwp['hwp1'] }
+ require => Aeolus::Conductor::Hwp['small-x86_64'] }
Aeolus::Conductor::Provider<| |> -> Aeolus::Conductor::Logout["admin"]
}
--
1.7.7.6
12 years, 1 month
[PATCH conductor] BZ786535: display failures for instances (rev. 2)
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=786535
Resending this patch based on Richard's comment
---
src/app/controllers/deployments_controller.rb | 8 ++++++++
src/app/models/task.rb | 5 +++++
src/app/stylesheets/layout.scss | 1 +
src/app/util/taskomatic.rb | 7 +++++++
src/config/locales/en.yml | 1 +
5 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
index d65dea3..5b2824f 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -205,6 +205,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 f2671b0..fd14056 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -1037,6 +1037,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/app/util/taskomatic.rb b/src/app/util/taskomatic.rb
index 5ddb782..73900a9 100644
--- a/src/app/util/taskomatic.rb
+++ b/src/app/util/taskomatic.rb
@@ -72,6 +72,13 @@ module Taskomatic
rescue Exception => ex
task.state = Task::STATE_FAILED
task.message = ex.message
+
+ # For RHEV-M, since we need to start up the instance after the vm has been created
+ # we also have to handle create_failed state events separately
+ if task.instance.state == Instance::STATE_STOPPED && task.action == InstanceTask::ACTION_START &&
+ task.instance.provider_account.provider.provider_type.deltacloud_driver == 'rhevm'
+ task.instance.update_attributes(:state => Instance::STATE_CREATE_FAILED)
+ end
ensure
task.save! if Task.exists?(task.id)
end
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 67f5b11..99d27c8 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -264,6 +264,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, 1 month
[PATCH conductor] BZ 800273 Cancel button on "New component Outline" page should launch the "Clouds" Page
by jzigmund@redhat.com
From: Jozef Zigmund <jzigmund(a)redhat.com>
Bugfix solved 2 issues. Cancel buttons on "New component outline" page and on "New Resource Zone" page.
https://bugzilla.redhat.com/show_bug.cgi?id=800273
---
src/app/views/images/new.html.haml | 4 ++--
src/app/views/pools/_form.html.haml | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/app/views/images/new.html.haml b/src/app/views/images/new.html.haml
index b14fe46..76f236c 100644
--- a/src/app/views/images/new.html.haml
+++ b/src/app/views/images/new.html.haml
@@ -35,7 +35,7 @@
= check_box_tag :edit, 1, true
%fieldset.align-center
- = link_to t(:cancel), pool_family_path(@environment), :class => "button danger"
+ = link_to t(:cancel), pool_families_path, :class => "button danger"
= submit_tag t(:continue), :id => "file_button", :class => "button primary"
%section#image-url-form
@@ -53,7 +53,7 @@
= check_box_tag :edit, 1, true
%fieldset.align-center
- = link_to t(:cancel), pool_family_path(@environment), :class => "button danger"
+ = link_to t(:cancel), pool_families_path, :class => "button danger"
= submit_tag t(:continue), :id => "url_button", :class => "button primary"
:javascript
diff --git a/src/app/views/pools/_form.html.haml b/src/app/views/pools/_form.html.haml
index a167e37..ccd8360 100644
--- a/src/app/views/pools/_form.html.haml
+++ b/src/app/views/pools/_form.html.haml
@@ -28,7 +28,10 @@
%fieldset.options
= form.submit t("save"), :class => 'button', :id => 'save_button'
- = link_to t('cancel'), pools_path, :class => 'button danger'
+ - if @pool.pool_family
+ = link_to t('cancel'), pool_families_path, :class => 'button danger'
+ - else
+ = link_to t('cancel'), pools_path, :class => 'button danger'
:javascript
$(document).ready(function(){
--
1.7.7.6
12 years, 1 month