deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH core 23/32] Core: Storage volumes should always show the :name attribute
Date Mon, 30 Apr 2012 14:06:34 GMT
On 04/30/12, Koper, Dies wrote:
> Hi Michal,
> 
> > +++ b/server/views/storage_volumes/show.html.haml
> ...
> > +    %p{ :'data-role' => 'fieldcontain'}=@storage_volume.id
> 
> What I don't understand about this patch is that the subject says that
> the :name attribute should be shown (I believe it is currently not in
> the GUI and that is inconvenient for FGCP as the name is much more
> meaningful than the id) but you're not adding any lines with :name in
> them?

Hi,

What does this patch do is to have the '<name>' attribute always visible,
even if it's not set. In that case we fallback to the 'id' and will display
the content of 'id' in 'name'.

Thing is that clients would expect to have 'id' and 'name' always available
in the XML/JSON.

  -- Michal

> 
> Regards,
> Dies Koper
> 
> 
> > -----Original Message-----
> > From: mfojtik@redhat.com [mailto:mfojtik@redhat.com]
> > Sent: Tuesday, 17 April 2012 11:40 PM
> > To: dev@deltacloud.apache.org
> > Subject: [PATCH core 23/32] Core: Storage volumes should always show
> > the :name attribute
> > 
> > From: Michal Fojtik <mfojtik@redhat.com>
> > 
> > 
> > Signed-off-by: Michal fojtik <mfojtik@redhat.com>
> > ---
> >  server/views/storage_volumes/show.html.haml |    1 +
> >  server/views/storage_volumes/show.xml.haml  |    5 ++---
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> > 
> > diff --git a/server/views/storage_volumes/show.html.haml
> > b/server/views/storage_volumes/show.html.haml
> > index aabdd85..1c1f458 100644
> > --- a/server/views/storage_volumes/show.html.haml
> > +++ b/server/views/storage_volumes/show.html.haml
> > @@ -4,6 +4,7 @@
> >  %div{ :'data-role' => :content, :'data-theme' => 'c'}
> >    %ul{ :'data-role' => :listview , :'data-inset' => :true,
> :'data-divider-theme'
> > => 'd'}
> >      %li{ :'data-role' => 'list-divider'} Name
> > +    %p{ :'data-role' => 'fieldcontain'}=@storage_volume.id
> >      %li
> >        %p{ :'data-role' => 'fieldcontain'}=@storage_volume.id
> >      %li{ :'data-role' => 'list-divider'} Created
> > diff --git a/server/views/storage_volumes/show.xml.haml
> > b/server/views/storage_volumes/show.xml.haml
> > index 440609b..f9f5f25 100644
> > --- a/server/views/storage_volumes/show.xml.haml
> > +++ b/server/views/storage_volumes/show.xml.haml
> > @@ -9,9 +9,8 @@
> >    - if @storage_volume.kind
> >      %kind<
> >        = @storage_volume.kind
> > -  - if @storage_volume.name
> > -    %name<
> > -      = @storage_volume.name
> > +  %name<
> > +    = @storage_volume.name || @storage_volume.id
> >    - if @storage_volume.device
> >      %device<
> >        = @storage_volume.device
> > --
> > 1.7.10
> > 
> 
> 

-- 
Michal Fojtik
Sr. Software Engineer, Deltacloud API (http://deltacloud.org)

Mime
View raw message