diff --git a/public/pages/ComposableTemplates/components/IndexControls/IndexControls.tsx b/public/pages/ComposableTemplates/components/IndexControls/IndexControls.tsx
index 96d0cbb42..1aee780c6 100644
--- a/public/pages/ComposableTemplates/components/IndexControls/IndexControls.tsx
+++ b/public/pages/ComposableTemplates/components/IndexControls/IndexControls.tsx
@@ -13,7 +13,6 @@ export interface SearchControlsProps {
search: string;
selectedTypes: string[];
};
- useNewUX?: boolean;
onSearchChange: (args: SearchControlsProps["value"]) => void;
}
@@ -47,7 +46,6 @@ export default function SearchControls(props: SearchControlsProps) {
}}
onChange={(val) => onChange("selectedTypes", val || [])}
value={state.selectedTypes}
- useNewUx={props.useNewUX}
options={[
{
label: IndicesUpdateMode.alias,
diff --git a/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx b/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx
index bca1f7be6..3a935e0a7 100644
--- a/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx
+++ b/public/pages/ComposableTemplates/containers/ComposableTemplates/ComposableTemplates.tsx
@@ -436,7 +436,6 @@ class ComposableTemplates extends MDSEnabledComponent
@@ -515,7 +514,6 @@ class ComposableTemplates extends MDSEnabledComponent
diff --git a/public/pages/CreateTransform/containers/ReviewAndCreateStep/ReviewAndCreateStep.tsx b/public/pages/CreateTransform/containers/ReviewAndCreateStep/ReviewAndCreateStep.tsx
index e75ea6efe..8f4d603a4 100644
--- a/public/pages/CreateTransform/containers/ReviewAndCreateStep/ReviewAndCreateStep.tsx
+++ b/public/pages/CreateTransform/containers/ReviewAndCreateStep/ReviewAndCreateStep.tsx
@@ -14,7 +14,6 @@ import JobNameAndIndices from "../../components/JobNameAndIndices";
import ReviewDefinition from "../../components/ReviewDefinition";
import ReviewSchedule from "../../components/ReviewSchedule";
import { CoreServicesContext } from "../../../../components/core_services";
-import { getUISettings } from "../../../../services/Services";
interface ReviewAndCreateStepProps extends RouteComponentProps {
transformService: TransformService;
diff --git a/public/pages/Indices/components/IndexControls/IndexControls.tsx b/public/pages/Indices/components/IndexControls/IndexControls.tsx
index ca812d9e6..97e4a904a 100644
--- a/public/pages/Indices/components/IndexControls/IndexControls.tsx
+++ b/public/pages/Indices/components/IndexControls/IndexControls.tsx
@@ -19,6 +19,7 @@ import {
import { DataStream, ManagedCatIndex } from "../../../../../server/models/interfaces";
import IndicesActions from "../../containers/IndicesActions";
import { getUISettings } from "../../../../services/Services";
+import { RouteComponentProps } from "react-router-dom";
interface IndexControlsProps {
search: string;
@@ -28,6 +29,7 @@ interface IndexControlsProps {
getDataStreams: () => Promise;
toggleShowDataStreams: () => void;
selectedItems: ManagedCatIndex[];
+ history?: RouteComponentProps["history"];
}
interface IndexControlsState {
@@ -50,7 +52,7 @@ export default class IndexControls extends Component
-
-
-
-
-
-
-
-
-
-
-
-
-
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
) : (
diff --git a/public/pages/Indices/containers/Indices/Indices.tsx b/public/pages/Indices/containers/Indices/Indices.tsx
index 7978958ca..6397a2a73 100644
--- a/public/pages/Indices/containers/Indices/Indices.tsx
+++ b/public/pages/Indices/containers/Indices/Indices.tsx
@@ -272,6 +272,10 @@ export class Indices extends MDSEnabledComponent {
const { history } = this.props;
+ const onClickCreate = () => {
+ this.props.history.push(ROUTES.CREATE_INDEX);
+ };
+
return this.state.useUpdatedUX ? (
<>
{
label: "Create Index",
fill: true,
iconType: "plus",
- href: `${PLUGIN_NAME}#/create-index`,
+ run: onClickCreate,
testId: "createIndexButton",
controlType: "button",
color: "primary",
@@ -308,6 +312,7 @@ export class Indices extends MDSEnabledComponent {
getDataStreams={this.getDataStreams}
toggleShowDataStreams={this.toggleShowDataStreams}
selectedItems={this.state.selectedItems}
+ history={this.props.history}
/>
{
text: "Create Index",
buttonProps: {
fill: true,
- onClick: () => {
- this.props.history.push(ROUTES.CREATE_INDEX);
- },
+ onClick: onClickCreate,
},
},
]}
diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx
index d12ae1bbf..5fa273475 100644
--- a/public/pages/Main/Main.tsx
+++ b/public/pages/Main/Main.tsx
@@ -191,6 +191,7 @@ const dataSourceEnabledPaths: string[] = [
ROUTES.CREATE_REPOSITORY,
ROUTES.EDIT_REPOSITORY,
ROUTES.NOTIFICATIONS,
+ ROUTES.SHRINK_INDEX,
];
const LocalCluster: DataSourceOption = {
@@ -526,6 +527,7 @@ export default class Main extends Component {
ROUTES.CREATE_REPOSITORY,
ROUTES.EDIT_REPOSITORY,
ROUTES.NOTIFICATIONS,
+ ROUTES.SHRINK_INDEX,
]}
render={() => (
-
-
-
-
-
-
- {Actions}
-
-
-
-
+ <>
+
+
+
+
+
+
+
+ {Actions}
+
+
+
+
+
+ >
) : (
diff --git a/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx b/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx
index bc4869762..e47937348 100644
--- a/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx
+++ b/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx
@@ -435,7 +435,6 @@ export class ManagedIndices extends MDSEnabledComponent {
- return (
- showRetryModal && (
-
- )
- );
- };
-
- const EditRolloverAliasModal = () => {
- return (
- showEditModal && (
-
- )
- );
- };
-
const RemovePolicyModal = () => {
return (
showRemoveModal && (
@@ -560,18 +539,24 @@ export class ManagedIndices extends MDSEnabledComponent {
- this.closePopover();
- this.onShowEditModal();
- }}
- >
- Edit rollover alias
- ,
+
+ {({ onShow, onClose }) => (
+
+ onShow(RolloverAliasModal, {
+ index: selectedItems[0].index,
+ core: this.context,
+ })
+ }
+ >
+ Edit rollover alias
+
+ )}
+ ,
Remove Policy
,
- {
- this.closePopover();
- this.onShowRetryModal();
- }}
- >
- Retry Policy
- ,
+
+ {({ onShow, onClose }) => (
+
+ onShow(RetryModal, {
+ retryItems: _.cloneDeep(selectedItems),
+ })
+ }
+ >
+ Retry Policy
+
+ )}
+ ,
];
const Action = () => {
@@ -641,6 +631,10 @@ export class ManagedIndices extends MDSEnabledComponent {
+ this.props.history.push(ROUTES.CHANGE_POLICY);
+ };
+
return this.state.useUpdatedUX ? (
<>
{CommonTable()}
- {RetryPolicyModal()}
{RemovePolicyModal()}
- {EditRolloverAliasModal()}
>
) : (
diff --git a/public/pages/Reindex/container/Reindex/Reindex.test.tsx b/public/pages/Reindex/container/Reindex/Reindex.test.tsx
index 876606095..c3afc6646 100644
--- a/public/pages/Reindex/container/Reindex/Reindex.test.tsx
+++ b/public/pages/Reindex/container/Reindex/Reindex.test.tsx
@@ -17,6 +17,11 @@ import { CoreServicesConsumer, CoreServicesContext } from "../../../../component
import Reindex from "./Reindex";
import { ModalProvider, ModalRoot } from "../../../../components/Modal";
import { BrowserServices } from "../../../../models/interfaces";
+import { setupCoreStart } from "../../../../../test/helper";
+
+beforeAll(() => {
+ setupCoreStart();
+});
function renderWithRouter(initialEntries = [ROUTES.REINDEX] as string[]) {
return {
diff --git a/public/pages/Reindex/container/Reindex/Reindex.tsx b/public/pages/Reindex/container/Reindex/Reindex.tsx
index 9ab096a43..1cd9ad83d 100644
--- a/public/pages/Reindex/container/Reindex/Reindex.tsx
+++ b/public/pages/Reindex/container/Reindex/Reindex.tsx
@@ -42,10 +42,13 @@ import { ListenType } from "../../../../lib/JobScheduler";
import NotificationConfig, { NotificationConfigRef } from "../../../../containers/NotificationConfig";
import { ActionType } from "../../../Notifications/constant";
import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent";
+import { getApplication, getNavigationUI, getUISettings } from "../../../../services/Services";
+import { TopNavControlDescriptionData, TopNavControlLinkData } from "src/plugins/navigation/public/top_nav_menu/top_nav_control_data";
interface ReindexProps extends RouteComponentProps {
commonService: CommonService;
indexService: IndexService;
+ useUpdatedUX: boolean;
}
interface ReindexState {
@@ -92,11 +95,14 @@ class Reindex extends Component
{
}
async componentDidMount() {
- this.context.chrome.setBreadcrumbs([
- BREADCRUMBS.INDEX_MANAGEMENT,
- BREADCRUMBS.INDICES,
- { ...BREADCRUMBS.REINDEX, href: `#${this.props.location.pathname}${this.props.location.search}` },
- ]);
+ const breadCrumbs = this.props.useUpdatedUX
+ ? [BREADCRUMBS.INDICES, { ...BREADCRUMBS.REINDEX, href: `#${this.props.location.pathname}${this.props.location.search}` }]
+ : [
+ BREADCRUMBS.INDEX_MANAGEMENT,
+ BREADCRUMBS.INDICES,
+ { ...BREADCRUMBS.REINDEX, href: `#${this.props.location.pathname}${this.props.location.search}` },
+ ];
+ this.context.chrome.setBreadcrumbs(breadCrumbs);
const { source } = queryString.parse(this.props.location.search);
@@ -550,163 +556,192 @@ class Reindex extends Component {
);
+ const descriptionData = [
+ {
+ description: "Shrink an existing index into a new index with fewer primary shards.",
+ links: {
+ label: "Learn more",
+ href: this.context.docLinks.links.opensearch.reindexData.base,
+ iconType: "popout",
+ iconSide: "right",
+ controlType: "link",
+ } as TopNavControlLinkData,
+ } as TopNavControlDescriptionData,
+ ];
+
// expand data streams and aliases
const allSelectedIndices = this.getAllSelectedIndices();
- return (
-
-
- Reindex
-
- {subTitleText}
-
-
-
-
- 0}
- error={sourceErr}
- fullWidth
- helpText="Specify one or more indexes or data streams you want to reindex from."
- >
-
-
-
-
-
- {
- this.setState({ subset: id === "subset" });
- }}
- name="subsetOption"
- data-test-subj="subsetOption"
- legend={{
- children: Specify a reindex option,
- }}
- />
-
-
- {subset ? (
+ const Common = () => {
+ return (
+ <>
+
+
-
- Learn more about query DSL
-
-
- }
+ label="Specify source indexes or data streams"
+ isInvalid={sourceErr.length > 0}
+ error={sourceErr}
+ fullWidth
+ helpText="Specify one or more indexes or data streams you want to reindex from."
>
-
- ) : null}
-
-
+
+
+ {
+ this.setState({ subset: id === "subset" });
+ }}
+ name="subsetOption"
+ data-test-subj="subsetOption"
+ legend={{
+ children: Specify a reindex option,
+ }}
+ />
+
+
+ {subset ? (
+
+
+ Learn more about query DSL
+
+
+ }
+ >
+
+
+ ) : null}
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+ this.setState({ showCreateIndexFlyout: true })}>
+ Create index
+
+
+
+
+
+
+
+
+ {advancedSettingsOpen && (
+ <>
+
+
-
+ (this.notificationRef = ref)} actionType={ActionType.REINDEX} />
+
+ >
+ )}
+
+
+
+
+
+
+
+ Cancel
+
- this.setState({ showCreateIndexFlyout: true })}>
- Create index
+
+ Reindex
-
-
+ {showCreateIndexFlyout ? (
+
this.setState({ showCreateIndexFlyout: false })}
+ />
+ ) : null}
+ >
+ );
+ };
-
- {advancedSettingsOpen && (
- <>
-
-
- (this.notificationRef = ref)} actionType={ActionType.REINDEX} />
-
- >
- )}
-
+ const { HeaderControl } = getNavigationUI();
+ const { setAppDescriptionControls } = getApplication();
+ return this.props.useUpdatedUX ? (
+
+
+ {Common()}
+
+ ) : (
+
+
+ Reindex
+
+ {subTitleText}
-
-
-
- Cancel
-
-
-
-
- Reindex
-
-
-
-
- {showCreateIndexFlyout ? (
- this.setState({ showCreateIndexFlyout: false })}
- />
- ) : null}
+ {Common()}
);
}
@@ -715,5 +750,7 @@ class Reindex extends Component {
export default function (props: ReindexProps) {
// in re-index page, user can't change the data source i.e., its in read-only
useUpdateUrlWithDataSourceProperties();
- return ;
+ const uiSettings = getUISettings();
+ const useUpdatedUX = uiSettings.get("home:useNewHomePage");
+ return ;
}
diff --git a/public/pages/ShrinkIndex/container/ShrinkIndex/ShrinkIndex.test.tsx b/public/pages/ShrinkIndex/container/ShrinkIndex/ShrinkIndex.test.tsx
index bdf68b153..c6628209d 100644
--- a/public/pages/ShrinkIndex/container/ShrinkIndex/ShrinkIndex.test.tsx
+++ b/public/pages/ShrinkIndex/container/ShrinkIndex/ShrinkIndex.test.tsx
@@ -17,6 +17,11 @@ import { CoreServicesConsumer, CoreServicesContext } from "../../../../component
import ShrinkIndex from "./ShrinkIndex";
import { ModalProvider, ModalRoot } from "../../../../components/Modal";
import { BrowserServices } from "../../../../models/interfaces";
+import { setupCoreStart } from "../../../../../test/helper";
+
+beforeAll(() => {
+ setupCoreStart();
+});
function renderWithRouter(initialEntries = [ROUTES.SHRINK_INDEX] as string[]) {
return {
diff --git a/public/pages/ShrinkIndex/container/ShrinkIndex/ShrinkIndex.tsx b/public/pages/ShrinkIndex/container/ShrinkIndex/ShrinkIndex.tsx
index 29c89ec7c..045a92dfb 100644
--- a/public/pages/ShrinkIndex/container/ShrinkIndex/ShrinkIndex.tsx
+++ b/public/pages/ShrinkIndex/container/ShrinkIndex/ShrinkIndex.tsx
@@ -50,6 +50,9 @@ import { NotificationConfigRef } from "../../../../containers/NotificationConfig
import { ListenType } from "../../../../lib/JobScheduler";
import { openIndices } from "../../../Indices/utils/helpers";
import { EVENT_MAP, destroyListener, listenEvent } from "../../../../JobHandler";
+import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent";
+import { getApplication, getNavigationUI, getUISettings } from "../../../../services/Services";
+import { TopNavControlDescriptionData, TopNavControlLinkData } from "src/plugins/navigation/public";
const WrappedAliasSelect = EuiToolTipWrapper(AliasSelect as any, {
disabledKey: "isDisabled",
@@ -57,6 +60,7 @@ const WrappedAliasSelect = EuiToolTipWrapper(AliasSelect as any, {
interface ShrinkIndexProps extends RouteComponentProps {
commonService: CommonService;
+ useUpdatedUX: boolean;
}
interface ShrinkIndexState {
@@ -66,7 +70,7 @@ interface ShrinkIndexState {
loading: boolean;
}
-export default class ShrinkIndex extends Component {
+class ShrinkIndex extends Component {
static contextType = CoreServicesContext;
destroyed: boolean = false;
@@ -83,11 +87,15 @@ export default class ShrinkIndex extends Component
);
- return (
+ const descriptionData = [
+ {
+ description: "Shrink an existing index into a new index with fewer primary shards.",
+ links: {
+ label: "Learn more",
+ href: SHRINK_DOCUMENTATION_URL,
+ iconType: "popout",
+ iconSide: "right",
+ controlType: "link",
+ } as TopNavControlLinkData,
+ } as TopNavControlDescriptionData,
+ ];
+
+ const Common = () => {
+ return (
+ <>
+
+ {!!disableShrinkButton ? null : configurationChildren}
+ (this.notificationRef = ref)}
+ actionType={ActionType.RESIZE}
+ operationType={OperationType.SHRINK}
+ />
+
+
+
+
+
+ Cancel
+
+
+
+
+ Shrink
+
+
+
+ >
+ );
+ };
+
+ const { HeaderControl } = getNavigationUI();
+ const { setAppDescriptionControls } = getApplication();
+
+ return this.props.useUpdatedUX ? (
+
+
+
+ {Common()}
+
+ ) : (
Shrink index
{subTitleText}
-
- {!!disableShrinkButton ? null : configurationChildren}
- (this.notificationRef = ref)}
- actionType={ActionType.RESIZE}
- operationType={OperationType.SHRINK}
- />
-
-
-
-
-
- Cancel
-
-
-
-
- Shrink
-
-
-
+ {Common()}
);
}
}
+
+export default function (props: ShrinkIndexProps) {
+ useUpdateUrlWithDataSourceProperties();
+ const uiSettings = getUISettings();
+ const useUpdatedUX = uiSettings.get("home:useNewHomePage");
+ return ;
+}
diff --git a/public/pages/SplitIndex/container/SplitIndex/SplitIndex.test.tsx b/public/pages/SplitIndex/container/SplitIndex/SplitIndex.test.tsx
index d5061b6e3..e48e40cf7 100644
--- a/public/pages/SplitIndex/container/SplitIndex/SplitIndex.test.tsx
+++ b/public/pages/SplitIndex/container/SplitIndex/SplitIndex.test.tsx
@@ -17,6 +17,11 @@ import { IAlias } from "../../../Aliases/interface";
import { BrowserServices } from "../../../../models/interfaces";
import { ModalProvider, ModalRoot } from "../../../../components/Modal";
import { CoreStart } from "opensearch-dashboards/public";
+import { setupCoreStart } from "../../../../../test/helper";
+
+beforeAll(() => {
+ setupCoreStart();
+});
function renderWithRouter(initialEntries = [ROUTES.SPLIT_INDEX] as string[]) {
return {
diff --git a/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx b/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx
index dade1590e..ee76c2a6f 100644
--- a/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx
+++ b/public/pages/SplitIndex/container/SplitIndex/SplitIndex.tsx
@@ -29,10 +29,13 @@ import { BREADCRUMBS, ROUTES } from "../../../../utils/constants";
import { EVENT_MAP, destroyListener, listenEvent } from "../../../../JobHandler";
import { ServerResponse } from "../../../../../server/models/types";
import { useUpdateUrlWithDataSourceProperties } from "../../../../components/MDSEnabledComponent";
+import { getApplication, getNavigationUI, getUISettings } from "../../../../services/Services";
+import { TopNavControlDescriptionData, TopNavControlLinkData } from "src/plugins/navigation/public/top_nav_menu/top_nav_control_data";
interface SplitIndexProps extends RouteComponentProps {
commonService: CommonService;
coreService: CoreStart;
+ useUpdatedUX: boolean;
}
export class SplitIndex extends Component {
@@ -46,11 +49,14 @@ export class SplitIndex extends Component {
};
async componentDidMount() {
- this.context.chrome.setBreadcrumbs([
- BREADCRUMBS.INDEX_MANAGEMENT,
- BREADCRUMBS.INDICES,
- { ...BREADCRUMBS.SPLIT_INDEX, href: `#${ROUTES.SPLIT_INDEX}${this.props.location.search}` },
- ]);
+ const breadCrumbs = this.props.useUpdatedUX
+ ? [BREADCRUMBS.INDICES, { ...BREADCRUMBS.SPLIT_INDEX, href: `#${ROUTES.SPLIT_INDEX}${this.props.location.search}` }]
+ : [
+ BREADCRUMBS.INDEX_MANAGEMENT,
+ BREADCRUMBS.INDICES,
+ { ...BREADCRUMBS.SPLIT_INDEX, href: `#${ROUTES.SPLIT_INDEX}${this.props.location.search}` },
+ ];
+ this.context.chrome.setBreadcrumbs(breadCrumbs);
await this.isSourceIndexReady();
this.calculateShardsOption();
this.setState({
@@ -219,7 +225,53 @@ export class SplitIndex extends Component {
render() {
const { sourceIndex, splitIndexFlyoutVisible, reasons, shardsSelectOptions } = this.state;
- return (
+
+ const { HeaderControl } = getNavigationUI();
+ const { setAppDescriptionControls } = getApplication();
+
+ const descriptionData = [
+ {
+ description: "Shrink an existing index into a new index with fewer primary shards.",
+ links: {
+ label: "Learn more",
+ href: "https://opensearch.org/docs/latest/api-reference/index-apis/split/",
+ iconType: "popout",
+ iconSide: "right",
+ controlType: "link",
+ } as TopNavControlLinkData,
+ } as TopNavControlDescriptionData,
+ ];
+
+ const Common = () => {
+ return (
+ <>
+ {splitIndexFlyoutVisible && (
+
+ getAlias({
+ aliasName,
+ commonService: this.props.commonService,
+ })
+ }
+ />
+ )}
+ >
+ );
+ };
+
+ return this.props.useUpdatedUX ? (
+
+
+ {Common()}
+
+ ) : (
Split index
@@ -245,23 +297,7 @@ export class SplitIndex extends Component {
- {splitIndexFlyoutVisible && (
-
- getAlias({
- aliasName,
- commonService: this.props.commonService,
- })
- }
- />
- )}
+ {Common()}
);
}
@@ -272,5 +308,7 @@ export default function SplitIndexWrapper(props: Omit;
+ const uiSettings = getUISettings();
+ const useUpdatedUX = uiSettings.get("home:useNewHomePage");
+ return ;
}
diff --git a/public/pages/Templates/components/IndexControls/IndexControls.tsx b/public/pages/Templates/components/IndexControls/IndexControls.tsx
index f61ff90d9..88e48c0da 100644
--- a/public/pages/Templates/components/IndexControls/IndexControls.tsx
+++ b/public/pages/Templates/components/IndexControls/IndexControls.tsx
@@ -4,7 +4,7 @@
*/
import React, { useEffect, useState } from "react";
-import { EuiCompressedFieldSearch, EuiFlexGroup, EuiFlexItem } from "@elastic/eui";
+import { EuiCompressedFieldSearch, EuiFlexGroup, EuiFlexItem, EuiSpacer } from "@elastic/eui";
import { getUISettings } from "../../../../services/Services";
import TemplatesActions from "../../containers/TemplatesActions";
import { ITemplate } from "../../interface";
@@ -38,19 +38,22 @@ export default function SearchControls(props: SearchControlsProps) {
const useUpdatedUX = uiSettings.get("home:useNewHomePage");
return useUpdatedUX ? (
-
-
- onChange("search", e.target.value)}
- />
-
-
-
-
-
+ <>
+
+
+ onChange("search", e.target.value)}
+ />
+
+
+
+
+
+
+ >
) : (
diff --git a/public/pages/Templates/containers/Templates/Templates.tsx b/public/pages/Templates/containers/Templates/Templates.tsx
index dcc4bb6bd..78b64e2df 100644
--- a/public/pages/Templates/containers/Templates/Templates.tsx
+++ b/public/pages/Templates/containers/Templates/Templates.tsx
@@ -399,6 +399,10 @@ class Templates extends MDSEnabledComponent {
},
];
+ const onClickCreate = () => {
+ this.props.history.push(ROUTES.CREATE_TEMPLATE);
+ };
+
return this.state.useUpdatedUX ? (
@@ -410,7 +414,7 @@ class Templates extends MDSEnabledComponent
{
label: "Create Index Template",
fill: true,
iconType: "plus",
- href: `${PLUGIN_NAME}#/create-template`,
+ run: onClickCreate,
testId: "createTemplateButton",
controlType: "button",
color: "primary",
@@ -446,9 +450,7 @@ class Templates extends MDSEnabledComponent {
text: "Create template",
buttonProps: {
fill: true,
- onClick: () => {
- this.props.history.push(ROUTES.CREATE_TEMPLATE);
- },
+ onClick: onClickCreate,
},
},
]}
diff --git a/public/pages/Transforms/containers/Transforms/TransformDetails.tsx b/public/pages/Transforms/containers/Transforms/TransformDetails.tsx
index e1761b9c6..8c8b44efa 100644
--- a/public/pages/Transforms/containers/Transforms/TransformDetails.tsx
+++ b/public/pages/Transforms/containers/Transforms/TransformDetails.tsx
@@ -507,7 +507,7 @@ export class TransformDetails extends Component
- Close
+ Close
diff --git a/public/pages/Transforms/containers/Transforms/Transforms.tsx b/public/pages/Transforms/containers/Transforms/Transforms.tsx
index 9d4dfff13..cd2a1e00b 100644
--- a/public/pages/Transforms/containers/Transforms/Transforms.tsx
+++ b/public/pages/Transforms/containers/Transforms/Transforms.tsx
@@ -26,6 +26,7 @@ import {
Pagination,
EuiTableSelectionType,
EuiTableSortingType,
+ EuiSpacer,
} from "@elastic/eui";
import queryString from "query-string";
import { RouteComponentProps } from "react-router-dom";
@@ -263,7 +264,7 @@ export class Transforms extends MDSEnabledComponent
-
+
-
+
{pageCount > 1 && (
@@ -300,6 +301,7 @@ export class Transforms extends MDSEnabledComponent
+
) => void,
- onChangeTimeunit: (value: ChangeEvent) => void
+ onChangeTimeunit: (value: ChangeEvent) => void,
+ useUpdatedUX?: boolean
) => (
diff --git a/test/helper.ts b/test/helper.ts
new file mode 100644
index 000000000..fc7a675f4
--- /dev/null
+++ b/test/helper.ts
@@ -0,0 +1,10 @@
+import { navigationPluginMock } from "../../../src/plugins/navigation/public/mocks";
+import { applicationServiceMock } from "../../../src/core/public/application/application_service.mock";
+import { uiSettingsServiceMock } from "../../../src/core/public/ui_settings/ui_settings_service.mock";
+import { setApplication, setNavigationUI, setUISettings } from "../public/services/Services";
+
+export function setupCoreStart() {
+ setNavigationUI(navigationPluginMock.createStartContract().ui);
+ setApplication(applicationServiceMock.createStartContract());
+ setUISettings(uiSettingsServiceMock.createStartContract());
+}
diff --git a/yarn.lock b/yarn.lock
index 253371e76..92ece1865 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1633,9 +1633,9 @@ ecc-jsbn@~0.1.1:
safer-buffer "^2.1.0"
elliptic@^6.5.3, elliptic@^6.5.5:
- version "6.5.6"
- resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.6.tgz#ee5f7c3a00b98a2144ac84d67d01f04d438fa53e"
- integrity sha512-mpzdtpeCLuS3BmE3pO3Cpp5bbjlOPY2Q0PgoF+Od1XZrHLYI28Xe3ossCmYCQt11FQKEYd9+PF8jymTvtWJSHQ==
+ version "6.5.7"
+ resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.7.tgz#8ec4da2cb2939926a1b9a73619d768207e647c8b"
+ integrity sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==
dependencies:
bn.js "^4.11.9"
brorand "^1.1.0"
@@ -3795,9 +3795,9 @@ qs@6.10.4:
side-channel "^1.0.4"
qs@^6.12.3:
- version "6.12.3"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.12.3.tgz#e43ce03c8521b9c7fd7f1f13e514e5ca37727754"
- integrity sha512-AWJm14H1vVaO/iNZ4/hO+HyaTehuy9nRqVdkTqlJt0HWvBiBIEXFmb4C0DGeYo3Xes9rrEW+TxHsaigCbN5ICQ==
+ version "6.13.0"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906"
+ integrity sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==
dependencies:
side-channel "^1.0.6"