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

Fix monitor parse and alerts table #645

Merged
merged 1 commit into from
Jul 15, 2023
Merged

Conversation

lezzago
Copy link
Member

@lezzago lezzago commented Jul 14, 2023

Description

Fix retrieving the correct latest alert time for the Alerts on Dashboards visualization feature.
Fix showing the alerts table on monitor details page. The issue was introduced in #611

Issues Resolved

N/A

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
Copy link
Member

@eirsep eirsep left a comment

Choose a reason for hiding this comment

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

can you tag the commit where alert was removed in the PR description?

@@ -22,7 +22,7 @@ const getMonitors = async (params) => {

const parseMonitor = (monitor) => {
const state = monitor.monitor.enabled ? 'enabled' : 'disabled';
const latestAlert = monitor.latestAlert === "--" ? undefined : monitor.latestAlert;
Copy link
Member

Choose a reason for hiding this comment

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

is there tests for parseMonitor? At least should be one added for this scenario

Copy link
Member Author

Choose a reason for hiding this comment

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

Will follow up on tests and will create a tracking issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

@codecov
Copy link

codecov bot commented Jul 15, 2023

Codecov Report

Merging #645 (07dd6f7) into main (043881b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #645   +/-   ##
=======================================
  Coverage   49.99%   49.99%           
=======================================
  Files         231      231           
  Lines        6509     6509           
  Branches      927      927           
=======================================
  Hits         3254     3254           
  Misses       3252     3252           
  Partials        3        3           

see 1 file with indirect coverage changes

@lezzago lezzago merged commit 6972667 into opensearch-project:main Jul 15, 2023
12 of 13 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 15, 2023
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
(cherry picked from commit 6972667)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 15, 2023
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
(cherry picked from commit 6972667)
lezzago added a commit that referenced this pull request Jul 15, 2023
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
(cherry picked from commit 6972667)

Co-authored-by: Ashish Agrawal <ashisagr@amazon.com>
lezzago added a commit that referenced this pull request Jul 15, 2023
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
(cherry picked from commit 6972667)

Co-authored-by: Ashish Agrawal <ashisagr@amazon.com>
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.

4 participants