You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2012/04/17 15:40:02 UTC
[PATCH core 23/32] Core: Storage volumes should always show the :name attribute
From: Michal Fojtik <mf...@redhat.com>
Signed-off-by: Michal fojtik <mf...@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
Re: [PATCH core 23/32] Core: Storage volumes should always show the
:name attribute
Posted by Michal Fojtik <mf...@redhat.com>.
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 <mf...@redhat.com>
> >
> >
> > Signed-off-by: Michal fojtik <mf...@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)
RE: [PATCH core 23/32] Core: Storage volumes should always show the :name attribute
Posted by "Koper, Dies" <di...@fast.au.fujitsu.com>.
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?
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 <mf...@redhat.com>
>
>
> Signed-off-by: Michal fojtik <mf...@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
>