deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tong Li <liton...@us.ibm.com>
Subject Re: [PATCH core 1/2] CIMI: Added links to JSON and XML in CIMI UI
Date Wed, 07 Dec 2011 15:01:49 GMT
ACK.

Tong Li
Emerging Technologies & Standards
Building 501/B205
litong01@us.ibm.com

mfojtik@redhat.com wrote on 12/07/2011 08:13:11 AM:

> From: mfojtik@redhat.com
> To: dev@deltacloud.apache.org
> Date: 12/07/2011 08:15 AM
> Subject: [PATCH core 1/2] CIMI: Added links to JSON and XML in CIMI UI
>
> From: Michal Fojtik <mfojtik@redhat.com>
>
>
> Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> ---
>  clients/cimi/public/app.css                        |    4 ++++
>  clients/cimi/views/cloud_entry_point/index.haml    |    5 +++++
>  clients/cimi/views/layout.haml                     |    6 ++----
>  .../cimi/views/machine_configurations/index.haml   |    4 ++++
>  .../cimi/views/machine_configurations/show.haml    |    5 +++++
>  clients/cimi/views/machine_images/index.haml       |    4 ++++
>  clients/cimi/views/machine_images/show.haml        |    5 +++++
>  clients/cimi/views/machines/index.haml             |    4 ++++
>  clients/cimi/views/machines/show.haml              |    3 +++
>  .../cimi/views/volume_configurations/index.haml    |    5 ++++-
>  clients/cimi/views/volume_configurations/show.haml |    7 ++++++-
>  clients/cimi/views/volume_images/index.haml        |    5 +++++
>  clients/cimi/views/volume_images/show.haml         |    7 ++++++-
>  clients/cimi/views/volumes/index.haml              |    4 ++++
>  clients/cimi/views/volumes/show.haml               |    7 ++++++-
>  15 files changed, 67 insertions(+), 8 deletions(-)
>
> diff --git a/clients/cimi/public/app.css b/clients/cimi/public/app.css
> index 1cabc0f..45580d6 100644
> --- a/clients/cimi/public/app.css
> +++ b/clients/cimi/public/app.css
> @@ -58,3 +58,7 @@ body {
>  .content .row .span10 div.alert-message {
>    margin-right : 30px;
>  }
> +
> +#toolbar p:first-child {
> +  text-align : right;
> +}
> diff --git a/clients/cimi/views/cloud_entry_point/index.haml b/
> clients/cimi/views/cloud_entry_point/index.haml
> index 0867d31..33321fc 100644
> --- a/clients/cimi/views/cloud_entry_point/index.haml
> +++ b/clients/cimi/views/cloud_entry_point/index.haml
> @@ -5,6 +5,11 @@
>      %li.active
>        CloudEntryPoint
>
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@entry_point.uri}?format=xml", :class => 'label
> warning' } XML
> +    %a{ :href => "#{@entry_point.uri}?format=json", :class =>
> 'label warning' } JSON
> +
>  %blockquote
>    %p
>      The Cloud Entry Point represents the entry point into the
clouddefined by
> diff --git a/clients/cimi/views/layout.haml
b/clients/cimi/views/layout.haml
> index 1978f83..87cdd3a 100644
> --- a/clients/cimi/views/layout.haml
> +++ b/clients/cimi/views/layout.haml
> @@ -21,13 +21,11 @@
>              %h1=@title || 'no-title-fix-me'
>              = yield_content :breadcrumb
>            .row
> -            .span10
> +            .span10#main
>                - [ :info, :error, :success ].map do |message|
>                  = flash_block_for message
>                =yield
> -            .span4
> -              %h3 Operations
> -              =yield_content :actions
> +            .span4#toolbar=yield_content :actions
>          %footer
>            %p
>              &copy; 2009-2011 The Apache Software Foundation and
> individual contributors.
> diff --git a/clients/cimi/views/machine_configurations/index.haml b/
> clients/cimi/views/machine_configurations/index.haml
> index 6b3452e..d24bd75 100644
> --- a/clients/cimi/views/machine_configurations/index.haml
> +++ b/clients/cimi/views/machine_configurations/index.haml
> @@ -8,6 +8,10 @@
>      %li.active
>        MachineConfigurationCollection
>
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@machine_configurations.uri}?format=xml",
> :class => 'label warning' } XML
> +    %a{ :href => "#{@machine_configurations.uri}?format=json",
> :class => 'label warning' } JSON
>
>  %blockquote
>    %p
> diff --git a/clients/cimi/views/machine_configurations/show.haml b/
> clients/cimi/views/machine_configurations/show.haml
> index 06663cf..387de62 100644
> --- a/clients/cimi/views/machine_configurations/show.haml
> +++ b/clients/cimi/views/machine_configurations/show.haml
> @@ -11,6 +11,11 @@
>      %li.active
>        = @machine_configuration.name
>
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@machine_configuration.uri}?format=xml", :class
> => 'label warning' } XML
> +    %a{ :href => "#{@machine_configuration.uri}?format=json",
> :class => 'label warning' } JSON
> +
>  %blockquote
>    %p
>      The Machine Configuration entity represents the set of
> configuration values
> diff --git a/clients/cimi/views/machine_images/index.haml b/clients/
> cimi/views/machine_images/index.haml
> index 6bfb7fa..54f3711 100644
> --- a/clients/cimi/views/machine_images/index.haml
> +++ b/clients/cimi/views/machine_images/index.haml
> @@ -8,6 +8,10 @@
>      %li.active
>        MachineImageCollection
>
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@machine_images.uri}?format=xml", :class =>
> 'label warning' } XML
> +    %a{ :href => "#{@machine_images.uri}?format=json", :class =>
> 'label warning' } JSON
>
>  %blockquote
>    %p
> diff --git a/clients/cimi/views/machine_images/show.haml b/clients/
> cimi/views/machine_images/show.haml
> index 3a6a75d..b3c4120 100644
> --- a/clients/cimi/views/machine_images/show.haml
> +++ b/clients/cimi/views/machine_images/show.haml
> @@ -11,6 +11,11 @@
>      %li.active
>        = @machine_image.name
>
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@machine_image.uri}?format=xml", :class =>
> 'label warning' } XML
> +    %a{ :href => "#{@machine_image.uri}?format=json", :class =>
> 'label warning' } JSON
> +
>  %blockquote
>    %p
>      This entity represents the information (e.g. an Open
> Virtualization Format
> diff --git a/clients/cimi/views/machines/index.haml b/clients/cimi/
> views/machines/index.haml
> index be18e65..08205bd 100644
> --- a/clients/cimi/views/machines/index.haml
> +++ b/clients/cimi/views/machines/index.haml
> @@ -10,8 +10,12 @@
>
>  - content_for :actions do
>    %p
> +    %a{ :href => "#{@machines.uri}?format=xml", :class => 'label
> warning' } XML
> +    %a{ :href => "#{@machines.uri}?format=json", :class => 'label
> warning' } JSON
> +  %p
>      %a{ :href => '/cimi/machines/new', :class => 'btn info'} New machine

>
> +
>  %blockquote
>    %p
>      A Machine Collection entity represents the collection of Machine
> diff --git a/clients/cimi/views/machines/show.haml b/clients/cimi/
> views/machines/show.haml
> index 620da17..fa637e5 100644
> --- a/clients/cimi/views/machines/show.haml
> +++ b/clients/cimi/views/machines/show.haml
> @@ -13,6 +13,9 @@
>
>  - content_for :actions do
>    %p
> +    %a{ :href => "#{@machine.uri}?format=xml", :class => 'label
> warning' } XML
> +    %a{ :href => "#{@machine.uri}?format=json", :class => 'label
> warning' } JSON
> +  %p
>      - if @machine.state == 'STARTED'
>        %form{ :action => "/cimi/machines/#{@machine.name}/stop",
> :method => :post, :style => 'display:inline'}
>          %button{ :class => 'btn'} Stop
> diff --git a/clients/cimi/views/volume_configurations/index.haml b/
> clients/cimi/views/volume_configurations/index.haml
> index 602d230..88ed9c8 100644
> --- a/clients/cimi/views/volume_configurations/index.haml
> +++ b/clients/cimi/views/volume_configurations/index.haml
> @@ -7,7 +7,10 @@
>        %span.divider="/"
>      %li.active
>        VolumeConfigurationCollection
> -
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@volume_configurations.uri}?format=xml", :class
> => 'label warning' } XML
> +    %a{ :href => "#{@volume_configurations.uri}?format=json",
> :class => 'label warning' } JSON
>
>  %blockquote
>    %p
> diff --git a/clients/cimi/views/volume_configurations/show.haml b/
> clients/cimi/views/volume_configurations/show.haml
> index 373486c..6378ee7 100644
> --- a/clients/cimi/views/volume_configurations/show.haml
> +++ b/clients/cimi/views/volume_configurations/show.haml
> @@ -11,6 +11,11 @@
>      %li.active
>        = @volume_configuration.name
>
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@volume_configuration.uri}?format=xml", :class
> => 'label warning' } XML
> +    %a{ :href => "#{@volume_configuration.uri}?format=json", :class
> => 'label warning' } JSON
> +
>  %blockquote
>    %p
>      The Volume Configuration entity represents the set of
> configuration values
> @@ -27,4 +32,4 @@
>    %dt Created
>    %dd #{@volume_configuration.created}&nbsp;
>    %dt Details
> -  %dd=@volume_configuration.inspect
> \ No newline at end of file
> +  %dd=@volume_configuration.inspect
> diff --git a/clients/cimi/views/volume_images/index.haml b/clients/
> cimi/views/volume_images/index.haml
> index e7ab56f..26be6c8 100644
> --- a/clients/cimi/views/volume_images/index.haml
> +++ b/clients/cimi/views/volume_images/index.haml
> @@ -8,6 +8,11 @@
>      %li.active
>        VolumeImageCollection
>
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@volume_images.uri}?format=xml", :class =>
> 'label warning' } XML
> +    %a{ :href => "#{@volume_images.uri}?format=json", :class =>
> 'label warning' } JSON
> +
>  %blockquote
>    %p
>      A Volume Image Collection entity represents the collection of
> Volume Image
> diff --git a/clients/cimi/views/volume_images/show.haml b/clients/
> cimi/views/volume_images/show.haml
> index ef396dc..20b3ef4 100644
> --- a/clients/cimi/views/volume_images/show.haml
> +++ b/clients/cimi/views/volume_images/show.haml
> @@ -11,6 +11,11 @@
>      %li.active
>        = @volume_image.name
>
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@volume_image.uri}?format=xml", :class =>
> 'label warning' } XML
> +    %a{ :href => "#{@volume_image.uri}?format=json", :class =>
> 'label warning' } JSON
> +
>  %blockquote
>    %p
>      This entity represents the information necessary for hardware
virtualized
> @@ -25,4 +30,4 @@
>    %dt Created
>    %dd=@volume_image.created
>    %dt Details
> -  %dd=@volume_image.inspect
> \ No newline at end of file
> +  %dd=@volume_image.inspect
> diff --git a/clients/cimi/views/volumes/index.haml b/clients/cimi/
> views/volumes/index.haml
> index e9bd529..eedb125 100644
> --- a/clients/cimi/views/volumes/index.haml
> +++ b/clients/cimi/views/volumes/index.haml
> @@ -8,6 +8,10 @@
>      %li.active
>        VolumeCollection
>
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@volumes.uri}?format=xml", :class => 'label
> warning' } XML
> +    %a{ :href => "#{@volumes.uri}?format=json", :class => 'label
> warning' } JSON
>
>  %blockquote
>    %p
> diff --git a/clients/cimi/views/volumes/show.haml b/clients/cimi/
> views/volumes/show.haml
> index 85a73f7..f08006b 100644
> --- a/clients/cimi/views/volumes/show.haml
> +++ b/clients/cimi/views/volumes/show.haml
> @@ -11,6 +11,11 @@
>      %li.active
>        = @volume.name
>
> +- content_for :actions do
> +  %p
> +    %a{ :href => "#{@volume.uri}?format=xml", :class => 'label
warning' } XML
> +    %a{ :href => "#{@volume.uri}?format=json", :class => 'label
> warning' } JSON
> +
>  %blockquote
>    %p
>      This entity represents a
> @@ -25,4 +30,4 @@
>    %dt Created
>    %dd #{@volume.created}&nbsp;
>    %dt Details
> -  %dd=@volume.inspect
> \ No newline at end of file
> +  %dd=@volume.inspect
> --
> 1.7.4.4
>


Mime
View raw message