Vonage / Grafana_Status_panel

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

"Default background colour" as an option #49

Closed PeteBa closed 7 years ago

PeteBa commented 7 years ago

Added an option to use the default grafana background rather than the green OK state colour. This allows for a more muted panel that only draws attention when a warning/critical threshold is received. This modification works regardless of whether the user has selected the light or dark theme. I also tweaked the html of the Editor tab so that it has the "flip" and checkboxes inline so the tab doesn't get too deep.

You may want to check editor.html as I noticed two labels in the "Make panel gray when no data" switch around line 36 of the original file. One references isGrayColor and the other isGrayOnNoData. Is that intended?

I have used this panel a lot in my dashboards and have further customised to support Date thresholds as well as the standard Decimal, Units and Time/Date Formatting. Let me know if interested and I'll create another pull request for those additions.

Thanks for a great panel.

tomer-amir-vonage commented 7 years ago

BTW, Thanks for reporting the but with no-data. we fixed and merged it here: #52

Also, feel free to add the functionality you wanted with the formatting, but we didn't quite understand what it will do... will it just add m/s if I choose meter/second?

Thanks!

PeteBa commented 7 years ago

Thanks for the feedback. You guys are coding fast and hard to keep in sync 8) I have changed the CSS approach to the Default Background option to support the new Flip capability.

I will take a look at porting the formatting options over the week-end. Yes, the formatting options allow you to specify number of decimal places and the units formatting will append units of measure (e.g. "m/s"). Works the same way as the format options for the standard Single Stat panel.

Let me know if any problems with this PR.

tomer-amir-vonage commented 7 years ago

Thanks for fixing everything 😄

Merging, and your changes will be released with our next version

PeteBa commented 7 years ago

Great stuff.

Have just created a PR for the Dates and Number formatting. This is a bit more substantial but hope it is OK and inline with how you want to develop the code.

I am now adding ability to select colours for the threshold settings and also a mode where the colour is applied to the text rather than background. Just doing some testing to make sure it works as expected.

This is proving really useful on our project. Thanks!

dashboard