From 3c3958db2a6072c9bc150c2003648e10131f0735 Mon Sep 17 00:00:00 2001 From: Kshitij Tandon Date: Wed, 4 Sep 2024 12:25:55 +0530 Subject: [PATCH] Fixed bugs in history navigation in rollups and transform jobs pages and some UI changes (#1166) * Fixed action button padding and removed plus sign in some pages Signed-off-by: Kshitij Tandon * Fixed a bug in Transform and Rollup Details pages Signed-off-by: Kshitij Tandon * Removed some commented code Signed-off-by: Kshitij Tandon * Retracting couple of changes from previous commits Signed-off-by: Kshitij Tandon * Fixed spacing between buttons in bottom bar Signed-off-by: Kshitij Tandon * Added compressed prop to DatePicker in Snapshot Policy Signed-off-by: Kshitij Tandon * Minor change in previous commit Signed-off-by: Kshitij Tandon --------- Signed-off-by: Kshitij Tandon --- .../Aliases/containers/AliasActions/index.tsx | 2 +- .../__snapshots__/CreateAlias.test.tsx.snap | 1 - .../Aliases/containers/CreateAlias/index.tsx | 1 - .../containers/ChangePolicy/ChangePolicy.tsx | 2 +- .../__snapshots__/ChangePolicy.test.tsx.snap | 2 +- .../containers/IndexForm/index.tsx | 11 ++------ .../TemplateDetail/TemplateDetail.tsx | 28 ------------------- .../TemplateDetail.test.tsx.snap | 1 - .../components/CronSchedule/CronSchedule.tsx | 1 + .../containers/IndicesActions/index.tsx | 2 +- .../ManagedIndexControls.tsx | 7 ----- .../ManagedIndices/ManagedIndices.tsx | 2 +- .../Reindex/container/Reindex/Reindex.tsx | 2 +- .../__snapshots__/Reindex.test.tsx.snap | 2 +- .../RollupDetails/RollupDetails.tsx | 1 - .../container/ShrinkIndex/ShrinkIndex.tsx | 3 +- .../__snapshots__/ShrinkIndex.test.tsx.snap | 5 +--- .../SplitIndexForm/SplitIndexForm.tsx | 2 +- .../containers/TemplatesActions/index.tsx | 2 +- .../containers/Transforms/EditTransform.tsx | 2 +- .../Transforms/TransformDetails.tsx | 1 - .../containers/Transforms/Transforms.tsx | 4 +-- .../__snapshots__/EditTransform.test.tsx.snap | 2 +- 23 files changed, 18 insertions(+), 68 deletions(-) diff --git a/public/pages/Aliases/containers/AliasActions/index.tsx b/public/pages/Aliases/containers/AliasActions/index.tsx index 0b467d78e..9601e856b 100644 --- a/public/pages/Aliases/containers/AliasActions/index.tsx +++ b/public/pages/Aliases/containers/AliasActions/index.tsx @@ -54,7 +54,7 @@ export default function AliasesActions(props: AliasesActionsProps) { <> Actions diff --git a/public/pages/Aliases/containers/CreateAlias/__snapshots__/CreateAlias.test.tsx.snap b/public/pages/Aliases/containers/CreateAlias/__snapshots__/CreateAlias.test.tsx.snap index 68c15e74f..2103c2ef7 100644 --- a/public/pages/Aliases/containers/CreateAlias/__snapshots__/CreateAlias.test.tsx.snap +++ b/public/pages/Aliases/containers/CreateAlias/__snapshots__/CreateAlias.test.tsx.snap @@ -232,7 +232,6 @@ HTMLCollection [ - EuiIconMock diff --git a/public/pages/Aliases/containers/CreateAlias/index.tsx b/public/pages/Aliases/containers/CreateAlias/index.tsx index dd50a20bf..a72291886 100644 --- a/public/pages/Aliases/containers/CreateAlias/index.tsx +++ b/public/pages/Aliases/containers/CreateAlias/index.tsx @@ -206,7 +206,6 @@ export default function CreateAlias(props: ICreateAliasProps) { fill color="primary" data-test-subj="createAliasButton" - iconType={isEdit ? undefined : "plus"} onClick={async () => { const { errors, values } = (await formGenerateRef.current?.validatePromise()) || {}; if (errors) { diff --git a/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx b/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx index 39eb97664..d07953bec 100644 --- a/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx +++ b/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx @@ -190,7 +190,7 @@ export class ChangePolicy extends Component - + Cancel diff --git a/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap b/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap index 8cba4876d..cc14a9634 100644 --- a/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap +++ b/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap @@ -415,7 +415,7 @@ exports[` spec renders the component 1`] = ` class="euiSpacer euiSpacer--l" />
- - + Cancel - + {isEdit ? "Update" : "Create"} diff --git a/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx b/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx index bbe0f4784..e2212afde 100644 --- a/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx +++ b/public/pages/CreateIndexTemplate/containers/TemplateDetail/TemplateDetail.tsx @@ -402,33 +402,6 @@ const TemplateDetail = (props: TemplateDetailProps, ref: Ref) => ) : null} - {/* - { - isEdit && selectedTabId === TABS_ENUM.SUMMARY ? ( - -

Preview template

-
- ) : values._meta?.flow === FLOW_ENUM.COMPONENTS ? ( - -

Override template definition

-
- ) : ( - -

Template definition

-
- ) - } - { - (!isEdit || selectedTabId !== TABS_ENUM.SUMMARY) && values._meta?.flow === FLOW_ENUM.COMPONENTS - ? - Provide additional configurations such as index aliases, settings, and mappings. Configurations defined in this section will take precedent if they overlap with the associated component templates. - - : undefined - } - {(!isEdit || selectedTabId !== TABS_ENUM.SUMMARY) && values._meta?.flow === FLOW_ENUM.COMPONENTS - ? : undefined - } -
*/} ) => }} isLoading={isSubmitting} data-test-subj="CreateIndexTemplateCreateButton" - iconType={"plus"} > Create template diff --git a/public/pages/CreateIndexTemplate/containers/TemplateDetail/__snapshots__/TemplateDetail.test.tsx.snap b/public/pages/CreateIndexTemplate/containers/TemplateDetail/__snapshots__/TemplateDetail.test.tsx.snap index 11270dbc5..c042f03bb 100644 --- a/public/pages/CreateIndexTemplate/containers/TemplateDetail/__snapshots__/TemplateDetail.test.tsx.snap +++ b/public/pages/CreateIndexTemplate/containers/TemplateDetail/__snapshots__/TemplateDetail.test.tsx.snap @@ -1262,7 +1262,6 @@ exports[` spec render component in non-edit-mode 1`] = ` - EuiIconMock diff --git a/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx b/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx index 05daa9c4d..bf07afd38 100644 --- a/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx +++ b/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx @@ -120,6 +120,7 @@ const CronSchedule = ({ let startTimeContent; startTimeContent = ( ( Actions diff --git a/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx b/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx index ad32ccdff..02a694f77 100644 --- a/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx +++ b/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx @@ -9,21 +9,14 @@ import { ArgsWithError, EuiFlexGroup, EuiFlexItem, - EuiPagination, EuiSearchBar, EuiCompressedSwitch, - EuiButton, - EuiPopover, - EuiContextMenuPanel, EuiButtonIcon, EuiButtonEmpty, EuiSpacer, } from "@elastic/eui"; import { DataStream } from "../../../../../server/models/interfaces"; -import { ManagedIndices } from "../../containers/ManagedIndices/ManagedIndices"; -import { ManagedIndexItem } from "plugins/index-management-dashboards-plugin/models/interfaces"; import { getUISettings } from "../../../../services/Services"; -import { size } from "lodash"; interface ManagedIndexControlsProps { search: string; diff --git a/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx b/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx index a22cb9571..1c52b62e9 100644 --- a/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx +++ b/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx @@ -601,7 +601,7 @@ export class ManagedIndices extends MDSEnabledComponent diff --git a/public/pages/Reindex/container/Reindex/Reindex.tsx b/public/pages/Reindex/container/Reindex/Reindex.tsx index 1fe900b30..fc9a8e4b5 100644 --- a/public/pages/Reindex/container/Reindex/Reindex.tsx +++ b/public/pages/Reindex/container/Reindex/Reindex.tsx @@ -728,7 +728,7 @@ class Reindex extends Component { - + Cancel diff --git a/public/pages/Reindex/container/Reindex/__snapshots__/Reindex.test.tsx.snap b/public/pages/Reindex/container/Reindex/__snapshots__/Reindex.test.tsx.snap index cb4858c19..5f6a8f974 100644 --- a/public/pages/Reindex/container/Reindex/__snapshots__/Reindex.test.tsx.snap +++ b/public/pages/Reindex/container/Reindex/__snapshots__/Reindex.test.tsx.snap @@ -390,7 +390,7 @@ exports[` spec renders the component 1`] = ` class="euiSpacer euiSpacer--l" />
{ operationType={OperationType.SHRINK} /> - - + Cancel diff --git a/public/pages/ShrinkIndex/container/ShrinkIndex/__snapshots__/ShrinkIndex.test.tsx.snap b/public/pages/ShrinkIndex/container/ShrinkIndex/__snapshots__/ShrinkIndex.test.tsx.snap index 2a3c40d49..dfc88fc2e 100644 --- a/public/pages/ShrinkIndex/container/ShrinkIndex/__snapshots__/ShrinkIndex.test.tsx.snap +++ b/public/pages/ShrinkIndex/container/ShrinkIndex/__snapshots__/ShrinkIndex.test.tsx.snap @@ -842,10 +842,7 @@ exports[` spec renders the component 1`] = ` class="euiSpacer euiSpacer--l" />
-
/> - + Cancel diff --git a/public/pages/Templates/containers/TemplatesActions/index.tsx b/public/pages/Templates/containers/TemplatesActions/index.tsx index d92d26094..d35a2e8c5 100644 --- a/public/pages/Templates/containers/TemplatesActions/index.tsx +++ b/public/pages/Templates/containers/TemplatesActions/index.tsx @@ -36,7 +36,7 @@ export default function TemplatesActions(props: TemplatesActionsProps) { <> Actions diff --git a/public/pages/Transforms/containers/Transforms/EditTransform.tsx b/public/pages/Transforms/containers/Transforms/EditTransform.tsx index 69c8eef88..efb7cf7a2 100644 --- a/public/pages/Transforms/containers/Transforms/EditTransform.tsx +++ b/public/pages/Transforms/containers/Transforms/EditTransform.tsx @@ -186,7 +186,7 @@ export class EditTransform extends Component - + Cancel diff --git a/public/pages/Transforms/containers/Transforms/TransformDetails.tsx b/public/pages/Transforms/containers/Transforms/TransformDetails.tsx index 0a9974a61..328cf8bd9 100644 --- a/public/pages/Transforms/containers/Transforms/TransformDetails.tsx +++ b/public/pages/Transforms/containers/Transforms/TransformDetails.tsx @@ -114,7 +114,6 @@ export class TransformDetails extends Component @@ -374,7 +374,7 @@ export class Transforms extends MDSEnabledComponent diff --git a/public/pages/Transforms/containers/Transforms/__snapshots__/EditTransform.test.tsx.snap b/public/pages/Transforms/containers/Transforms/__snapshots__/EditTransform.test.tsx.snap index bcd30143c..058d8f909 100644 --- a/public/pages/Transforms/containers/Transforms/__snapshots__/EditTransform.test.tsx.snap +++ b/public/pages/Transforms/containers/Transforms/__snapshots__/EditTransform.test.tsx.snap @@ -540,7 +540,7 @@ exports[` spec renders the component 1`] = ` class="euiSpacer euiSpacer--l" />