|
4 | 4 | */
|
5 | 5 | /* eslint-disable react-hooks/exhaustive-deps */
|
6 | 6 |
|
7 |
| -import React, { ReactChild, useEffect, useState } from 'react'; |
8 |
| -import { HashRouter, Route, RouteComponentProps, Switch } from 'react-router-dom'; |
9 |
| -import DSLService from 'public/services/requests/dsl'; |
10 |
| -import PPLService from 'public/services/requests/ppl'; |
11 |
| -import SavedObjects from 'public/services/saved_objects/event_analytics/saved_objects'; |
12 |
| -import TimestampUtils from 'public/services/timestamp/timestamp'; |
13 | 7 | import { EuiGlobalToastList, EuiLink } from '@elastic/eui';
|
14 | 8 | import { Toast } from '@elastic/eui/src/components/toast/global_toast_list';
|
15 |
| -import isEmpty from 'lodash/isEmpty'; |
| 9 | +import { isEmpty } from 'lodash'; |
| 10 | +import React, { ReactChild, useEffect, useState } from 'react'; |
16 | 11 | import { useDispatch } from 'react-redux';
|
17 |
| -import { AppTable } from './components/app_table'; |
18 |
| -import { Application } from './components/application'; |
19 |
| -import { CreateApp } from './components/create'; |
20 |
| -import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_analytics/home'; |
21 |
| -import { FilterType } from '../trace_analytics/components/common/filters/filters'; |
22 |
| -import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/requests/request_handler'; |
| 12 | +import { HashRouter, Route, RouteComponentProps, Switch } from 'react-router-dom'; |
23 | 13 | import { ChromeBreadcrumb, NotificationsStart } from '../../../../../src/core/public';
|
24 | 14 | import { APP_ANALYTICS_API_PREFIX } from '../../../common/constants/application_analytics';
|
| 15 | +import { |
| 16 | + CUSTOM_PANELS_API_PREFIX, |
| 17 | + CUSTOM_PANELS_DOCUMENTATION_URL, |
| 18 | +} from '../../../common/constants/custom_panels'; |
| 19 | +import { observabilityApplicationsID } from '../../../common/constants/shared'; |
| 20 | +import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; |
25 | 21 | import {
|
26 | 22 | ApplicationRequestType,
|
27 | 23 | ApplicationType,
|
28 | 24 | } from '../../../common/types/application_analytics';
|
| 25 | +import DSLService from '../../services/requests/dsl'; |
| 26 | +import PPLService from '../../services/requests/ppl'; |
| 27 | +import SavedObjects from '../../services/saved_objects/event_analytics/saved_objects'; |
| 28 | +import TimestampUtils from '../../services/timestamp/timestamp'; |
| 29 | +import { FilterType } from '../trace_analytics/components/common/filters/filters'; |
| 30 | +import { TraceAnalyticsComponentDeps, TraceAnalyticsCoreDeps } from '../trace_analytics/home'; |
| 31 | +import { handleDataPrepperIndicesExistRequest } from '../trace_analytics/requests/request_handler'; |
| 32 | +import { AppTable } from './components/app_table'; |
| 33 | +import { Application } from './components/application'; |
| 34 | +import { CreateApp } from './components/create'; |
29 | 35 | import {
|
30 | 36 | calculateAvailability,
|
31 | 37 | fetchPanelsVizIdList,
|
32 | 38 | isNameValid,
|
33 | 39 | removeTabData,
|
34 | 40 | } from './helpers/utils';
|
35 |
| -import { |
36 |
| - CUSTOM_PANELS_API_PREFIX, |
37 |
| - CUSTOM_PANELS_DOCUMENTATION_URL, |
38 |
| -} from '../../../common/constants/custom_panels'; |
39 |
| -import { QueryManager } from '../../../common/query_manager/ppl_query_manager'; |
40 |
| -import { observabilityApplicationsID } from '../../../common/constants/shared'; |
41 | 41 |
|
42 | 42 | export type AppAnalyticsCoreDeps = TraceAnalyticsCoreDeps;
|
43 | 43 |
|
@@ -142,6 +142,7 @@ export const Home = (props: HomeProps) => {
|
142 | 142 | mode: 'data_prepper',
|
143 | 143 | dataPrepperIndicesExist: indicesExist,
|
144 | 144 | dataSourcePluggables,
|
| 145 | + attributesFilterFields: [], |
145 | 146 | };
|
146 | 147 |
|
147 | 148 | const setToast = (title: string, color = 'success', text?: ReactChild) => {
|
@@ -202,7 +203,7 @@ export const Home = (props: HomeProps) => {
|
202 | 203 | if (!isEmpty(savedVizIdsToDelete)) {
|
203 | 204 | savedObjects
|
204 | 205 | .deleteSavedObjectsList({ objectIdList: savedVizIdsToDelete })
|
205 |
| - .then((res) => { |
| 206 | + .then((_res) => { |
206 | 207 | deletePanelForApp(appPanelId);
|
207 | 208 | })
|
208 | 209 | .catch((err) => {
|
@@ -300,7 +301,7 @@ export const Home = (props: HomeProps) => {
|
300 | 301 | .put(`${APP_ANALYTICS_API_PREFIX}/rename`, {
|
301 | 302 | body: JSON.stringify(requestBody),
|
302 | 303 | })
|
303 |
| - .then((res) => { |
| 304 | + .then((_res) => { |
304 | 305 | setApplicationList((prevApplicationList) => {
|
305 | 306 | const newApplicationData = [...prevApplicationList];
|
306 | 307 | const renamedApplication = newApplicationData.find(
|
|
0 commit comments