mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Replace AppEvents with notifyApp in Explore (#31864)
* Replace AppEvents with notifyApp in Explore * Replace AppEvents with notifyApp in Explore-related components
This commit is contained in:
@@ -21,14 +21,16 @@ import { Editor, Node, Plugin } from 'slate';
|
||||
import syntax from '../syntax';
|
||||
|
||||
// Types
|
||||
import { AbsoluteTimeRange, AppEvents, ExploreQueryFieldProps, SelectableValue } from '@grafana/data';
|
||||
import { AbsoluteTimeRange, ExploreQueryFieldProps, SelectableValue } from '@grafana/data';
|
||||
import { CloudWatchJsonData, CloudWatchLogsQuery, CloudWatchQuery } from '../types';
|
||||
import { CloudWatchDatasource } from '../datasource';
|
||||
import { LanguageMap, languages as prismLanguages } from 'prismjs';
|
||||
import { CloudWatchLanguageProvider } from '../language_provider';
|
||||
import { css } from 'emotion';
|
||||
import { ExploreId } from 'app/types';
|
||||
import { appEvents } from 'app/core/core';
|
||||
import { dispatch } from 'app/store/store';
|
||||
import { notifyApp } from 'app/core/actions';
|
||||
import { createErrorNotification } from 'app/core/copy/appNotification';
|
||||
import { InputActionMeta } from '@grafana/ui/src/components/Select/types';
|
||||
import { getStatsGroups } from '../utils/query/getStatsGroups';
|
||||
|
||||
@@ -119,7 +121,7 @@ export class CloudWatchLogsQueryField extends React.PureComponent<CloudWatchLogs
|
||||
label: logGroup,
|
||||
}));
|
||||
} catch (err) {
|
||||
appEvents.emit(AppEvents.alertError, [err]);
|
||||
dispatch(notifyApp(createErrorNotification(err)));
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user