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

[ML] Enhances toast notifications to improve error reporting #173362

Merged
merged 6 commits into from Dec 20, 2023

Conversation

peteharverson
Copy link
Contributor

@peteharverson peteharverson commented Dec 14, 2023

Summary

Several enhancements to the error toast notifications in the ML plugin to improve error reporting.

The bulk of the changes are to add 'See the full error' buttons to the toasts allowing the user to see further details on the error that has occurred. Also makes minor edits to some of the error messages to improve clarity.

Also closes #171839 by changes to x-pack/plugins/ml/public/application/jobs/jobs_list/components/utils.js so that the the 'Jobs started successfully' toast is only shown if 1 or more jobs have been started successfully.

Fixes #171839

Checklist

@peteharverson peteharverson self-assigned this Dec 14, 2023
@peteharverson peteharverson requested a review from a team as a code owner December 14, 2023 11:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

const { toasts } = notifications;
toasts.addDanger(
const toastNotificationService = toastNotificationServiceProvider(toasts);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const toastNotificationService = toastNotificationServiceProvider(toasts);
const toastNotificationService = useToastNotificationService();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 39a1915

@@ -30,6 +30,7 @@ import { parseUrlState } from '@kbn/ml-url-state';

import { useMlKibana } from '../../../contexts/kibana';
import { isValidLabel, openCustomUrlWindow } from '../../../util/custom_url_utils';
import { toastNotificationServiceProvider } from '../../../services/toast_notification_service';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import { toastNotificationServiceProvider } from '../../../services/toast_notification_service';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 39a1915

@darnautov
Copy link
Contributor

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
aiops 387.3KB 387.4KB +106.0B
dataVisualizer 617.3KB 617.4KB +106.0B
ml 3.6MB 3.6MB +568.0B
transform 404.3KB 404.4KB +106.0B
total +886.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
ml 561 553 -8

Total ESLint disabled count

id before after diff
ml 564 556 -8

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @peteharverson

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

LGTM!

@peteharverson peteharverson merged commit 2c51f63 into elastic:main Dec 20, 2023
35 checks passed
@peteharverson peteharverson deleted the ml-toasts-enhancements branch December 20, 2023 14:00
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.

[ML] Hide toast message if zero jobs start
5 participants