Dne 14.7.2011 07:55, kkeiter(a)redhat.com napsal(a):
From: Kenneth Keiter<kkeiter(a)redhat.com>
---
src/app/stylesheets/layout.scss | 18 ++++++-
src/app/views/deployments/_launch_new.haml | 62 +++++++++++++++---------
src/features/deployment.feature | 4 +-
src/public/images/header_icon_deployments.png | Bin 0 -> 626 bytes
4 files changed, 56 insertions(+), 28 deletions(-)
create mode 100644 src/public/images/header_icon_deployments.png
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index d8e8315..b005fcc 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -1,6 +1,6 @@
/* ###########################################################################
Generated SCSS for Aeolus UI [aeolus_ui]
-Compiled on Wed Jun 29 20:41:07 -0700 2011
+Compiled on Wed Jul 13 21:46:02 -0700 2011
########################################################################### */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -653,7 +653,7 @@ strong, em, b, i{ font-family: $font-family-em; }
#primary-container{
position: relative;
min-height: 100%;
- margin-bottom: -40px;
+ display: block;
}
/* Content */
@@ -1464,6 +1464,14 @@ div#content .page-header{
padding: 6px 7px 7px 54px;
}
+ h1 span{
+ color: #666;
+ }
+
+ h1.no-icon{
+ padding: 7px;
+ }
+
h1.pools{
background: transparent url('../../images/header_icon_pools.png') no-repeat
8px center;
}
@@ -1507,6 +1515,10 @@ div#content .page-header{
background: transparent url('../../images/header_icon_deployables.png')
no-repeat 8px center;
}
+ h1.deployments{
+ background: transparent url('../../images/header_icon_deployments.png')
no-repeat 8px center;
+ }
+
h1.settings{
background: transparent url('../../images/header_icon_settings.png')
no-repeat 8px center;
}
@@ -2519,7 +2531,7 @@ footer.standard{
height: 40px;
width: 100%;
font-size: 11px;
- clear:both;
+ clear: both;
div.container{
margin: 0 auto;
diff --git a/src/app/views/deployments/_launch_new.haml
b/src/app/views/deployments/_launch_new.haml
index af7a456..3e24758 100644
--- a/src/app/views/deployments/_launch_new.haml
+++ b/src/app/views/deployments/_launch_new.haml
@@ -1,38 +1,47 @@
= if request.xhr?
= render :partial => '/layouts/new_notification'
%header.page-header
- %h1{:class => controller.controller_name}
- New Deployment in
- = @pool.name
+ %h1.deployments
+ New Deployment
+ %span= "to #{(a)pool.name.capitalize} Pool"
#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
+ %h2 Deployment Details
.content
- - form_for :deployment, {:url => new_deployment_path, :method => :get} do
+ - form_for :deployment, {:url => new_deployment_path, :method => :get, :html
=> {:class => 'generic'}} do
= error_messages_for :deployment
= 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([['other (enter
below)', 'other']] + @suggested_deployables.map {|d| [d.name, d.id]},
params[:suggested_deployable_id])
- %p
- Or provide the URL of the Deployable definition
- = text_field_tag :deployable_url, params[: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'
+ %fieldset
+ %p
+ %label{:for => 'deployment_name'}
+ Deployment Name
+ %span (uniquely identifies your deployment)
+ = text_field(:deployment, :name, :class => 'em long')
+ %span#name_avail_indicator
+
+ %fieldset
+ %p
+ %label{:for => 'suggested_deployable_id'} Deployable Definition
+ = select_tag :suggested_deployable_id, options_for_select([['Load
definition from URL', 'other']] + @suggested_deployables.map {|d| [d.name,
d.id]}, params[:suggested_deployable_id])
+ %p#deployable-url-section
+ %label{:for => 'deployable_url'}
+ Deployable URL
+ %span (must be a valid URL including http://)
+ = text_field_tag :deployable_url, params[:deployable_url], :class =>
'long'
+
+ %fieldset
+ %p
+ %label{:for => 'frontend_realm_id'} Realm
+ = select :deployment, :frontend_realm_id, @realms.map{|r| [r.name, r.id]},
:include_blank => true
+
+ %fieldset.options
+ = submit_tag 'Next', :class => 'button'
+
:javascript
// FIXME: This has a theoretical race condition: if responses come back out of order,
the value
@@ -40,10 +49,17 @@
// Might be nice to build something in application.js to guard against this, and that
also
// introduces a ~250ms buffer so we don't do a lookup on every single
keystroke...
$(document).ready(function () {
+ $('#suggested_deployable_id').change(function(){
+ if($(this).val() !== 'other'){
+ $('#deployable-url-section').hide();
+ }else{
+ $('#deployable-url-section').show();
+ }
+ });
$('#deployment_name').keyup(function(e) {
e.preventDefault();
$.get('#{check_name_deployments_path}', {name:
$('#deployment_name').val() }, function(data) {
- $('.name_available').html(data == "false" ? "That name is
already in use" : "Name available");
+ $('#name_avail_indicator').html(data == "false" ? "That
name is already in use" : "Name available");
});
});
});
diff --git a/src/features/deployment.feature b/src/features/deployment.feature
index 9c72262..8886de4 100644
--- a/src/features/deployment.feature
+++ b/src/features/deployment.feature
@@ -30,7 +30,7 @@ Feature: Manage Deployments
And there is "front_hwp2" conductor hardware profile
When I am viewing the pool "mockpool"
And I follow "New Deployment"
- Then I should see "New Deployment in mockpool"
+ Then I should see "New Deployment"
When I fill in "deployable_url" with
"http://localhost/deployables/deployable1.xml"
When I fill in "deployment_name" with "mynewdeployment"
When I press "Next"
@@ -144,7 +144,7 @@ Feature: Manage Deployments
Given a pool "mockpool" exists
When I am viewing the pool "mockpool"
And I follow "New Deployment"
- Then I should see "New Deployment in mockpool"
+ Then I should see "New Deployment"
When I fill in "deployable_url" with
"http://invalid.deployable.url/"
And I fill in "deployment_name" with "mynewdeployment"
And I press "Next"
diff --git a/src/public/images/header_icon_deployments.png
b/src/public/images/header_icon_deployments.png
new file mode 100644
index 0000000000000000000000000000000000000000..36fa110f0408ae42f12c33064b286799c15e17c1
GIT binary patch
literal 626
zcmV-&0*(ENP)<h;3K|Lk000e1NJLTq001HY000{Z1^@s688Tg`00004b3#c}2nYxW
zd<bNS00009a7bBm000XT000XT0n*)m`~Uy|6?8>dbVG7wVRUJ4ZXi@?ZDjy9FEKVR
zF)<9NV9Nji0338hSaefwW^{L9a%BKPWN%_+AVz6&Wp{6KYjYq&Q#En5<2C>Q0n155
zK~zYIy_V5YgFq05KOEn&1F-^A0?8Jj9VAvDRuHVfbP&=(EMRA12PuJ6pj2=^aAZ#8
z0>=#b-+;Z{kALqLphv2jsOnu`+*lc7Fvf5*AT|NAsX!VH0RhOSbR`5NW@1-{g22SC
zgn&%yN(cx{=*n$ieB(;)3$UOw=hjg~ethv!6k&`ZQq>elFBDIJrE^^YNjtgClL1d1
zIlh2gL=IgAj4?z`l64P|t9KE}9f%F^I$+&SL{?r9C*e?_vn#5a0UrY(yfFVJtB4##
zWDd-M!-Zt-3EBrh04!B?)xH^Z1fJF7kn743cnp9!iAd61^nPnv4i&A(t}E?leY#gw
z_hj|Y5mikr&<pU;Dw?TkLU?-so(F^2nNX-|sj4dxDO*4>^|360&p?pWz65Y#k67yt
zwpgQ+EnL``gnAFXQNQ6f5T*js#bR;n1hGz(EeKbCfSfhofglac%-5Ry0tCQ4ux(lf
zU?=Tv1V{|zK1WJhY^YAud!{73Jph&OqZb0v#ILDs9-}z)H=sA+*o8ij)7XR~Rrx@Q
zYf=DvAIOIB{SH+H<eeb)D5h6{X$D&9-K-*Vr2aeGO#oEcyfa&eUu`A4BOeIP0RR91
M07*qoM6N<$f<@T$^Z)<=
literal 0
HcmV?d00001
Looks great, although It seems that this patch also contains changes
made in separate patch Fixed footer overlap BZ720401. Also two cucumber
tests fail because "New Deployment in mockpool" is present.
Jirka