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

Create silence from the alerts filter bar #1911

Merged
merged 2 commits into from
Jun 5, 2019

Conversation

m-masataka
Copy link
Contributor

In our operation, we often create silence after filtering alert with filter bar.
So we need the button that create from filter.
This PR is related to #1850.

Signed-off-by: m-masataka m.mizukoshi.wakuwaku@gmail.com

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

list ->
list
|> List.map convertFilterMatcher
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need the convertFilterMatchers function, because it can be replaced with List.map convertFilterMatcher matchers.

There is no need to check for the empty list, because List.map convertFilterMatcher [] == []

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your review. I will remove it.

{ name = key
, value = value
, isRegex =
case op of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isRegex = op == RegexMatch is shorter

]
[ i [ class "fa fa-bell-slash-o mr-2" ] []
, text "Silence"
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please attach a screenshot to your PR? It would make it easier to review!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I'll attach the screenshot.

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>
@m-masataka
Copy link
Contributor Author

output

@w0rm
Copy link
Member

w0rm commented Jun 5, 2019

@m-masataka thank you!

@w0rm w0rm merged commit e33edd6 into prometheus:master Jun 5, 2019
@simonpasquier simonpasquier changed the title Create Silence from filter Bar Create silence from the filter bar Jun 21, 2019
@simonpasquier simonpasquier changed the title Create silence from the filter bar Create silence from the alerts filter bar Jun 21, 2019
DuskEagle pushed a commit to DuskEagle/alertmanager that referenced this pull request Aug 1, 2019
* Create Silence from filters

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>

* Get rid of unnecessary things

Signed-off-by: m-masataka <m.mizukoshi.wakuwaku@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants