From: Jiri Tomasek <jtomasek(a)redhat.com>
Signed-off-by: Matt Wagner <matt.wagner(a)redhat.com>
---
src/app/controllers/builds_controller.rb | 8 +-
src/app/controllers/deployables_controller.rb | 10 ++--
src/app/controllers/deployments_controller.rb | 6 +-
.../controllers/hardware_profiles_controller.rb | 8 +-
src/app/controllers/image_imports_controller.rb | 2 +-
src/app/controllers/instances_controller.rb | 12 ++--
src/app/controllers/pool_families_controller.rb | 10 ++--
src/app/controllers/pools_controller.rb | 2 +-
.../controllers/provider_accounts_controller.rb | 8 +-
src/app/controllers/providers_controller.rb | 6 +-
src/app/controllers/realm_mappings_controller.rb | 8 +-
src/app/controllers/realms_controller.rb | 8 +-
src/app/controllers/roles_controller.rb | 8 +-
src/app/controllers/templates_controller.rb | 6 +-
src/app/controllers/users_controller.rb | 8 +-
src/app/helpers/providers_helper.rb | 2 +-
src/app/views/assemblies/index.haml | 2 +-
src/app/views/deployables/_assemblies.haml | 4 +-
src/app/views/deployables/_deployments.haml | 2 +-
src/app/views/deployables/_form.haml | 2 +-
src/app/views/deployables/_list.haml | 8 +-
src/app/views/deployables/_pick_assemblies.haml | 6 +-
src/app/views/deployables/_properties.haml | 4 +-
src/app/views/deployables/edit.haml | 2 +-
src/app/views/deployables/new.haml | 2 +-
src/app/views/deployments/_list.haml | 20 +++---
src/app/views/deployments/launch_new.haml | 4 +-
src/app/views/deployments/new.haml | 2 +-
src/app/views/hardware_profiles/_list.haml | 6 +-
.../_matching_provider_hardware_profiles.haml | 6 +-
src/app/views/hardware_profiles/_properties.haml | 2 +-
src/app/views/hardware_profiles/edit.haml | 2 +-
src/app/views/hardware_profiles/new.haml | 4 +-
src/app/views/image_imports/new.haml | 4 +-
src/app/views/instances/_list.haml | 8 +-
src/app/views/instances/_properties.haml | 2 +-
src/app/views/instances/new.haml | 2 +-
src/app/views/instances/select_template.haml | 2 +-
src/app/views/layouts/_header.haml | 2 +-
src/app/views/pool_families/_list.haml | 6 +-
src/app/views/pool_families/_properties.haml | 2 +-
.../views/pool_families/_provider_accounts.haml | 4 +-
src/app/views/pool_families/edit.haml | 4 +-
src/app/views/pool_families/new.haml | 4 +-
src/app/views/pools/_instances.haml | 12 ++--
src/app/views/pools/_list.haml | 6 +-
src/app/views/pools/_properties.haml | 2 +-
src/app/views/pools/new.haml | 2 +-
src/app/views/provider_accounts/_list.haml | 6 +-
src/app/views/provider_accounts/_properties.haml | 4 +-
.../provider_accounts/_provider_selection.haml | 4 +-
src/app/views/provider_accounts/edit.haml | 2 +-
src/app/views/provider_accounts/new.haml | 2 +-
src/app/views/providers/_list.haml | 6 +-
src/app/views/providers/_properties.haml | 4 +-
src/app/views/providers/edit.haml | 4 +-
src/app/views/providers/new.haml | 4 +-
src/app/views/realm_mappings/new.haml | 2 +-
src/app/views/realms/_list.haml | 6 +-
src/app/views/realms/_mapping.haml | 6 +-
src/app/views/realms/_properties.haml | 2 +-
src/app/views/realms/edit.haml | 2 +-
src/app/views/realms/new.haml | 4 +-
src/app/views/roles/_form.haml | 2 +-
src/app/views/roles/_list.haml | 6 +-
src/app/views/roles/_properties.haml | 2 +-
src/app/views/roles/edit.haml | 2 +-
src/app/views/roles/new.haml | 2 +-
src/app/views/settings/index.haml | 4 +-
src/app/views/templates/_addbuttons.haml | 4 +-
src/app/views/templates/_builds.haml | 8 +-
src/app/views/templates/_form.haml | 2 +-
src/app/views/templates/_list.haml | 6 +-
src/app/views/templates/_managed_content.haml | 2 +-
src/app/views/templates/_metagroups.haml | 4 +-
src/app/views/templates/_properties.haml | 2 +-
src/app/views/templates/edit.haml | 6 +-
src/app/views/templates/new.haml | 6 +-
.../views/templates/xml/_hardware_profile.xml.haml | 4 +-
src/app/views/users/_list.haml | 18 +++---
src/app/views/users/_properties.haml | 2 +-
src/app/views/users/edit.haml | 4 +-
src/app/views/users/new.haml | 4 +-
src/classad_plugin/conductor_classad_plugin.cpp | 2 +-
src/config/navigation.rb | 36 ++++++------
src/config/routes.rb | 63 +++++++++-----------
src/features/deployable.feature | 28 ++++----
src/features/deployable_permissions.feature | 24 ++++----
src/features/deployment.feature | 6 +-
src/features/image_import.feature | 10 ++--
src/features/pool.feature | 22 ++++----
src/features/pool_family.feature | 16 +++---
src/features/provider.feature | 20 +++---
src/features/provider_account.feature | 18 +++---
src/features/realm.feature | 18 +++---
src/features/role.feature | 12 ++--
src/features/settings.feature | 8 +-
src/features/step_definitions/api_steps.rb | 4 +-
src/features/step_definitions/instance_steps.rb | 6 +-
src/features/step_definitions/template_steps.rb | 2 +-
src/features/support/paths.rb | 34 +++++-----
src/features/template.feature | 48 ++++++++--------
src/features/user.feature | 16 +++---
src/spec/controllers/builds_controller_spec.rb | 2 +-
.../hardware_profiles_controller_spec.rb | 2 +-
src/spec/controllers/instance_controller_spec.rb | 4 +-
src/spec/controllers/pools_controller_spec.rb | 4 +-
.../provider_accounts_controller_spec.rb | 6 +-
src/spec/controllers/provider_controller_spec.rb | 6 +-
src/spec/controllers/templates_controller_spec.rb | 2 +-
src/spec/controllers/users_controller_spec.rb | 4 +-
111 files changed, 408 insertions(+), 415 deletions(-)
diff --git a/src/app/controllers/builds_controller.rb
b/src/app/controllers/builds_controller.rb
index 3572a45..4535439 100644
--- a/src/app/controllers/builds_controller.rb
+++ b/src/app/controllers/builds_controller.rb
@@ -18,7 +18,7 @@ class BuildsController < ApplicationController
logger.error $!.message
logger.error $!.backtrace.join("\n ")
end
- redirect_to image_factory_template_path(@tpl, :details_tab => 'builds')
+ redirect_to template_path(@tpl, :details_tab => 'builds')
end
def upload
@@ -29,13 +29,13 @@ class BuildsController < ApplicationController
:status => ProviderImage::STATE_QUEUED
)
Delayed::Job.enqueue(PushJob.new(pimg.id))
- redirect_to image_factory_template_path(@tpl, :details_tab => 'builds')
+ redirect_to template_path(@tpl, :details_tab => 'builds')
end
def delete
@tpl = Template.find(params[:template_id])
# FIXME: add logic to delete image when v2 image factory lands
- redirect_to image_factory_template_path(@tpl, :details_tab => 'builds')
+ redirect_to template_path(@tpl, :details_tab => 'builds')
end
def edit
@@ -76,7 +76,7 @@ class BuildsController < ApplicationController
logger.error $!.message
logger.error $!.backtrace.join("\n ")
end
- redirect_to image_factory_template_path(@tpl, :details_tab => 'builds')
+ redirect_to template_path(@tpl, :details_tab => 'builds')
end
def update_status
diff --git a/src/app/controllers/deployables_controller.rb
b/src/app/controllers/deployables_controller.rb
index 22332f5..40a0a04 100644
--- a/src/app/controllers/deployables_controller.rb
+++ b/src/app/controllers/deployables_controller.rb
@@ -44,7 +44,7 @@ class DeployablesController < ApplicationController
@deployable.owner = current_user
if @deployable.save
flash[:notice] = "Deployable added."
- redirect_to image_factory_deployable_url(@deployable)
+ redirect_to deployable_url(@deployable)
else
render :action => :new
end
@@ -60,7 +60,7 @@ class DeployablesController < ApplicationController
require_privilege(Privilege::MODIFY, @deployable)
if @deployable.update_attributes(params[:deployable])
flash[:notice] = "Deployable updated."
- redirect_to image_factory_deployable_url(@deployable)
+ redirect_to deployable_url(@deployable)
else
render :action => :edit
end
@@ -84,7 +84,7 @@ class DeployablesController < ApplicationController
unless failed.empty?
flash[:error] = t('deployables.index.not_deleted', :count =>
failed.length, :list => failed.join(', '))
end
- redirect_to image_factory_deployables_url
+ redirect_to deployables_url
end
def pick_assemblies
@@ -105,7 +105,7 @@ class DeployablesController < ApplicationController
end
respond_to do |format|
format.js { render :partial => 'assemblies' }
- format.html { redirect_to image_factory_deployable_url(@deployable, :details_tab
=> 'assemblies') and return }
+ format.html { redirect_to deployable_url(@deployable, :details_tab =>
'assemblies') and return }
end
end
@@ -118,7 +118,7 @@ class DeployablesController < ApplicationController
end
respond_to do |format|
format.js { render :partial => 'assemblies' }
- format.html { redirect_to image_factory_deployable_url(@deployable, :details_tab
=> 'assemblies') and return }
+ format.html { redirect_to deployable_url(@deployable, :details_tab =>
'assemblies') and return }
end
end
diff --git a/src/app/controllers/deployments_controller.rb
b/src/app/controllers/deployments_controller.rb
index 8fe4cd0..6bfb78b 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -17,7 +17,7 @@ class DeploymentsController < ApplicationController
@deployment = Deployment.new(:deployable_id => params[:deployable_id])
if @deployment.deployable.assemblies.empty?
flash[:warning] = "Deployable must have at least one assembly"
- redirect_to resources_deployments_path
+ redirect_to deployments_path
else
init_new_deployment_attrs
end
@@ -36,7 +36,7 @@ class DeploymentsController < ApplicationController
:failures => errors
}
end
- redirect_to resources_deployment_path(@deployment)
+ redirect_to deployment_path(@deployment)
else
flash.now[:warning] = "Deployment launch failed"
init_new_deployment_attrs
@@ -87,7 +87,7 @@ class DeploymentsController < ApplicationController
end
flash[:notice] = notices unless notices.blank?
flash[:error] = errors unless errors.blank?
- redirect_to resources_deployments_path
+ redirect_to deployments_path
end
private
diff --git a/src/app/controllers/hardware_profiles_controller.rb
b/src/app/controllers/hardware_profiles_controller.rb
index 54f7e8f..6bbbc90 100644
--- a/src/app/controllers/hardware_profiles_controller.rb
+++ b/src/app/controllers/hardware_profiles_controller.rb
@@ -62,7 +62,7 @@ class HardwareProfilesController < ApplicationController
build_hardware_profile(params[:hardware_profile])
if params[:commit] == 'Save'
if @hardware_profile.save!
- redirect_to admin_hardware_profiles_path
+ redirect_to hardware_profiles_path
else
params.delete :commit
render :action => 'create'
@@ -87,7 +87,7 @@ class HardwareProfilesController < ApplicationController
def update
if params[:commit] == "Reset"
- redirect_to edit_admin_hardware_profile_url(@hardware_profile) and return
+ redirect_to edit_hardware_profile_url(@hardware_profile) and return
end
if params[:id]
@@ -104,7 +104,7 @@ class HardwareProfilesController < ApplicationController
render :action => 'edit' and return
else
flash[:notice] = "Hardware Profile updated!"
- redirect_to admin_hardware_profiles_path
+ redirect_to hardware_profiles_path
end
kick_condor
end
@@ -112,7 +112,7 @@ class HardwareProfilesController < ApplicationController
def multi_destroy
HardwareProfile.destroy(params[:hardware_profile_selected])
kick_condor
- redirect_to admin_hardware_profiles_path
+ redirect_to hardware_profiles_path
end
private
diff --git a/src/app/controllers/image_imports_controller.rb
b/src/app/controllers/image_imports_controller.rb
index 24d286b..8cff787 100644
--- a/src/app/controllers/image_imports_controller.rb
+++ b/src/app/controllers/image_imports_controller.rb
@@ -9,7 +9,7 @@ class ImageImportsController < ApplicationController
begin
Image.import(ProviderAccount.find(params[:provider_account_id]), params[:ami_id],
current_user)
flash[:notice]="Image successfully imported"
- redirect_to image_factory_templates_path
+ redirect_to templates_path
kick_condor
rescue Exception => e
init_provider_vars
diff --git a/src/app/controllers/instances_controller.rb
b/src/app/controllers/instances_controller.rb
index 42e0e01..6e675df 100644
--- a/src/app/controllers/instances_controller.rb
+++ b/src/app/controllers/instances_controller.rb
@@ -22,7 +22,7 @@ class InstancesController < ApplicationController
require_privilege(Privilege::CREATE, Instance, @instance.pool) if @instance.pool
unless @instance.template
- redirect_to select_template_resources_instances_path
+ redirect_to select_template_instances_path
return
end
@@ -41,7 +41,7 @@ class InstancesController < ApplicationController
def create
if params[:cancel]
- redirect_to select_template_resources_instances_path
+ redirect_to select_template_instances_path
return
end
@@ -72,7 +72,7 @@ class InstancesController < ApplicationController
else
flash[:warning] = "Quota Exceeded: Instance will not start until you have
free quota"
end
- redirect_to resources_instances_path
+ redirect_to instances_path
end
end
@@ -103,7 +103,7 @@ class InstancesController < ApplicationController
return
end
flash[:warning] = "SSH Key not found for this Instance."
- redirect_to resources_instance_path(@instance)
+ redirect_to instance_path(@instance)
end
def multi_stop
@@ -130,7 +130,7 @@ class InstancesController < ApplicationController
end
flash[:notice] = notices unless notices.blank?
flash[:error] = errors unless errors.blank?
- redirect_to resources_instances_path
+ redirect_to instances_path
end
def remove_failed
@@ -149,7 +149,7 @@ class InstancesController < ApplicationController
end
flash[:notice] = notices unless notices.blank?
flash[:error] = errors unless errors.blank?
- redirect_to resources_instances_path
+ redirect_to instances_path
end
def can_create
diff --git a/src/app/controllers/pool_families_controller.rb
b/src/app/controllers/pool_families_controller.rb
index 3d1a5fd..d38a04d 100644
--- a/src/app/controllers/pool_families_controller.rb
+++ b/src/app/controllers/pool_families_controller.rb
@@ -29,7 +29,7 @@ class PoolFamiliesController < ApplicationController
else
@pool_family.assign_owner_roles(current_user)
flash[:notice] = "Pool family was added."
- redirect_to admin_pool_families_path
+ redirect_to pool_families_path
end
end
@@ -45,7 +45,7 @@ class PoolFamiliesController < ApplicationController
render :action => 'edit' and return
else
flash[:notice] = "Pool Family was updated!"
- redirect_to admin_pool_families_path
+ redirect_to pool_families_path
end
end
@@ -70,7 +70,7 @@ class PoolFamiliesController < ApplicationController
@pool_family.provider_accounts << @provider_account
flash[:notice] = "Provider Account has been added"
- redirect_to admin_pool_family_path(@pool_family, :details_tab =>
'provider_accounts')
+ redirect_to pool_family_path(@pool_family, :details_tab =>
'provider_accounts')
end
def multi_destroy
@@ -89,7 +89,7 @@ class PoolFamiliesController < ApplicationController
if not_deleted.size > 0
flash[:error] = t 'pool_families.index.not_deleted', :list =>
not_deleted.join(', ')
end
- redirect_to admin_pool_families_path
+ redirect_to pool_families_path
end
def multi_destroy_provider_accounts
@@ -99,7 +99,7 @@ class PoolFamiliesController < ApplicationController
@pool_family.provider_accounts.delete provider_account
end
- redirect_to admin_pool_family_path(@pool_family, :details_tab =>
'provider_accounts')
+ redirect_to pool_family_path(@pool_family, :details_tab =>
'provider_accounts')
end
protected
diff --git a/src/app/controllers/pools_controller.rb
b/src/app/controllers/pools_controller.rb
index ecfff29..7706902 100644
--- a/src/app/controllers/pools_controller.rb
+++ b/src/app/controllers/pools_controller.rb
@@ -108,7 +108,7 @@ class PoolsController < ApplicationController
unless error_messages.empty?
flash[:error] = error_messages.join('<br />')
end
- redirect_to resources_pools_url
+ redirect_to pools_url
end
protected
diff --git a/src/app/controllers/provider_accounts_controller.rb
b/src/app/controllers/provider_accounts_controller.rb
index 438e7ee..1fa0277 100644
--- a/src/app/controllers/provider_accounts_controller.rb
+++ b/src/app/controllers/provider_accounts_controller.rb
@@ -71,7 +71,7 @@ class ProviderAccountsController < ApplicationController
if @provider_account.populate_realms
flash[:notice] = "Provider account added."
end
- redirect_to admin_provider_account_path(@provider_account)
+ redirect_to provider_account_path(@provider_account)
kick_condor
end
@@ -95,7 +95,7 @@ class ProviderAccountsController < ApplicationController
@provider_account.quota.set_maximum_running_instances(limit)
if @provider_account.update_attributes(params[:provider_account])
flash[:notice] = "Provider Account updated!"
- redirect_to admin_provider_account_path(@provider_account)
+ redirect_to provider_account_path(@provider_account)
else
flash[:error] = "Provider Account wasn't updated!"
render :action => :edit
@@ -105,7 +105,7 @@ class ProviderAccountsController < ApplicationController
def multi_destroy
if params[:accounts_selected].blank?
flash[:notice] = "You must select some accounts first."
- redirect_to admin_provider_accounts_url and return
+ redirect_to provider_accounts_url and return
end
succeeded = []
@@ -126,7 +126,7 @@ class ProviderAccountsController < ApplicationController
flash[:error] = t 'provider_accounts.index.account_not_deleted', :count
=> failed.length, :list => failed.join(', ')
end
kick_condor
- redirect_to admin_provider_accounts_url
+ redirect_to provider_accounts_url
end
def set_selected_provider
diff --git a/src/app/controllers/providers_controller.rb
b/src/app/controllers/providers_controller.rb
index 9bbbf8c..f2ad3bf 100644
--- a/src/app/controllers/providers_controller.rb
+++ b/src/app/controllers/providers_controller.rb
@@ -67,7 +67,7 @@ class ProvidersController < ApplicationController
if @provider.save && @provider.populate_hardware_profiles
@provider.assign_owner_roles(current_user)
flash[:notice] = "Provider added."
- redirect_to admin_providers_path
+ redirect_to providers_path
else
flash[:notice] = "Cannot add the provider."
render :action => "new"
@@ -86,7 +86,7 @@ class ProvidersController < ApplicationController
else
if @provider.errors.empty? and @provider.save
flash[:notice] = "Provider updated."
- redirect_to admin_providers_path
+ redirect_to providers_path
else
flash[:notice] = "Cannot update the provider."
render :action => 'edit'
@@ -100,7 +100,7 @@ class ProvidersController < ApplicationController
provider.destroy if check_privilege(Privilege::MODIFY, provider)
end
kick_condor
- redirect_to admin_providers_url
+ redirect_to providers_url
end
def test_connection(provider)
diff --git a/src/app/controllers/realm_mappings_controller.rb
b/src/app/controllers/realm_mappings_controller.rb
index 226cdf9..0af86d0 100644
--- a/src/app/controllers/realm_mappings_controller.rb
+++ b/src/app/controllers/realm_mappings_controller.rb
@@ -12,8 +12,8 @@ class RealmMappingsController < ApplicationController
@realm_target = RealmBackendTarget.new(params[:realm_backend_target])
if @realm_target.save
flash[:notice] = "Realm mapping was added."
- redirect_to admin_realm_path((a)realm_target.frontend_realm, :details_tab =>
'mapping') and return
- #redirect_to admin_realms_path and return
+ redirect_to realm_path((a)realm_target.frontend_realm, :details_tab =>
'mapping') and return
+ #redirect_to realms_path and return
end
load_backend_targets
@@ -24,11 +24,11 @@ class RealmMappingsController < ApplicationController
require_privilege(Privilege::MODIFY, Realm)
if params[:id].blank?
flash[:error] = 'You must select at least one mapping to delete.'
- redirect_to admin_realm_path(params[:frontend_realm_id], :details_tab =>
'mapping')
+ redirect_to realm_path(params[:frontend_realm_id], :details_tab =>
'mapping')
else
# TODO: add permissions checks
destroyed = RealmBackendTarget.destroy(params[:id])
- redirect_to admin_realm_path(destroyed.first.frontend_realm_id, :details_tab =>
'mapping')
+ redirect_to realm_path(destroyed.first.frontend_realm_id, :details_tab =>
'mapping')
end
end
diff --git a/src/app/controllers/realms_controller.rb
b/src/app/controllers/realms_controller.rb
index 7f05ff7..0d782fd 100644
--- a/src/app/controllers/realms_controller.rb
+++ b/src/app/controllers/realms_controller.rb
@@ -19,12 +19,12 @@ class RealmsController < ApplicationController
@realm = FrontendRealm.find(params[:id])
if params[:commit] == "Reset"
- redirect_to edit_admin_realm_url(@realm) and return
+ redirect_to edit_realm_url(@realm) and return
end
if @realm.update_attributes(params[:frontend_realm])
flash[:notice] = 'Realm updated successfully!'
- redirect_to admin_realms_url and return
+ redirect_to realms_url and return
end
load_backend_realms
@@ -36,7 +36,7 @@ class RealmsController < ApplicationController
@realm = FrontendRealm.new(params[:frontend_realm])
if @realm.save
flash[:notice] = "Realm was added."
- redirect_to admin_realms_path and return
+ redirect_to realms_path and return
end
load_backend_realms
@@ -50,7 +50,7 @@ class RealmsController < ApplicationController
require_privilege(Privilege::MODIFY, Realm)
FrontendRealm.destroy(params[:id])
end
- redirect_to admin_realms_path
+ redirect_to realms_path
end
def show
diff --git a/src/app/controllers/roles_controller.rb
b/src/app/controllers/roles_controller.rb
index a0ac666..e8a08b0 100644
--- a/src/app/controllers/roles_controller.rb
+++ b/src/app/controllers/roles_controller.rb
@@ -30,7 +30,7 @@ class RolesController < ApplicationController
if @role.save
flash[:notice] = 'Role successfully saved!'
- redirect_to admin_roles_path and return
+ redirect_to roles_path and return
end
render :action => 'new'
@@ -64,12 +64,12 @@ class RolesController < ApplicationController
@role = Role.find(params[:id])
if params[:commit] == "Reset"
- redirect_to edit_admin_role_url(@role) and return
+ redirect_to edit_role_url(@role) and return
end
if @role.update_attributes(params[:role])
flash[:notice] = 'Role updated successfully!'
- redirect_to admin_roles_url and return
+ redirect_to roles_url and return
end
render :action => 'edit'
@@ -78,7 +78,7 @@ class RolesController < ApplicationController
def multi_destroy
require_privilege(Privilege::PERM_SET)
Role.destroy(params[:role_selected])
- redirect_to admin_roles_url
+ redirect_to roles_url
end
protected
diff --git a/src/app/controllers/templates_controller.rb
b/src/app/controllers/templates_controller.rb
index 786f55a..53e17b7 100644
--- a/src/app/controllers/templates_controller.rb
+++ b/src/app/controllers/templates_controller.rb
@@ -80,7 +80,7 @@ class TemplatesController < ApplicationController
if params[:create_deployable]
Deployable.create!(:name => @tpl.name, :assemblies => @tpl.assemblies,
:owner => current_user)
end
- redirect_to image_factory_templates_path
+ redirect_to templates_path
else
@repository_manager = RepositoryManager.new(:repositories => params[:repository]
|| @tpl.platform)
render :new
@@ -96,7 +96,7 @@ class TemplatesController < ApplicationController
if @tpl.update_attributes(params[:tpl])
@tpl.set_complete
flash[:notice] = "Template updated."
- redirect_to image_factory_templates_path
+ redirect_to templates_path
else
@repository_manager = RepositoryManager.new(:repositories => params[:repository]
|| @tpl.platform)
render :action => 'edit'
@@ -201,7 +201,7 @@ class TemplatesController < ApplicationController
unless failed.empty?
flash[:error] = t('templates.index.not_deleted', :count =>
failed.length, :list => failed.join(', '))
end
- redirect_to image_factory_templates_url
+ redirect_to templates_url
end
protected
diff --git a/src/app/controllers/users_controller.rb
b/src/app/controllers/users_controller.rb
index 8e3484c..2d9459c 100644
--- a/src/app/controllers/users_controller.rb
+++ b/src/app/controllers/users_controller.rb
@@ -39,7 +39,7 @@ class UsersController < ApplicationController
if current_user != @user
flash[:notice] = "User registered!"
- redirect_to admin_users_url
+ redirect_to users_url
else
flash[:notice] = "You have successfully registered!"
redirect_to root_url
@@ -75,7 +75,7 @@ class UsersController < ApplicationController
require_privilege(Privilege::MODIFY, User) unless @user == current_user
if params[:commit] == "Reset"
- redirect_to edit_admin_user_url(@user) and return
+ redirect_to edit_user_url(@user) and return
end
redirect_to root_url and return unless @user
@@ -84,7 +84,7 @@ class UsersController < ApplicationController
render :action => 'edit' and return
else
flash[:notice] = "User updated!"
- redirect_to (@user == current_user) ? root_url : admin_users_url
+ redirect_to (@user == current_user) ? root_url : users_url
end
end
@@ -103,7 +103,7 @@ class UsersController < ApplicationController
msg = "Deleted user#{'s' if deleted_users.length > 1}"
flash[:notice] = "#{msg}: #{deleted_users.join(', ')}"
end
- redirect_to admin_users_url
+ redirect_to users_url
end
protected
diff --git a/src/app/helpers/providers_helper.rb b/src/app/helpers/providers_helper.rb
index 3c0d348..cfc12b7 100644
--- a/src/app/helpers/providers_helper.rb
+++ b/src/app/helpers/providers_helper.rb
@@ -2,7 +2,7 @@ module ProvidersHelper
def edit_button(provider, action)
if provider and action == 'show'
- link_to 'Edit', edit_admin_provider_path(provider), :class =>
'button', :id => 'edit_button'
+ link_to 'Edit', edit_provider_path(provider), :class =>
'button', :id => 'edit_button'
else
content_tag('a', 'Edit', :href => '#', :class =>
'button disabled')
end
diff --git a/src/app/views/assemblies/index.haml b/src/app/views/assemblies/index.haml
index 766d92c..aba40ed 100644
--- a/src/app/views/assemblies/index.haml
+++ b/src/app/views/assemblies/index.haml
@@ -1 +1 @@
-image_factory/assemblies/index.haml
+assemblies/index.haml
diff --git a/src/app/views/deployables/_assemblies.haml
b/src/app/views/deployables/_assemblies.haml
index 9af208b..01bf09a 100644
--- a/src/app/views/deployables/_assemblies.haml
+++ b/src/app/views/deployables/_assemblies.haml
@@ -1,7 +1,7 @@
.grid_13
- form_tag do
- = restful_submit_tag "Remove Selected", 'destroy',
remove_assemblies_image_factory_deployable_path(@deployable), 'DELETE', :id =>
'delete_button'
- = link_to "Add Assembly...",
pick_assemblies_image_factory_deployable_path(@deployable), :class => 'button',
:id => 'add_assembly'
+ = restful_submit_tag "Remove Selected", 'destroy',
remove_assemblies_deployable_path(@deployable), 'DELETE', :id =>
'delete_button'
+ = link_to "Add Assembly...", pick_assemblies_deployable_path(@deployable),
:class => 'button', :id => 'add_assembly'
%table#assemblies_table
%thead
diff --git a/src/app/views/deployables/_deployments.haml
b/src/app/views/deployables/_deployments.haml
index 77af2f9..d2ce11a 100644
--- a/src/app/views/deployables/_deployments.haml
+++ b/src/app/views/deployables/_deployments.haml
@@ -10,7 +10,7 @@
%td
- selected = @url_params[:select] == 'all'
%input{:name => "deployments_selected[]", :type =>
"checkbox", :value => deployment.id, :id =>
"deployment_checkbox_#{deployment.id}", :checked => selected }
- = link_to deployment.name, resources_deployment_path(deployment)
+ = link_to deployment.name, deployment_path(deployment)
%td
= deployment.deployable.name
%td
diff --git a/src/app/views/deployables/_form.haml b/src/app/views/deployables/_form.haml
index 98c2232..bf54513 100644
--- a/src/app/views/deployables/_form.haml
+++ b/src/app/views/deployables/_form.haml
@@ -7,4 +7,4 @@
= form.text_area :summary, :class => "grid_5", :rows => 3
%fieldset.clearfix
= form.submit "Save", :class => "submit formbutton"
- = link_to t(:cancel), image_factory_deployables_path, :class => 'button
formbutton'
+ = link_to t(:cancel), deployables_path, :class => 'button formbutton'
diff --git a/src/app/views/deployables/_list.haml b/src/app/views/deployables/_list.haml
index e2933f0..b0fb991 100644
--- a/src/app/views/deployables/_list.haml
+++ b/src/app/views/deployables/_list.haml
@@ -1,17 +1,17 @@
- form_tag do
- = link_to "Create", new_image_factory_deployable_url, :class =>
'button'
- = restful_submit_tag "Delete", 'destroy',
multi_destroy_image_factory_deployables_path, 'DELETE', :id =>
'delete_button'
+ = link_to "Create", new_deployable_url, :class => 'button'
+ = restful_submit_tag "Delete", 'destroy',
multi_destroy_deployables_path, 'DELETE', :id => 'delete_button'
%table#deployables_table
%thead
%tr
%th
- %th= link_to "Name", image_factory_deployables_url(:sort_by =>
"name")
+ %th= link_to "Name", deployables_url(:sort_by => "name")
-(a)deployables.each do |deployable|
%tr
%td
%input{:name => "deployables_selected[]", :type =>
"checkbox", :value => deployable.id, :id =>
"deployable_checkbox_#{deployable.id}" }
- %td= link_to deployable.name, image_factory_deployable_path(deployable)
+ %td= link_to deployable.name, deployable_path(deployable)
:javascript
$(document).ready(function () {
diff --git a/src/app/views/deployables/_pick_assemblies.haml
b/src/app/views/deployables/_pick_assemblies.haml
index cfaf30b..01e472b 100644
--- a/src/app/views/deployables/_pick_assemblies.haml
+++ b/src/app/views/deployables/_pick_assemblies.haml
@@ -1,5 +1,5 @@
.grid_13
- - form_tag(image_factory_deployable_path(@deployable)) do
+ - form_tag(deployable_path(@deployable)) do
%table#assemblies_list
%thead
%tr
@@ -12,5 +12,5 @@
%td= assembly.name
-# AJAX post
- = restful_submit_tag('Save', 'add_assemblies',
add_assemblies_image_factory_deployable_path(@deployable), 'PUT')
- = link_to "Back", image_factory_deployable_path(@deployable, :details_tab
=> 'assemblies'), :class => 'button'
+ = restful_submit_tag('Save', 'add_assemblies',
add_assemblies_deployable_path(@deployable), 'PUT')
+ = link_to "Back", deployable_path(@deployable, :details_tab =>
'assemblies'), :class => 'button'
diff --git a/src/app/views/deployables/_properties.haml
b/src/app/views/deployables/_properties.haml
index ce50669..1fbf002 100644
--- a/src/app/views/deployables/_properties.haml
+++ b/src/app/views/deployables/_properties.haml
@@ -1,8 +1,8 @@
.grid_13
%h2 #{(a)deployable.name}
- = link_to 'Edit', edit_image_factory_deployable_path(@deployable), :class =>
'button'
+ = link_to 'Edit', edit_deployable_path(@deployable), :class =>
'button'
- if @deployable.launchable?
- = link_to "Launch", new_resources_deployment_path(:deployable_id =>
@deployable.id), {:class => 'button'}
+ = link_to "Launch", new_deployment_path(:deployable_id =>
@deployable.id), {:class => 'button'}
- else
The deployable can't be launched - the deployable must have at least one assembly
and each assembly must have at least one template.
diff --git a/src/app/views/deployables/edit.haml b/src/app/views/deployables/edit.haml
index fc47660..fd81aeb 100644
--- a/src/app/views/deployables/edit.haml
+++ b/src/app/views/deployables/edit.haml
@@ -1,4 +1,4 @@
%h2 Editing Deployable: #{(a)deployable.name}
-- form_for @deployable, :url => image_factory_deployable_path(@deployable), :html
=> { :method => :put } do |f|
+- form_for @deployable, :url => deployable_path(@deployable), :html => { :method
=> :put } do |f|
= render :partial => "form", :locals => { :form => f }
diff --git a/src/app/views/deployables/new.haml b/src/app/views/deployables/new.haml
index cc582a3..50abe11 100644
--- a/src/app/views/deployables/new.haml
+++ b/src/app/views/deployables/new.haml
@@ -1,3 +1,3 @@
%h2 New Deployable
-- form_for @deployable, :url => image_factory_deployables_path do |f|
+- form_for @deployable, :url => deployables_path do |f|
= render :partial => "form", :locals => { :form => f }
diff --git a/src/app/views/deployments/_list.haml b/src/app/views/deployments/_list.haml
index 7b80677..2d89766 100644
--- a/src/app/views/deployments/_list.haml
+++ b/src/app/views/deployments/_list.haml
@@ -1,14 +1,14 @@
- form_tag do
#object-actions
- = restful_submit_tag "Start", "start",
resources_deployments_path, "PUT"
- = restful_submit_tag "Stop", "stop",
multi_stop_resources_deployments_path, "GET"
- = restful_submit_tag "Launch new", "launch_new",
launch_new_resources_deployments_path, "GET"
- = restful_submit_tag "Delete", "delete",
resources_deployments_path, "DELETE"
+ = restful_submit_tag "Start", "start", deployments_path,
"PUT"
+ = restful_submit_tag "Stop", "stop", multi_stop_deployments_path,
"GET"
+ = restful_submit_tag "Launch new", "launch_new",
launch_new_deployments_path, "GET"
+ = restful_submit_tag "Delete", "delete", deployments_path,
"DELETE"
#search-actions
- = restful_submit_tag "Save Search", "save_search",
resources_deployments_path, "PUT"
- = restful_submit_tag "Save Selection", "save_selection",
resources_deployments_path, "PUT"
- = restful_submit_tag "Export to File", "export",
resources_deployments_path, "PUT"
+ = restful_submit_tag "Save Search", "save_search",
deployments_path, "PUT"
+ = restful_submit_tag "Save Selection", "save_selection",
deployments_path, "PUT"
+ = restful_submit_tag "Export to File", "export",
deployments_path, "PUT"
%p
Select:
@@ -24,12 +24,12 @@
- selected = @url_params[:select] == 'all'
%input{:name => "deployments_selected[]", :type =>
"checkbox", :value => deployment.id, :id =>
"deployment_checkbox_#{deployment.id}", :checked => selected }
%td
- = link_to deployment.name, resources_deployment_path(deployment)
+ = link_to deployment.name, deployment_path(deployment)
%td
- = link_to deployment.deployable.name,
image_factory_deployable_path(deployment.deployable)
+ = link_to deployment.deployable.name, deployable_path(deployment.deployable)
%td
= deployment.owner.login
%td
= deployment.created_at
%td
- = link_to deployment.pool.name, resources_pool_path(deployment.pool)
+ = link_to deployment.pool.name, pool_path(deployment.pool)
diff --git a/src/app/views/deployments/launch_new.haml
b/src/app/views/deployments/launch_new.haml
index 86cf47f..6edf475 100644
--- a/src/app/views/deployments/launch_new.haml
+++ b/src/app/views/deployments/launch_new.haml
@@ -1,6 +1,6 @@
%h2 Launch new deployment via
-- form_tag new_resources_deployment_path, :method => :get do
+- form_tag new_deployment_path, :method => :get do
= label_tag "Deployable:"
= select_tag :deployable_id,
options_from_collection_for_select(@launchable_deployables, "id",
"name")
= submit_tag "Launch"
- = link_to "Cancel", resources_deployments_path, :class =>
"button"
+ = link_to "Cancel", deployments_path, :class => "button"
diff --git a/src/app/views/deployments/new.haml b/src/app/views/deployments/new.haml
index 42e75fe..390840d 100644
--- a/src/app/views/deployments/new.haml
+++ b/src/app/views/deployments/new.haml
@@ -1,6 +1,6 @@
= error_messages_for 'deployment'
%h2 Launch deployable
-- form_for @deployment, :url => resources_deployments_path do
+- form_for @deployment, :url => deployments_path do
= hidden_field :deployment, :deployable_id
%ul
%li
diff --git a/src/app/views/hardware_profiles/_list.haml
b/src/app/views/hardware_profiles/_list.haml
index eee5ff1..339ec36 100644
--- a/src/app/views/hardware_profiles/_list.haml
+++ b/src/app/views/hardware_profiles/_list.haml
@@ -1,7 +1,7 @@
- form_tag do
#object-actions
- = link_to "New Hardware Profile", new_admin_hardware_profile_path, :class
=> 'button'
- = restful_submit_tag "Delete", 'destroy',
multi_destroy_admin_hardware_profiles_path, 'DELETE', :id =>
'delete_button'
+ = link_to "New Hardware Profile", new_hardware_profile_path, :class =>
'button'
+ = restful_submit_tag "Delete", 'destroy',
multi_destroy_hardware_profiles_path, 'DELETE', :id => 'delete_button'
#selections
%p
Select:
@@ -17,7 +17,7 @@
%td
- selected = @url_params[:select] == 'all'
%input{:name => "hardware_profile_selected[]", :type =>
"checkbox", :value => hwp.id, :id =>
"hardware_profile_checkbox_#{hwp.id}", :checked => selected }
- = link_to hwp.name, admin_hardware_profile_path(hwp)
+ = link_to hwp.name, hardware_profile_path(hwp)
%td
=hwp.architecture.to_s
%td
diff --git a/src/app/views/hardware_profiles/_matching_provider_hardware_profiles.haml
b/src/app/views/hardware_profiles/_matching_provider_hardware_profiles.haml
index 49c45e3..8384aa3 100644
--- a/src/app/views/hardware_profiles/_matching_provider_hardware_profiles.haml
+++ b/src/app/views/hardware_profiles/_matching_provider_hardware_profiles.haml
@@ -8,9 +8,9 @@
%tr
%td
- if hwp.provider
- = link_to hwp.provider.name, admin_provider_path(hwp.provider)
+ = link_to hwp.provider.name, provider_path(hwp.provider)
%td
- = link_to hwp.name, admin_hardware_profile_path(hwp)
+ = link_to hwp.name, hardware_profile_path(hwp)
%td
=hwp.architecture.to_s
%td
@@ -21,4 +21,4 @@
=hwp.cpu.to_s
- else
%h3
- No Matching Provider Hardware Profiles Could be found
\ No newline at end of file
+ No Matching Provider Hardware Profiles Could be found
diff --git a/src/app/views/hardware_profiles/_properties.haml
b/src/app/views/hardware_profiles/_properties.haml
index 0739b84..dd5a05b 100644
--- a/src/app/views/hardware_profiles/_properties.haml
+++ b/src/app/views/hardware_profiles/_properties.haml
@@ -1,6 +1,6 @@
%h3
= @hardware_profile.name + "(" + (@hardware_profile.provider_id.nil? ?
"Front End" : "Provider" ) + ")"
- = link_to 'Edit', edit_admin_hardware_profile_path(@hardware_profile), :class
=> 'button'
+ = link_to 'Edit', edit_hardware_profile_path(@hardware_profile), :class =>
'button'
%table
= sortable_table_header @properties_header
- @hwp_properties.each do |hwpp|
diff --git a/src/app/views/hardware_profiles/edit.haml
b/src/app/views/hardware_profiles/edit.haml
index e32eebd..3fd0b73 100644
--- a/src/app/views/hardware_profiles/edit.haml
+++ b/src/app/views/hardware_profiles/edit.haml
@@ -1,7 +1,7 @@
- content_for :list do
%h3
Edit Hardware Profile
- -form_for @hardware_profile, :url => admin_hardware_profile_path(@hardware_profile),
:html => { :multipart => true } do |hwp_form|
+ -form_for @hardware_profile, :url => hardware_profile_path(@hardware_profile), :html
=> { :multipart => true } do |hwp_form|
= render :partial => "form", :locals => { :hwp_form => hwp_form }
- content_for :details do
= render :partial => 'layouts/details_pane'
diff --git a/src/app/views/hardware_profiles/new.haml
b/src/app/views/hardware_profiles/new.haml
index 3355c87..e19fb46 100644
--- a/src/app/views/hardware_profiles/new.haml
+++ b/src/app/views/hardware_profiles/new.haml
@@ -1,7 +1,7 @@
- content_for :list do
%h3
New Hardware Profile
- -form_for @hardware_profile, :url => admin_hardware_profiles_path, :html => {
:multipart => true } do |hwp_form|
+ -form_for @hardware_profile, :url => hardware_profiles_path, :html => {
:multipart => true } do |hwp_form|
= render :partial => "form", :locals => { :hwp_form => hwp_form }
- content_for :details do
- = render :partial => 'layouts/details_pane'
\ No newline at end of file
+ = render :partial => 'layouts/details_pane'
diff --git a/src/app/views/image_imports/new.haml b/src/app/views/image_imports/new.haml
index cebc7a7..8c18021 100644
--- a/src/app/views/image_imports/new.haml
+++ b/src/app/views/image_imports/new.haml
@@ -1,8 +1,8 @@
-- form_tag :image_factory_image_imports do
+- form_tag :image_imports do
%fieldset.clear
= label_tag :provider_account_id, "Provider Account ID: "
= select_tag :provider_account_id,
option_groups_from_collection_for_select(@providers,:provider_accounts, :name, :id,:name)
%fieldset.clear
= label_tag :ami_id, "Image ID: "
= text_field_tag :ami_id, params[:ami_id]
- = restful_submit_tag "Import", 'create',
image_factory_image_imports_path, 'POST', :class => "submit"
+ = restful_submit_tag "Import", 'create', image_imports_path,
'POST', :class => "submit"
diff --git a/src/app/views/instances/_list.haml b/src/app/views/instances/_list.haml
index 7a6cbc4..2c6f9d7 100644
--- a/src/app/views/instances/_list.haml
+++ b/src/app/views/instances/_list.haml
@@ -1,7 +1,7 @@
- form_tag do
- = restful_submit_tag 'Stop', 'stop',
multi_stop_resources_instances_path, 'GET'
- = restful_submit_tag 'Create', 'new',
select_template_resources_instances_path, 'GET'
- = restful_submit_tag 'Remove failed', 'remove_failed',
remove_failed_resources_instances_path, 'GET'
+ = restful_submit_tag 'Stop', 'stop', multi_stop_instances_path,
'GET'
+ = restful_submit_tag 'Create', 'new', select_template_instances_path,
'GET'
+ = restful_submit_tag 'Remove failed', 'remove_failed',
remove_failed_instances_path, 'GET'
%p
Select:
@@ -15,7 +15,7 @@
%td
- selected = params[:select] == 'all'
%input{:name => 'instance_selected[]', :type =>
'checkbox', :value => inst.id, :id =>
"instance_checkbox_#{inst.id}", :checked => selected }
- = link_to inst.name, resources_instance_path(inst)
+ = link_to inst.name, instance_path(inst)
%td= inst.state
%td= inst.template ? inst.template.name : "#{inst.assembly.name}
(assembly)"
%td= inst.public_addresses
diff --git a/src/app/views/instances/_properties.haml
b/src/app/views/instances/_properties.haml
index 2d93dbf..cc5877d 100644
--- a/src/app/views/instances/_properties.haml
+++ b/src/app/views/instances/_properties.haml
@@ -52,7 +52,7 @@
- if @instance.instance_key
%li
= label_tag :instance_key, 'SSH key'
- %span= link_to("Download", key_resources_instance_path(@instance))
+ %span= link_to("Download", key_instance_path(@instance))
%li
= label_tag :owner, 'Owner'
%span= "#{(a)instance.owner.first_name} #{(a)instance.owner.last_name}"
diff --git a/src/app/views/instances/new.haml b/src/app/views/instances/new.haml
index 7839ba9..139d08d 100644
--- a/src/app/views/instances/new.haml
+++ b/src/app/views/instances/new.haml
@@ -1,6 +1,6 @@
= error_messages_for 'instance'
%h2 Launch instance
-- form_for @instance, :url => resources_instances_path do
+- form_for @instance, :url => instances_path do
= hidden_field :instance, :template_id
%ul
%li
diff --git a/src/app/views/instances/select_template.haml
b/src/app/views/instances/select_template.haml
index a2dfbeb..a0c9117 100644
--- a/src/app/views/instances/select_template.haml
+++ b/src/app/views/instances/select_template.haml
@@ -3,7 +3,7 @@
%ul
- @templates.each do |tpl|
%li
- - form_tag new_resources_instance_path do
+ - form_tag new_instance_path do
= hidden_field :instance, :template_id, :value => tpl.id
- if tpl.platform != "unknown"
= image_tag "platform_#{tpl.platform}.png", :size =>
"32x32", :alt => tpl.platform
diff --git a/src/app/views/layouts/_header.haml b/src/app/views/layouts/_header.haml
index f319082..d853ad2 100644
--- a/src/app/views/layouts/_header.haml
+++ b/src/app/views/layouts/_header.haml
@@ -12,7 +12,7 @@
= t(:configure)
%li.hello
- - link_to edit_admin_user_path(@current_user) do
+ - link_to edit_user_path(@current_user) do
= t(:hello) + " "
%b
= "#{(a)current_user.first_name} #{(a)current_user.last_name}"
diff --git a/src/app/views/pool_families/_list.haml
b/src/app/views/pool_families/_list.haml
index 323b6b7..596dc2e 100644
--- a/src/app/views/pool_families/_list.haml
+++ b/src/app/views/pool_families/_list.haml
@@ -1,6 +1,6 @@
- form_tag do
- = link_to "Create", new_admin_pool_family_path, :class =>
"button"
- = restful_submit_tag "Delete", 'destroy',
multi_destroy_admin_pool_families_path, 'DELETE', :id =>
'delete_button'
+ = link_to "Create", new_pool_family_path, :class => "button"
+ = restful_submit_tag "Delete", 'destroy',
multi_destroy_pool_families_path, 'DELETE', :id => 'delete_button'
%p
Select:
@@ -16,7 +16,7 @@
%td
- selected = @url_params[:select] == 'all'
%input{:name => "pool_family_selected[]", :type =>
"checkbox", :value => pool_family.id, :id =>
"pool_family_checkbox_#{pool_family.id}", :checked => selected }
- = link_to pool_family.name, admin_pool_family_path(pool_family)
+ = link_to pool_family.name, pool_family_path(pool_family)
%td
= pool_family.quota.maximum_running_instances or 'unlimited'
%td
diff --git a/src/app/views/pool_families/_properties.haml
b/src/app/views/pool_families/_properties.haml
index 02d197e..4740ee4 100644
--- a/src/app/views/pool_families/_properties.haml
+++ b/src/app/views/pool_families/_properties.haml
@@ -1,4 +1,4 @@
%h3
Properties for
= @pool_family.name
-= link_to "Edit", edit_admin_pool_family_path(@pool_family), {:class =>
'button'}
+= link_to "Edit", edit_pool_family_path(@pool_family), {:class =>
'button'}
diff --git a/src/app/views/pool_families/_provider_accounts.haml
b/src/app/views/pool_families/_provider_accounts.haml
index 358e3d2..4d22b9c 100644
--- a/src/app/views/pool_families/_provider_accounts.haml
+++ b/src/app/views/pool_families/_provider_accounts.haml
@@ -4,7 +4,7 @@
- unless @pool_family.provider_accounts.blank?
- form_tag do
- = restful_submit_tag "Remove selected", 'destroy',
multi_destroy_provider_accounts_admin_pool_families_path(:pool_family_id =>
@pool_family.id), 'DELETE', :id => 'delete_button'
+ = restful_submit_tag "Remove selected", 'destroy',
multi_destroy_provider_accounts_pool_families_path(:pool_family_id => @pool_family.id),
'DELETE', :id => 'delete_button'
= #submit_tag "Remove selected"
%table#provider_accounts_table
@@ -17,7 +17,7 @@
= provider_account.name
- unless @pool_family.provider_accounts.count == ProviderAccount.all.count
- - form_for :pool_family, :url => add_provider_account_admin_pool_families_path(:id
=> @pool_family.id) do |f|
+ - form_for :pool_family, :url => add_provider_account_pool_families_path(:id =>
@pool_family.id) do |f|
- unless @pool_family.provider_accounts.blank?
= select_tag :provider_account_id, options_for_select(ProviderAccount.find(:all,
:conditions => [ "id NOT IN (?)", @pool_family.provider_account_ids
]).collect{ |pa| [pa.name, pa.id] })
- else
diff --git a/src/app/views/pool_families/edit.haml
b/src/app/views/pool_families/edit.haml
index 1c09438..30b2447 100644
--- a/src/app/views/pool_families/edit.haml
+++ b/src/app/views/pool_families/edit.haml
@@ -3,5 +3,5 @@
= @pool_family.name
Pool Family
--form_for @pool_family, :url => admin_pool_family_path(@pool_family), :html => {
:method => :put } do |f|
- = render :partial => 'form', :locals => { :form => f, :cancel_path
=> admin_providers_path }
+-form_for @pool_family, :url => pool_family_path(@pool_family), :html => { :method
=> :put } do |f|
+ = render :partial => 'form', :locals => { :form => f, :cancel_path
=> providers_path }
diff --git a/src/app/views/pool_families/new.haml b/src/app/views/pool_families/new.haml
index 7dbac4c..8200805 100644
--- a/src/app/views/pool_families/new.haml
+++ b/src/app/views/pool_families/new.haml
@@ -1,3 +1,3 @@
%h2 Create a new Pool family
-- form_for @pool_family, :url => admin_pool_families_path do |f|
- = render :partial => "form", :locals => { :form => f, :cancel_path
=> admin_pool_families_path }
+- form_for @pool_family, :url => pool_families_path do |f|
+ = render :partial => "form", :locals => { :form => f, :cancel_path
=> pool_families_path }
diff --git a/src/app/views/pools/_instances.haml b/src/app/views/pools/_instances.haml
index 260a9f8..44dcc1a 100644
--- a/src/app/views/pools/_instances.haml
+++ b/src/app/views/pools/_instances.haml
@@ -1,10 +1,10 @@
- form_tag do
- = restful_submit_tag 'Stop', 'stop',
multi_stop_resources_instances_path, 'GET'
+ = restful_submit_tag 'Stop', 'stop', multi_stop_instances_path,
'GET'
Show only
= hidden_field_tag 'details_tab', 'instances'
= select '', 'state', Instance::STATES, { :include_blank => true,
:selected => params[:state] }
instances
- = restful_submit_tag "Filter", 'show', resources_pool_path,
'GET', :id => 'filter_button'
+ = restful_submit_tag "Filter", 'show', pool_path, 'GET', :id
=> 'filter_button'
%table
%thead
@@ -17,12 +17,12 @@
%tr
%td
%input{:name => 'instance_selected[]', :type =>
'checkbox', :value => instance.id, :id =>
"instance_checkbox_#{instance.id}" }
- = link_to instance.name, resources_instance_path(instance)
+ = link_to instance.name, instance_path(instance)
%td
- = instance.assembly.present? ? link_to((instance.assembly.name),
image_factory_assembly_path(instance.assembly)) : '—'
+ = instance.assembly.present? ? link_to((instance.assembly.name),
assembly_path(instance.assembly)) : '—'
%td
- = instance.deployment.present? ? link_to((instance.deployment.name),
resources_deployment_path(instance.deployment)) : '—'
+ = instance.deployment.present? ? link_to((instance.deployment.name),
deployment_path(instance.deployment)) : '—'
%td
= instance.created_at.to_s
%td
- = instance.state
\ No newline at end of file
+ = instance.state
diff --git a/src/app/views/pools/_list.haml b/src/app/views/pools/_list.haml
index c8083b7..ff02c26 100644
--- a/src/app/views/pools/_list.haml
+++ b/src/app/views/pools/_list.haml
@@ -1,6 +1,6 @@
- form_tag do
- = link_to "New Pool", new_resources_pool_path, { :class =>
'button' }
- = restful_submit_tag "Destroy", 'destroy',
multi_destroy_resources_pools_path, 'DELETE', :id => 'delete_button'
+ = link_to "New Pool", new_pool_path, { :class => 'button' }
+ = restful_submit_tag "Destroy", 'destroy', multi_destroy_pools_path,
'DELETE', :id => 'delete_button'
%p
Select:
= link_to "All", @url_params.merge(:select => 'all')
@@ -13,7 +13,7 @@
%td
- selected = @url_params[:select] == 'all'
%input{:name => "pools_selected[]", :type =>
"checkbox", :value => pool.id, :id =>
"pool_checkbox_#{pool.id}", :checked => selected }
- = link_to pool.name, resources_pool_path(pool)
+ = link_to pool.name, pool_path(pool)
%td
= pool.quota.maximum_running_instances or 'unlimited'
%td
diff --git a/src/app/views/pools/_properties.haml b/src/app/views/pools/_properties.haml
index 066a491..3e757f2 100644
--- a/src/app/views/pools/_properties.haml
+++ b/src/app/views/pools/_properties.haml
@@ -1,4 +1,4 @@
%h3
Properties for
= @pool.name
-= link_to "Edit", edit_resources_pool_path(@pool), { :class =>
'button' }
+= link_to "Edit", edit_pool_path(@pool), { :class => 'button' }
diff --git a/src/app/views/pools/new.haml b/src/app/views/pools/new.haml
index 5c48c9e..09df69e 100644
--- a/src/app/views/pools/new.haml
+++ b/src/app/views/pools/new.haml
@@ -1,6 +1,6 @@
= error_messages_for :pool
%h1 Create a new Pool
-- form_for @pool, :url => resources_pools_path do |form|
+- form_for @pool, :url => pools_path do |form|
%fieldset
= form.label :name, "Name:", :class => "grid_2 alpha"
= form.text_field :name
diff --git a/src/app/views/provider_accounts/_list.haml
b/src/app/views/provider_accounts/_list.haml
index b431f9b..45898ef 100644
--- a/src/app/views/provider_accounts/_list.haml
+++ b/src/app/views/provider_accounts/_list.haml
@@ -1,6 +1,6 @@
- form_tag do
- = link_to "New Account", new_admin_provider_account_path, :class =>
'button'
- = restful_submit_tag "Delete", "delete",
multi_destroy_admin_provider_accounts_path, 'DELETE'
+ = link_to "New Account", new_provider_account_path, :class =>
'button'
+ = restful_submit_tag "Delete", "delete",
multi_destroy_provider_accounts_path, 'DELETE'
%p
Select:
= link_to "All", @url_params.merge(:select => 'all')
@@ -13,7 +13,7 @@
%td
- selected = @url_params[:select] == 'all'
%input{:name => 'accounts_selected[]', :type =>
'checkbox', :value => account.id, :id =>
"account_checkbox_#{account.id}", :checked => selected }
- = link_to account.name, admin_provider_account_path(account)
+ = link_to account.name, provider_account_path(account)
%td
=account.credentials_hash['username']
%td
diff --git a/src/app/views/provider_accounts/_properties.haml
b/src/app/views/provider_accounts/_properties.haml
index 27789a1..e7d987d 100644
--- a/src/app/views/provider_accounts/_properties.haml
+++ b/src/app/views/provider_accounts/_properties.haml
@@ -9,5 +9,5 @@
%label
Account ID:
= @account.credentials_hash['account_number']
-= link_to "Edit", edit_admin_provider_account_path(@account), { :class =>
'button' }
-= link_to "Test", admin_provider_account_path(@account, {:test_account =>
true}), { :class => 'button' }
+= link_to "Edit", edit_provider_account_path(@account), { :class =>
'button' }
+= link_to "Test", provider_account_path(@account, {:test_account => true}),
{ :class => 'button' }
diff --git a/src/app/views/provider_accounts/_provider_selection.haml
b/src/app/views/provider_accounts/_provider_selection.haml
index 2095fde..eb8728f 100644
--- a/src/app/views/provider_accounts/_provider_selection.haml
+++ b/src/app/views/provider_accounts/_provider_selection.haml
@@ -1,7 +1,7 @@
%fieldset#provider_type.clear
= label_tag "Provider: "
= select(:provider_account, :provider_id, options_for_select((a)providers.map{ |p|
[p.name, p.id] }, :selected => @selected_provider.id))
- = restful_submit_tag "Choose",
'set_selected_provider',set_selected_provider_admin_provider_accounts_path,
'GET', :class => 'button'
+ = restful_submit_tag "Choose",
'set_selected_provider',set_selected_provider_provider_accounts_path,
'GET', :class => 'button'
= label_tag "Cloud type: "
= @selected_provider.provider_type.name
- unless @selected_provider.provider_type.codename.nil?
@@ -15,7 +15,7 @@
$("#provider_account_provider_id").change(function()
{
selected_provider = $("option:selected").attr('value');
- $.get("#{set_selected_provider_admin_provider_accounts_url}",
{'provider_account[provider_id]':selected_provider},
+ $.get("#{set_selected_provider_provider_accounts_url}",
{'provider_account[provider_id]':selected_provider},
function(result) {
$("#provider_type").html(result);
}
diff --git a/src/app/views/provider_accounts/edit.haml
b/src/app/views/provider_accounts/edit.haml
index 9da4d1c..8a63d1d 100644
--- a/src/app/views/provider_accounts/edit.haml
+++ b/src/app/views/provider_accounts/edit.haml
@@ -2,7 +2,7 @@
= error_messages_for :provider_account
%h2
= t('provider_accounts.edit.edit_provider_account')
- - form_tag(admin_provider_account_path, { :method => :put, :multipart => true })
do
+ - form_tag(provider_account_path, { :method => :put, :multipart => true }) do
= render :partial => 'provider_selection'
%fieldset.clearfix
.grid_13.alpha.omega
diff --git a/src/app/views/provider_accounts/new.haml
b/src/app/views/provider_accounts/new.haml
index f1a5e2a..65396f3 100644
--- a/src/app/views/provider_accounts/new.haml
+++ b/src/app/views/provider_accounts/new.haml
@@ -6,7 +6,7 @@
Provider
%fieldset.clear
- unless @providers.empty?
- - form_for(@provider_account, :url => admin_provider_accounts_path, :html =>
{:multipart => true}) do |f|
+ - form_for(@provider_account, :url => provider_accounts_path, :html =>
{:multipart => true}) do |f|
= render :partial => 'provider_selection'
%fieldset.clearfix
.grid_13.alpha.omega
diff --git a/src/app/views/providers/_list.haml b/src/app/views/providers/_list.haml
index 7de6e32..bef0b5f 100644
--- a/src/app/views/providers/_list.haml
+++ b/src/app/views/providers/_list.haml
@@ -1,6 +1,6 @@
- form_tag do
- = link_to "Create", new_admin_provider_url, :class => "button"
- = restful_submit_tag "Delete", 'destroy',
multi_destroy_admin_providers_path, 'DELETE', :id => 'delete_button'
+ = link_to "Create", new_provider_url, :class => "button"
+ = restful_submit_tag "Delete", 'destroy',
multi_destroy_providers_path, 'DELETE', :id => 'delete_button'
%p
Select:
@@ -15,6 +15,6 @@
%td
- selected = @url_params[:select] == 'all'
%input{:name => "provider_selected[]", :type =>
"checkbox", :value => provider.id, :id =>
"provider_checkbox_#{provider.id}", :checked => selected }
- = link_to provider.name, admin_provider_path(provider)
+ = link_to provider.name, provider_path(provider)
%td= provider.url
%td= provider.provider_type.name
diff --git a/src/app/views/providers/_properties.haml
b/src/app/views/providers/_properties.haml
index 044895a..cb44fae 100644
--- a/src/app/views/providers/_properties.haml
+++ b/src/app/views/providers/_properties.haml
@@ -1,5 +1,5 @@
%h3
Properties for
= @provider.name
-= link_to "Edit", edit_admin_provider_path(@provider), {:class =>
'button'}
-= link_to "Test", admin_provider_path(@provider, {:test_provider => true}),
{ :class => 'button' }
+= link_to "Edit", edit_provider_path(@provider), {:class =>
'button'}
+= link_to "Test", provider_path(@provider, {:test_provider => true}), {
:class => 'button' }
diff --git a/src/app/views/providers/edit.haml b/src/app/views/providers/edit.haml
index 66864e9..87c035f 100644
--- a/src/app/views/providers/edit.haml
+++ b/src/app/views/providers/edit.haml
@@ -3,5 +3,5 @@
= @provider.name
Provider
--form_for @provider, :url => admin_provider_path(@provider), :html => { :method
=> :put } do |f|
- = render :partial => 'form', :locals => { :form => f, :cancel_path
=> admin_providers_path }
+-form_for @provider, :url => provider_path(@provider), :html => { :method =>
:put } do |f|
+ = render :partial => 'form', :locals => { :form => f, :cancel_path
=> providers_path }
diff --git a/src/app/views/providers/new.haml b/src/app/views/providers/new.haml
index 516fdb3..2618f70 100644
--- a/src/app/views/providers/new.haml
+++ b/src/app/views/providers/new.haml
@@ -1,3 +1,3 @@
%h2 Create a new Provider
-- form_for @provider, :url => admin_providers_path do |f|
- = render :partial => "form", :locals => { :form => f, :cancel_path
=> admin_providers_path }
+- form_for @provider, :url => providers_path do |f|
+ = render :partial => "form", :locals => { :form => f, :cancel_path
=> providers_path }
diff --git a/src/app/views/realm_mappings/new.haml
b/src/app/views/realm_mappings/new.haml
index 0861199..df30240 100644
--- a/src/app/views/realm_mappings/new.haml
+++ b/src/app/views/realm_mappings/new.haml
@@ -1,6 +1,6 @@
= error_messages_for 'realm_target'
%h2 Create a new Realm Mapping
-- form_for @realm_target, :url => admin_realm_mappings_path do |f|
+- form_for @realm_target, :url => realm_mappings_path do |f|
= f.hidden_field :frontend_realm_id
= f.hidden_field :realm_or_provider_type
diff --git a/src/app/views/realms/_list.haml b/src/app/views/realms/_list.haml
index 367dc14..d9b9c2c 100644
--- a/src/app/views/realms/_list.haml
+++ b/src/app/views/realms/_list.haml
@@ -1,6 +1,6 @@
- form_tag do
- = link_to "Create", new_admin_realm_path, :class => "button"
- = restful_submit_tag "Delete", 'destroy',
multi_destroy_admin_realms_path, 'DELETE', :id => 'delete_button'
+ = link_to "Create", new_realm_path, :class => "button"
+ = restful_submit_tag "Delete", 'destroy', multi_destroy_realms_path,
'DELETE', :id => 'delete_button'
%p
Select:
@@ -16,4 +16,4 @@
%td
- selected = @url_params[:select] == 'all'
%input{:name => "id[]", :type => "checkbox", :value
=> realm.id, :id => "realm_id_#{realm.id}", :checked => selected }
- = link_to realm.name, admin_realm_path(realm)
+ = link_to realm.name, realm_path(realm)
diff --git a/src/app/views/realms/_mapping.haml b/src/app/views/realms/_mapping.haml
index 66b278c..e20cff9 100644
--- a/src/app/views/realms/_mapping.haml
+++ b/src/app/views/realms/_mapping.haml
@@ -1,7 +1,7 @@
- form_tag do
- = link_to "Add mapping to realm",
new_admin_realm_mapping_path(:frontend_realm_id => @realm.id, :realm_or_provider_type
=> 'Realm'), :class => "button"
- = link_to "Add mapping to provider",
new_admin_realm_mapping_path(:frontend_realm_id => @realm.id, :realm_or_provider_type
=> 'Provider'), :class => "button"
- = restful_submit_tag "Delete", 'destroy',
multi_destroy_admin_realm_mappings_path(:frontend_realm_id => @realm.id),
'DELETE', :id => 'delete_button'
+ = link_to "Add mapping to realm", new_realm_mapping_path(:frontend_realm_id
=> @realm.id, :realm_or_provider_type => 'Realm'), :class =>
"button"
+ = link_to "Add mapping to provider",
new_realm_mapping_path(:frontend_realm_id => @realm.id, :realm_or_provider_type =>
'Provider'), :class => "button"
+ = restful_submit_tag "Delete", 'destroy',
multi_destroy_realm_mappings_path(:frontend_realm_id => @realm.id), 'DELETE',
:id => 'delete_button'
- unless @backend_provider_targets.empty?
%h2 Realm '#{(a)realm.name}' is mapped to providers:
diff --git a/src/app/views/realms/_properties.haml
b/src/app/views/realms/_properties.haml
index 8d5b66d..18dd5fa 100644
--- a/src/app/views/realms/_properties.haml
+++ b/src/app/views/realms/_properties.haml
@@ -1,3 +1,3 @@
.grid_13
%h2 #{(a)realm.name}
- = link_to t(:edit), edit_admin_realm_path(@realm), :class => 'button
formbutton'
+ = link_to t(:edit), edit_realm_path(@realm), :class => 'button formbutton'
diff --git a/src/app/views/realms/edit.haml b/src/app/views/realms/edit.haml
index a0aa97f..4b1536e 100644
--- a/src/app/views/realms/edit.haml
+++ b/src/app/views/realms/edit.haml
@@ -1,4 +1,4 @@
%h2 Editing Realm: #{(a)realm.name}
-- form_for @realm, :url => admin_realm_path(@realm), :html => { :method => :put
} do |f|
+- form_for @realm, :url => realm_path(@realm), :html => { :method => :put } do
|f|
= render :partial => "form", :locals => { :form => f }
diff --git a/src/app/views/realms/new.haml b/src/app/views/realms/new.haml
index c95a306..f69a89e 100644
--- a/src/app/views/realms/new.haml
+++ b/src/app/views/realms/new.haml
@@ -1,3 +1,3 @@
%h2 Create a new Realm
-- form_for @realm, :url => admin_realms_path do |f|
- = render :partial => "form", :locals => { :form => f, :cancel_path
=> admin_realms_path }
+- form_for @realm, :url => realms_path do |f|
+ = render :partial => "form", :locals => { :form => f, :cancel_path
=> realms_path }
diff --git a/src/app/views/roles/_form.haml b/src/app/views/roles/_form.haml
index fc10dd2..c20c8e1 100644
--- a/src/app/views/roles/_form.haml
+++ b/src/app/views/roles/_form.haml
@@ -5,4 +5,4 @@
%fieldset.clearfix
= form.submit "Save", :class => "submit formbutton"
= form.submit "Reset", :class => "submit formbutton"
- = link_to t(:cancel), admin_roles_path, :class => 'button formbutton'
+ = link_to t(:cancel), roles_path, :class => 'button formbutton'
diff --git a/src/app/views/roles/_list.haml b/src/app/views/roles/_list.haml
index d825e2f..5b7b71f 100644
--- a/src/app/views/roles/_list.haml
+++ b/src/app/views/roles/_list.haml
@@ -1,6 +1,6 @@
- form_tag do
- = link_to "New Role", new_admin_role_path, :class => 'button'
- = restful_submit_tag "Destroy", "destroy",
multi_destroy_admin_roles_path, 'DELETE', :id => 'delete_button'
+ = link_to "New Role", new_role_path, :class => 'button'
+ = restful_submit_tag "Destroy", "destroy",
multi_destroy_roles_path, 'DELETE', :id => 'delete_button'
%p
Select:
= link_to "All", @url_params.merge(:select => 'all')
@@ -13,7 +13,7 @@
%td
- selected = @url_params[:select] == 'all'
%input{:name => "role_selected[]", :type =>
"checkbox", :value => role.id, :id =>
"role_checkbox_#{role.id}", :checked => selected }
- = link_to role.name, admin_role_path(role)
+ = link_to role.name, role_path(role)
:javascript
$(document).ready(function () {
diff --git a/src/app/views/roles/_properties.haml b/src/app/views/roles/_properties.haml
index bcb59f4..98b390f 100644
--- a/src/app/views/roles/_properties.haml
+++ b/src/app/views/roles/_properties.haml
@@ -20,4 +20,4 @@
= privilege.action
%td
= privilege.target_type
- = link_to t(:edit), edit_admin_role_path(@role), :class => 'button
formbutton'
+ = link_to t(:edit), edit_role_path(@role), :class => 'button formbutton'
diff --git a/src/app/views/roles/edit.haml b/src/app/views/roles/edit.haml
index 7aa428e..15e0f94 100644
--- a/src/app/views/roles/edit.haml
+++ b/src/app/views/roles/edit.haml
@@ -1,4 +1,4 @@
%h2 Editing Role: #{(a)role.name}
-- form_for @role, :url => admin_role_path(@role), :html => { :method => :put }
do |f|
+- form_for @role, :url => role_path(@role), :html => { :method => :put } do |f|
= render :partial => "form", :locals => { :form => f }
diff --git a/src/app/views/roles/new.haml b/src/app/views/roles/new.haml
index 064e67d..f1e68cf 100644
--- a/src/app/views/roles/new.haml
+++ b/src/app/views/roles/new.haml
@@ -1,3 +1,3 @@
%h2 New Role
-- form_for @role, :url => admin_roles_path do |f|
+- form_for @role, :url => roles_path do |f|
= render :partial => "form", :locals => { :form => f }
diff --git a/src/app/views/settings/index.haml b/src/app/views/settings/index.haml
index 8a68a65..0046793 100644
--- a/src/app/views/settings/index.haml
+++ b/src/app/views/settings/index.haml
@@ -13,14 +13,14 @@
= t('.permissions')
%p
= t('.permissions_desc')
- = link_to t(:continue), self_service_admin_settings_path, :class =>
'button'
+ = link_to t(:continue), self_service_settings_path, :class => 'button'
%li#settings.grid_8
= image_tag "blnk.png", :class => "icon", :alt =>
""
%h2
= t('.general_settings')
%p
= t('.general_settings_desc')
- = link_to t(:continue), general_settings_admin_settings_path, :class =>
'button'
+ = link_to t(:continue), general_settings_settings_path, :class =>
'button'
%li#locales.grid_8.disabled.clear
= image_tag "blnk.png", :class => "icon", :alt =>
""
%h2
diff --git a/src/app/views/templates/_addbuttons.haml
b/src/app/views/templates/_addbuttons.haml
index 9f88751..120f961 100644
--- a/src/app/views/templates/_addbuttons.haml
+++ b/src/app/views/templates/_addbuttons.haml
@@ -1,4 +1,4 @@
%fieldset.clear
- - cancel_path = @tpl.id ? edit_image_factory_template_path(@tpl) :
new_image_factory_template_path
- = restful_submit_tag "Add Selected", "add_selected",
add_selected_image_factory_templates_path, 'GET', {:class => "grid_2
alpha", :id => "do_add_software"}
+ - cancel_path = @tpl.id ? edit_template_path(@tpl) : new_template_path
+ = restful_submit_tag "Add Selected", "add_selected",
add_selected_templates_path, 'GET', {:class => "grid_2 alpha", :id
=> "do_add_software"}
= restful_submit_tag "Cancel", "cancel_add_software", cancel_path,
'GET', {:class => "grid_2", :id =>
"cancel_add_software"}
diff --git a/src/app/views/templates/_builds.haml b/src/app/views/templates/_builds.haml
index a6bdd4b..0431fbd 100644
--- a/src/app/views/templates/_builds.haml
+++ b/src/app/views/templates/_builds.haml
@@ -3,7 +3,7 @@ Builds for
= @tpl.platform_version
, template "#{(a)tpl.name}"
-- form_tag image_factory_builds_path do
+- form_tag builds_path do
= hidden_field_tag :template_id, @tpl.id
- if @targets_not_built.count > 0 then
- if @tpl.imported
@@ -19,7 +19,7 @@ Builds for
- else
- @images.each do |img|
%li
- - form_tag(retry_image_factory_builds_path, { :method => :post }) do
+ - form_tag(retry_builds_path, { :method => :post }) do
= "#{img.name}-#{img.template.architecture}: #{img.status}"
= hidden_field_tag :template_id, @tpl.id
= hidden_field_tag :image_id, img.id
@@ -28,7 +28,7 @@ Builds for
%ul
- img.provider_images.each do |pimg|
%li
- - form_tag(retry_image_factory_builds_path, { :method => :post }) do
+ - form_tag(retry_builds_path, { :method => :post }) do
= "#{pimg.provider.name}: #{pimg.status}"
= hidden_field_tag :template_id, @tpl.id
= hidden_field_tag :provider_image_id, pimg.id
@@ -38,4 +38,4 @@ Builds for
%li
= "#{provider.name}: "
not uploaded
- = link_to 'upload',
upload_image_factory_builds_path(:template_id => @tpl.id, :image_id => img.id,
:provider_id => provider.id), {:class => 'button'}
+ = link_to 'upload', upload_builds_path(:template_id =>
@tpl.id, :image_id => img.id, :provider_id => provider.id), {:class =>
'button'}
diff --git a/src/app/views/templates/_form.haml b/src/app/views/templates/_form.haml
index 7cc323c..d326b18 100644
--- a/src/app/views/templates/_form.haml
+++ b/src/app/views/templates/_form.haml
@@ -113,7 +113,7 @@
.clearfix
.grid_16.alpha.omega
- = restful_submit_tag "Add Software", 'collections',
collections_image_factory_templates_path, 'GET', {:id =>
"add_software_button", :class => "iconbutton"}
+ = restful_submit_tag "Add Software", 'collections',
collections_templates_path, 'GET', {:id => "add_software_button",
:class => "iconbutton"}
#package_selection_list{:style => 'display: none'}
diff --git a/src/app/views/templates/_list.haml b/src/app/views/templates/_list.haml
index bf8be82..947a066 100644
--- a/src/app/views/templates/_list.haml
+++ b/src/app/views/templates/_list.haml
@@ -1,6 +1,6 @@
- form_tag do
- = link_to "Create", new_image_factory_template_path, :class =>
'button'
- = restful_submit_tag "Delete", 'destroy',
multi_destroy_image_factory_templates_path, 'DELETE', :id =>
'delete_button'
+ = link_to "Create", new_template_path, :class => 'button'
+ = restful_submit_tag "Delete", 'destroy',
multi_destroy_templates_path, 'DELETE', :id => 'delete_button'
%table#templates_table
= sortable_table_header @header
@@ -14,7 +14,7 @@
%td
= check_box_tag 'selected[]', template.id, @url_params[:select] ==
'all', :id => "selected_#{template.id}"
= image_tag "blnk.png", :alt => template.platform, :class
=> "icon platform #{template.platform}"
- = link_to template.name, image_factory_template_path(template)
+ = link_to template.name, template_path(template)
%td= template.platform_name
%td= template.platform_version
%td= image_tag 'blnk.png', :alt => 'yes', :class =>
"icon yes"
diff --git a/src/app/views/templates/_managed_content.haml
b/src/app/views/templates/_managed_content.haml
index ebea6cd..29f9fd3 100644
--- a/src/app/views/templates/_managed_content.haml
+++ b/src/app/views/templates/_managed_content.haml
@@ -10,7 +10,7 @@
.packagewrap
%a.packagename{:id => "package_#{pkg}"}=pkg
= hidden_field_tag 'packages[]', pkg, :id =>
"package_#{pkg}"
- = restful_submit_tag "Remove", "remove_package",
remove_package_image_factory_templates_path(:name => pkg), 'GET', {:id =>
"remove_package_#{pkg}", :class => 'remove_package'}
+ = restful_submit_tag "Remove", "remove_package",
remove_package_templates_path(:name => pkg), 'GET', {:id =>
"remove_package_#{pkg}", :class => 'remove_package'}
.dropdown
/ we don't display repository for now, it's pretty difficult with
current design
/%section
diff --git a/src/app/views/templates/_metagroups.haml
b/src/app/views/templates/_metagroups.haml
index f23c408..b313e55 100644
--- a/src/app/views/templates/_metagroups.haml
+++ b/src/app/views/templates/_metagroups.haml
@@ -7,7 +7,7 @@
%ul.metagroups{:class => 'packagegroupsidebar grid_4 alpha'}
%li
- = restful_submit_tag 'Collections', 'collections',
collections_image_factory_templates_path, 'GET', {:id => 'collections',
:class => 'icon'}
+ = restful_submit_tag 'Collections', 'collections',
collections_templates_path, 'GET', {:id => 'collections', :class =>
'icon'}
- @metagroups.keys.sort.each do |cat|
%li
- = restful_submit_tag cat, "metagroup_packages",
metagroup_packages_image_factory_templates_path, 'GET', {:class =>
'icon'}
+ = restful_submit_tag cat, "metagroup_packages",
metagroup_packages_templates_path, 'GET', {:class => 'icon'}
diff --git a/src/app/views/templates/_properties.haml
b/src/app/views/templates/_properties.haml
index 0fe33ae..d47a13a 100644
--- a/src/app/views/templates/_properties.haml
+++ b/src/app/views/templates/_properties.haml
@@ -1,4 +1,4 @@
%h3
Properties for
= @tpl.name
-= link_to "Edit", edit_image_factory_template_path(@tpl), { :class =>
'button' }
+= link_to "Edit", edit_template_path(@tpl), { :class => 'button' }
diff --git a/src/app/views/templates/edit.haml b/src/app/views/templates/edit.haml
index a2a58ef..959ed7a 100644
--- a/src/app/views/templates/edit.haml
+++ b/src/app/views/templates/edit.haml
@@ -1,9 +1,9 @@
#dropdown
.grid_16
%h2 Edit Template
- /- form_for @tpl, :url => image_factory_template_path(@tpl), :html => { :method
=> :put } do |f|
+ /- form_for @tpl, :url => template_path(@tpl), :html => { :method => :put } do
|f|
- form_tag do
= hidden_field_tag :id, @tpl.id
= render :partial => 'form'
- = restful_submit_tag "Save", 'update',
image_factory_template_path(@tpl), 'PUT', :class => "formbutton"
- = link_to 'Cancel', image_factory_templates_path, :class => 'button
formbutton'
+ = restful_submit_tag "Save", 'update', template_path(@tpl),
'PUT', :class => "formbutton"
+ = link_to 'Cancel', templates_path, :class => 'button formbutton'
diff --git a/src/app/views/templates/new.haml b/src/app/views/templates/new.haml
index 2dbac5b..dcc6bfc 100644
--- a/src/app/views/templates/new.haml
+++ b/src/app/views/templates/new.haml
@@ -1,10 +1,10 @@
#dropdown
.grid_16
%h2 New Template
- /- form_for @tpl, :url => image_factory_templates_path do |f|
+ /- form_for @tpl, :url => templates_path do |f|
- form_tag do
= render :partial => 'form'
= check_box_tag :create_deployable
= label_tag :create_deployable, "Create Deployable for this template"
- = restful_submit_tag "Save", 'create',
image_factory_templates_path, 'POST', :class => "formbutton"
- = link_to 'Cancel', image_factory_templates_path, :class => 'button
formbutton'
+ = restful_submit_tag "Save", 'create', templates_path,
'POST', :class => "formbutton"
+ = link_to 'Cancel', templates_path, :class => 'button formbutton'
diff --git a/src/app/views/templates/xml/_hardware_profile.xml.haml
b/src/app/views/templates/xml/_hardware_profile.xml.haml
index 6ac533e..c51691f 100644
--- a/src/app/views/templates/xml/_hardware_profile.xml.haml
+++ b/src/app/views/templates/xml/_hardware_profile.xml.haml
@@ -1,6 +1,6 @@
!!! XML
-%hardware_profile{ :href => admin_hardware_profile_path(profile.id), :id =>
profile.external_key }<>
+%hardware_profile{ :href => hardware_profile_path(profile.id), :id =>
profile.external_key }<>
%name<>
= profile.name
- [profile.memory, profile.cpu, profile.architecture, profile.storage].each do |prop|
- = render :partial => 'templates/xml/hardware_profile_property.xml',
:locals => { :property => prop }
\ No newline at end of file
+ = render :partial => 'templates/xml/hardware_profile_property.xml',
:locals => { :property => prop }
diff --git a/src/app/views/users/_list.haml b/src/app/views/users/_list.haml
index 6a544ed..0204695 100644
--- a/src/app/views/users/_list.haml
+++ b/src/app/views/users/_list.haml
@@ -1,24 +1,24 @@
- form_tag do
- = link_to "Create", new_admin_user_url, :class => 'button'
- = restful_submit_tag "Delete", 'destroy',
multi_destroy_admin_users_path, 'DELETE', :id => 'delete_button'
+ = link_to "Create", new_user_url, :class => 'button'
+ = restful_submit_tag "Delete", 'destroy', multi_destroy_users_path,
'DELETE', :id => 'delete_button'
%table#users_table
%thead
%tr
%th
- %th= link_to "User ID", admin_users_url(:sort_by =>
"login")
- %th= link_to "Last Name", admin_users_url(:sort_by =>
"last_name")
- %th= link_to "First Name", admin_users_url(:sort_by =>
"first_name")
- %th= link_to "% Quota Used", admin_users_url(:sort_by =>
"percentage_quota_used")
+ %th= link_to "User ID", users_url(:sort_by => "login")
+ %th= link_to "Last Name", users_url(:sort_by =>
"last_name")
+ %th= link_to "First Name", users_url(:sort_by =>
"first_name")
+ %th= link_to "% Quota Used", users_url(:sort_by =>
"percentage_quota_used")
%th
- =link_to "Quota", admin_users_url(:sort_by => "quota")
+ =link_to "Quota", users_url(:sort_by => "quota")
%span (Instances)
- %th= link_to "e-mail", admin_users_url(:sort_by =>
"email")
+ %th= link_to "e-mail", users_url(:sort_by => "email")
-(a)users.each do |user|
%tr
%td
%input{:name => "user_selected[]", :type =>
"checkbox", :value => user.id, :id => "user_checkbox_#{user.id}"
}
- %td= link_to user.login, admin_user_path(user)
+ %td= link_to user.login, user_path(user)
%td= user.last_name
%td= user.first_name
%td= sprintf("%.2f", user.quota.percentage_used)
diff --git a/src/app/views/users/_properties.haml b/src/app/views/users/_properties.haml
index 0842cb1..33799be 100644
--- a/src/app/views/users/_properties.haml
+++ b/src/app/views/users/_properties.haml
@@ -1,7 +1,7 @@
.grid_13
%h2 #{(a)user.first_name} #{(a)user.last_name} (#{(a)user.login})
- = link_to 'Edit', edit_admin_user_path(@user), :class => 'button'
+ = link_to 'Edit', edit_user_path(@user), :class => 'button'
%table
%thead
diff --git a/src/app/views/users/edit.haml b/src/app/views/users/edit.haml
index 1290c4d..b3d0dc2 100644
--- a/src/app/views/users/edit.haml
+++ b/src/app/views/users/edit.haml
@@ -3,5 +3,5 @@
- else
%h2 Editing Account
-- form_for @user, :url => admin_user_path(@user), :html => { :method => :put }
do |f|
- = render :partial => "form", :locals => { :form => f, :cancel_path
=> admin_users_path }
+- form_for @user, :url => user_path(@user), :html => { :method => :put } do |f|
+ = render :partial => "form", :locals => { :form => f, :cancel_path
=> users_path }
diff --git a/src/app/views/users/new.haml b/src/app/views/users/new.haml
index 0958f12..976f130 100644
--- a/src/app/views/users/new.haml
+++ b/src/app/views/users/new.haml
@@ -1,6 +1,6 @@
%h2 New Account
-- form_for @user, :url => admin_users_path do |f|
+- form_for @user, :url => users_path do |f|
-if current_user
- = render :partial => "form", :locals => { :form => f, :cancel_path
=> admin_users_path }
+ = render :partial => "form", :locals => { :form => f, :cancel_path
=> users_path }
-else
= render :partial => "form", :locals => { :form => f, :cancel_path
=> login_path }
diff --git a/src/classad_plugin/conductor_classad_plugin.cpp
b/src/classad_plugin/conductor_classad_plugin.cpp
index 5151d72..83d0a19 100644
--- a/src/classad_plugin/conductor_classad_plugin.cpp
+++ b/src/classad_plugin/conductor_classad_plugin.cpp
@@ -152,7 +152,7 @@ conductor_quota_check(const char *name, const ArgumentList
&arglist,
goto do_ret;
}
- rest_call << "resources/instances/" << instance_id <<
"/can_start/" << account_id;
+ rest_call << "instances/" << instance_id <<
"/can_start/" << account_id;
// Call rest API to get answer on quota..
// FIXME: this should be configurable somehow, maybe passed via condor?
diff --git a/src/config/navigation.rb b/src/config/navigation.rb
index 074f905..2abd7d0 100644
--- a/src/config/navigation.rb
+++ b/src/config/navigation.rb
@@ -1,26 +1,26 @@
SimpleNavigation::Configuration.run do |navigation|
navigation.autogenerate_item_ids = false
navigation.items do |first_level|
- first_level.item :resource_management, t(:resource_management), resources_pools_path,
:highlights_on => /^\/$/ do |second_level|
- second_level.item :pools, t('pools.index.pools'), resources_pools_path
- second_level.item :deployments, t(:deployments),resources_deployments_path,
:highlights_on => /^\/$|\/deployments/
- second_level.item :instances, t(:instances), resources_instances_path
+ first_level.item :resource_management, t(:resource_management), pools_path,
:highlights_on => /^\/$/ do |second_level|
+ second_level.item :pools, t('pools.index.pools'), pools_path
+ second_level.item :deployments, t(:deployments),deployments_path, :highlights_on
=> /^\/$|\/deployments/
+ second_level.item :instances, t(:instances), instances_path
end
- first_level.item :image_factory, t(:image_factory), image_factory_templates_path,
:highlights_on => /\/image_factory/ do |second_level|
- second_level.item :templates, t('templates.templates'),
image_factory_templates_path
- second_level.item :assemblies, t(:assemblies), image_factory_assemblies_path
- second_level.item :deployables, t('deployables.index.deployables'),
image_factory_deployables_path
- second_level.item :image_imports, t(:image_imports),
new_image_factory_image_import_path
+ first_level.item :image_factory, t(:image_factory), templates_path, :highlights_on
=> /\/image_factory/ do |second_level|
+ second_level.item :templates, t('templates.templates'), templates_path
+ second_level.item :assemblies, t(:assemblies), assemblies_path
+ second_level.item :deployables, t('deployables.index.deployables'),
deployables_path
+ second_level.item :image_imports, t(:image_imports), new_image_import_path
end
- first_level.item :administration, t(:administration), admin_users_path,
:highlights_on => /\/admin/ do |second_level|
- second_level.item :users, t(:users), admin_users_path
- second_level.item :roles, t(:roles), admin_roles_path
- second_level.item :providers, t('providers.providers'),
admin_providers_path
- second_level.item :provider_accounts, t(:provider_accounts_item),
admin_provider_accounts_path
- second_level.item :hardware_profiles, t(:cloud_engine_hardware_profiles),
admin_hardware_profiles_path
- second_level.item :realms, t(:cloud_engine_realms), admin_realms_path
- second_level.item :pool_families, t('pool_families.pool_families'),
admin_pool_families_path
- second_level.item :settings, t(:setting), admin_settings_path
+ first_level.item :administration, t(:administration), users_path, :highlights_on
=> /\/admin/ do |second_level|
+ second_level.item :users, t(:users), users_path
+ second_level.item :roles, t(:roles), roles_path
+ second_level.item :providers, t('providers.providers'), providers_path
+ second_level.item :provider_accounts, t(:provider_accounts_item),
provider_accounts_path
+ second_level.item :hardware_profiles, t(:cloud_engine_hardware_profiles),
hardware_profiles_path
+ second_level.item :realms, t(:cloud_engine_realms), realms_path
+ second_level.item :pool_families, t('pool_families.pool_families'),
pool_families_path
+ second_level.item :settings, t(:setting), settings_path
end
first_level.item :dashboard, t(:dashboard), '#'
end
diff --git a/src/config/routes.rb b/src/config/routes.rb
index ab23347..5d48373 100644
--- a/src/config/routes.rb
+++ b/src/config/routes.rb
@@ -32,47 +32,40 @@ ActionController::Routing::Routes.draw do |map|
# You can have the root of your site routed by hooking up ''
# -- just remember to delete public/index.html.
- map.namespace 'resources' do |r|
- r.resources :pools, :collection => { :multi_destroy => :delete }
- r.resources :deployments, :collection => { :multi_stop => :get, :launch_new
=> :get }
- r.resources :instances, :collection => {:start => :get, :multi_stop => :get,
:select_template => :get, :remove_failed => :get, :can_start => :get, :can_create
=> :get }, :member => {:key => :get}
- end
-
- map.can_start_instance
'/resources/instances/:instance_id/can_start/:provider_account_id', :controller
=> 'resources/instances', :action => 'can_start', :conditions =>
{ :method => :get }
- map.can_create_instance
'/resources/instances/:instance_id/can_create/:provider_account_id', :controller
=> 'resources/instances', :action => 'can_create', :conditions =>
{ :method => :get }
-
- map.namespace 'image_factory' do |r|
- r.resources :assemblies
- r.resources :image_imports
- r.resources :deployables, :collection => { :multi_destroy => :delete }, :member
=> { :pick_assemblies => :get, :remove_assemblies => :delete, :add_assemblies
=> :put, :launch => :post }
- r.resources :templates, :collection => {:collections => :get, :add_selected
=> :get, :metagroup_packages => :get, :remove_package => :get, :multi_destroy
=> :delete}
- r.connect "/builds/update_status.:format", :controller => :builds,
:action => :update_status
- r.resources :builds, :collection => { :delete => :delete, :upload => :get,
:retry => :post }
- end
-
- map.namespace 'admin' do |r|
- r.resources :hardware_profiles, :collection => { :multi_destroy => :delete }
- r.resources :providers, :collection => { :multi_destroy => :delete }
- r.resources :users, :collection => { :multi_destroy => :delete }
- r.resources :provider_accounts, :collection => { :multi_destroy => :delete,
:set_selected_provider => :get}
-
- r.resources :roles, :collection => { :multi_destroy => :delete }
- r.resources :settings, :collection => { :self_service => :get,
:general_settings => :get }
- r.resources :pool_families, :collection => { :multi_destroy => :delete,
:add_provider_account => :post, :multi_destroy_provider_accounts => :delete }
- r.resources :realms, :collection => { :multi_destroy => :delete }
- r.resources :realm_mappings, :collection => { :multi_destroy => :delete }
- end
-
- map.matching_profiles
'/admin/hardware_profiles/matching_profiles/:hardware_profile_id/provider/:provider_id',
:controller => 'admin/hardware_profiles', :action =>
'matching_profiles', :conditions => { :method => :get }
+ map.resources :pools, :collection => { :multi_destroy => :delete }
+ map.resources :deployments, :collection => { :multi_stop => :get, :launch_new
=> :get }
+ map.resources :instances, :collection => {:start => :get, :multi_stop => :get,
:select_template => :get, :remove_failed => :get, :can_start => :get, :can_create
=> :get }, :member => {:key => :get}
+
+ map.can_start_instance
'/instances/:instance_id/can_start/:provider_account_id', :controller =>
'instances', :action => 'can_start', :conditions => { :method =>
:get }
+ map.can_create_instance
'/instances/:instance_id/can_create/:provider_account_id', :controller =>
'instances', :action => 'can_create', :conditions => { :method =>
:get }
+
+ map.resources :assemblies
+ map.resources :image_imports
+ map.resources :deployables, :collection => { :multi_destroy => :delete }, :member
=> { :pick_assemblies => :get, :remove_assemblies => :delete, :add_assemblies
=> :put, :launch => :post }
+ map.resources :templates, :collection => {:collections => :get, :add_selected
=> :get, :metagroup_packages => :get, :remove_package => :get, :multi_destroy
=> :delete}
+ map.connect "/builds/update_status.:format", :controller => :builds,
:action => :update_status
+ map.resources :builds, :collection => { :delete => :delete, :upload => :get,
:retry => :post }
+
+ map.resources :hardware_profiles, :collection => { :multi_destroy => :delete }
+ map.resources :providers, :collection => { :multi_destroy => :delete }
+ map.resources :users, :collection => { :multi_destroy => :delete }
+ map.resources :provider_accounts, :collection => { :multi_destroy => :delete,
:set_selected_provider => :get}
+ map.resources :roles, :collection => { :multi_destroy => :delete }
+ map.resources :settings, :collection => { :self_service => :get,
:general_settings => :get }
+ map.resources :pool_families, :collection => { :multi_destroy => :delete,
:add_provider_account => :post, :multi_destroy_provider_accounts => :delete }
+ map.resources :realms, :collection => { :multi_destroy => :delete }
+ map.resources :realm_mappings, :collection => { :multi_destroy => :delete }
+
+ map.matching_profiles
'/hardware_profiles/matching_profiles/:hardware_profile_id/provider/:provider_id',
:controller => 'hardware_profiles', :action => 'matching_profiles',
:conditions => { :method => :get }
map.login 'login', :controller => "user_sessions", :action =>
"new"
map.logout 'logout', :controller => "user_sessions", :action =>
"destroy"
map.resource :user_session
- map.register 'register', :controller => 'admin/users', :action =>
'new'
- map.resource :account, :controller => "admin/users"
+ map.register 'register', :controller => 'users', :action =>
'new'
+ map.resource :account, :controller => "users"
map.resources :permissions, :collection => { :list => :get }
- map.root :controller => 'resources/deployments'
+ map.root :controller => 'deployments'
# Allow downloading Web Service WSDL as a file with an extension
diff --git a/src/features/deployable.feature b/src/features/deployable.feature
index 66cbef7..979ea72 100644
--- a/src/features/deployable.feature
+++ b/src/features/deployable.feature
@@ -11,48 +11,48 @@ Feature: Manage Deployables
Scenario: List deployables
Given I am on the homepage
And there is a deployable named "MySQL cluster"
- When I go to the image factory deployables page
+ When I go to the deployables page
Then I should see "MySQL cluster"
Scenario: Create a new Deployable
Given there is a deployable named "MySQL cluster"
- And I am on the image factory deployables page
+ And I am on the deployables page
When I follow "Create"
- Then I should be on the new image factory deployable page
+ Then I should be on the new deployable page
And I should see "New Deployable"
When I fill in "deployable[name]" with "App"
And I press "Save"
- Then I should be on App's image factory deployable page
+ Then I should be on App's deployable page
And I should see "Deployable added"
And I should have a deployable named "App"
And I should see "App"
Scenario: Edit a deployable
Given there is a deployable named "MySQL cluster"
- And I am on the image factory deployables page
+ And I am on the deployables page
When I follow "MySQL cluster"
And I follow "Edit"
- Then I should be on the edit image factory deployable page
+ Then I should be on the edit deployable page
And I should see "Editing Deployable"
When I fill in "deployable[name]" with "AppModified"
And I press "Save"
- Then I should be on AppModified's image factory deployable page
+ Then I should be on AppModified's deployable page
And I should see "Deployable updated"
And I should have a deployable named "AppModified"
And I should see "AppModified"
Scenario: Delete a deployable
Given there is a deployable named "App"
- And I am on the image factory deployables page
+ And I am on the deployables page
When I check the "App" deployable
And I press "Delete"
- Then I should be on the image factory deployables page
+ Then I should be on the deployables page
And there should be no deployables
Scenario: Add an assembly to a deployable
Given there is a deployable named "Webserver"
Given there is an assembly named "Apache"
- And I am on the image factory deployables page
+ And I am on the deployables page
When I follow "Webserver"
And I follow "details_Assemblies"
And I follow "Add Assembly..."
@@ -65,7 +65,7 @@ Feature: Manage Deployables
Scenario: Remove an assembly from a deployable
Given there is a deployable named "Webserver"
Given there is an assembly named "Apache" belonging to
"Webserver"
- And I am on the image factory deployables page
+ And I am on the deployables page
When I follow "Webserver"
And I follow "details_Assemblies"
Then I should see "Apache"
@@ -77,7 +77,7 @@ Feature: Manage Deployables
Scenario: Search for deployables
Given there is a deployable named "first"
And there is a deployable named "second"
- And I am on the image factory deployables page
+ And I am on the deployables page
Then I should see "first"
And I should see "second"
When I fill in "q" with "first"
@@ -101,13 +101,13 @@ Feature: Manage Deployables
Scenario: Create and launch a deployment from a deployable
Given there is a factory deployable named "test1"
- And I am on the image factory deployables page
+ And I am on the deployables page
And there is "mock_profile" conductor hardware profile
And there is "mock_realm" frontend realm
And there is "mock_pool" pool
When I follow "test1"
And I follow "Launch"
- Then I should be on the new resources deployment page
+ Then I should be on the new deployment page
When I fill in "deployment_name" with "depl1"
And I select "mock_pool" from "deployment_pool_id"
And I select "mock_realm" from "deployment_frontend_realm_id"
diff --git a/src/features/deployable_permissions.feature
b/src/features/deployable_permissions.feature
index 9ca55e5..4550d57 100644
--- a/src/features/deployable_permissions.feature
+++ b/src/features/deployable_permissions.feature
@@ -9,53 +9,53 @@ Feature: Manage Deployables as a non-admin
Scenario: List deployables as a new user
Given I am on the homepage
And there is a deployable named "MySQL cluster"
- When I go to the image factory deployables page
+ When I go to the deployables page
Then I should see "MySQL cluster"
Scenario: View an existing deployable as a new user
Given there is a deployable named "MySQL cluster"
- And I am on the image factory deployables page
+ And I am on the deployables page
When I follow "MySQL cluster"
Then I should see "Edit"
@allow-rescue
Scenario: Try to edit an existing deployable as a new user
Given there is a deployable named "Apache Webserver"
- And I am on the image factory deployables page
+ And I am on the deployables page
When I follow "Apache Webserver"
And I follow "Edit"
Then I should see "You have insufficient privileges to perform action."
Scenario: Edit a deployable I created
- Given I am on the image factory deployables page
+ Given I am on the deployables page
When I follow "Create"
- Then I should be on the new image factory deployable page
+ Then I should be on the new deployable page
And I should see "New Deployable"
When I fill in "deployable[name]" with "Mahout Server"
And I press "Save"
- Then I should be on App's image factory deployable page
+ Then I should be on App's deployable page
And I should see "Deployable added"
And I should have a deployable named "Mahout Server"
And I should see "Mahout Server"
When I follow "Mahout Server"
And I follow "Edit"
- Then I should be on the edit image factory deployable page
+ Then I should be on the edit deployable page
And I should see "Editing Deployable"
When I fill in "deployable[name]" with "MahoutModified"
And I press "Save"
- Then I should be on MahoutModified's image factory deployable page
+ Then I should be on MahoutModified's deployable page
And I should see "Deployable updated"
And I should have a deployable named "MahoutModified"
And I should see "MahoutModified"
Scenario: Create a deployable as a new user
- And I am on the image factory deployables page
+ And I am on the deployables page
When I follow "Create"
- Then I should be on the new image factory deployable page
+ Then I should be on the new deployable page
And I should see "New Deployable"
When I fill in "deployable[name]" with "Solr Server"
And I press "Save"
- Then I should be on App's image factory deployable page
+ Then I should be on App's deployable page
And I should see "Deployable added"
And I should have a deployable named "Solr Server"
And I should see "Solr Server"
@@ -64,7 +64,7 @@ Feature: Manage Deployables as a non-admin
Scenario: Try to remove an existing assembly as a new user
Given there is a deployable named "Mailserver Cluster"
Given there is an assembly named "Postfix Node" belonging to
"Mailserver Cluster"
- And I am on the image factory deployables page
+ And I am on the deployables page
Then I should see "Mailserver Cluster"
When I follow "Mailserver Cluster"
And I follow "details_Assemblies"
diff --git a/src/features/deployment.feature b/src/features/deployment.feature
index 81213e0..22a8748 100644
--- a/src/features/deployment.feature
+++ b/src/features/deployment.feature
@@ -10,7 +10,7 @@ Feature: Manage Deployments
Scenario: List deployments
Given I am on the homepage
And there is a deployment named "MySQL Cluster" belonging to
"Databases" owned by "bob"
- When I go to the resources deployments page
+ When I go to the deployments page
Then I should see "MySQL Cluster"
And I should see "bob"
@@ -20,7 +20,7 @@ Feature: Manage Deployments
And there is a "testtemplate" template
And there is an assembly named "testassembly" belonging to
"testdeployable"
And there is an assembly named "testassembly" belonging to
"testtemplate" template
- When I go to the resources deployments page
+ When I go to the deployments page
And I press "Launch new"
Then I should see "Launch new deployment via"
When I select "testdeployable" from "deployable_id"
@@ -29,7 +29,7 @@ Feature: Manage Deployments
Scenario: Stop deployments
Given there is a deployment named "testdeployment" belonging to
"testdeployable" owned by "testuser"
- When I go to the resources deployments page
+ When I go to the deployments page
Then I should see "testdeployment"
When I check "testdeployment" deployment
And I press "Stop"
diff --git a/src/features/image_import.feature b/src/features/image_import.feature
index 56302cf..a5e9d58 100644
--- a/src/features/image_import.feature
+++ b/src/features/image_import.feature
@@ -10,8 +10,8 @@ Feature: Import Images
And there is a provider named "testprovider"
And there is a provider account named "provider1"
And There is a mock pulp repository
- When I go to the new image factory image import page
- Then I should be on the new image factory image import page
+ When I go to the new image import page
+ Then I should be on the new image import page
Scenario: Import a new image
@@ -19,18 +19,18 @@ Feature: Import Images
And I fill in "ami_id" with "img1"
Given I press "Import"
Then I should see "Image successfully imported"
- And I should be on the image factory templates page
+ And I should be on the templates page
Scenario: Import an already imported image
When I select "provider1" from "provider_account_id"
And I fill in "ami_id" with "img1"
Given I press "Import"
- When I go to the new image factory image import page
+ When I go to the new image import page
When I select "provider1" from "provider_account_id"
And I fill in "ami_id" with "img1"
And I press "Import"
Then I should see "Image 'img1' is already imported"
- And I should be on the image factory image imports page
+ And I should be on the image imports page
Scenario: Import a non-existent image
When I select "provider1" from "provider_account_id"
diff --git a/src/features/pool.feature b/src/features/pool.feature
index b4523e2..534e69c 100644
--- a/src/features/pool.feature
+++ b/src/features/pool.feature
@@ -11,13 +11,13 @@ Feature: Manage Pools
Given I am on the pools page
And there is not a pool named "mockpool"
When I follow "New Pool"
- Then I should be on the new resources pool page
+ Then I should be on the new pool page
And I should see "Create a new Pool"
When I fill in "pool_name" with "mockpool"
And I select "default" from "pool_pool_family_id"
And I fill in "quota_instances" with "unlimited"
And I press "Save"
- Then I should be on the resources pool page
+ Then I should be on the pool page
And I should see "Pool added"
And I should see "mockpool"
And I should see "default"
@@ -31,7 +31,7 @@ Feature: Manage Pools
| resource | capacity |
| maximum_running_instances | 10 |
| running_instances | 8 |
- And I am on the resources pools page
+ And I am on the pools page
When I follow "mockpool"
Then I should be on the show pool page
When I follow "Quota"
@@ -39,7 +39,7 @@ Feature: Manage Pools
| mockpool | 10 | 80.0 |
Scenario: Enter invalid characters into Name field
- Given I am on the new resources pool page
+ Given I am on the new pool page
When I fill in "pool[name]" with "@%&*())_@!#!"
And I press "Save"
Then I should see "Name must only contain: numbers, letters, spaces, '_'
and '-'"
@@ -48,14 +48,14 @@ Feature: Manage Pools
Given I am on the pools page
And a pool "Amazon Startrek Pool" exists
And a pool "Redhat Voyager Pool" exists
- And I am on the resources pools page
+ And I am on the pools page
And there are 3 pools
When I check "Redhat Voyager Pool" pool
And I check "Amazon Startrek Pool" pool
And I press "Destroy"
Then there should only be 1 pools
- And I should be on the resources pools page
- When I go to the resources pools page
+ And I should be on the pools page
+ When I go to the pools page
Then I should not see "Redhat Voyager Pool"
And I should not see "Amazon Startrek Pool"
@@ -64,22 +64,22 @@ Feature: Manage Pools
And there is not a pool named "mockpool"
And there is not a pool named "foopool"
When I follow "New Pool"
- Then I should be on the new resources pool page
+ Then I should be on the new pool page
And I should see "Create a new Pool"
When I fill in "pool_name" with "mockpool"
And I select "default" from "pool_pool_family_id"
And I press "Save"
- Then I should be on the resources pool page
+ Then I should be on the pool page
And I should see "Pool added"
And I should see "mockpool"
And I should have a pool named "mockpool"
When I follow "New Pool"
- Then I should be on the new resources pool page
+ Then I should be on the new pool page
And I should see "Create a new Pool"
When I fill in "pool_name" with "foopool"
And I select "default" from "pool_pool_family_id"
And I press "Save"
- Then I should be on the resources pool page
+ Then I should be on the pool page
And I should see "Pool added"
And I should see "mockpool"
And I should see "foopool"
diff --git a/src/features/pool_family.feature b/src/features/pool_family.feature
index 3ca5cfb..506ceab 100644
--- a/src/features/pool_family.feature
+++ b/src/features/pool_family.feature
@@ -14,7 +14,7 @@ Feature: Pool Families
| pool_family1 |
| pool_family2 |
| pool_family3 |
- When I go to the admin pool families page
+ When I go to the pool families page
Then I should see the following:
| pool_family1 |
| pool_family2 |
@@ -22,32 +22,32 @@ Feature: Pool Families
Scenario: Show pool family details
Given there is a pool family named "testpoolfamily"
- And I am on the admin pool families page
+ And I am on the pool families page
When I follow "testpoolfamily"
Then I should see "Name"
Scenario: Create a new Pool family
- Given I am on the admin pool families page
+ Given I am on the pool families page
And there is not a pool family named "testpoolfamily"
When I follow "Create"
- Then I should be on the new admin pool family page
+ Then I should be on the new pool family page
When I fill in "pool_family[name]" with "testpoolfamily"
When I fill in "pool_family[quota_attributes][maximum_running_instances]"
with "2"
And I press "Save"
- Then I should be on the admin pool families page
+ Then I should be on the pool families page
And I should see "Pool family was added."
And I should have a pool family named "testpoolfamily"
Scenario: Delete a pool family
Given I am on the homepage
And there is a pool family named "poolfamily1"
- When I go to the admin pool families page
+ When I go to the pool families page
And I check "poolfamily1" pool family
And I press "Delete"
Then there should not exist a pool family named "poolfamily1"
Scenario: Disallow deletion of default pool family
- Given I am on the admin pool families page
+ Given I am on the pool families page
Then I should see "default"
When I check "default" pool family
And I press "Delete"
@@ -60,7 +60,7 @@ Feature: Pool Families
| first_family |
| second_family |
| third_family |
- Given I am on the admin pool families page
+ Given I am on the pool families page
Then I should see "first_family"
And I should see "second_family"
And I should see "third_family"
diff --git a/src/features/provider.feature b/src/features/provider.feature
index e7b186f..29bf918 100644
--- a/src/features/provider.feature
+++ b/src/features/provider.feature
@@ -15,7 +15,7 @@ Feature: Manage Providers
| provider1 |
| provider2 |
| provider3 |
- When I go to the admin providers page
+ When I go to the providers page
Then I should see the following:
| provider1 |
| provider2 |
@@ -23,34 +23,34 @@ Feature: Manage Providers
Scenario: Show provider details
Given there is a provider named "testprovider"
- And I am on the admin providers page
+ And I am on the providers page
When I follow "testprovider"
Then I should see "Provider name"
And I should see "Provider URL"
Scenario: Create a new Provider
- Given I am on the admin providers page
+ Given I am on the providers page
And there is not a provider named "testprovider"
When I follow "Create"
- Then I should be on the new admin provider page
+ Then I should be on the new provider page
When I fill in "provider[name]" with "testprovider"
And I fill in "provider[url]" with "http://localhost:3001/api"
And I select "Amazon EC2" from "provider_provider_type_id"
And I press "Save"
- Then I should be on the admin providers page
+ Then I should be on the providers page
And I should see "Provider added"
And I should have a provider named "testprovider"
Scenario: Create a new Provider failure when using wrong url
- Given I am on the admin providers page
+ Given I am on the providers page
And there is not a provider named "testprovider"
When I follow "Create"
- Then I should be on the new admin provider page
+ Then I should be on the new provider page
When I fill in "provider[name]" with "testprovider"
And I fill in "provider[url]" with "http://localhost:3010/api"
And I select "Amazon EC2" from "provider_provider_type_id"
And I press "Save"
- Then I should be on the admin providers page
+ Then I should be on the providers page
And I should see "Failed to connect to Provider"
Scenario: Delete a provider
@@ -60,7 +60,7 @@ Feature: Manage Providers
And this provider has 5 hardware profiles
And this provider has a realm
And this provider has a provider account
- When I go to the admin providers page
+ When I go to the providers page
And I check "provider1" provider
And I press "Delete"
And there should not exist a provider named "provider1"
@@ -75,7 +75,7 @@ Feature: Manage Providers
| Test |
http://testprovider.com/api |
| Kenny |
http://mockprovider.com/api |
| Other |
http://sometesturl.com/api |
- And I am on the admin providers page
+ And I am on the providers page
Then I should see the following:
| Test |
http://testprovider.com/api |
| Kenny |
http://mockprovider.com/ap |
diff --git a/src/features/provider_account.feature
b/src/features/provider_account.feature
index 6a06d32..3e6c8c9 100644
--- a/src/features/provider_account.feature
+++ b/src/features/provider_account.feature
@@ -11,16 +11,16 @@ Feature: Manage Provider Accounts
Scenario: List provider accounts
Given I am on the homepage
And there is a provider named "testprovider"
- When I go to the admin provider accounts page
+ When I go to the provider accounts page
Then I should see "New Account"
And there should be no provider accounts
Scenario: Create a new Provider Account
Given there is a provider named "testprovider"
And there are no provider accounts
- And I am on the admin provider accounts page
+ And I am on the provider accounts page
When I follow "New Account"
- Then I should be on the new admin provider account page
+ Then I should be on the new provider account page
And I should see "New Account"
When I select "testprovider" from "provider_account_provider_id"
And I fill in "provider_account[label]" with "testaccount"
@@ -37,9 +37,9 @@ Feature: Manage Provider Accounts
Scenario: Create a new Provider Account using wrong credentials
Given there is a provider named "testprovider"
And there are no provider accounts
- And I am on the admin provider accounts page
+ And I am on the provider accounts page
When I follow "New Account"
- Then I should be on the new admin provider account page
+ Then I should be on the new provider account page
And I should see "New Account"
When I select "testprovider" from "provider_account_provider_id"
And I fill in "provider_account[label]" with "testaccount"
@@ -53,16 +53,16 @@ Feature: Manage Provider Accounts
Given there is a provider named "testprovider"
And there is a provider account named "testaccount"
And the account has an instance associated with it
- And I am on the admin provider accounts page
+ And I am on the provider accounts page
When I check the "testaccount" account
And I press "Delete"
- Then I should be on the admin provider accounts page
+ Then I should be on the provider accounts page
And I should see "was not deleted"
And there should be 1 provider account
When I delete all instances from the account
And I check the "testaccount" account
And I press "Delete"
- Then I should be on the admin provider accounts page
+ Then I should be on the provider accounts page
And I should see "was deleted"
And there should be no provider accounts
@@ -70,7 +70,7 @@ Feature: Manage Provider Accounts
Given there is a provider named "testprovider"
And there is a provider account named "testaccount"
And there is a second provider account named "otheraccount"
- And I am on the admin provider accounts page
+ And I am on the provider accounts page
When I fill in "q" with "test"
And I press "Search"
Then I should see the following:
diff --git a/src/features/realm.feature b/src/features/realm.feature
index 0cb2b85..c5e81d2 100644
--- a/src/features/realm.feature
+++ b/src/features/realm.feature
@@ -10,7 +10,7 @@ Feature: Manage Realms
And a realm "testrealm1" exists
Scenario: Create new frontend realm
- Given I am on the admin realms page
+ Given I am on the realms page
When I follow "Create"
Then I should see "Create a new Realm"
When I fill in "frontend_realm[name]" with "testrealm2"
@@ -18,7 +18,7 @@ Feature: Manage Realms
Then I should see "Realm was added."
Scenario: Add realm mapping
- Given I am on the admin realms page
+ Given I am on the realms page
And there is a realm "testrealm1"
And a provider "provider1" exists
When I follow "testrealm1"
@@ -29,7 +29,7 @@ Feature: Manage Realms
Then I should see "Realm mapping was added."
Scenario: Change the name
- Given I am on the admin realms page
+ Given I am on the realms page
And there is a realm "testrealm1"
When I follow "testrealm1"
And I follow "Edit"
@@ -40,30 +40,30 @@ Feature: Manage Realms
Scenario: Show realm detials
Given a realm "testrealm2" exists
- And I am on the admin realms page
+ And I am on the realms page
When I follow "testrealm2"
Then I should be on testrealm2's realm page
Scenario: Delete realms
Given a realm "testrealm2" exists
- And I am on the admin realms page
+ And I am on the realms page
And there are 2 realms
When I check "testrealm2" realm
And I check "testrealm1" realm
And I press "Delete"
Then there should be only 0 realms
- And I should be on the admin realms page
+ And I should be on the realms page
And I should not see "testrealm1"
And I should not see "testrealm2"
Scenario: Delete realm without selecting one
- Given I am on the admin realms page
+ Given I am on the realms page
When I press "Delete"
- Then I should be on the admin realms page
+ Then I should be on the realms page
And I should see "You must select at least one realm to delete."
Scenario: Delete realm mapping without selecting one
- Given I am on the admin realms page
+ Given I am on the realms page
And there is a realm "testrealm1"
When I follow "testrealm1"
And I follow "Mapping"
diff --git a/src/features/role.feature b/src/features/role.feature
index dbfb22b..ab24323 100644
--- a/src/features/role.feature
+++ b/src/features/role.feature
@@ -10,7 +10,7 @@ Feature: Manage Roles
And a role "Captain" exists
Scenario: Change the name
- Given I am on the admin roles page
+ Given I am on the roles page
And there should be a role named "Captain"
When I follow "Captain"
And I follow "Edit"
@@ -21,31 +21,31 @@ Feature: Manage Roles
Scenario: Show role details
Given a role "Admiral" exists
- And I am on the admin roles page
+ And I am on the roles page
When I follow "Admiral"
Then I should be on Admiral's role page
Scenario: Show default role privileges
- Given I am on the admin roles page
+ Given I am on the roles page
And there should be a role named "Administrator"
When I follow "Administrator"
Then I should be on Administrator's role page
Scenario: Delete roles
Given a role "Admiral" exists
- And I am on the admin roles page
+ And I am on the roles page
And there are 2 more roles
When I check "Admiral" role
And I check "Captain" role
And I press "Destroy"
Then there should be 0 more roles
- And I should be on the admin roles page
+ And I should be on the roles page
And I should not see "Captain"
And I should not see "Admiral"
Scenario: Search roles
Given a role "Admiral" exists
- And I am on the admin roles page
+ And I am on the roles page
And there are 2 more roles
When I fill in "q" with "admi"
And I press "Search"
diff --git a/src/features/settings.feature b/src/features/settings.feature
index 3da9589..99505d0 100644
--- a/src/features/settings.feature
+++ b/src/features/settings.feature
@@ -9,7 +9,7 @@ Feature: Manage System wide Settings
Scenario: Change the self service default quota
Given the default quota is set to 5
- And I am on the self service admin settings page
+ And I am on the self service settings page
When I fill in "self_service_default_quota[maximum_running_instances]" with
"8"
And I press "Save"
Then I should see "Settings Updated!"
@@ -18,7 +18,7 @@ Feature: Manage System wide Settings
Scenario: Invalid decimal entry for the self service default quota
Given the default quota is set to 5
- And I am on the self service admin settings page
+ And I am on the self service settings page
When I fill in "self_service_default_quota[maximum_running_instances]" with
"1.5"
And I press "Save"
Then I should see "Could not update the default quota"
@@ -27,7 +27,7 @@ Feature: Manage System wide Settings
Scenario: Invalid chars entry for the self service default quota
Given the default quota is set to 5
- And I am on the self service admin settings page
+ And I am on the self service settings page
When I fill in "self_service_default_quota[maximum_running_instances]" with
"abc"
And I press "Save"
Then I should see "Could not update the default quota"
@@ -36,7 +36,7 @@ Feature: Manage System wide Settings
Scenario: Invalid special chars entry for the self service default quota
Given the default quota is set to 5
- And I am on the self service admin settings page
+ And I am on the self service settings page
When I fill in "self_service_default_quota[maximum_running_instances]" with
"^&(*_!"
And I press "Save"
Then I should see "Could not update the default quota"
diff --git a/src/features/step_definitions/api_steps.rb
b/src/features/step_definitions/api_steps.rb
index 96521d1..c722b60 100644
--- a/src/features/step_definitions/api_steps.rb
+++ b/src/features/step_definitions/api_steps.rb
@@ -10,7 +10,7 @@ end
When /^a client requests matching hardware profile for "([^"]*)"$/ do
|name|
hardware_profile = HardwareProfile.find_by_name(name)
provider = HardwareProfile.find_by_name("m1-medium").provider
- uri = url_for :action => 'matching_profiles', :controller =>
'admin/hardware_profiles', :hardware_profile_id => hardware_profile.id,
:provider_id => provider.id
+ uri = url_for :action => 'matching_profiles', :controller =>
'hardware_profiles', :hardware_profile_id => hardware_profile.id, :provider_id
=> provider.id
send_xml_get(uri)
end
@@ -40,7 +40,7 @@ end
When /^a client requests "([^"]*)" for instance "([^"]*)"
for provider account "([^"]*)"$/ do |action, instance, provider_account|
instance = Instance.find_by_name(instance)
provider_account = ProviderAccount.find_by_label(provider_account)
- uri = url_for :action => action, :controller => 'resources/instances',
:instance_id => instance.id, :provider_account_id => provider_account.id
+ uri = url_for :action => action, :controller => 'instances', :instance_id
=> instance.id, :provider_account_id => provider_account.id
send_xml_get(uri)
end
diff --git a/src/features/step_definitions/instance_steps.rb
b/src/features/step_definitions/instance_steps.rb
index b7daa18..c4ceb0c 100644
--- a/src/features/step_definitions/instance_steps.rb
+++ b/src/features/step_definitions/instance_steps.rb
@@ -15,15 +15,15 @@ Given /^a mock pending instance exists$/ do
end
Given /^I am viewing the mock instance detail$/ do
- visit resources_instance_url(mock_instance)
+ visit instance_url(mock_instance)
end
When /^I am viewing the pending instance detail$/ do
- visit resources_instance_url(pending_instance)
+ visit instance_url(pending_instance)
end
When /^I manually go to the key action for this instance$/ do
- visit key_resources_instance_url(pending_instance)
+ visit key_instance_url(pending_instance)
end
Given /^I see "([^"]*)"$/ do |text|
diff --git a/src/features/step_definitions/template_steps.rb
b/src/features/step_definitions/template_steps.rb
index d888ba7..db07c6a 100644
--- a/src/features/step_definitions/template_steps.rb
+++ b/src/features/step_definitions/template_steps.rb
@@ -121,7 +121,7 @@ Given /^has package "([^"]*)"$/ do |arg1|
end
When /^I edit the template$/ do
- visit edit_image_factory_template_url(@template)
+ visit edit_template_url(@template)
end
When /^(?:|I )check "([^"]*)" template$/ do |template_name|
diff --git a/src/features/support/paths.rb b/src/features/support/paths.rb
index 9f859a0..e26e611 100644
--- a/src/features/support/paths.rb
+++ b/src/features/support/paths.rb
@@ -18,13 +18,13 @@ module NavigationHelpers
login_path
when /^(.*)'s user page$/i
- admin_user_path(User.find_by_login($1))
+ user_path(User.find_by_login($1))
when /^(.*)'s role page$/i
- admin_role_path(Role.find_by_name($1))
+ role_path(Role.find_by_name($1))
when /^(.*)'s realm page$/i
- admin_realm_path(FrontendRealm.find_by_name($1))
+ realm_path(FrontendRealm.find_by_name($1))
when /the account page/
account_path
@@ -48,25 +48,25 @@ module NavigationHelpers
settings_path
when /the pools page/
- resources_pools_path
+ pools_path
when /the new pool page/
new_pool_path
when /the show pool page/
- resources_pool_path
+ pool_path
when /the pool realms page/
pool_realms_path
when /the deployments page/
- resources_deployments_path
+ deployments_path
when /the instances page/
- resources_instances_path
+ instances_path
when /the new instance page/
- new_resources_instance_path
+ new_instance_path
when /the pool hardware profiles page/
hardware_profiles_pool_path
@@ -84,10 +84,10 @@ module NavigationHelpers
url_for new_build_path
when /the template builds page/
- url_for image_factory_template_path(@template, :details_tab =>
'builds')
+ url_for template_path(@template, :details_tab => 'builds')
when /the pool family provider accounts page/
- url_for admin_pool_family_path(@pool_family, :details_tab =>
'provider_accounts')
+ url_for pool_family_path(@pool_family, :details_tab =>
'provider_accounts')
when /the templates page/
templates_path
@@ -102,25 +102,25 @@ module NavigationHelpers
url_for :action => 'update', :controller => 'settings',
:only_path => true
when /the hardware profiles page/
- url_for admin_hardware_profiles_path
+ url_for hardware_profiles_path
when /the new hardware profile page/
- url_for new_admin_hardware_profile_path
+ url_for new_hardware_profile_path
when /the edit hardware profiles page/
url_for :action => 'edit', :controller =>
'hardware_profiles', :only_path => true
when /^(.*)'s provider account page$/
- admin_provider_account_path(ProviderAccount.find_by_label($1))
+ provider_account_path(ProviderAccount.find_by_label($1))
when /the deployable deployments page/
- image_factory_deployable_path(@deployable, :details_tab =>
'deployments')
+ deployable_path(@deployable, :details_tab => 'deployments')
when /the operational status of deployment page/
- resources_deployment_path(@deployment, :details_tab => 'operation')
+ deployment_path(@deployment, :details_tab => 'operation')
- when /^(.*)'s image factory deployable page$/
- image_factory_deployable_path(Deployable.find_by_name($1))
+ when /^(.*)'s deployable page$/
+ deployable_path(Deployable.find_by_name($1))
# Add more mappings here.
# Here is an example that pulls values out of the Regexp:
diff --git a/src/features/template.feature b/src/features/template.feature
index fa6b56d..90c1ed5 100644
--- a/src/features/template.feature
+++ b/src/features/template.feature
@@ -9,20 +9,20 @@ Feature: Manage Templates
And There is a mock pulp repository
Scenario: Create a new Template
- Given I am on the image factory templates page
+ Given I am on the templates page
When I follow "Create"
- Then I should be on the new image factory template page
+ Then I should be on the new template page
When I fill in the following:
| tpl_name | mocktemplate |
| tpl_platform | fedora13 |
| tpl_summary | mockdesc |
When I press "Save"
- Then I should be on the image factory templates page
+ Then I should be on the templates page
And I should see "Template saved"
And I should see "mocktemplate"
Scenario: Add a package to a new template
- Given I am on the new image factory template page
+ Given I am on the new template page
When I press "Add Software"
When I press "admin-tools"
Then I should see "System Tools"
@@ -33,7 +33,7 @@ Feature: Manage Templates
And I should see "libdeltacloud"
Scenario: Add a searched package to a new template
- Given I am on the new image factory template page
+ Given I am on the new template page
When I press "Add Software"
And I fill in "package_search" with "libdeltacloud"
And I press "package_search_button"
@@ -44,9 +44,9 @@ Feature: Manage Templates
And I should see "libdeltacloud"
Scenario: Add group and remove package to/from the template
- Given I am on the image factory templates page
+ Given I am on the templates page
When I follow "Create"
- Then I should be on the new image factory template page
+ Then I should be on the new template page
When I fill in the following:
| tpl_name | mocktemplate |
And I press "Add Software"
@@ -61,7 +61,7 @@ Feature: Manage Templates
Then I should see "Managed Content to Bundle"
And the page should not contain "#package_libdeltacloud" selector
When I press "Save"
- Then I should be on the image factory templates page
+ Then I should be on the templates page
And I should see "Template saved"
And I should see "mocktemplate"
@@ -77,7 +77,7 @@ Feature: Manage Templates
Then I should see "Managed Content to Bundle"
And the page should contain "#package_libdeltacloud" selector
When I press "Save"
- Then I should be on the image factory templates page
+ Then I should be on the templates page
And I should see "Template updated"
When I edit the template
Then the page should contain "#package_libdeltacloud" selector
@@ -85,7 +85,7 @@ Feature: Manage Templates
Scenario: Sorting templates
Given there is a "mock1" template
And there is a "mock2" template
- And I am on the image factory templates page
+ And I am on the templates page
When I follow "Name" within "#templates_table"
Then I should see "mock1" followed by "mock2"
When I follow "Name" within "#templates_table"
@@ -101,14 +101,14 @@ Feature: Manage Templates
Then I should see "mock2" followed by "mock1"
Scenario: Search software with empty string
- Given I am on the new image factory template page
+ Given I am on the new template page
When I press "Add Software"
And I fill in "package_search" with ""
And I press "package_search_button"
Then I should see "Search string is empty"
Scenario: Show software selection
- Given I am on the new image factory template page
+ Given I am on the new template page
And I press "Add Software"
Then I should see an input "Collections"
# test that we see a metagroup
@@ -119,7 +119,7 @@ Feature: Manage Templates
Scenario: See upload status
Given there is a "mock1" template
And there is Amazon AWS build and push for this template
- And I am on the image factory templates page
+ And I am on the templates page
When I choose this template
And I follow "Builds"
Then I should see "amazon-ec2: complete"
@@ -127,21 +127,21 @@ Feature: Manage Templates
Scenario: Build template
Given there is a "mock1" template
And there is Amazon AWS provider account
- And I am on the image factory templates page
+ And I am on the templates page
When I choose this template
And I follow "Builds"
Then I should see "Builds for"
When I select "Amazon EC2" from "target"
And I press "Go"
- Then I should be on the image factory template page
+ Then I should be on the template page
And I should see "mock1"
Scenario: Upload image
Given there is a "mock1" template
- And I am on the image factory templates page
+ And I am on the templates page
And there is Amazon AWS build for this template
And there is Amazon AWS provider
- And I am on the image factory templates page
+ And I am on the templates page
When I choose this template
And I follow "Builds"
Then I should see "amazon-ec2: not uploaded upload"
@@ -153,7 +153,7 @@ Feature: Manage Templates
Scenario: Build imported template
Given there is an imported template
And there is Amazon AWS provider account
- And I am on the image factory templates page
+ And I am on the templates page
When I choose this template
And I follow "Builds"
Then I should see "Build imported template is not supported"
@@ -164,7 +164,7 @@ Feature: Manage Templates
| Test1 | fedora13 | 13 | x86_64 | Test Template Fedora
13 64 bit Description |
| Mock | fedora14 | 14 | i386 | Test Template Fedora
14 Description |
| Other | fedora14 | 10.04 | i386 | Test Template Ubuntu
10.04 32 bit Description |
- And I am on the image factory templates page
+ And I am on the templates page
Then I should see the following:
| NAME | OS | VERSION | ARCH |
| Test1 | Fedora | 13 | x86_64 |
@@ -207,22 +207,22 @@ Feature: Manage Templates
| Test1 | fedora13 | 13 | x86_64 | Test Template Fedora
13 64 bit Description |
| Mock | fedora13 | 14 | i386 | Test Template Fedora
14 Description |
| Other | fedora13 | 10.04 | i386 | Test Template Ubuntu
10.04 32 bit Description |
- And I am on the image factory templates page
+ And I am on the templates page
When I check "Test1" template
And I check "Mock" template
And I press "Delete"
- Then I should be on the image factory templates page
+ Then I should be on the templates page
And I should see "Other"
Scenario: Create Assembly and Deployable
- Given I am on the new image factory template page
+ Given I am on the new template page
When I fill in the following:
| tpl_name | mocktemplate |
| tpl_platform | fedora13 |
| tpl_summary | mockdesc |
And I check "create_deployable"
And I press "Save"
- Then I should be on the image factory templates page
+ Then I should be on the templates page
And I should see "mocktemplate"
- When I go to the image factory deployables page
+ When I go to the deployables page
And I should see "mocktemplate"
diff --git a/src/features/user.feature b/src/features/user.feature
index b073436..0d90dbe 100644
--- a/src/features/user.feature
+++ b/src/features/user.feature
@@ -9,7 +9,7 @@ Feature: Manage Users
And a user "testuser" exists
Scenario: Change the password
- Given I am on the admin users page
+ Given I am on the users page
And there is a user "testuser"
When I follow "testuser"
And I follow "Edit"
@@ -28,29 +28,29 @@ Feature: Manage Users
Then I should see "User updated!"
Scenario: Show user detials
- Given I am on the admin users page
+ Given I am on the users page
And there is a user "testuser"
When I follow "testuser"
Then I should be on testuser's user page
Scenario: Administrator cancels the creation of a user account
- Given I am on the admin users page
+ Given I am on the users page
And there are 2 users
When I follow "create"
- Then I should be on the new admin user page
+ Then I should be on the new user page
When I follow "cancel"
Then there should be 2 users
- And I should be on the admin users page
+ And I should be on the users page
Scenario: Delete users
Given there is a user "testuser"
- And I am on the admin users page
+ And I am on the users page
Then there should be 2 users
When I check "admin" user
And I press "Delete"
Then I should see "Cannot delete admin"
And there should be 2 users
- And I should be on the admin users page
+ And I should be on the users page
When I check "testuser" user
And I press "Delete"
Then I should see "Deleted user"
@@ -59,7 +59,7 @@ Feature: Manage Users
Scenario: Search for hardware profiles
Given there is a user "myuser"
And there is a user "someuser"
- And I am on the admin users page
+ And I am on the users page
Then I should see "myuser"
And I should see "someuser"
When I fill in "q" with "some"
diff --git a/src/spec/controllers/builds_controller_spec.rb
b/src/spec/controllers/builds_controller_spec.rb
index 17fac9c..3d0debf 100644
--- a/src/spec/controllers/builds_controller_spec.rb
+++ b/src/spec/controllers/builds_controller_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe ImageFactory::BuildsController do
+describe BuildsController do
fixtures :all
before(:each) do
@admin_permission = Factory :admin_permission
diff --git a/src/spec/controllers/hardware_profiles_controller_spec.rb
b/src/spec/controllers/hardware_profiles_controller_spec.rb
index c7bb49f..31f42ba 100644
--- a/src/spec/controllers/hardware_profiles_controller_spec.rb
+++ b/src/spec/controllers/hardware_profiles_controller_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Admin::HardwareProfilesController do
+describe HardwareProfilesController do
fixtures :all
before(:each) do
diff --git a/src/spec/controllers/instance_controller_spec.rb
b/src/spec/controllers/instance_controller_spec.rb
index ffed76d..2837338 100644
--- a/src/spec/controllers/instance_controller_spec.rb
+++ b/src/spec/controllers/instance_controller_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Resources::InstancesController do
+describe InstancesController do
fixtures :all
before(:each) do
@admin_permission = Factory :admin_permission
@@ -11,7 +11,7 @@ describe Resources::InstancesController do
it "should provide ui to create new instance" do
UserSession.create(@admin)
get :new
- response.should redirect_to(select_template_resources_instances_path)
+ response.should redirect_to(select_template_instances_path)
end
it "should fail to grant access to new pool ui for unauthenticated user" do
diff --git a/src/spec/controllers/pools_controller_spec.rb
b/src/spec/controllers/pools_controller_spec.rb
index 9c730c3..01c8d8d 100644
--- a/src/spec/controllers/pools_controller_spec.rb
+++ b/src/spec/controllers/pools_controller_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Resources::PoolsController do
+describe PoolsController do
fixtures :all
before(:each) do
@admin_permission = Factory :admin_permission
@@ -30,7 +30,7 @@ describe Resources::PoolsController do
}
end.should change(Pool, :count).by(1)
id = Pool.find(:first, :conditions => ['name = ?',
'foopool']).id
- response.should redirect_to(resources_pool_path(id))
+ response.should redirect_to(pool_path(id))
end
end
diff --git a/src/spec/controllers/provider_accounts_controller_spec.rb
b/src/spec/controllers/provider_accounts_controller_spec.rb
index c6887cf..503216b 100644
--- a/src/spec/controllers/provider_accounts_controller_spec.rb
+++ b/src/spec/controllers/provider_accounts_controller_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Admin::ProviderAccountsController do
+describe ProviderAccountsController do
fixtures :all
before(:each) do
@@ -43,7 +43,7 @@ describe Admin::ProviderAccountsController do
@provider_account.quota = Quota.new
@provider_account.save.should be_true
post :update, :id => @provider_account.id, :provider_account => {
:credentials_hash => {:username => 'mockuser', :password =>
'mockpassword'} }
- response.should redirect_to admin_provider_account_path(@provider_account)
+ response.should redirect_to provider_account_path(@provider_account)
ProviderAccount.find((a)provider_account.id).credentials_hash['password'].should ==
"mockpassword"
end
@@ -52,7 +52,7 @@ describe Admin::ProviderAccountsController do
lambda do
post :multi_destroy, :accounts_selected => [@provider_account.id]
end.should change(ProviderAccount, :count).by(-1)
- response.should redirect_to admin_provider_accounts_url
+ response.should redirect_to provider_accounts_url
ProviderAccount.find_by_id((a)provider_account.id).should be_nil
end
diff --git a/src/spec/controllers/provider_controller_spec.rb
b/src/spec/controllers/provider_controller_spec.rb
index 0b4661d..775ef92 100644
--- a/src/spec/controllers/provider_controller_spec.rb
+++ b/src/spec/controllers/provider_controller_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Admin::ProvidersController do
+describe ProvidersController do
fixtures :all
before(:each) do
@@ -17,7 +17,7 @@ describe Admin::ProvidersController do
get :show, :id => provider.id, :details_tab => 'hw_profiles'
response.should be_success
assigns[:hardware_profiles].size.should == provider.hardware_profiles.size
- response.should render_template("admin/providers/_hw_profiles")
+ response.should render_template("providers/_hw_profiles")
end
it "should provide ui to view realms" do
@@ -27,7 +27,7 @@ describe Admin::ProvidersController do
get :show, :id => provider.id, :details_tab => 'realms'
response.should be_success
assigns[:realm_names].size.should == provider.realms.size
- response.should render_template("admin/providers/_realms")
+ response.should render_template("providers/_realms")
end
diff --git a/src/spec/controllers/templates_controller_spec.rb
b/src/spec/controllers/templates_controller_spec.rb
index db38d74..1ace2cc 100644
--- a/src/spec/controllers/templates_controller_spec.rb
+++ b/src/spec/controllers/templates_controller_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe ImageFactory::TemplatesController do
+describe TemplatesController do
fixtures :all
before(:each) do
diff --git a/src/spec/controllers/users_controller_spec.rb
b/src/spec/controllers/users_controller_spec.rb
index 90b161b..20d46e8 100644
--- a/src/spec/controllers/users_controller_spec.rb
+++ b/src/spec/controllers/users_controller_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Admin::UsersController do
+describe UsersController do
before(:each) do
@tuser = Factory :tuser
@@ -53,7 +53,7 @@ describe Admin::UsersController do
:password_confirmation => "testpass" }
end.should change(User, :count)
- response.should redirect_to(admin_users_url)
+ response.should redirect_to(users_url)
end
it "should not allow a regular user to create user" do
--
1.7.4.4