-
Notifications
You must be signed in to change notification settings - Fork 91
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: error toast message while configuring trigger while creating a monitor #1178
Conversation
…onitor Signed-off-by: vikhy-aws <[email protected]>
Signed-off-by: vikhy-aws <[email protected]>
package.json
Outdated
@@ -34,7 +34,7 @@ | |||
"@babel/plugin-transform-modules-commonjs": "^7.22.9", | |||
"@elastic/elastic-eslint-config-kibana": "link:../../packages/opensearch-eslint-config-opensearch-dashboards", | |||
"@elastic/eslint-import-resolver-kibana": "link:../../packages/osd-eslint-import-resolver-opensearch-dashboards", | |||
"cypress": "9.5.4", | |||
"cypress": "12.17.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we changing this? Have other plugins updated it as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the version of cypress in OpenSearch-Dashboards and the version of cypress in all the plugins should match for the frontend to run. So, set them to the same value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMK if this needs to be updated or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted back
public/pages/CreateTrigger/containers/ConfigureActions/ConfigureActions.js
Outdated
Show resolved
Hide resolved
Signed-off-by: vikhy-aws <[email protected]>
Signed-off-by: vikhy-aws <[email protected]>
@@ -182,8 +182,9 @@ class ConfigureActions extends React.Component { | |||
type: toChannelType(destination.type), | |||
description: '', | |||
})); | |||
} else { | |||
backendErrorNotification(notifications, 'load', 'destinations', response.err); | |||
} else if (response.totalMonitors !== 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am hazy on my JS but are you intending to check response.totalMonitor > 0
if yes, why are we checking for >0 and then code comment says config index not created?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the config index will be created automatically when the monitor is created. So, when the totalMonitors
is 0 it is expected that the config index has not been created, and we don't want to show that error popup to the user.
…onitor (#1178) * fix: error toast message while configuring trigger while creating a monitor Signed-off-by: vikhy-aws <[email protected]> * fix: gracefully handle exceptions related to config index not created Signed-off-by: vikhy-aws <[email protected]> * fix: gracefully handle exceptions related to config index not created Signed-off-by: vikhy-aws <[email protected]> * fix: fix unit test to conform to code changes Signed-off-by: vikhy-aws <[email protected]> --------- Signed-off-by: vikhy-aws <[email protected]> (cherry picked from commit ad86031) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…onitor (#1178) (#1179) * fix: error toast message while configuring trigger while creating a monitor * fix: gracefully handle exceptions related to config index not created * fix: gracefully handle exceptions related to config index not created * fix: fix unit test to conform to code changes --------- (cherry picked from commit ad86031) Signed-off-by: vikhy-aws <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
This PR fixes the issue of an unnecessary error popup appearing while creation of a monitor. The error popup is raised because the config index is not been before a monitor is created, but is created automatically when the monitor is created. So, the error popup is redundant when creating a monitor.
Check List
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.