[PATCH conductor] BZ 784564 - some running instances were not stopped when deleting a deployment
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/app/models/deployment.rb | 2 +-
src/spec/models/deployment_spec.rb | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
index 68b5a57..535629b 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -158,7 +158,7 @@ class Deployment < ActiveRecord::Base
# stop all deployment's instances
instances.each do |instance|
- break unless instance.state == Instance::STATE_RUNNING
+ next unless instance.state == Instance::STATE_RUNNING
@task = instance.queue_action(instance.owner, 'stop')
unless @task
diff --git a/src/spec/models/deployment_spec.rb b/src/spec/models/deployment_spec.rb
index 38b2b19..a62c298 100644
--- a/src/spec/models/deployment_spec.rb
+++ b/src/spec/models/deployment_spec.rb
@@ -109,6 +109,19 @@ describe Deployment do
@deployment.should be_destroyable
expect { @deployment.destroy }.to change(Deployment, :count).by(-1)
end
+
+ it "should send stop request to all running instances before it's destroyed" do
+ @deployment.save!
+ inst1 = Factory.create :mock_running_instance, :deployment_id => @deployment.id
+ inst2 = Factory.create :mock_running_instance, :deployment_id => @deployment.id
+ inst2.state = Instance::STATE_STOPPED
+ inst2.save!
+ inst3 = Factory.create :mock_running_instance, :deployment_id => @deployment.id
+ Taskomatic.stub!(:stop_instance).and_return(nil)
+ @deployment.stop_instances_and_destroy!
+ inst1.tasks.last.action.should == 'stop'
+ inst3.tasks.last.action.should == 'stop'
+ end
end
describe ".provider" do
--
1.7.7.5
12 years, 1 month
[PATCH conductor] BZ773051 disable automatic deployable creation option in images/overview when no catalog exist
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/controllers/images_controller.rb | 10 +++++++++-
src/app/views/images/overview.html.haml | 5 ++++-
src/app/views/pool_families/_pools.html.haml | 2 +-
src/config/locales/en.yml | 1 +
src/features/image.feature | 12 ++++++++++++
src/features/step_definitions/catalog_steps.rb | 4 ++++
src/features/step_definitions/web_steps.rb | 4 ++++
7 files changed, 35 insertions(+), 3 deletions(-)
diff --git a/src/app/controllers/images_controller.rb b/src/app/controllers/images_controller.rb
index 997ab6a..6591c1c 100644
--- a/src/app/controllers/images_controller.rb
+++ b/src/app/controllers/images_controller.rb
@@ -229,7 +229,12 @@ class ImagesController < ApplicationController
@xml = xml_source
render :edit_xml and return
end
- render :overview unless params[:edit]
+
+ unless params[:edit]
+ @catalogs = Catalog.list_for_user(current_user, Privilege::VIEW)
+ flash.now[:warning] = t("images.overview.no_catalogs") if @catalogs.blank?
+ render :overview
+ end
end
def overview
@@ -250,6 +255,9 @@ class ImagesController < ApplicationController
flash.now[:error] = errors
render :edit_xml and return
end
+
+ @catalogs = Catalog.list_for_user(current_user, Privilege::VIEW)
+ flash.now[:warning] = t("images.overview.no_catalogs") if @catalogs.blank?
end
def create
diff --git a/src/app/views/images/overview.html.haml b/src/app/views/images/overview.html.haml
index 0167513..13f1008 100644
--- a/src/app/views/images/overview.html.haml
+++ b/src/app/views/images/overview.html.haml
@@ -17,7 +17,10 @@
%p.description= t('.description', :name => @name)
%fieldset.align-center
- = check_box_tag :make_deployable, 1, true
+ - if @catalogs.blank?
+ = check_box_tag :make_deployable, 1, false, :disabled => true
+ - else
+ = check_box_tag :make_deployable, 1, true
= label_tag :make_deployable, t('.make_deployable', :name => @name)
.centered
%fieldset.align-center
diff --git a/src/app/views/pool_families/_pools.html.haml b/src/app/views/pool_families/_pools.html.haml
index 50a8c00..000b87b 100644
--- a/src/app/views/pool_families/_pools.html.haml
+++ b/src/app/views/pool_families/_pools.html.haml
@@ -4,7 +4,7 @@
%td{:class => 'center'}= pool.deployments.count
%td{:class => 'center'}= pool.statistics[:total_instances]
%td{:class => 'center'}= pool.statistics[:instances_pending]
- %td{:class => 'center'}= pool.statistics[:instances_failed]
+ %td{:class => 'center'}= pool.statistics[:instances_failed_count]
%td{:class => 'center'}= pool.statistics[:quota_percent]
%td{:class => 'center'}= pool.statistics[:used_quota]
%td{:class => 'center'}= pool.statistics[:available_quota].nil? ? raw('∞') : pool.statistics[:available_quota]
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 71cdb65..9997e06 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -786,6 +786,7 @@ en:
make_deployable: Automatically make "%{name}" deployable.
back: Back
save_template: Save Template
+ no_catalogs: "It's not possible to automatically create a deployable because no catalogs exist."
not_on_provider: The requested image was not found on the provider.
template_xml:
errors:
diff --git a/src/features/image.feature b/src/features/image.feature
index 4e901d5..c406a32 100644
--- a/src/features/image.feature
+++ b/src/features/image.feature
@@ -27,6 +27,18 @@ Feature: Manage Images
And I press "save_image"
Then I should see "Failed to parse XML."
+ Scenario: Disable deployable creation when no catalog exists
+ Given there is a pool family named "testpoolfamily"
+ And I am on the new image page for "testpoolfamily"
+ And there are no catalogs
+ When I fill in "name" with "my template"
+ And I attach the file "features/upload_files/template.xml" to "image_file"
+ And I uncheck "edit"
+ And I press "file_button"
+ Then I should be on the edit xml images page
+ And I should see "no catalogs exist"
+ And the "make_deployable" checkbox should be disabled
+
#
# FIXME - This test is failing, but fixing it requires fixing a larger bug: we don't
# use VCR the way we think we do when interacting with iwhd... That's a large can of worms.
diff --git a/src/features/step_definitions/catalog_steps.rb b/src/features/step_definitions/catalog_steps.rb
index 3dcb34f..f5bb0b0 100644
--- a/src/features/step_definitions/catalog_steps.rb
+++ b/src/features/step_definitions/catalog_steps.rb
@@ -25,3 +25,7 @@ When /^I check "([^"]*)" catalog$/ do |arg1|
catalog = Catalog.find_by_name(arg1)
check("catalog_checkbox_#{catalog.id}")
end
+
+Then /^there are no catalogs/ do
+ Catalog.destroy_all
+end
diff --git a/src/features/step_definitions/web_steps.rb b/src/features/step_definitions/web_steps.rb
index 236a801..ce5a0b1 100644
--- a/src/features/step_definitions/web_steps.rb
+++ b/src/features/step_definitions/web_steps.rb
@@ -200,6 +200,10 @@ Then /^the "([^"]*)" checkbox(?: within (.*))? should not be checked$/ do |label
end
end
+Then /^the "([^\"]*)" checkbox should be disabled$/ do |field|
+ find_field(field)[:disabled].should == 'disabled'
+end
+
Then /^(?:|I )should be on (.+)$/ do |page_name|
current_path = URI.parse(current_url).path
if current_path.respond_to? :should
--
1.7.7.6
12 years, 1 month
[PATCH conductor] Make some more tests i18n-independent
by Tomas Sedovic
From: Tomas Sedovic <tomas(a)sedovic.cz>
Another piece to the ongoing effort to have all tests independent on
localization.
---
src/features/deployables.feature | 15 +++++++--------
src/features/image.feature | 2 +-
src/features/pool_family.feature | 3 +--
src/features/support/paths.rb | 7 +++++++
.../controllers/deployables_controller_spec.rb | 10 +++++-----
5 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/src/features/deployables.feature b/src/features/deployables.feature
index 922b02a..a27f8ef 100644
--- a/src/features/deployables.feature
+++ b/src/features/deployables.feature
@@ -11,14 +11,13 @@ Feature: Manage Catalog Entries
Scenario: Create new catalog entry
Given there is a "default" catalog
When I am on the "default" catalog catalog entries page
- Then I should see "Deployables"
- When I follow "new_catalog_entry_button"
- Then I should see "Add New Deployable"
+ And I follow "new_catalog_entry_button"
+ Then I should be on the new deployable page for "default"
When I fill in "deployable[name]" with "test1"
And I fill in "deployable[description]" with "description"
When I attach the file "features/upload_files/deployable.xml" to "deployable[xml]"
And I press "save_button"
- Then I should see "Deployable added"
+ Then I should see a confirmation message
Scenario: Change the name
Given there is a "default" catalog
@@ -26,10 +25,10 @@ Feature: Manage Catalog Entries
When I am on the "default" catalog catalog entries page
When I follow "testdepl"
And I follow "edit_button"
- Then I should see "Editing Deployable"
+ Then I should be on the edit deployable page for "testdepl"
When I fill in "deployable[name]" with "testdepl-renamed"
And I press "save_button"
- Then I should see "Deployable updated successfully!"
+ Then I should see a confirmation message
And I should see "testdepl-renamed"
Scenario: Show catalog entry details
@@ -59,7 +58,7 @@ Feature: Manage Catalog Entries
And I press "delete_button"
Then I should be on the "default" catalog page
And there should be only 0 catalog entries for "default" catalog
- And I should see "2 deployables testdepl1, testdepl2 were deleted!"
+ And I should see a confirmation message
Scenario: Delete deployable
Given there is a "default" catalog
@@ -69,7 +68,7 @@ Feature: Manage Catalog Entries
And I press "delete"
Then I should be on the "default" catalog page
And there should be only 0 catalog entries for "default" catalog
- And I should see "Deployable testdepl1 delete successfully!"
+ And I should see a confirmation message
#Scenario: Search Catalog Entries
# Given there is a "testcatalog" catalog
diff --git a/src/features/image.feature b/src/features/image.feature
index 4e901d5..8ebfd4c 100644
--- a/src/features/image.feature
+++ b/src/features/image.feature
@@ -12,7 +12,7 @@ Feature: Manage Images
And I am on the new image page for "testpoolfamily"
When I fill in "name" with "my template"
And I press "file_button"
- Then I should see "You must specify the template XML file"
+ Then I should see an error message
Scenario: Edit an invalid XML when creating an image
Given there is a pool family named "testpoolfamily"
diff --git a/src/features/pool_family.feature b/src/features/pool_family.feature
index 3bcc1f5..a7589e2 100644
--- a/src/features/pool_family.feature
+++ b/src/features/pool_family.feature
@@ -25,8 +25,7 @@ Feature: Pool Families
Given I am logged in
And I can view pool family "testpoolfamily"
When I go to the pool families page
- Then I should see "Pool Families"
- And I should not see "testpoolfamily"
+ Then I should not see "testpoolfamily"
Scenario: Show pool family details
Given I am an authorised user
diff --git a/src/features/support/paths.rb b/src/features/support/paths.rb
index 2b44259..3a7796e 100644
--- a/src/features/support/paths.rb
+++ b/src/features/support/paths.rb
@@ -186,6 +186,13 @@ module NavigationHelpers
when /^the "(.*)" catalog catalog entries page/
url_for catalog_deployables_path(Catalog.find_by_name($1))
+ when /^the new deployable page for "(.*)"/
+ url_for new_catalog_deployable_path(Catalog.find_by_name($1))
+
+ when /^the edit deployable page for "(.*)"/
+ deployable = Deployable.find_by_name $1
+ url_for edit_catalog_deployable_path(deployable.catalogs.first, deployable)
+
# Add more mappings here.
# Here is an example that pulls values out of the Regexp:
#
diff --git a/src/spec/controllers/deployables_controller_spec.rb b/src/spec/controllers/deployables_controller_spec.rb
index ec96d7c..699f0b3 100644
--- a/src/spec/controllers/deployables_controller_spec.rb
+++ b/src/spec/controllers/deployables_controller_spec.rb
@@ -64,7 +64,7 @@ describe DeployablesController do
it "deletes a deployable and appears flash notice" do
delete :destroy, :id => @deployable.id
- flash[:notice].should eql("Deployable test_delete delete successfully!")
+ flash[:notice].should_not be_empty
end
end
@@ -80,7 +80,7 @@ describe DeployablesController do
it "not delete a deployable and shows flash error" do
delete :destroy, :id => @deployable.id
- flash[:error].should eql("Deployable test_delete delete failed!")
+ flash[:error].should_not be_empty
end
end
end
@@ -99,20 +99,20 @@ describe DeployablesController do
it "deletes both deployables and shows flash notice" do
delete :multi_destroy, :deployables_selected => [@deployable1.id, @deployable2.id]
- flash[:notice].should eql("2 deployables #{(a)deployable1.name}, #{(a)deployable2.name} were deleted!")
+ flash[:notice].should_not be_empty
end
it "not delete deployable1 but not deployable2 and shows flash notice and error" do
Deployable.any_instance.stub(:destroy).and_return(false)
delete :multi_destroy, :deployables_selected => [@deployable1.id, @deployable2.id]
- flash[:error].should eql("2 deployables #{(a)deployable1.name}, #{(a)deployable2.name} were not deleted!")
+ flash[:error].should_not be_empty
end
end
context "without params[:deployables_selected]" do
it "not delete a deployable and shows flash error" do
delete :multi_destroy
- flash[:error].should eql("No deployable was not selected!")
+ flash[:error].should_not be_empty
end
end
end
--
1.7.6.5
12 years, 1 month
[PATCH configure] BZ 746702 - Update the error message displayed when there is a problem with a config file
by Richard Su
https://bugzilla.redhat.com/show_bug.cgi?id=746702
The config file format was changed to support multiple providers.
The old error message didn't make sense.
---
bin/aeolus-node-check | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/bin/aeolus-node-check b/bin/aeolus-node-check
index 3647bd5..3c7fe9e 100755
--- a/bin/aeolus-node-check
+++ b/bin/aeolus-node-check
@@ -55,8 +55,11 @@ else
errors.each do |e|
puts e
end
- puts "parameters must be in the form [space][space][parameter name][colon][space][parameter value]"
- puts "classes must be in the form [dash][space][class name]"
+ puts "The config files are in YAML. Please use the following conventions: "
+ puts "* Spaces and not tabs should be used to indent."
+ puts "* A node must be indented further away from its parent node. We use 2 spaces."
+ puts "* All sibling nodes must be indented with the same number of spaces. "
+ puts "* The parameter name and value is separated by a colon and a space."
exit 1
end
--
1.7.7.6
12 years, 1 month
[PATCH conductor] BZ786262 Fix missing navigation for Provider Realms
by Tomas Sedovic
From: Tomas Sedovic <tomas(a)sedovic.cz>
---
src/config/navigation.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/config/navigation.rb b/src/config/navigation.rb
index 6073a43..4b85d13 100644
--- a/src/config/navigation.rb
+++ b/src/config/navigation.rb
@@ -23,7 +23,7 @@ SimpleNavigation::Configuration.run do |navigation|
second_level.item :users, t('navigation.second_level.users'), users_path, :link => { :class => 'users' }, :highlights_on => /\/users|\/roles|\/permissions|\/account/
second_level.item :environments, t('navigation.second_level.environments'), pool_families_path, :link => { :class => 'environments' }, :highlights_on => /\/pool_families|\/images/
second_level.item :content, t('navigation.second_level.content'), catalogs_path, :link => { :class => 'content' }, :highlights_on => /\/catalogs|\/catalog_entries|\/realms|\/hardware_profiles|\/realm_mappings|\/deployables/
- second_level.item :cloud_providers, t('navigation.second_level.cloud_providers'), providers_path, :link => { :class => 'providers' }, :highlights_on => /\/providers/
+ second_level.item :cloud_providers, t('navigation.second_level.cloud_providers'), providers_path, :link => { :class => 'providers' }, :highlights_on => /\/providers|\/provider_realms/
second_level.item :settings, t('navigation.second_level.settings'), settings_path, :link => { :class => 'settings'}, :highlights_on => /\/settings/
end
end
--
1.7.6.5
12 years, 1 month
[PATCH conductor] BZ#782768 Fix a few typos in the Flash messages
by Tomas Sedovic
From: Tomas Sedovic <tomas(a)sedovic.cz>
https://bugzilla.redhat.com/show_bug.cgi?id=782768
The reported issue (with Hardware Profile delete messages) has been fixed in
the past, but the same typo was present for Roles and Realms, too.
---
src/config/locales/en.yml | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index d76e0ef..b5dfc05 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -564,7 +564,7 @@ en:
select_to_delete_mapping: "You must select at least one mapping to delete."
not_deleted: "Realm was not deleted!"
select_to_delete: "You must select at least one realm to delete."
- more_not_deleted: "Could not deleted these Realms:"
+ more_not_deleted: "Could not delete these Realms:"
preset_filters:
all_realms: "All Realms"
pool_families:
@@ -1207,7 +1207,7 @@ en:
updated: "Role updated successfully!"
more_deleted: "These Roles were deleted:"
error:
- more_not_deleted: "Could not deleted these Roles:"
+ more_not_deleted: "Could not delete these Roles:"
date:
formats:
default: "%Y-%m-%d"
--
1.7.6.5
12 years, 1 month
[PATCH aeolus-conductor] BZ#786126 Do not mass assign on credentials hash
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
.../controllers/provider_accounts_controller.rb | 7 ++++-
src/app/models/provider_account.rb | 25 ++++++++++++-------
.../provider_accounts_controller_spec.rb | 2 +-
src/spec/models/provider_account_spec.rb | 18 ++++++++++++++
4 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/src/app/controllers/provider_accounts_controller.rb b/src/app/controllers/provider_accounts_controller.rb
index 9b5517d..acfecdb 100644
--- a/src/app/controllers/provider_accounts_controller.rb
+++ b/src/app/controllers/provider_accounts_controller.rb
@@ -79,6 +79,7 @@ class ProviderAccountsController < ApplicationController
params[:provider_account][:provider_id] = @provider.id
@providers = Provider.all
@provider_account = ProviderAccount.new(params[:provider_account])
+ @provider_account.credentials_hash = params[:provider_account][:credentials_hash]
@provider_account.quota = @quota = Quota.new
limit = params[:quota][:maximum_running_instances] if params[:quota]
@provider_account.quota.set_maximum_running_instances(limit)
@@ -119,10 +120,14 @@ class ProviderAccountsController < ApplicationController
limit = params[:quota][:maximum_running_instances] if params[:quota]
@provider_account.quota.set_maximum_running_instances(limit)
- if @provider_account.update_attributes(params[:provider_account])
+ credentials_hash = params[:provider_account].delete(:credentials_hash)
+ @provider_account.attributes = @provider_account.attributes.merge(params[:provider_account])
+ @provider_account.credentials_hash= credentials_hash
+ if @provider_account.save
flash[:notice] = t"provider_accounts.flash.notice.updated"
redirect_to edit_provider_path(@provider, :details_tab => 'accounts')
else
+ puts "==================================================================\n" + @provider_account.errors.inspect
flash[:error] = t"provider_accounts.flash.error.not_updated"
render :action => :edit
end
diff --git a/src/app/models/provider_account.rb b/src/app/models/provider_account.rb
index e772f52..541834e 100644
--- a/src/app/models/provider_account.rb
+++ b/src/app/models/provider_account.rb
@@ -74,6 +74,11 @@ class ProviderAccount < ActiveRecord::Base
scope :enabled, lambda { where(:provider_id => Provider.enabled) }
+ # We set credentials hash as protected so that it is not set during mass assign on new
+ # This is to avoid the scenario where the credentials are set before provider which
+ # will result in an exception.
+ attr_protected :credentials_hash
+
def validate_presence_of_credentials
provider.provider_type.credential_definitions.each do |cd|
errors.add(:base, "#{cd.label} can't be blank") if credentials_hash[cd.name].blank?
@@ -207,16 +212,18 @@ class ProviderAccount < ActiveRecord::Base
end
def credentials_hash=(hash={})
- cred_defs = provider.provider_type.credential_definitions
- hash.each do |k,v|
- cred_def = cred_defs.detect {|d| d.name == k.to_s}
- raise "Key #{k} not found" unless cred_def
- unless cred = credentials.detect {|c| c.credential_definition_id == cred_def.id}
- cred = Credential.new(:provider_account_id => id, :credential_definition_id => cred_def.id)
- credentials << cred
+ if @provider
+ cred_defs = provider.provider_type.credential_definitions
+ hash.each do |k,v|
+ cred_def = cred_defs.detect {|d| d.name == k.to_s}
+ raise "Key #{k} not found" unless cred_def
+ unless cred = credentials.detect {|c| c.credential_definition_id == cred_def.id}
+ cred = Credential.new(:provider_account_id => id, :credential_definition_id => cred_def.id)
+ credentials << cred
+ end
+ # we need to handle uploaded files:
+ cred.value = v.respond_to?(:read) ? v.read : v
end
- # we need to handle uploaded files:
- cred.value = v.respond_to?(:read) ? v.read : v
end
end
diff --git a/src/spec/controllers/provider_accounts_controller_spec.rb b/src/spec/controllers/provider_accounts_controller_spec.rb
index 4675d0a..0b722c9 100644
--- a/src/spec/controllers/provider_accounts_controller_spec.rb
+++ b/src/spec/controllers/provider_accounts_controller_spec.rb
@@ -42,7 +42,7 @@ describe ProviderAccountsController do
it "doesn't allow to save provider's account if not valid credentials" do
mock_warden(@admin)
- post :create, :provider_account => {:provider_id => @provider.id}, :provider_id => @provider.id
+ post :create, :provider_account => {:provider_id => @provider.id, :credentials_hash => {}}, :provider_id => @provider.id
response.should be_success
response.should render_template("new")
request.flash[:error].should == "Cannot add the provider account."
diff --git a/src/spec/models/provider_account_spec.rb b/src/spec/models/provider_account_spec.rb
index 6a52224..04b4b1e 100644
--- a/src/spec/models/provider_account_spec.rb
+++ b/src/spec/models/provider_account_spec.rb
@@ -153,6 +153,24 @@ describe ProviderAccount do
@provider_account.should_not be_valid
end
+ it "should not set credentials in intialise" do
+ @provider_account = ProviderAccount.new({:credentials_hash => {"username" => "test", "password" => "test"}})
+ @provider_account.credentials_hash.should == {}
+ end
+
+ it "should not set credentials before provider is set" do
+ @provider_account = ProviderAccount.new
+ @provider_account.credentials_hash = {"username" => "test", "password" => "test"}
+ @provider_account.credentials_hash.should == {}
+ end
+
+ it "should set credentials after provider is set" do
+ provider = FactoryGirl.create :mock_provider
+ @provider_account = ProviderAccount.new({:provider => provider})
+ @provider_account.credentials_hash = {"username" => "test", "password" => "test"}
+ @provider_account.credentials_hash.should == {"username" => "test", "password" => "test"}
+ end
+
context "validations" do
context "priority" do
it "can be positive integer" do
--
1.7.6.4
12 years, 1 month
[PATCH conductor] Fix the Launch button on Deployable Details page
by Tomas Sedovic
From: Tomas Sedovic <tomas(a)sedovic.cz>
Since the Launch Deployment Overview page allows the user to change the name
and select the realms, the Launch button on the Deployable Details should go
directly to that screen.
---
src/app/views/deployables/show.html.haml | 2 +-
src/config/routes.rb | 1 +
src/features/deployables.feature | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/app/views/deployables/show.html.haml b/src/app/views/deployables/show.html.haml
index 8d311e5..dbe5a97 100644
--- a/src/app/views/deployables/show.html.haml
+++ b/src/app/views/deployables/show.html.haml
@@ -9,7 +9,7 @@
= link_to t('.edit_xml'), edit_polymorphic_path([@catalog, @deployable], :edit_xml => true), :class => 'button', :id => 'edit_xml_button'
- if @catalog.present? && @deployable_errors.empty? && @pushed_count > 0
- = link_to t('.launch'), launch_new_deployments_path(:deployable_id => @deployable.id, :pool_id => @catalog.pool), :id => :launch_deployment_button
+ = link_to t('.launch'), launch_time_params_deployments_path(:deployable_id => @deployable.id, :deployment => { :name => @deployable.name, :pool_id => @catalog.pool }), :id => :launch_deployment_button
-else
%a{:id => :launch_deployment_button, :class => 'disabled'}= t('.launch')
diff --git a/src/config/routes.rb b/src/config/routes.rb
index 48c8e57..3d440a8 100644
--- a/src/config/routes.rb
+++ b/src/config/routes.rb
@@ -106,6 +106,7 @@ Conductor::Application.routes.draw do
delete :multi_destroy
get 'launch_new'
post 'launch_time_params'
+ get 'launch_time_params'
post 'overview'
get 'check_name'
get 'launch_from_catalog'
diff --git a/src/features/deployables.feature b/src/features/deployables.feature
index 922b02a..c73ac2e 100644
--- a/src/features/deployables.feature
+++ b/src/features/deployables.feature
@@ -47,7 +47,7 @@ Feature: Manage Catalog Entries
And there is "front_hwp2" conductor hardware profile
And I am on testdepl's catalog entry page
When I follow "launch_deployment_button"
- Then I should be on the launch new deployments page
+ Then I should be on the launch time params deployments page
Scenario: Delete deployables
Given there is a "default" catalog
--
1.7.6.5
12 years, 1 month