icon as value in metrics.js

Started by loseymark, May 18, 2016, 08:23:22 PM

loseymark

Is it possible to display an icon as the value supplied in metrics.js?

Felix

Quote from: loseymark on May 18, 2016, 08:23:22 PM
as the value supplied in metrics.js

What is "the value"?
I think the answer is no, not unless you make changes of where the icon comes from. Currently the icons are defined as part of the node types.

loseymark

I'm guessing no too

in the metrics entry I would like to display an icon instead of the text 'Closed/Closed'
//GDPIMote metrics
  BC : { name:'GDState', regexp:/DS\:0/i, value:'Closed/Closed', unit:'', pin:1, },

syrinxtech

I think it would be neat if the icon could change depending on some state/metric.

ie, the icon for a water leak detector could change from something indicating dry to a picture of a wet floor (or some other ridiculous example).

Felix

@syrinxtech
Yeah you can totally do that, you will need to hack a little at my gateway.js. I haven't built this in but it could be considered as a feature to add in the future.
Thanks for the suggestion.