-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
colored and sorted problems by severity #41
Conversation
marconett
commented
Aug 25, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
but, i think, the service_problems_severity() function should be enhanced with the color.
otherwise, the loop over the function result is to expensive.
i honestly wouldn't know how to do move coloring and sorting to service_problems_severity. my branch has been working quite nicely for me for a while now. i won't redo this, so feel free to just close this pull request or work on it yourself :) |
Hi @marconett |
severity is calculated differently than just by the state. One could implement a callback which defines the sort order. I'll think about it, thanks for your patch 👍 |
After a second look, I really like that patch. It doesn't affect the other lists as I feared already. Coloring always was a pain with that list (and that background). |
Oh, there's one problem though - that patch kills the values in a list. |
Previous this was just "random" by the string comparison with Crit > Unknown > Warn, which isn't what we expect. Great help: https://stackoverflow.com/questions/40121932/ruby-sort-array-of-hashes-values-string-based-on-array-order refs #41
- fix problems with certificate exchange with our cert-service - backport [colored and sorted problems by severity](mocdaniel/dashing-icinga2#41)