On 06/16/2011 01:33 PM, jtomasek(a)redhat.com wrote:
From: Jiri Tomasek<jtomasek(a)redhat.com>
---
src/app/views/deployments/_launch_new.haml | 52 +++++++++------
src/app/views/deployments/_new.haml | 97 +++++++++++++++-------------
2 files changed, 83 insertions(+), 66 deletions(-)
diff --git a/src/app/views/deployments/_launch_new.haml
b/src/app/views/deployments/_launch_new.haml
index a05408c..101de2b 100644
--- a/src/app/views/deployments/_launch_new.haml
+++ b/src/app/views/deployments/_launch_new.haml
@@ -1,29 +1,37 @@
= if request.xhr?
- = render :partial => '/layouts/notification'
+ = render :partial => '/layouts/new_notification'
%header.page-header
- %h1
+ %h1{:class => controller.controller_name}
New Deployment in
= @pool.name
-%h2
- Deployment Details
-- form_for :deployment, {:url => new_deployment_path, :method => :get} do
- = hidden_field :deployment, :pool_id
- %p
- What do you want to launch?
- %p
- Select the Deployable definition
- = select_tag :suggested_deployable_id, options_for_select([['custom -- type
bellow', 'custom']] + @suggested_deployables.map {|d| [d.name, d.id]},
params[:suggested_deployable_id])
- %p
- Or provide the URL of the Deployable definition
- = text_field('deployable', 'url')
- %p
- Name your deployment
- = text_field(:deployment, :name)
- %span.name_available
- %p
- Choose a realm
- = select :deployment, :frontend_realm_id, @realms.map{|r| [r.name, r.id]},
:include_blank => true
- = submit_tag('Next')
+ #obj_actions.button-container
+ = link_to 'Cancel', pool_path(@pool), :class => 'button danger',
:id => 'cancel_deployment_button'
+ .corner
+
+%section.content-section.deployment
+ %header
+ %h2
+ Deployment Details
+
+ .content
+ - form_for :deployment, {:url => new_deployment_path, :method => :get} do
+ = hidden_field :deployment, :pool_id
+ %p
+ What do you want to launch?
+ %p
+ Select the Deployable definition
+ = select_tag :suggested_deployable_id, options_for_select([['custom -- type
bellow', 'custom']] + @suggested_deployables.map {|d| [d.name, d.id]},
params[:suggested_deployable_id])
+ %p
+ Or provide the URL of the Deployable definition
+ = text_field('deployable', 'url')
+ %p
+ Name your deployment
+ = text_field(:deployment, :name)
+ %span.name_available
+ %p
+ Choose a realm
+ = select :deployment, :frontend_realm_id, @realms.map{|r| [r.name, r.id]},
:include_blank => true
+ = submit_tag 'Next', :class => 'button'
:javascript
// FIXME: This has a theoretical race condition: if responses come back out of order,
the value
diff --git a/src/app/views/deployments/_new.haml b/src/app/views/deployments/_new.haml
index 329af19..05ed857 100644
--- a/src/app/views/deployments/_new.haml
+++ b/src/app/views/deployments/_new.haml
@@ -1,10 +1,11 @@
= error_messages_for 'deployment'
%header.page-header
- %h1
+ %h1{:class => controller.controller_name}
Deployment
= @deployment.name
-%h2
- Launch Summary
+ #obj_actions.button-container
+ = link_to 'Cancel', pool_path(@pool), :class => 'button danger',
:id => 'cancel_deployment_button'
+ .corner
#scoreboard
%dl.statistics
@@ -16,44 +17,52 @@
%dt= t("deployments.deployment")
%dd= @deployment.name
%li
- = link_to('view deployable definition', '#')
-
-%h2
- Deployable details
-
-%ul
- %li
- Name:
- = @deployment.deployable_xml.name
- %li
- Description:
- = @deployment.deployable_xml.description
- %li
-
-%h2
- Assemblies
-
-= filter_table([{:name => 'Assembly Name'},
- {:name => 'Hardware Profile'},
- {:name => 'Image ID'},
- {:name => 'Build ID'}],
- @deployment.deployable_xml.assemblies) do |assembly|
- %tr
- %td
- = assembly.name
- %td
- = assembly.hwp
- %td
- = assembly.image_id
- %td
- = assembly.image_build
-
-- form_for @deployment do
- = hidden_field :deployment, :name
- = hidden_field :deployment, :pool_id
- = hidden_field :deployment, :frontend_realm_id
- -# FIXME: Passing chunks of XML around in hidden form fields doesn't feel right
- = hidden_field :deployment, :deployable_xml
- = submit_tag 'Launch'
-
--# Quota checking to go here as well, once I understand how it works with new code
+ %dt deployable definition
+ %dd= link_to('view', '#')
+
+%section.content-section.deployable_details
+ %header
+ %h2
+ Deployable details
+
+ .content
+
+ %ul
+ %li
+ Name:
+ = @deployment.deployable_xml.name
+ %li
+ Description:
+ = @deployment.deployable_xml.description
+
+%section.content-section.deployable_details
+ %header
+ %h2
+ Assemblies
+
+ .content
+
+ = filter_table([{:name => 'Assembly Name'},
+ {:name => 'Hardware Profile'},
+ {:name => 'Image ID'},
+ {:name => 'Build ID'}],
+ @deployment.deployable_xml.assemblies) do |assembly|
+ %tr
+ %td
+ = assembly.name
+ %td
+ = assembly.hwp
+ %td
+ = assembly.image_id
+ %td
+ = assembly.image_build
+
+ - form_for @deployment do
+ = hidden_field :deployment, :name
+ = hidden_field :deployment, :pool_id
+ = hidden_field :deployment, :frontend_realm_id
+ -# FIXME: Passing chunks of XML around in hidden form fields doesn't feel
right
+ = hidden_field :deployment, :deployable_xml
+ = submit_tag 'Launch', :class => 'button'
+
+ -# Quota checking to go here as well, once I understand how it works with new code
Looks good but there are two cucumber tests that are failing when this
patch is applied. They both concern launching a deployment and I think
it's the test that need fixing, not the code.
There's also one additional failing test. That is unrelated to this as
it's present on the current HEAD of next, too.
Thomas
--
No trees were killed to send this message, but a large number of
electrons were terribly inconvenienced.