diff --git a/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/flyout_body.tsx b/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/flyout_body.tsx
index 3f493ef7d4355..f7de84a9c1ad0 100644
--- a/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/flyout_body.tsx
+++ b/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/flyout_body.tsx
@@ -9,7 +9,6 @@ import { EuiButtonEmpty, EuiSpacer } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { LayerWizardSelect } from './layer_wizard_select';
import { LayerWizard, RenderWizardArguments } from '../../../classes/layers/layer_wizard_registry';
-/* eslint-disable @typescript-eslint/consistent-type-definitions */
type Props = RenderWizardArguments & {
layerWizard: LayerWizard | null;
diff --git a/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/layer_wizard_select.test.tsx b/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/layer_wizard_select.test.tsx
index e802c5259e5ed..d64e38cf49dea 100644
--- a/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/layer_wizard_select.test.tsx
+++ b/x-pack/plugins/maps/public/connected_components/add_layer_panel/flyout_body/layer_wizard_select.test.tsx
@@ -17,6 +17,7 @@ const defaultProps = {
describe('LayerWizardSelect', () => {
beforeAll(() => {
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
require('../../../classes/layers/layer_wizard_registry').getLayerWizards = async () => {
return [
{
diff --git a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap
index 388712e1ebcca..8a5b7cf9186a8 100644
--- a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap
+++ b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/__snapshots__/toc_entry_actions_popover.test.tsx.snap
@@ -82,7 +82,7 @@ exports[`TOCEntryActionsPopover is rendered 1`] = `
"data-test-subj": "layerVisibilityToggleButton",
"icon":
,
"name": "Hide layer",
"onClick": [Function],
@@ -210,7 +210,7 @@ exports[`TOCEntryActionsPopover should disable fit to data when supportsFitToBou
"data-test-subj": "layerVisibilityToggleButton",
"icon":
,
"name": "Hide layer",
"onClick": [Function],
@@ -256,7 +256,7 @@ exports[`TOCEntryActionsPopover should disable fit to data when supportsFitToBou
`;
-exports[`TOCEntryActionsPopover should not show edit actions in read only mode 1`] = `
+exports[`TOCEntryActionsPopover should have "show layer" action when layer is not visible 1`] = `
,
+ "name": "Show layer",
+ "onClick": [Function],
+ "toolTipContent": null,
+ },
+ Object {
+ "data-test-subj": "editLayerButton",
+ "disabled": false,
+ "icon":
,
+ "name": "Edit layer",
+ "onClick": [Function],
+ "toolTipContent": null,
+ },
+ Object {
+ "data-test-subj": "cloneLayerButton",
+ "icon":
,
+ "name": "Clone layer",
+ "onClick": [Function],
+ "toolTipContent": null,
+ },
+ Object {
+ "data-test-subj": "removeLayerButton",
+ "icon":
,
+ "name": "Remove layer",
+ "onClick": [Function],
+ "toolTipContent": null,
+ },
+ ],
+ "title": "Layer actions",
+ },
+ ]
+ }
+ />
+
+`;
+
+exports[`TOCEntryActionsPopover should not show edit actions in read only mode 1`] = `
+
+ simulated tooltip content at zoom: 0
+
+
+ mockFootnoteIcon
+
+
+ simulated footnote at isUsingSearch: true
+
+
+ }
+ delay="regular"
+ position="top"
+ title="layer 1"
+ >
+
+
+
+ mockIcon
+
+
+ layer 1
+
+
+
+
+ mockFootnoteIcon
+
+
+
+
+ }
+ className="mapLayTocActions"
+ closePopover={[Function]}
+ display="inlineBlock"
+ hasArrow={true}
+ id="contextMenu"
+ isOpen={false}
+ ownFocus={false}
+ panelPaddingSize="none"
+ withTitle={true}
+>
+ ,
+ "name": "Fit to data",
+ "onClick": [Function],
+ "toolTipContent": null,
+ },
+ Object {
+ "data-test-subj": "layerVisibilityToggleButton",
+ "icon": ,
"name": "Hide layer",
"onClick": [Function],
"toolTipContent": null,
diff --git a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.test.tsx b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.test.tsx
index c7ed5ec74ac7a..95f13574105b7 100644
--- a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.test.tsx
+++ b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.test.tsx
@@ -6,7 +6,7 @@
/* eslint-disable max-classes-per-file */
import React from 'react';
-import { shallowWithIntl } from 'test_utils/enzyme_helpers';
+import { shallow } from 'enzyme';
import { AbstractLayer, ILayer } from '../../../../../../classes/layers/layer';
import { AbstractSource, ISource } from '../../../../../../classes/sources/source';
import { AbstractStyle, IStyle } from '../../../../../../classes/styles/style';
@@ -76,7 +76,7 @@ describe('TOCEntryActionsPopover', () => {
});
test('is rendered', async () => {
- const component = shallowWithIntl();
+ const component = shallow();
// Ensure all promises resolve
await new Promise((resolve) => process.nextTick(resolve));
@@ -87,9 +87,7 @@ describe('TOCEntryActionsPopover', () => {
});
test('should not show edit actions in read only mode', async () => {
- const component = shallowWithIntl(
-
- );
+ const component = shallow();
// Ensure all promises resolve
await new Promise((resolve) => process.nextTick(resolve));
@@ -101,7 +99,22 @@ describe('TOCEntryActionsPopover', () => {
test('should disable fit to data when supportsFitToBounds is false', async () => {
supportsFitToBounds = false;
- const component = shallowWithIntl();
+ const component = shallow();
+
+ // Ensure all promises resolve
+ await new Promise((resolve) => process.nextTick(resolve));
+ // Ensure the state changes are reflected
+ component.update();
+
+ expect(component).toMatchSnapshot();
+ });
+
+ test('should have "show layer" action when layer is not visible', async () => {
+ const layer = new LayerMock();
+ layer.isVisible = () => {
+ return false;
+ };
+ const component = shallow();
// Ensure all promises resolve
await new Promise((resolve) => process.nextTick(resolve));
diff --git a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx
index 5baac0a474ffa..a1b9026fc57da 100644
--- a/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx
+++ b/x-pack/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/toc_entry_actions_popover/toc_entry_actions_popover.tsx
@@ -158,7 +158,7 @@ export class TOCEntryActionsPopover extends Component {
: i18n.translate('xpack.maps.layerTocActions.showLayerTitle', {
defaultMessage: 'Show layer',
}),
- icon: ,
+ icon: ,
'data-test-subj': 'layerVisibilityToggleButton',
toolTipContent: null,
onClick: () => {
diff --git a/x-pack/plugins/maps/public/index_pattern_util.test.ts b/x-pack/plugins/maps/public/index_pattern_util.test.ts
index 27b0a4aac9bf7..ffcc6da52677a 100644
--- a/x-pack/plugins/maps/public/index_pattern_util.test.ts
+++ b/x-pack/plugins/maps/public/index_pattern_util.test.ts
@@ -68,6 +68,7 @@ describe('Gold+ licensing', () => {
describe('basic license', () => {
beforeEach(() => {
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
require('./kibana_services').getIsGoldPlus = () => false;
});
@@ -90,6 +91,7 @@ describe('Gold+ licensing', () => {
describe('gold license', () => {
beforeEach(() => {
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
require('./kibana_services').getIsGoldPlus = () => true;
});
describe('getAggregatableGeoFieldTypes', () => {
diff --git a/x-pack/plugins/maps/public/routing/maps_router.js b/x-pack/plugins/maps/public/routing/maps_router.js
index 30b2137399c1e..9992bd7a92ab1 100644
--- a/x-pack/plugins/maps/public/routing/maps_router.js
+++ b/x-pack/plugins/maps/public/routing/maps_router.js
@@ -7,8 +7,11 @@
import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { Router, Switch, Route, Redirect } from 'react-router-dom';
-import { getCoreI18n } from '../kibana_services';
-import { createKbnUrlStateStorage } from '../../../../../src/plugins/kibana_utils/public';
+import { getCoreI18n, getToasts } from '../kibana_services';
+import {
+ createKbnUrlStateStorage,
+ withNotifyOnErrors,
+} from '../../../../../src/plugins/kibana_utils/public';
import { getStore } from './store_operations';
import { Provider } from 'react-redux';
import { LoadListAndRender } from './routes/list/load_list_and_render';
@@ -19,7 +22,11 @@ export let kbnUrlStateStorage;
export async function renderApp(context, { appBasePath, element, history, onAppLeave }) {
goToSpecifiedPath = (path) => history.push(path);
- kbnUrlStateStorage = createKbnUrlStateStorage({ useHash: false, history });
+ kbnUrlStateStorage = createKbnUrlStateStorage({
+ useHash: false,
+ history,
+ ...withNotifyOnErrors(getToasts()),
+ });
render(, element);
diff --git a/x-pack/plugins/maps_legacy_licensing/public/plugin.ts b/x-pack/plugins/maps_legacy_licensing/public/plugin.ts
index 69c25efd96e75..eaf527f856bc5 100644
--- a/x-pack/plugins/maps_legacy_licensing/public/plugin.ts
+++ b/x-pack/plugins/maps_legacy_licensing/public/plugin.ts
@@ -13,7 +13,6 @@ import { LicensingPluginSetup, ILicense } from '../../licensing/public';
* @public
*/
-// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface MapsLegacyLicensingSetupDependencies {
licensing: LicensingPluginSetup;
mapsLegacy: any;
diff --git a/x-pack/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx b/x-pack/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx
index a354612a348dc..07e33a43d3ff9 100644
--- a/x-pack/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx
+++ b/x-pack/plugins/ml/public/application/components/chart_tooltip/chart_tooltip.tsx
@@ -69,7 +69,7 @@ const Tooltip: FC<{ service: ChartTooltipService }> = React.memo(({ service }) =
.slice(1)
.map(({ label, value, color, isHighlighted, seriesIdentifier, valueAccessor }) => {
const classes = classNames('mlChartTooltip__item', {
- /* eslint @typescript-eslint/camelcase:0 */
+ // eslint-disable-next-line @typescript-eslint/naming-convention
echTooltip__rowHighlighted: isHighlighted,
});
return (
diff --git a/x-pack/plugins/ml/public/application/components/data_grid/column_chart.tsx b/x-pack/plugins/ml/public/application/components/data_grid/column_chart.tsx
index 00e2d5b14a96b..a3a67fbb8bb75 100644
--- a/x-pack/plugins/ml/public/application/components/data_grid/column_chart.tsx
+++ b/x-pack/plugins/ml/public/application/components/data_grid/column_chart.tsx
@@ -61,6 +61,7 @@ export const ColumnChart: FC = ({ chartData, columnType, dataTestSubj })
)}
{
setVisibleColumns(defaultVisibleColumns);
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [defaultVisibleColumns.join()]);
const [invalidSortingColumnns, setInvalidSortingColumnns] = useState
([]);
diff --git a/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts b/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts
index 3bc3b8c2c6dfd..e3da9b509e620 100644
--- a/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts
+++ b/x-pack/plugins/ml/public/application/contexts/kibana/kibana_context.ts
@@ -23,6 +23,5 @@ interface StartPlugins {
}
export type StartServices = CoreStart &
StartPlugins & { kibanaVersion: string } & MlServicesContext;
-// eslint-disable-next-line react-hooks/rules-of-hooks
export const useMlKibana = () => useKibana();
export type MlKibanaReactContextValue = KibanaReactContextValue;
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/_index.scss b/x-pack/plugins/ml/public/application/data_frame_analytics/_index.scss
index 140593cb17f6e..231d0f6a0d8c5 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/_index.scss
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/_index.scss
@@ -1,3 +1,4 @@
@import 'pages/analytics_exploration/components/regression_exploration/index';
@import 'pages/analytics_management/components/analytics_list/index';
@import 'pages/analytics_management/components/create_analytics_button/index';
+@import 'pages/analytics_creation/components/index';
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/common/fields.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/common/fields.ts
index 1b28875a624f8..1b99aac812fcd 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/common/fields.ts
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/common/fields.ts
@@ -47,6 +47,7 @@ export const EXTENDED_NUMERICAL_TYPES = new Set([
ES_FIELD_TYPES.SCALED_FLOAT,
]);
+// eslint-disable-next-line @typescript-eslint/naming-convention
export const ML__ID_COPY = 'ml__id_copy';
export const isKeywordAndTextType = (fieldName: string): boolean => {
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/_index.scss b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/_index.scss
new file mode 100644
index 0000000000000..28d0928eb4d35
--- /dev/null
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/_index.scss
@@ -0,0 +1,3 @@
+.dfAnalyticsCreationWizard__card {
+ width: 300px;
+}
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx
index 183cbe084f9b3..babb557105270 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/back_to_list_panel/back_to_list_panel.tsx
@@ -5,7 +5,7 @@
*/
import React, { FC, Fragment } from 'react';
-import { EuiCard, EuiHorizontalRule, EuiIcon } from '@elastic/eui';
+import { EuiCard, EuiIcon } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { useNavigateToPath } from '../../../../../contexts/kibana';
@@ -18,10 +18,8 @@ export const BackToListPanel: FC = () => {
return (
-
}
title={i18n.translate('xpack.ml.dataframe.analytics.create.analyticsListCardTitle', {
defaultMessage: 'Data Frame Analytics',
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx
index a229a79d316d7..a52cbb99d7f48 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/configuration_step/analysis_fields_table.tsx
@@ -54,7 +54,7 @@ const columns = [
id: 'is_included',
alignment: LEFT_ALIGNMENT,
isSortable: true,
- // eslint-disable-next-line @typescript-eslint/camelcase
+ // eslint-disable-next-line @typescript-eslint/naming-convention
render: ({ is_included }: { is_included: boolean }) => (is_included ? 'Yes' : 'No'),
},
{
@@ -64,7 +64,7 @@ const columns = [
id: 'is_required',
alignment: LEFT_ALIGNMENT,
isSortable: true,
- // eslint-disable-next-line @typescript-eslint/camelcase
+ // eslint-disable-next-line @typescript-eslint/naming-convention
render: ({ is_required }: { is_required: boolean }) => (is_required ? 'Yes' : 'No'),
},
{
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx
index 8ad49b84134cb..dc9f1bd586d9f 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/create_step.tsx
@@ -18,8 +18,7 @@ import { i18n } from '@kbn/i18n';
import { CreateAnalyticsFormProps } from '../../../analytics_management/hooks/use_create_analytics_form';
import { Messages } from '../shared';
import { ANALYTICS_STEPS } from '../../page';
-import { BackToListPanel } from '../back_to_list_panel';
-import { ProgressStats } from './progress_stats';
+import { CreateStepFooter } from '../create_step_footer';
interface Props extends CreateAnalyticsFormProps {
step: ANALYTICS_STEPS;
@@ -28,7 +27,7 @@ interface Props extends CreateAnalyticsFormProps {
export const CreateStep: FC = ({ actions, state, step }) => {
const { createAnalyticsJob, startAnalyticsJob } = actions;
const { isAdvancedEditorValidJson, isJobCreated, isJobStarted, isValid, requestMessages } = state;
- const { jobId } = state.form;
+ const { jobId, jobType } = state.form;
const [checked, setChecked] = useState(true);
const [showProgress, setShowProgress] = useState(false);
@@ -86,8 +85,9 @@ export const CreateStep: FC = ({ actions, state, step }) => {
)}
- {isJobCreated === true && showProgress && }
- {isJobCreated === true && }
+ {isJobCreated === true && (
+
+ )}
);
};
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/progress_stats.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/create_step_footer.tsx
similarity index 55%
rename from x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/progress_stats.tsx
rename to x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/create_step_footer.tsx
index c87f0f4206feb..93d88ebc0b5ac 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step/progress_stats.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/create_step_footer.tsx
@@ -4,38 +4,43 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import React, { FC, useState, useEffect } from 'react';
-import {
- EuiCallOut,
- EuiFlexGroup,
- EuiFlexItem,
- EuiProgress,
- EuiSpacer,
- EuiText,
-} from '@elastic/eui';
+import React, { FC, useEffect, useState } from 'react';
+import { EuiFlexGroup, EuiFlexItem, EuiHorizontalRule } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
-import { useMlKibana } from '../../../../../contexts/kibana';
+
import {
getDataFrameAnalyticsProgressPhase,
DATA_FRAME_TASK_STATE,
} from '../../../analytics_management/components/analytics_list/common';
import { isGetDataFrameAnalyticsStatsResponseOk } from '../../../analytics_management/services/analytics_service/get_analytics';
+import { useMlKibana } from '../../../../../contexts/kibana';
import { ml } from '../../../../../services/ml_api_service';
-import { DataFrameAnalyticsId } from '../../../../common/analytics';
+import { BackToListPanel } from '../back_to_list_panel';
+import { ViewResultsPanel } from '../view_results_panel';
+import { ProgressStats } from './progress_stats';
+import { ANALYSIS_CONFIG_TYPE } from '../../../../common/analytics';
export const PROGRESS_REFRESH_INTERVAL_MS = 1000;
-export const ProgressStats: FC<{ jobId: DataFrameAnalyticsId }> = ({ jobId }) => {
+interface Props {
+ jobId: string;
+ jobType: ANALYSIS_CONFIG_TYPE;
+ showProgress: boolean;
+}
+
+export interface AnalyticsProgressStats {
+ currentPhase: number;
+ progress: number;
+ totalPhases: number;
+}
+
+export const CreateStepFooter: FC = ({ jobId, jobType, showProgress }) => {
const [initialized, setInitialized] = useState(false);
const [failedJobMessage, setFailedJobMessage] = useState(undefined);
- const [currentProgress, setCurrentProgress] = useState<
- | {
- currentPhase: number;
- progress: number;
- totalPhases: number;
- }
- | undefined
- >(undefined);
+ const [jobFinished, setJobFinished] = useState(false);
+ const [currentProgress, setCurrentProgress] = useState(
+ undefined
+ );
const {
services: { notifications },
@@ -77,6 +82,7 @@ export const ProgressStats: FC<{ jobId: DataFrameAnalyticsId }> = ({ jobId }) =>
jobStats.state === DATA_FRAME_TASK_STATE.STOPPED
) {
clearInterval(interval);
+ setJobFinished(true);
}
} else {
clearInterval(interval);
@@ -95,62 +101,26 @@ export const ProgressStats: FC<{ jobId: DataFrameAnalyticsId }> = ({ jobId }) =>
return () => clearInterval(interval);
}, [initialized]);
- if (currentProgress === undefined) return null;
-
return (
- <>
-
- {failedJobMessage !== undefined && (
- <>
-
- {failedJobMessage}
-
-
- >
- )}
-
-
- {i18n.translate('xpack.ml.dataframe.analytics.create.analyticsProgressTitle', {
- defaultMessage: 'Progress',
- })}
-
-
-
-
-
-
-
- {i18n.translate('xpack.ml.dataframe.analytics.create.analyticsProgressPhaseTitle', {
- defaultMessage: 'Phase',
- })}{' '}
- {currentProgress.currentPhase}/{currentProgress.totalPhases}
-
-
-
-
-
-
-
- {`${currentProgress.progress}%`}
-
-
- >
+
+
+ {showProgress && (
+
+ )}
+
+
+
+
+
+
+
+ {jobFinished === true && (
+
+
+
+ )}
+
+
+
);
};
diff --git a/x-pack/plugins/canvas/public/apps/export/export/load_workpad.js b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/index.ts
similarity index 72%
rename from x-pack/plugins/canvas/public/apps/export/export/load_workpad.js
rename to x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/index.ts
index 388bf00723f82..fc4e230ba1034 100644
--- a/x-pack/plugins/canvas/public/apps/export/export/load_workpad.js
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/index.ts
@@ -4,6 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import React from 'react';
-
-export const LoadWorkpad = () => Load a workpad...
;
+export { CreateStepFooter } from './create_step_footer';
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/progress_stats.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/progress_stats.tsx
new file mode 100644
index 0000000000000..522bafa54a270
--- /dev/null
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/create_step_footer/progress_stats.tsx
@@ -0,0 +1,83 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+
+import React, { FC } from 'react';
+import {
+ EuiCallOut,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiProgress,
+ EuiSpacer,
+ EuiText,
+} from '@elastic/eui';
+import { i18n } from '@kbn/i18n';
+import { AnalyticsProgressStats } from './create_step_footer';
+
+interface Props {
+ currentProgress?: AnalyticsProgressStats;
+ failedJobMessage: string | undefined;
+}
+
+export const ProgressStats: FC = ({ currentProgress, failedJobMessage }) => {
+ if (currentProgress === undefined) return null;
+
+ return (
+ <>
+
+ {failedJobMessage !== undefined && (
+ <>
+
+ {failedJobMessage}
+
+
+ >
+ )}
+
+
+ {i18n.translate('xpack.ml.dataframe.analytics.create.analyticsProgressTitle', {
+ defaultMessage: 'Progress',
+ })}
+
+
+
+
+
+
+
+ {i18n.translate('xpack.ml.dataframe.analytics.create.analyticsProgressPhaseTitle', {
+ defaultMessage: 'Phase',
+ })}{' '}
+ {currentProgress.currentPhase}/{currentProgress.totalPhases}
+
+
+
+
+
+
+
+ {`${currentProgress.progress}%`}
+
+
+ >
+ );
+};
diff --git a/x-pack/plugins/canvas/public/apps/workpad/workpad_app/load_workpad.js b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/index.ts
similarity index 72%
rename from x-pack/plugins/canvas/public/apps/workpad/workpad_app/load_workpad.js
rename to x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/index.ts
index 388bf00723f82..ef3c0cce38652 100644
--- a/x-pack/plugins/canvas/public/apps/workpad/workpad_app/load_workpad.js
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/index.ts
@@ -4,6 +4,4 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import React from 'react';
-
-export const LoadWorkpad = () => Load a workpad...
;
+export { ViewResultsPanel } from './view_results_panel';
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx
new file mode 100644
index 0000000000000..13706eb548ec8
--- /dev/null
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/components/view_results_panel/view_results_panel.tsx
@@ -0,0 +1,46 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License;
+ * you may not use this file except in compliance with the Elastic License.
+ */
+
+import React, { FC, Fragment } from 'react';
+import { EuiCard, EuiIcon } from '@elastic/eui';
+import { i18n } from '@kbn/i18n';
+import { useNavigateToPath } from '../../../../../contexts/kibana';
+import { getResultsUrl } from '../../../analytics_management/components/analytics_list/common';
+import { ANALYSIS_CONFIG_TYPE } from '../../../../common/analytics';
+
+interface Props {
+ jobId: string;
+ analysisType: ANALYSIS_CONFIG_TYPE;
+}
+
+export const ViewResultsPanel: FC = ({ jobId, analysisType }) => {
+ const navigateToPath = useNavigateToPath();
+
+ const redirectToAnalyticsManagementPage = async () => {
+ const path = getResultsUrl(jobId, analysisType);
+ await navigateToPath(path);
+ };
+
+ return (
+
+ }
+ title={i18n.translate('xpack.ml.dataframe.analytics.create.viewResultsCardTitle', {
+ defaultMessage: 'View Results',
+ })}
+ description={i18n.translate(
+ 'xpack.ml.dataframe.analytics.create.viewResultsCardDescription',
+ {
+ defaultMessage: 'View results for the analytics job.',
+ }
+ )}
+ onClick={redirectToAnalyticsManagementPage}
+ data-test-subj="analyticsWizardViewResultsCard"
+ />
+
+ );
+};
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts
index 2cecffc993257..eab5165a42137 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_creation/hooks/use_index_data.ts
@@ -63,7 +63,6 @@ export const useIndexData = (
useEffect(() => {
resetPagination();
// custom comparison
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [JSON.stringify(query)]);
const getIndexData = async function () {
@@ -103,7 +102,6 @@ export const useIndexData = (
useEffect(() => {
getIndexData();
// custom comparison
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [indexPattern.title, JSON.stringify([query, pagination, sortingColumns])]);
const dataLoader = useMemo(() => new DataLoader(indexPattern, toastNotifications), [
@@ -132,7 +130,6 @@ export const useIndexData = (
fetchColumnChartsData();
}
// custom comparison
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
dataGrid.chartsVisible,
indexPattern.title,
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts
index 98dd40986e32b..8d53214d23d47 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/exploration_results_table/use_exploration_results.ts
@@ -70,7 +70,6 @@ export const useExplorationResults = (
useEffect(() => {
getIndexData(jobConfig, dataGrid, searchQuery);
// custom comparison
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [jobConfig && jobConfig.id, dataGrid.pagination, searchQuery, dataGrid.sortingColumns]);
const dataLoader = useMemo(
@@ -103,7 +102,6 @@ export const useExplorationResults = (
fetchColumnChartsData();
}
// custom comparison
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
dataGrid.chartsVisible,
jobConfig?.dest.index,
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx
index 4c4731d0dad5f..2b1c40f0eb734 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/outlier_exploration.tsx
@@ -56,7 +56,6 @@ export const OutlierExploration: FC = React.memo(({ jobId }) =
const { columnsWithCharts, errorMessage, status, tableItems } = outlierData;
- /* eslint-disable-next-line react-hooks/rules-of-hooks */
const colorRange = useColorRange(
COLOR_RANGE.BLUE,
COLOR_RANGE_SCALE.INFLUENCER,
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts
index 90294a09c0adc..24649ae5f1e71 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/outlier_exploration/use_outlier_data.ts
@@ -77,7 +77,6 @@ export const useOutlierData = (
useEffect(() => {
getIndexData(jobConfig, dataGrid, searchQuery);
// custom comparison
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [jobConfig && jobConfig.id, dataGrid.pagination, searchQuery, dataGrid.sortingColumns]);
const dataLoader = useMemo(
@@ -112,7 +111,6 @@ export const useOutlierData = (
fetchColumnChartsData();
}
// custom comparison
- // eslint-disable-next-line react-hooks/exhaustive-deps
}, [
dataGrid.chartsVisible,
jobConfig?.dest.index,
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/regression_exploration/evaluate_panel.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/regression_exploration/evaluate_panel.tsx
index 75c41c097192e..895d217555ef4 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/regression_exploration/evaluate_panel.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_exploration/components/regression_exploration/evaluate_panel.tsx
@@ -94,6 +94,7 @@ export const EvaluatePanel: FC = ({ jobConfig, jobStatus, searchQuery })
genErrorEval.eval &&
isRegressionEvaluateResponse(genErrorEval.eval)
) {
+ // eslint-disable-next-line @typescript-eslint/naming-convention
const { mse, msle, huber, r_squared } = getValuesFromResponse(genErrorEval.eval);
setGeneralizationEval({
mse,
@@ -131,6 +132,7 @@ export const EvaluatePanel: FC = ({ jobConfig, jobStatus, searchQuery })
trainingErrorEval.eval &&
isRegressionEvaluateResponse(trainingErrorEval.eval)
) {
+ // eslint-disable-next-line @typescript-eslint/naming-convention
const { mse, msle, huber, r_squared } = getValuesFromResponse(trainingErrorEval.eval);
setTrainingEval({
mse,
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_button.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_button.tsx
index 010aa7b8513b5..d78e1bcc1a913 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_button.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_clone/clone_button.tsx
@@ -314,6 +314,7 @@ export type CloneDataFrameAnalyticsConfig = Omit<
export function extractCloningConfig({
id,
version,
+ // eslint-disable-next-line @typescript-eslint/naming-convention
create_time,
...configToClone
}: DeepReadonly): CloneDataFrameAnalyticsConfig {
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_button_flyout.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_button_flyout.tsx
index 86b1c879417bb..14b743997f30a 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_button_flyout.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/action_edit/edit_button_flyout.tsx
@@ -133,7 +133,7 @@ export const EditButtonFlyout: FC> = ({ closeFlyout, item }
onClose={closeFlyout}
hideCloseButton
aria-labelledby="analyticsEditFlyoutTitle"
- data-test-subj="analyticsEditFlyout"
+ data-test-subj="mlAnalyticsEditFlyout"
>
@@ -297,7 +297,7 @@ export const EditButtonFlyout: FC> = ({ closeFlyout, item }
= ({
return (
<>
{i18n.translate('xpack.ml.dataFrame.analyticsList.emptyPromptTitle', {
- defaultMessage: 'No data frame analytics jobs found',
+ defaultMessage: 'Create your first data frame analytics job',
})}
}
actions={
!isManagementTable
? [
- setIsSourceIndexModalVisible(true)}
isDisabled={disabled}
+ color="primary"
+ iconType="plusInCircle"
+ fill
data-test-subj="mlAnalyticsCreateFirstButton"
>
{i18n.translate('xpack.ml.dataFrame.analyticsList.emptyPromptButtonText', {
- defaultMessage: 'Create your first data frame analytics job',
+ defaultMessage: 'Create job',
})}
- ,
+ ,
]
: []
}
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/common.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/common.ts
index e2d9ecccf0626..cc52138d7c7b7 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/common.ts
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/common.ts
@@ -130,6 +130,6 @@ export function isCompletedAnalyticsJob(stats: DataFrameAnalyticsStats) {
return stats.state === DATA_FRAME_TASK_STATE.STOPPED && progress === 100;
}
-export function getResultsUrl(jobId: string, analysisType: string) {
+export function getResultsUrl(jobId: string, analysisType: ANALYSIS_CONFIG_TYPE | string) {
return `#/data_frame_analytics/exploration?_g=(ml:(jobId:${jobId},analysisType:${analysisType}))`;
}
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/expanded_row.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/expanded_row.tsx
index 5276fedff0fde..645c6c276a6f9 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/expanded_row.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/expanded_row.tsx
@@ -95,6 +95,7 @@ export const ExpandedRow: FC = ({ item }) => {
genErrorEval.eval &&
isRegressionEvaluateResponse(genErrorEval.eval)
) {
+ // eslint-disable-next-line @typescript-eslint/naming-convention
const { mse, msle, huber, r_squared } = getValuesFromResponse(genErrorEval.eval);
setGeneralizationEval({
mse,
@@ -129,6 +130,7 @@ export const ExpandedRow: FC = ({ item }) => {
trainingErrorEval.eval &&
isRegressionEvaluateResponse(trainingErrorEval.eval)
) {
+ // eslint-disable-next-line @typescript-eslint/naming-convention
const { mse, msle, huber, r_squared } = getValuesFromResponse(trainingErrorEval.eval);
setTrainingEval({
mse,
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/use_columns.tsx b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/use_columns.tsx
index 123fdada44866..1b115496c2091 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/use_columns.tsx
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/use_columns.tsx
@@ -258,6 +258,7 @@ export const useColumns = (
}),
actions,
width: isManagementTable === true ? '100px' : '150px',
+ 'data-test-subj': 'mlAnalyticsTableColumnActions',
},
];
diff --git a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts
index 69599f43ef297..f932e4d0db7d7 100644
--- a/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts
+++ b/x-pack/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/hooks/use_create_analytics_form/state.ts
@@ -18,7 +18,6 @@ import { CloneDataFrameAnalyticsConfig } from '../../components/action_clone';
export enum DEFAULT_MODEL_MEMORY_LIMIT {
regression = '100mb',
- // eslint-disable-next-line @typescript-eslint/camelcase
outlier_detection = '50mb',
classification = '100mb',
}
diff --git a/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx b/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx
index 33bb78c51e013..0af6030df28b1 100644
--- a/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx
+++ b/x-pack/plugins/ml/public/application/management/jobs_list/components/jobs_list_page/jobs_list_page.tsx
@@ -5,6 +5,7 @@
*/
import React, { useEffect, useState, Fragment, FC } from 'react';
+import { Router } from 'react-router-dom';
import { i18n } from '@kbn/i18n';
import { CoreStart } from 'kibana/public';
@@ -20,6 +21,8 @@ import {
EuiTitle,
} from '@elastic/eui';
+import { ManagementAppMountParams } from '../../../../../../../../../src/plugins/management/public/';
+
import { checkGetManagementMlJobsResolver } from '../../../../capabilities/check_capabilities';
import { KibanaContextProvider } from '../../../../../../../../../src/plugins/kibana_react/public';
@@ -30,6 +33,7 @@ import { DataFrameAnalyticsList } from '../../../../data_frame_analytics/pages/a
import { AccessDeniedPage } from '../access_denied_page';
interface Tab {
+ 'data-test-subj': string;
id: string;
name: string;
content: any;
@@ -38,6 +42,7 @@ interface Tab {
function getTabs(isMlEnabledInSpace: boolean): Tab[] {
return [
{
+ 'data-test-subj': 'mlStackManagementJobsListAnomalyDetectionTab',
id: 'anomaly_detection_jobs',
name: i18n.translate('xpack.ml.management.jobsList.anomalyDetectionTab', {
defaultMessage: 'Anomaly detection',
@@ -50,6 +55,7 @@ function getTabs(isMlEnabledInSpace: boolean): Tab[] {
),
},
{
+ 'data-test-subj': 'mlStackManagementJobsListAnalyticsTab',
id: 'analytics_jobs',
name: i18n.translate('xpack.ml.management.jobsList.analyticsTab', {
defaultMessage: 'Analytics',
@@ -67,7 +73,10 @@ function getTabs(isMlEnabledInSpace: boolean): Tab[] {
];
}
-export const JobsListPage: FC<{ coreStart: CoreStart }> = ({ coreStart }) => {
+export const JobsListPage: FC<{
+ coreStart: CoreStart;
+ history: ManagementAppMountParams['history'];
+}> = ({ coreStart, history }) => {
const [initialized, setInitialized] = useState(false);
const [accessDenied, setAccessDenied] = useState(false);
const [isMlEnabledInSpace, setIsMlEnabledInSpace] = useState(false);
@@ -128,46 +137,51 @@ export const JobsListPage: FC<{ coreStart: CoreStart }> = ({ coreStart }) => {
return (
-
-
-
-
-
- {i18n.translate('xpack.ml.management.jobsList.jobsListTitle', {
- defaultMessage: 'Machine Learning Jobs',
- })}
-
-
-
-
- {currentTabId === 'anomaly_detection_jobs'
- ? anomalyDetectionDocsLabel
- : analyticsDocsLabel}
-
-
-
-
-
-
-
- {i18n.translate('xpack.ml.management.jobsList.jobsListTagline', {
- defaultMessage: 'View machine learning analytics and anomaly detection jobs.',
- })}
-
-
-
- {renderTabs()}
-
+
+
+
+
+
+
+ {i18n.translate('xpack.ml.management.jobsList.jobsListTitle', {
+ defaultMessage: 'Machine Learning Jobs',
+ })}
+
+
+
+
+ {currentTabId === 'anomaly_detection_jobs'
+ ? anomalyDetectionDocsLabel
+ : analyticsDocsLabel}
+
+
+
+
+
+
+
+ {i18n.translate('xpack.ml.management.jobsList.jobsListTagline', {
+ defaultMessage: 'View machine learning analytics and anomaly detection jobs.',
+ })}
+
+
+
+ {renderTabs()}
+
+
);
diff --git a/x-pack/plugins/ml/public/application/management/jobs_list/index.ts b/x-pack/plugins/ml/public/application/management/jobs_list/index.ts
index 81190a412abc0..afea5a573b8b5 100644
--- a/x-pack/plugins/ml/public/application/management/jobs_list/index.ts
+++ b/x-pack/plugins/ml/public/application/management/jobs_list/index.ts
@@ -14,8 +14,12 @@ import { getJobsListBreadcrumbs } from '../breadcrumbs';
import { setDependencyCache, clearCache } from '../../util/dependency_cache';
import './_index.scss';
-const renderApp = (element: HTMLElement, coreStart: CoreStart) => {
- ReactDOM.render(React.createElement(JobsListPage, { coreStart }), element);
+const renderApp = (
+ element: HTMLElement,
+ history: ManagementAppMountParams['history'],
+ coreStart: CoreStart
+) => {
+ ReactDOM.render(React.createElement(JobsListPage, { coreStart, history }), element);
return () => {
unmountComponentAtNode(element);
clearCache();
@@ -37,5 +41,5 @@ export async function mountApp(
params.setBreadcrumbs(getJobsListBreadcrumbs());
- return renderApp(params.element, coreStart);
+ return renderApp(params.element, params.history, coreStart);
}
diff --git a/x-pack/plugins/ml/public/application/services/results_service/index.ts b/x-pack/plugins/ml/public/application/services/results_service/index.ts
index 6c508422e7063..5547c4096e3de 100644
--- a/x-pack/plugins/ml/public/application/services/results_service/index.ts
+++ b/x-pack/plugins/ml/public/application/services/results_service/index.ts
@@ -10,9 +10,9 @@ import { ml, MlApiServices } from '../ml_api_service';
export type MlResultsService = typeof mlResultsService;
-type time = string;
+type Time = string;
export interface ModelPlotOutputResults {
- results: Record