From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/views/deployments/_launch_new.haml | 52 +++++++++------
src/app/views/deployments/_new.haml | 97 +++++++++++++++-------------
src/features/deployment.feature | 4 +-
3 files changed, 85 insertions(+), 68 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
diff --git a/src/features/deployment.feature b/src/features/deployment.feature
index b8a07dd..56b5e68 100644
--- a/src/features/deployment.feature
+++ b/src/features/deployment.feature
@@ -34,7 +34,7 @@ Feature: Manage Deployments
When I fill in "deployable_url" with
"http://localhost/deployables/deployable1.xml"
When I fill in "deployment_name" with "mynewdeployment"
When I press "Next"
- Then I should see "Launch Summary"
+ Then I should see "Deployable details"
When I press "Launch"
Then I should see "Deployment launched"
Then I should see "mynewdeployment Deployment"
@@ -51,7 +51,7 @@ Feature: Manage Deployments
When I fill in "deployable_url" with
"http://localhost/deployables/deployable1.xml"
When I fill in "deployment_name" with "mynewdeployment"
When I press "Next"
- Then I should see "Launch Summary"
+ Then I should see "Deployable details"
When I press "Launch"
Then I should see "Created"
Then I should see "mynewdeployment"
--
1.7.4.2