Skip to content
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

Merged
merged 2 commits into from
Jan 20, 2018
Merged

colored and sorted problems by severity #41

merged 2 commits into from
Jan 20, 2018

Conversation

marconett
Copy link
Contributor

screenshot 2017-08-25 12 53 25

Copy link
Contributor

@bodsch bodsch left a 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.

@marconett
Copy link
Contributor Author

marconett commented Aug 31, 2017

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 :)

@bodsch
Copy link
Contributor

bodsch commented Sep 4, 2017

Hi @marconett
I think, i take your idea and implement this in my ruby gem.
and modify the result from the similar function, it is possible ;)

@dnsmichi
Copy link
Collaborator

dnsmichi commented Sep 4, 2017

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 👍

@dnsmichi
Copy link
Collaborator

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).

@dnsmichi
Copy link
Collaborator

Oh, there's one problem though - that patch kills the values in a list.

@dnsmichi dnsmichi added this to the 1.4.0 milestone Jan 20, 2018
@dnsmichi
Copy link
Collaborator

Fixed, squashed, and rebased against master. Thanks for your contribution! 👍

screen shot 2018-01-20 at 17 14 21

@dnsmichi dnsmichi merged commit 2ae0f15 into mocdaniel:master Jan 20, 2018
dnsmichi pushed a commit that referenced this pull request Jan 22, 2018
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
bodsch added a commit to bodsch/docker-dashing-icinga2 that referenced this pull request Jan 25, 2018
  - fix problems with certificate exchange with our cert-service
  - backport [colored and sorted problems by severity](mocdaniel/dashing-icinga2#41)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants