dashing-icinga2 icon indicating copy to clipboard operation
dashing-icinga2 copied to clipboard

Numbers next to the Chart

Open 2AdmiralAdonis2 opened this issue 5 years ago • 4 comments

Hello,

i got one question. Is it posible to add the numbers of services and hosts next to the chart? At the moment i get the number of services when i cross the chart with my mouse.

Thank you very much in advance for your answer!

2AdmiralAdonis2 avatar Jan 22 '20 15:01 2AdmiralAdonis2

Well, there is always the possibility to add the desired data using the moreInfo attribute of the widgets, either by calling a function from your icinga2.erb or by creating a job or editing the existing jobs in icinga2.rb to add this desired information to your widgets upon creation.

mocdaniel avatar Jan 22 '20 16:01 mocdaniel

I haven't found a solution for this yet, since it requires overriding the legend in chartjs with some advanced javascript.

This is the commented function here, where I stopped playing with that: https://github.com/dnsmichi/dashing-icinga2/blob/master/widgets/chartjs/chartjs.coffee#L2

Google points to e.g. https://stackoverflow.com/questions/48476520/show-count-concatenated-to-labels-using-chart-js but I haven't found a way to merge that with the coffeescript layers.

dnsmichi avatar Jan 23 '20 08:01 dnsmichi

Hi there,

is there something new for this topic? Or is it not possible?

Thank you in advance for your answer!

2AdmiralAdonis2 avatar Mar 10 '20 12:03 2AdmiralAdonis2

If you have time, please look into the code and try to fix it. I won't have time to do so in the coming months with my new responsibilities. I've switched jobs and am not longer working at Netways/Icinga, I'm with GitLab now.

dnsmichi avatar Mar 10 '20 14:03 dnsmichi