[PATCH conductor] Allow changing deployment name on the Overview page
Tomas Sedovic
tsedovic at redhat.com
Fri Dec 9 12:46:23 UTC 2011
On 12/08/2011 03:11 PM, tsedovic at redhat.com wrote:
> From: Tomas Sedovic<tomas at sedovic.cz>
>
> https://bugzilla.redhat.com/show_bug.cgi?id=751024
>
> When a deployment is launched via catalog or the deployable details page, its
> name is set as the underlying deployable's name.
>
> Previously there wasn't a way to change the name, which meant that the user
> couldn't launch a second deployment using the same way.
>
> Now the deployable overview page has a field where the name can be changed.
> ---
> src/app/stylesheets/custom.scss | 9 +++++++++
> src/app/views/deployments/_overview.html.haml | 9 ++++++---
> src/config/locales/en.yml | 1 +
> 3 files changed, 16 insertions(+), 3 deletions(-)
>
> diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss
> index 2943ce4..f3ce3bc 100644
> --- a/src/app/stylesheets/custom.scss
> +++ b/src/app/stylesheets/custom.scss
> @@ -60,6 +60,15 @@
> list-style-type: none;
> margin-top: 4px;
> }
> + input[type="text"] {
> + padding: 4px;
> + width: 200px;
> + font-size: 13px;
> + border: 1px solid #c4c4c4;
> + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
> + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
> + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5);
> + }
> }
>
> .image-id {
> diff --git a/src/app/views/deployments/_overview.html.haml b/src/app/views/deployments/_overview.html.haml
> index e8da927..e68ee50 100644
> --- a/src/app/views/deployments/_overview.html.haml
> +++ b/src/app/views/deployments/_overview.html.haml
> @@ -4,7 +4,6 @@
> %header.page-header
> %h1{:class => controller.controller_name}= t('.pool_name', :pool => @pool.name)
> .corner
> - = hidden_field :deployment, :name
> = hidden_field :deployment, :pool_id
> = hidden_field :deployment, :frontend_realm_id
> = hidden_field_tag :launch_parameters_encoded, @launch_parameters_encoded
> @@ -16,8 +15,12 @@
> %p= t('.confirmation', :deployment => @deployment.name, :pool => @pool.name, :quota => number_to_percentage(@additional_quota, :precision => 0))
>
> .content
> - %h3= t '.description'
> - %p= @deployment.deployable_xml.description
> + %h3= t('.name')
> + %p= text_field :deployment, :name
> +
> + - unless @deployment.deployable_xml.description.blank?
> + %h3= t '.description'
> + %p= @deployment.deployable_xml.description
>
> %h3= t('.deployable_xml')
> =link_to @deployable.xml_filename, catalog_deployable_path(@deployable.catalogs.first, @deployable.catalog_entries.first.id, :deployable_xml => true)
> diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
> index 3e14332..4dab401 100644
> --- a/src/config/locales/en.yml
> +++ b/src/config/locales/en.yml
> @@ -176,6 +176,7 @@ en:
> Are you sure you wish to deploy "%{deployment}" to the %{pool} Pool? Doing
> so will utilize %{quota} of your overall deployment quota.
> deployable_xml: Deployable XML
> + name: Name
> description: Description
> image_ids: Image IDs
> launch: Launch
Self-ack & pushed
--
No trees were killed to send this message, but a large number of
electrons were terribly inconvenienced.
More information about the aeolus-devel
mailing list