You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Guillaume Nodet <gn...@gmail.com> on 2009/05/11 20:07:52 UTC

Webconsole and ConfigAdmin

What is the config tab supposed to display when the configurations
available in the config admin do not have any metadata infos and are
not SCR managed ?
Currently, those are not even displayed in the list box.
I've been able to change that using a simple patch and now I can see 3
buttons (save, reset, delete), but no way to change any values.
Any idea?

Index: src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
===================================================================
--- src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java	(revision
773613)
+++ src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java	(working
copy)
@@ -373,7 +373,7 @@
                     name = pid;
                 }

-                if ( ocd != null )
+//                if ( ocd != null )
                 {
                     optionsPlain.put( pid, name );
                 }


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Webconsole and ConfigAdmin

Posted by Carsten Ziegeler <cz...@apache.org>.
Felix Meschberger wrote:
> Hi Guillaume,
> 
> Guillaume Nodet schrieb:
>> What is the config tab supposed to display when the configurations
>> available in the config admin do not have any metadata infos and are
>> not SCR managed ?
>> Currently, those are not even displayed in the list box.
>> I've been able to change that using a simple patch and now I can see 3
>> buttons (save, reset, delete), but no way to change any values.
>> Any idea?
> 
> Yes ;-)
> 
> The reason for only displaying configurations for which metadata exists,
> is to limit the configuration list. In addition the web console uses the
> metadata to render the configuration GUI.
> 
> If there is no metadata, all the web console could do is show the
> configuration values as name value pairs - currently IIRC in a <textarea>.
> 
> I could imagine the following:
> 
> * A switch allows to show or hide the service PIDs for which no metadata
> exists. Service PIDs come from existing configuration and registered
> ManagedService[Factory] instances.
> 
> * Configuration for which no metadata exists can be displayed as follows:
>    - existing properties are displayed with property name and
>      input fields according to current property value (array, vector,
>      single value of a given type)
>    - additional properties may be added by specifying cardinality
>      and type and then the form entries are created on-the-fly
> 
> WDYT ?
> 
Hmpf I was just drafting a similar answer :) But you beat me (again..)
I think those changes make sense, in addition we need to rewamp the
config tab anyway, so maybe we can divide it into section (configs with
metadata, all configs, factories) or something like that.

Carsten
-- 
Carsten Ziegeler
cziegeler@apache.org

Re: Webconsole and ConfigAdmin

Posted by Filippo Diotalevi <fi...@gmail.com>.
On Mon, May 11, 2009 at 8:37 PM, Felix Meschberger <fm...@gmail.com> wrote:
> Hi Guillaume,
> Guillaume Nodet schrieb:
>> What is the config tab supposed to display when the configurations
>> available in the config admin do not have any metadata infos and are
>> not SCR managed ?
>> Currently, those are not even displayed in the list box.
>> I've been able to change that using a simple patch and now I can see 3
>> buttons (save, reset, delete), but no way to change any values.
>> Any idea?
>
> Yes ;-)
>
> The reason for only displaying configurations for which metadata exists,
> is to limit the configuration list. In addition the web console uses the
> metadata to render the configuration GUI.
>
> If there is no metadata, all the web console could do is show the
> configuration values as name value pairs - currently IIRC in a <textarea>.
>
> I could imagine the following:
>
> * A switch allows to show or hide the service PIDs for which no metadata
> exists. Service PIDs come from existing configuration and registered
> ManagedService[Factory] instances.

That's my favourite option.
Honestly, I don't mind having to provide the metadata for
managedservices, because the result is a well-comprehensible page that
the user can easily use.
So if the goal is to support also managedservices without metadata,
I'd like to have them separated from the others.
-- 
Filippo Diotalevi

Re: Webconsole and ConfigAdmin

Posted by Guillaume Nodet <gn...@gmail.com>.
For non metatype described configurations, I would just use a single
text area and display / load the configuration using the
java.util.Properties text serialization methods.
I've added some metatype descriptions to Karaf configurations, but I
think some of them can not be easily described by metatype, such as
the one for pax-logging-service (which is actually a log4j properties
file), so I think it makes sense to allow them to be edited /
displayed somehow.

2009/5/11 Felix Meschberger <fm...@gmail.com>:
> Hi Guillaume,
>
> Guillaume Nodet schrieb:
>> What is the config tab supposed to display when the configurations
>> available in the config admin do not have any metadata infos and are
>> not SCR managed ?
>> Currently, those are not even displayed in the list box.
>> I've been able to change that using a simple patch and now I can see 3
>> buttons (save, reset, delete), but no way to change any values.
>> Any idea?
>
> Yes ;-)
>
> The reason for only displaying configurations for which metadata exists,
> is to limit the configuration list. In addition the web console uses the
> metadata to render the configuration GUI.
>
> If there is no metadata, all the web console could do is show the
> configuration values as name value pairs - currently IIRC in a <textarea>.
>
> I could imagine the following:
>
> * A switch allows to show or hide the service PIDs for which no metadata
> exists. Service PIDs come from existing configuration and registered
> ManagedService[Factory] instances.
>
> * Configuration for which no metadata exists can be displayed as follows:
>   - existing properties are displayed with property name and
>     input fields according to current property value (array, vector,
>     single value of a given type)
>   - additional properties may be added by specifying cardinality
>     and type and then the form entries are created on-the-fly
>
> WDYT ?
>
> Regards
> Felix
>
>>
>> Index: src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
>> ===================================================================
>> --- src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java  (revision
>> 773613)
>> +++ src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java  (working
>> copy)
>> @@ -373,7 +373,7 @@
>>                      name = pid;
>>                  }
>>
>> -                if ( ocd != null )
>> +//                if ( ocd != null )
>>                  {
>>                      optionsPlain.put( pid, name );
>>                  }
>>
>>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Webconsole and ConfigAdmin

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Guillaume,

Guillaume Nodet schrieb:
> What is the config tab supposed to display when the configurations
> available in the config admin do not have any metadata infos and are
> not SCR managed ?
> Currently, those are not even displayed in the list box.
> I've been able to change that using a simple patch and now I can see 3
> buttons (save, reset, delete), but no way to change any values.
> Any idea?

Yes ;-)

The reason for only displaying configurations for which metadata exists,
is to limit the configuration list. In addition the web console uses the
metadata to render the configuration GUI.

If there is no metadata, all the web console could do is show the
configuration values as name value pairs - currently IIRC in a <textarea>.

I could imagine the following:

* A switch allows to show or hide the service PIDs for which no metadata
exists. Service PIDs come from existing configuration and registered
ManagedService[Factory] instances.

* Configuration for which no metadata exists can be displayed as follows:
   - existing properties are displayed with property name and
     input fields according to current property value (array, vector,
     single value of a given type)
   - additional properties may be added by specifying cardinality
     and type and then the form entries are created on-the-fly

WDYT ?

Regards
Felix

> 
> Index: src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
> ===================================================================
> --- src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java	(revision
> 773613)
> +++ src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java	(working
> copy)
> @@ -373,7 +373,7 @@
>                      name = pid;
>                  }
> 
> -                if ( ocd != null )
> +//                if ( ocd != null )
>                  {
>                      optionsPlain.put( pid, name );
>                  }
> 
>