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

Fixed an issue that was causing the results of the ctx object to be empty. #334

Merged
merged 7 commits into from
Dec 8, 2022

Conversation

AWSHurneyt
Copy link
Collaborator

@AWSHurneyt AWSHurneyt commented Sep 29, 2022

Description

  1. Fixed an issue that was causing the results of the ctx object to be empty when viewing the available ctx variables in the Trigger condition Info flyout.
  2. Fixed an issue that was causing variables like ctx.trigger.name to not populate in the message preview.

Known issues

  1. [BUG] Action Message can't populate mustache expression values correctly  #333 describes an issue that's causing the ctx.monitor.schedule.period.interval and ctx.monitor.schedule.period.unit to be blank when the notification is sent to the webhook. This is still under investigation. The message preview in the UI does show those values, suggesting this may be a backend issue. As discussed in issue [BUG] Action Message can't populate mustache expression values correctly  #333, this known issue results from the backend, and there is a PR published to address it.

Issues Resolved

#152
#333

Screenshots

Screen Shot 2022-09-28 at 9 03 33 PM
Screen Shot 2022-09-28 at 9 04 09 PM
Screen Shot 2022-09-28 at 9 06 36 PM
Screen Shot 2022-09-28 at 9 08 06 PM
Screen Shot 2022-09-28 at 9 11 12 PM
Screen Shot 2022-09-28 at 9 12 57 PM
Screen Shot 2022-09-28 at 9 13 27 PM

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.

…mpty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
@AWSHurneyt
Copy link
Collaborator Author

The cypress tests are failing because the plugin version doesn't match the version of OpenSearch-Dashboards used by the tests. A separate PR will be submitted to adjust the version.

@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2022

Codecov Report

Merging #334 (bae4684) into main (e8572fc) will decrease coverage by 0.10%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #334      +/-   ##
==========================================
- Coverage   52.68%   52.57%   -0.11%     
==========================================
  Files         207      207              
  Lines        5444     5461      +17     
  Branches      764      765       +1     
==========================================
+ Hits         2868     2871       +3     
- Misses       2574     2588      +14     
  Partials        2        2              
Impacted Files Coverage Δ
...-plugin/public/pages/CreateTrigger/utils/helper.js 55.00% <0.00%> (-11.67%) ⬇️
...oard/components/FindingsDashboard/FindingFlyout.js 33.33% <0.00%> (-2.39%) ⬇️
...er/containers/ConfigureActions/ConfigureActions.js 6.72% <0.00%> (-0.69%) ⬇️
...fineBucketLevelTrigger/DefineBucketLevelTrigger.js 20.68% <0.00%> (-0.37%) ⬇️
...DocumentLevelTrigger/DefineDocumentLevelTrigger.js 13.23% <0.00%> (-0.20%) ⬇️
...eTrigger/containers/DefineTrigger/DefineTrigger.js 12.12% <0.00%> (-0.19%) ⬇️
...erting-dashboards-plugin/public/utils/constants.js 100.00% <0.00%> (ø)
...gin/public/pages/Dashboard/containers/Dashboard.js 56.02% <0.00%> (ø)
...ic/pages/CreateTrigger/components/Action/Action.js 48.00% <0.00%> (ø)
.../pages/MonitorDetails/containers/MonitorDetails.js 0.00% <0.00%> (ø)
... and 6 more

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

