Vonage / Grafana_Status_panel

A panel plugin for Grafana to monitor multiple parameters at once
Other
178 stars 108 forks source link

fix metric decimals with "0" value #120

Closed vlehm closed 5 years ago

vlehm commented 5 years ago

When editing a panel and in the options define a number threshold for a metric, it is possible to define the decimals to be displayed as a number. That works fine unless "0" is inserted as value, in that case when re-opening the panel in edit mode it will be displayed as the default value "2" and the previously configured value is lost. Reason is that "0" in javascript is falsy and therefore treats the value as unset and uses the default instead. Tested with my scenario and should also fix the issue as described in https://github.com/Vonage/Grafana_Status_panel/issues/98