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

NETOBSERV-908: Added query to get silenced alert and only display non silenced alert #313

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

OlivierCazade
Copy link
Collaborator

The banner will only appear after both query have been done and only non silenced alert will appear.

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Mar 24, 2023

@OlivierCazade: This pull request references NETOBSERV-908 which is a valid jira issue.

In response to this:

The banner will only appear after both query have been done and only non silenced alert will appear.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Merging #313 (feab6a1) into main (5e54011) will increase coverage by 0.01%.
The diff coverage is 40.74%.

@@            Coverage Diff             @@
##             main     #313      +/-   ##
==========================================
+ Coverage   58.49%   58.50%   +0.01%     
==========================================
  Files         148      148              
  Lines        6536     6557      +21     
  Branches      783      786       +3     
==========================================
+ Hits         3823     3836      +13     
- Misses       2497     2505       +8     
  Partials      216      216              
Flag Coverage Δ
uitests 59.04% <40.74%> (-0.02%) ⬇️
unittests 56.92% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
web/src/components/alerts/banner.tsx 44.44% <0.00%> (-8.89%) ⬇️
web/src/components/messages/loki-error.tsx 24.28% <33.33%> (+0.40%) ⬆️
web/src/components/alerts/fetcher.tsx 55.00% <52.63%> (+3.14%) ⬆️

... and 7 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Amoghrd
Copy link
Contributor

Amoghrd commented Mar 24, 2023

/ok-to-test

@openshift-ci openshift-ci bot added the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Mar 24, 2023
@github-actions
Copy link

New image: ["quay.io/netobserv/network-observability-console-plugin:7d90df7"]. It will expire after two weeks.

jpinsonneau
jpinsonneau previously approved these changes Mar 27, 2023
Copy link
Contributor

@jpinsonneau jpinsonneau left a comment

Choose a reason for hiding this comment

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

Small nit comments, LGTM in terms of code

);
})
.catch(() => {
console.log('Could not get alerts');
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
console.log('Could not get alerts');
console.log('Could not get silenced alerts');

Should we also set silenced alertes to [] to show all alerts in that case ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, thanks

getSilencedAlerts()
.then(result => {
setSilencedAlerts(
/* result.filter(rule => rule.status.state == 'active').map(rule => rule.id) */
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
/* result.filter(rule => rule.status.state == 'active').map(rule => rule.id) */

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

@Amoghrd
Copy link
Contributor

Amoghrd commented Mar 27, 2023

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved QE has approved this pull request label Mar 27, 2023
@openshift-ci openshift-ci bot removed the lgtm label Mar 28, 2023
@github-actions github-actions bot removed the ok-to-test To set manually when a PR is safe to test. Triggers image build on PR. label Mar 28, 2023
Copy link
Contributor

@jpinsonneau jpinsonneau left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @OlivierCazade !

@openshift-ci openshift-ci bot added the lgtm label Mar 28, 2023
@OlivierCazade
Copy link
Collaborator Author

/approve

@openshift-ci
Copy link

openshift-ci bot commented Mar 28, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: OlivierCazade

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit b97d900 into netobserv:main Mar 28, 2023
OlivierCazade added a commit to OlivierCazade/network-observability-console-plugin that referenced this pull request Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants