Skip to content

Commit

Permalink
Use addDanger on notifications service directly to workaround useKiba…
Browse files Browse the repository at this point in the history
…na helper wrapper bug
  • Loading branch information
Kerry350 committed Mar 30, 2020
1 parent ed846a1 commit 4825d85
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class GrokDebuggerComponent extends React.Component {
};

simulateGrok = async () => {
const notifications = this.props.kibana.notifications;
const notifications = this.props.kibana.services.notifications;
try {
const simulateResponse = await this.props.grokdebuggerService.simulate(
this.grokdebuggerRequest
Expand All @@ -83,15 +83,13 @@ export class GrokDebuggerComponent extends React.Component {
});

if (!isEmpty(simulateResponse.error)) {
notifications.toasts.danger({
notifications.toasts.addDanger({
body: simulateResponse.error,
toastLifeTimeMs: 4 * 1000,
});
}
} catch (e) {
notifications.toasts.danger({
notifications.toasts.addDanger({
body: e,
toastLifeTimeMs: 4 * 1000,
});
}
};
Expand Down

0 comments on commit 4825d85

Please sign in to comment.