@amsiglan amsiglan marked this pull request as ready for review November 28, 2022 21:28
@amsiglan amsiglan requested a review from a team November 28, 2022 21:28
…mpty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
# Conflicts:
#	public/pages/CreateTrigger/containers/ConfigureTriggers/ConfigureTriggers.js
@AWSHurneyt AWSHurneyt merged commit e34fa02 into opensearch-project:main Dec 8, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 8, 2022
…mpty. (#334)

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Consolidated duplicate code.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit e34fa02)
@sikhote sikhote mentioned this pull request Dec 8, 2022
5 tasks
AWSHurneyt added a commit that referenced this pull request Dec 8, 2022
…mpty. (#334) (#411)

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Consolidated duplicate code.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit e34fa02)

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 21, 2022
…mpty. (#334)

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Consolidated duplicate code.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit e34fa02)
lezzago pushed a commit that referenced this pull request Dec 21, 2022
…mpty. (#334) (#428)

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Consolidated duplicate code.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit e34fa02)

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
lezzago added a commit that referenced this pull request Feb 13, 2023
* Bumped version from 2.3 to 2.4. (#346)

* Bumping version from 2.3 to 2.4.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Adjusted OSD version used by unit test workflow to last version that allowed the tests to pass.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Bumped d3-color version. (#350)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Support windows CI (#354)

* Support windows CI

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

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

* Add 2.4 release notes (#357)

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

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

* Fix confidence bug (#360)

This PR fixed a bug when showing confidence in trigger definition. Confidence is usually a non-decreasing function on an interval. But we incorrectly only show confidence when the corresponding anomaly grade is larger than 0.

Testing done:
1. manually tested that the bug is fixed. See attached snapshots.
2. yarn test:jest

Signed-off-by: Kaituo Li <kaituo@amazon.com>

* Bumped loader-utils version to address dependabot alert. (#361)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* updated link to dashboards developer guide (#349)

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Fixed a bug that prevented the throttling settings from displaying for PER_ALERT bucket level trigger actions. (#328)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Adjust OpenSearch-Dashboards version used by test workflows. (#363)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* avoid nesting search inside search (#382)

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Bumped loader-utils version to address dependabot alert. (#379)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* [BUG] Issues in the UI above 200 destinations paging issue #195 (#375)

* [BUG] Issues in the UI above 200 destinations #195

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [BUG] Issues in the UI above 200 destinations #195

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* [BUG] Issues in the UI above 200 destinations #195

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>

* sorted data by date (#385)

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Align all flyout components to be overlay kind and add close button X in header (#373)

* align all flyout components to overlay

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* simplify if statement

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* fix snapshot

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* add close button to flyout header, remove footer

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* simplify flex layout

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* update snapshot

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* add data-test-subject on flyout header title

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* fix cypress tests, overflow on flyout title

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* fix snapshot

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* eui-textTruncate on flyout titles

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>

* Bumped decode-uri-component version to address CVE-2022-38900. (#400)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed an issue that was causing the results of the ctx object to be empty.  (#334)

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Fixed an issue that was causing the results of the ctx object to be empty.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Consolidated duplicate code.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Keep monitor table cell width flexible; Check for whether monitor is enabled when displaying related action (#402)

* made table cells flexible; added monitor enabled check for actions

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* updated snapshot

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* minor updates

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* updated jest snapshots

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>

* Add release notes for 2.4.1 (#420)

Signed-off-by: Saurabh Singh <sisurab@amazon.com>

Signed-off-by: Saurabh Singh <sisurab@amazon.com>

* Bumped version to 2.5. (#437)

* Bumped version to 2.5.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Adjusted test workflows to not use 2.5 tag for OSD as it hasn't been created yet.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* 2.5.0 release notes. (#440)

* Drafted 2.5 release notes.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Drafted 2.5 release notes.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored the help text elements displayed when users access the destinations list page after destinations deprecation. (#413) (#438) (#443)

* Refactored the help text elements displayed when users access the destinations list page after destinations deprecation.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored the help text elements displayed when users access the destinations list page after destinations deprecation.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated snapshot.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated button text.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Updated snapshot files.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

* Refactored landing page logic.

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
(cherry picked from commit 58dee83)

Co-authored-by: AWSHurneyt <hurneyt@amazon.com>

Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>

* Fix CVE-2022-46175 (#453)

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>

* Updated MAINTAINERS.md to match recommended opensearch-project format. (#435)

Signed-off-by: dblock <dblock@amazon.com>

Signed-off-by: dblock <dblock@amazon.com>

* Refactored cypress and unit test workflows to use the 2.5.0 tag as the OSD repo reference. (#462)

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>

---------

Signed-off-by: AWSHurneyt <hurneyt@amazon.com>
Signed-off-by: Ashish Agrawal <ashisagr@amazon.com>
Signed-off-by: Kaituo Li <kaituo@amazon.com>
Signed-off-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Signed-off-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>
Signed-off-by: Aleksandar Djindjic <djindjic@gmail.com>
Signed-off-by: Saurabh Singh <sisurab@amazon.com>
Signed-off-by: bowenlan-amzn <bowenlan23@gmail.com>
Signed-off-by: dblock <dblock@amazon.com>
Co-authored-by: AWSHurneyt <hurneyt@amazon.com>
Co-authored-by: Kaituo Li <kaituo@amazon.com>
Co-authored-by: Amardeepsingh Siglani <amardeep7194@gmail.com>
Co-authored-by: Jovan Cvetkovic <jovanca.cvetkovic@gmail.com>
Co-authored-by: Aleksandar Djindjic <djindjic@gmail.com>
Co-authored-by: Saurabh Singh <sisurab@amazon.com>
Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
Co-authored-by: bowenlan-amzn <bowenlan23@gmail.com>
Co-authored-by: Daniel (dB.) Doubrovkine <dblock@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.

5 participants