Widget Custom Javascript


#1

When I add a widget to my Murano Dashboard, it seems I am limited to only “Text”, “Gauge”, “Indicator Light”, and “Toggle Switch”. Are there any plans to add more of these, or to add a completely custom one? Or am I approaching this incorrectly?

“You can assume this javascript is wrapped in a function of the form function(resources) where resources is a collection of javascript objects (keyed by their name) corresponding to the most current data in a resource.”

Do you have any documentation on the structure of the resources object? I can’t seem to get it to work right.


#2

Well, determined, at least, that it wasn’t working because I assumed resources(“alias”) would return a number, when it was actually returning a string.

Now, the question comes - how can we expand the abilities in the widget code? I’d love to be able to return a boolean array for the indicator light and have it display multiple lights in the same widget. Or at least be able to return html to process and display.


#3

@RIS - the Product Prototyping dashboard is meant to be used as a quick way to visualize your device data. Its feature set is light by design, because the main application you develop in Murano should be inside your Solution.

No doubt, the documentation for this Murano feature is light, and we can work to make its purpose and abilities clearer.

Have you tried deploying a Solution in Murano yet?