[PATCH conductor] BZ 783510 clean up\add css to instance details page
Petr Blaho
pblaho at redhat.com
Mon Feb 6 16:08:48 UTC 2012
On Monday, February 06, 2012 04:37:59 PM jzigmund at redhat.com wrote:
> From: Jozef Zigmund <jzigmund at redhat.com>
>
> ---
> src/app/stylesheets/custom.scss | 25 ++++++
> src/app/views/instances/_history.html.haml | 18 ++--
> src/app/views/instances/_parameters.haml | 24 +++--
> src/app/views/instances/_properties.html.haml | 113 ++++++++++++-------------
> src/config/locales/en.yml | 37 ++++----
> 5 files changed, 123 insertions(+), 94 deletions(-)
>
> diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss
> index a5b8ff5..bcc5d90 100644
> --- a/src/app/stylesheets/custom.scss
> +++ b/src/app/stylesheets/custom.scss
> @@ -235,3 +235,28 @@ form.generic section.services {
> #no-catalog-entry {
> margin-bottom: 30px;
> }
> +
> +.instance_details {
> +
> + h3{
> + font-size: 22px;
> + font-weight: normal;
> + margin-bottom: 10px;
> + }
> +
> + ul li {
> + list-style-type: none;
> + margin: 10px 15px;
> + font-weight: bold;
> + span {
> + font-weight: normal;
> + }
> + }
> +
> + ol{
> + margin: 15px;
> + li {
> + margin:10px 15px;
> + }
> + }
> +}
> \ No newline at end of file
> diff --git a/src/app/views/instances/_history.html.haml b/src/app/views/instances/_history.html.haml
> index 2facfc3..ee461e6 100644
> --- a/src/app/views/instances/_history.html.haml
> +++ b/src/app/views/instances/_history.html.haml
> @@ -1,10 +1,10 @@
> -%h3
> - = t 'instances.history.history_for'
> - = @instance.name
> -%ul
> - - @events.each do |event|
> - %li
> - = @instance.name
> - = event.summary
> +%div.instance_details
> + %h3
> + = t 'instances.history.history_for'
> + = @instance.name
> + %ol
> + - @events.each do |event|
> + %li
> + = event.summary
>
> -= will_paginate @events
> + = will_paginate @events
> diff --git a/src/app/views/instances/_parameters.haml b/src/app/views/instances/_parameters.haml
> index 92ffb28..7ed7d31 100644
> --- a/src/app/views/instances/_parameters.haml
> +++ b/src/app/views/instances/_parameters.haml
> @@ -1,10 +1,14 @@
> -%h3
> - = t 'instances.parameters.config_parameters_for'
> - = @instance.name
> -%ul
> - - @instance.instance_parameters.each do |parameter|
> - %li
> - = parameter.service
> - = parameter.name
> - = parameter.type
> - = parameter.value
> +%div.instance_details
> + %h3
> + = t 'instances.parameters.config_parameters_for'
> + = @instance.name
> + %ul
> + - if @instance.instance_parameters.empty?
> + %li= t("instances.parameters.none")
> + - else
> + - @instance.instance_parameters.each do |parameter|
> + %li
> + = parameter.service
> + = parameter.name
> + = parameter.type
> + = parameter.value
> diff --git a/src/app/views/instances/_properties.html.haml b/src/app/views/instances/_properties.html.haml
> index 3561cd4..8b0951b 100644
> --- a/src/app/views/instances/_properties.html.haml
> +++ b/src/app/views/instances/_properties.html.haml
> @@ -1,57 +1,56 @@
> -%h3
> - = t 'instances.properties.properties_for'
> - = @instance.name
> -%ul
> - %li
> - = label_tag :name, t('instances.properties.name')
> - %span= @instance.name
> - %li
> - = label_tag :status, t('instances.properties.status')
> - %span= @instance.state
> - %li
> - = label_tag :public_addresses, t('instances.properties.public_addresses')
> - %span= @instance.public_addresses
> - %li
> - = label_tag :private_addresses, t('instances.properties.private_adresses')
> - %span= @instance.private_addresses
> - = label_tag :assembly, t('instances.properties.assembly')
> - %span= @instance.assembly_xml.name
> - %li
> - = label_tag :provider, t('instances.properties.provider')
> - %span= @instance.provider_account.provider.name if @instance.provider_account
> - %li
> - = label_tag :architecture, t('instances.properties.architecture')
> - %span= @instance.hardware_profile.architecture.value
> - %li
> - = label_tag :memory, t('instances.properties.memory')
> - %span= @instance.hardware_profile.memory.value
> - %li
> - = label_tag :storage, t('instances.properties.storage')
> - %span= @instance.hardware_profile.storage.value
> - %li
> - = label_tag :instantiation_time, t('instances.properties.instantiation_time')
> - %span= @instance.created_at.strftime("%d-%b-%Y %H:%M:%S")
> - %li
> - = label_tag :current_alerts, t('instances.properties.current_alerts')
> - %span= 0
> - = label_tag :console_connection, t('instances.properties.console_connection')
> - %span= t('instances.properties.via_ssh')
> - - if @instance.instance_key
> - %li
> - = label_tag :instance_key, t('instances.properties.ssh_key')
> - %span= link_to t('instances.properties.download'), key_instance_path(@instance), :id =>'download_ssh_key'
> - %li
> - = label_tag :instance_key_name, t('instances.properties.ssh_key_name')
> - = @instance.instance_key.name
> - %li
> - = label_tag :owner, t('instances.properties.owner')
> - %span= "#{@instance.owner.first_name} #{@instance.owner.last_name}"
> - %li
> - = label_tag :shared_to, t('instances.properties.shared_to')
> - %span= t('instances.properties.n_a')
> - - if @instance.state == Instance::STATE_ERROR
> - %li
> - = label_tag :error, t('instances.properties.error')
> - %span= @instance.last_error
> - %li
> - %li
> +%div.instance_details
> + %h3
> + = t 'instances.properties.properties_for'
> + = @instance.name
> + %ul
> + %li
> + = label_tag :name, t('instances.properties.name')
> + %span= @instance.name
> + %li
> + = label_tag :status, t('instances.properties.status')
> + %span= @instance.state
> + %li
> + = label_tag :public_addresses, t('instances.properties.public_addresses')
> + %span= @instance.public_addresses
> + %li
> + = label_tag :private_addresses, t('instances.properties.private_adresses')
> + %span= @instance.private_addresses
> + = label_tag :assembly, t('instances.properties.assembly')
> + %span= @instance.assembly_xml.name
> + %li
> + = label_tag :provider, t('instances.properties.provider')
> + %span= @instance.provider_account.provider.name if @instance.provider_account
> + %li
> + = label_tag :architecture, t('instances.properties.architecture')
> + %span= @instance.hardware_profile.architecture.value
> + %li
> + = label_tag :memory, t('instances.properties.memory')
> + %span= @instance.hardware_profile.memory.value
> + %li
> + = label_tag :storage, t('instances.properties.storage')
> + %span= @instance.hardware_profile.storage.value
> + %li
> + = label_tag :instantiation_time, t('instances.properties.instantiation_time')
> + %span= @instance.created_at.strftime("%d-%b-%Y %H:%M:%S")
> + %li
> + = label_tag :current_alerts, t('instances.properties.current_alerts')
> + %span= 0
> + = label_tag :console_connection, t('instances.properties.console_connection')
> + %span= t('instances.properties.via_ssh')
> + - if @instance.instance_key
> + %li
> + = label_tag :instance_key, t('instances.properties.ssh_key')
> + %span= link_to t('instances.properties.download'), key_instance_path(@instance), :id =>'download_ssh_key'
> + %li
> + = label_tag :instance_key_name, t('instances.properties.ssh_key_name')
> + = @instance.instance_key.name
> + %li
> + = label_tag :owner, t('instances.properties.owner')
> + %span= "#{@instance.owner.first_name} #{@instance.owner.last_name}"
> + %li
> + = label_tag :shared_to, t('instances.properties.shared_to')
> + %span= t('instances.properties.n_a')
> + - if @instance.state == Instance::STATE_ERROR
> + %li
> + = label_tag :error, t('instances.properties.error')
> + %span= @instance.last_error
> diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
> index d2b67da..04f990e 100644
> --- a/src/config/locales/en.yml
> +++ b/src/config/locales/en.yml
> @@ -309,32 +309,33 @@ en:
> edit_instance: Edit instance
> name: Name
> history:
> - history_for: History for
> + history_for: "History for: "
> parameters:
> config_parameters_for: Config Parameters for
> + none: None
> permissions:
> permissions_for: Permissions for
> properties:
> properties_for: Properties for
> - name: Name
> - status: Status
> - public_addresses: Public Addresses
> - private_adresses: Private Addresses
> - assembly: Assembly
> - provider: Provider
> - architecture: Architecture
> - memory: Memory
> - storage: Storage
> - instantiation_time: Instantiation Time
> - current_alerts: Current Alerts
> - console_connection: Console Connection
> + name: "Name:"
> + status: "Status: "
> + public_addresses: "Public Addresses: "
> + private_adresses: "Private Addresses: "
> + assembly: "Assembly: "
> + provider: "Provider: "
> + architecture: "Architecture: "
> + memory: "Memory: "
> + storage: "Storage: "
> + instantiation_time: "Instantiation Time: "
> + current_alerts: "Current Alerts: "
> + console_connection: "Console Connection: "
> via_ssh: via SSH
> - ssh_key: SSH key
> - ssh_key_name: SSH key name
> + ssh_key: "SSH key: "
> + ssh_key_name: "SSH key name: "
> download: Download
> - owner: Owner
> - shared_to: Shared to
> - error: Error
> + owner: "Owner: "
> + shared_to: "Shared to: "
> + error: "Error: "
> n_a: "N/A"
> flash:
> warning:
>
ACK. Looks good.
--
With regards
Petr Blaho
More information about the aeolus-devel
mailing list