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

Add a filter to hide silenced alerts #319

Merged
merged 1 commit into from Apr 28, 2016

Conversation

Projects
None yet
4 participants
@mpchadwick
Contributor

mpchadwick commented Apr 22, 2016

An implementation for the feature request in #313.

Just uses CSS display: none to hide the silenced alerts. Worth noting that the alert group node will not be removed if all alerts are silenced (the UI feels like an accordion in this case).

Before Filtering

image

After Filtering

image

@matthiasr

This comment has been minimized.

matthiasr commented Apr 22, 2016

@fabxc

This comment has been minimized.

Member

fabxc commented Apr 22, 2016

Nice, thanks! 👍

</fieldset>
</form>

<div id="alert-groups">
<div id="alert-groups" ng-class="{'hide-silenced': hideSilenced}">

This comment has been minimized.

@juliusv

juliusv Apr 22, 2016

Member

Can this just be ng-hide="hideSilenced"? Then you don't need any CSS... same for the other one in alert.html.

This comment has been minimized.

@mpchadwick

mpchadwick Apr 22, 2016

Contributor

@juliusv Hmm...I think that would hide the entire alert-groups node. In order to avoid the DOM / CSS approach we'd probably need to do something like this on the alert-item (untested)...

ng-hide="alert.silenced && hideSilenced"

hideSilenced is currently a property on AlertsCtrls $scope. So we'd need to make it available in AlertCtrl either via $rootScope or a service. Thoughts?

This comment has been minimized.

@juliusv

juliusv Apr 22, 2016

Member

Ah, the nested nature of this wasn't apparent to me. All makes sense then, I guess keep it like it is.

@mpchadwick

This comment has been minimized.

Contributor

mpchadwick commented Apr 22, 2016

@matthiasr I initially thought about floating and using that real estate, but then when I added it initially at the bottom I thought it looked fine. If we start having tons of filters we would probably want the two columns (and maybe even show more / show less). I thought it might look weird / lonely to have a second column with a lone checkbox. I can add a screenshot later though.

@mpchadwick mpchadwick force-pushed the mpchadwick:filter-silenced branch from d6480ff to c319863 Apr 28, 2016

@mpchadwick

This comment has been minimized.

Contributor

mpchadwick commented Apr 28, 2016

@matthiasr updated to use 2 columns for the filters. I tested it out and do think it looks better after all

image

@fabxc anything holding back the merge here?

@matthiasr

This comment has been minimized.

matthiasr commented Apr 28, 2016

@fabxc

This comment has been minimized.

Member

fabxc commented Apr 28, 2016

Thanks!

@fabxc fabxc merged commit 6493dd5 into prometheus:master Apr 28, 2016

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@fabxc fabxc referenced this pull request Apr 28, 2016

Closed

Hide silenced alerts #313

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment