|
|
Re: Metatype configuration supported data types - tables/lists? [message #1769900 is a reply to message #1593563] |
Fri, 04 August 2017 20:35 |
Phoebe Li Messages: 4 Registered: July 2017 |
Junior Member |
|
|
Hello, David
I am wondering if you have any suggestions on how to extend the Web UI and create self-defined tabs. I really like the way that in Cloud Service, we can just click Cloud Service, Data Service and MqttDataTransport to switch to different configuration page. I wish I can do that for my application as well.
Thanks
Phoebe
David Woodard wrote on Fri, 30 January 2015 18:43Hi Dan,
The metatype configuration files adhere to the OSGi Compendium spec (v4.3) [1] for the Metatype Service. If you haven't, it is properly worth reading the sections on Configuration Admin and Metatype Service. The spec states that the Metatype Service is only intended for simple data types. As you may have noticed, Kura displays these attribute definitions as:
if options are present => display drop down list
if type is boolean => display true/false radio buttons
else => display input box
The tabs you described are not using the Metatype Service or Configuration Admin. They are using internal data models to track changes made through the web UI. For dealing with a large set of inputs, I would recommend using a configuration file or for GPIO have a look at the device I/O features [2] we recently added. Otherwise, I think you would need to extend the UI and create your own custom tab.
Let me know if I can clarify anything further.
[1] http://www.osgi.org/Release4/Download
[2] http://eclipse.github.io/kura/doc/kura-dio-apis.html
Thanks,
--Dave
|
|
|
Re: Metatype configuration supported data types - tables/lists? [message #1769901 is a reply to message #1593563] |
Fri, 04 August 2017 20:42 |
Phoebe Li Messages: 4 Registered: July 2017 |
Junior Member |
|
|
Hello, David
Do you have any suggestions on how to extend the web UI and create self-defined tabs? I really like the way that in Cloud service, we can click CloudService, DataService, MqttDataTransport to switch to different configuration page. I wish I could do that when I configure my own application.
Thanks
Phoebe
David Woodard wrote on Fri, 30 January 2015 18:43Hi Dan,
The metatype configuration files adhere to the OSGi Compendium spec (v4.3) [1] for the Metatype Service. If you haven't, it is properly worth reading the sections on Configuration Admin and Metatype Service. The spec states that the Metatype Service is only intended for simple data types. As you may have noticed, Kura displays these attribute definitions as:
if options are present => display drop down list
if type is boolean => display true/false radio buttons
else => display input box
The tabs you described are not using the Metatype Service or Configuration Admin. They are using internal data models to track changes made through the web UI. For dealing with a large set of inputs, I would recommend using a configuration file or for GPIO have a look at the device I/O features [2] we recently added. Otherwise, I think you would need to extend the UI and create your own custom tab.
Let me know if I can clarify anything further.
[1] http://www.osgi.org/Release4/Download
[2] http://eclipse.github.io/kura/doc/kura-dio-apis.html
Thanks,
--Dave
|
|
|
|
Powered by
FUDForum. Page generated in 0.03560 seconds