Hi Jan,
* I'm getting a spec failure:
'ImageFactory::BuildsController when a user has permission to build templates should
create a new Image' FAILED
count should have been changed by 1, but was changed by 0
./spec/controllers/builds_controller_spec.rb:52:
Could you fix and resend, I will do e2e in the meantime,
Cheers
Martyn
----- Original Message -----
From: jprovazn(a)redhat.com
To: aeolus-devel(a)lists.fedorahosted.org
Sent: Thursday, 31 March, 2011 9:42:25 AM
Subject: [PATCH conductor 2/2] Fixed template builds tab
From: Jan Provaznik <jprovazn(a)redhat.com>
Disabled build for imported images
---
src/app/views/image_factory/templates/_builds.haml | 29 +++++++++----------
src/features/template.feature | 6 ++--
2 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/src/app/views/image_factory/templates/_builds.haml
b/src/app/views/image_factory/templates/_builds.haml
index 00620e1..65cbc5a 100644
--- a/src/app/views/image_factory/templates/_builds.haml
+++ b/src/app/views/image_factory/templates/_builds.haml
@@ -3,17 +3,15 @@ Builds for
= @tpl.platform_version
, template "#{(a)tpl.name}"
-- if @targets_not_built.count > 0 then
- - form_tag(image_factory_builds_path, { :action => 'create', :method =>
:post }) do
- = hidden_field_tag :template_id, @tpl.id
- New Build for
- = select_tag 'target', options_for_select(@targets_not_built)
- = submit_tag "Go", :name => "build"
-
-- form_tag do
+- form_tag image_factory_builds_path do
= hidden_field_tag :template_id, @tpl.id
- /= restful_submit_tag "Upload", 'upload',
upload_image_factory_builds_path, 'POST'
- /= restful_submit_tag "Delete", 'delete',
delete_image_factory_builds_path, 'DELETE'
+ - if @targets_not_built.count > 0 then
+ - if @tpl.imported
+ Build imported template is not supported
+ - else
+ New Build for
+ = select_tag 'target', options_for_select(@targets_not_built)
+ = submit_tag "Go", :name => "build"
%ul
- if @images.empty?
@@ -27,8 +25,9 @@ Builds for
- img.provider_images.each do |pimg|
%li
= "#{pimg.provider.name}: #{pimg.status}"
- - img.not_uploaded_providers.each do |provider|
- %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'}
+ - unless @tpl.imported
+ - img.not_uploaded_providers.each do |provider|
+ %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'}
diff --git a/src/features/template.feature b/src/features/template.feature
index 4ed55b5..3ffea33 100644
--- a/src/features/template.feature
+++ b/src/features/template.feature
@@ -152,11 +152,11 @@ 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
When I choose this template
- And I follow "Build"
- Then I should be on the image factory templates page
- And I should see "Build imported template is not supported"
+ And I follow "Builds"
+ Then I should see "Build imported template is not supported"
Scenario: Search for templates
Given there are these templates:
--
1.7.4
_______________________________________________
aeolus-devel mailing list
aeolus-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/aeolus-devel