Skip to content

Commit

Permalink
Fixed bugs in history navigation in rollups and transform jobs pages …
Browse files Browse the repository at this point in the history
…and some UI changes (#1166)

* Fixed action button padding and removed plus sign in some pages

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Fixed a bug in Transform and Rollup Details pages

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Removed some commented code

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Retracting couple of changes from previous commits

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Fixed spacing between buttons in bottom bar

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Added compressed prop to DatePicker in Snapshot Policy

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

* Minor change in previous commit

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>

---------

Signed-off-by: Kshitij Tandon <tandonks@amazon.com>
  • Loading branch information
tandonks committed Sep 4, 2024
1 parent 163ad4e commit 3c1c7a3
Show file tree
Hide file tree
Showing 23 changed files with 18 additions and 68 deletions.
2 changes: 1 addition & 1 deletion public/pages/Aliases/containers/AliasActions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function AliasesActions(props: AliasesActionsProps) {
<>
<SimplePopover
data-test-subj="moreAction"
panelPaddingSize="none"
panelPaddingSize="s"
button={
<EuiSmallButton iconType="arrowDown" iconSide="right">
Actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ HTMLCollection [
<span
class="euiButtonContent euiButton__content"
>
EuiIconMock
<span
class="euiButton__text"
>
Expand Down
1 change: 0 additions & 1 deletion public/pages/Aliases/containers/CreateAlias/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class ChangePolicy extends Component<ChangePolicyProps, ChangePolicyState

<EuiSpacer />

<EuiFlexGroup alignItems="center" justifyContent="flexEnd">
<EuiFlexGroup alignItems="center" justifyContent="flexEnd" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiSmallButtonEmpty onClick={this.onCancel} data-test-subj="changePolicyCancelButton">
Cancel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ exports[`<ChangePolicy /> spec renders the component 1`] = `
class="euiSpacer euiSpacer--l"
/>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--justifyContentFlexEnd euiFlexGroup--directionRow euiFlexGroup--responsive"
class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--justifyContentFlexEnd euiFlexGroup--directionRow euiFlexGroup--responsive"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
Expand Down
11 changes: 2 additions & 9 deletions public/pages/CreateIndex/containers/IndexForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -464,21 +464,14 @@ export class IndexForm extends Component<IndexFormProps & { services: BrowserSer
{hideButtons ? null : (
<>
<EuiSpacer />
<EuiSpacer />
<EuiFlexGroup alignItems="center" justifyContent="flexEnd">
<EuiFlexGroup alignItems="center" justifyContent="flexEnd" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiSmallButtonEmpty onClick={this.onCancel} data-test-subj="createIndexCancelButton">
Cancel
</EuiSmallButtonEmpty>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiSmallButton
fill
onClick={this.onSubmit}
isLoading={isSubmitting}
data-test-subj="createIndexCreateButton"
iconType={isEdit ? undefined : "plus"}
>
<EuiSmallButton fill onClick={this.onSubmit} isLoading={isSubmitting} data-test-subj="createIndexCreateButton">
{isEdit ? "Update" : "Create"}
</EuiSmallButton>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,33 +402,6 @@ const TemplateDetail = (props: TemplateDetailProps, ref: Ref<FieldInstance>) =>
<EuiSpacer />
</>
) : null}
{/* <EuiPanel>
{
isEdit && selectedTabId === TABS_ENUM.SUMMARY ? (
<EuiText size="s">
<h2>Preview template</h2>
</EuiText>
) : values._meta?.flow === FLOW_ENUM.COMPONENTS ? (
<EuiText size="s">
<h2>Override template definition</h2>
</EuiText>
) : (
<EuiText size="s">
<h2>Template definition</h2>
</EuiText>
)
}
{
(!isEdit || selectedTabId !== TABS_ENUM.SUMMARY) && values._meta?.flow === FLOW_ENUM.COMPONENTS
? <EuiText size="xs">
<EuiTextColor color="subdued">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.</EuiTextColor>
</EuiText>
: undefined
}
{(!isEdit || selectedTabId !== TABS_ENUM.SUMMARY) && values._meta?.flow === FLOW_ENUM.COMPONENTS
? <EuiAccordion id={htmlIdGenerator()()} forceState={isAccordionOpen} onToggle={toggleAccordion} buttonContent={titleContent}></EuiAccordion> : undefined
}
</EuiPanel> */}
<ContentPanel
title={
isEdit && selectedTabId === TABS_ENUM.SUMMARY ? (
Expand Down Expand Up @@ -503,7 +476,6 @@ const TemplateDetail = (props: TemplateDetailProps, ref: Ref<FieldInstance>) =>
}}
isLoading={isSubmitting}
data-test-subj="CreateIndexTemplateCreateButton"
iconType={"plus"}
>
Create template
</EuiSmallButton>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,6 @@ exports[`<TemplateDetail /> spec render component in non-edit-mode 1`] = `
<span
class="euiButtonContent euiButton__content"
>
EuiIconMock
<span
class="euiButton__text"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const CronSchedule = ({
let startTimeContent;
startTimeContent = (
<EuiDatePicker
compressed={true}
showTimeSelect
showTimeSelectOnly
selected={startTime(hour, minute)}
Expand Down
2 changes: 1 addition & 1 deletion public/pages/Indices/containers/IndicesActions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default function IndicesActions(props: IndicesActionsProps) {
{({ onShow }) => (
<SimplePopover
data-test-subj="moreAction"
panelPaddingSize="none"
panelPaddingSize="s"
button={
<EuiSmallButton iconType="arrowDown" iconSide="right">
Actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ export class ManagedIndices extends MDSEnabledComponent<ManagedIndicesProps, Man
isOpen={isPopoverOpen}
closePopover={this.closePopover}
anchorPosition="downLeft"
panelPaddingSize="none"
panelPaddingSize="s"
>
<EuiContextMenuPanel items={popoverActionItems} size="s" />
</EuiPopover>
Expand Down
2 changes: 1 addition & 1 deletion public/pages/Reindex/container/Reindex/Reindex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ class Reindex extends Component<ReindexProps, ReindexState> {

<EuiSpacer />

<EuiFlexGroup alignItems="center" justifyContent="flexEnd">
<EuiFlexGroup alignItems="center" justifyContent="flexEnd" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiSmallButtonEmpty onClick={this.onCancel} data-test-subj="reindexCancelButton">
Cancel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ exports[`<Reindex /> spec renders the component 1`] = `
class="euiSpacer euiSpacer--l"
/>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--justifyContentFlexEnd euiFlexGroup--directionRow euiFlexGroup--responsive"
class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--justifyContentFlexEnd euiFlexGroup--directionRow euiFlexGroup--responsive"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export class RollupDetails extends Component<RollupDetailsProps, RollupDetailsSt
? [BREADCRUMBS.ROLLUPS, { text: id }]
: [BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.ROLLUPS, { text: id }];
this.context.chrome.setBreadcrumbs(newBreadCrumbs);
this.props.history.push(`${ROUTES.ROLLUP_DETAILS}?id=${id}`);
await this.getRollup(id);
this.forceUpdate();
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,7 @@ class ShrinkIndex extends Component<ShrinkIndexProps, ShrinkIndexState> {
operationType={OperationType.SHRINK}
/>
<EuiSpacer />
<EuiSpacer />
<EuiFlexGroup justifyContent="flexEnd">
<EuiFlexGroup justifyContent="flexEnd" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiSmallButtonEmpty onClick={this.onCancel} flush="left" data-test-subj="shrinkIndexCancelButton">
Cancel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -842,10 +842,7 @@ exports[`<Shrink index /> spec renders the component 1`] = `
class="euiSpacer euiSpacer--l"
/>
<div
class="euiSpacer euiSpacer--l"
/>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--justifyContentFlexEnd euiFlexGroup--directionRow euiFlexGroup--responsive"
class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--justifyContentFlexEnd euiFlexGroup--directionRow euiFlexGroup--responsive"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export default class SplitIndexForm extends Component<SplitIndexComponentProps>
/>

<EuiSpacer />
<EuiFlexGroup alignItems="center" justifyContent="flexEnd">
<EuiFlexGroup alignItems="center" justifyContent="flexEnd" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiSmallButtonEmpty onClick={this.props.onCancel} data-test-subj="splitCancelButton">
Cancel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function TemplatesActions(props: TemplatesActionsProps) {
<>
<SimplePopover
data-test-subj="moreAction"
panelPaddingSize="none"
panelPaddingSize="s"
button={
<EuiSmallButton iconType="arrowDown" iconSide="right">
Actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export class EditTransform extends Component<EditTransformProps, EditTransformSt

<EuiSpacer />

<EuiFlexGroup alignItems="center" justifyContent="flexEnd">
<EuiFlexGroup alignItems="center" justifyContent="flexEnd" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiSmallButtonEmpty onClick={this.onCancel} data-test-subj="editTransformCancelButton">
Cancel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ export class TransformDetails extends Component<TransformDetailsProps, Transform
? [BREADCRUMBS.TRANSFORMS, { text: id }]
: [BREADCRUMBS.INDEX_MANAGEMENT, BREADCRUMBS.TRANSFORMS, { text: id }];
this.context.chrome.setBreadcrumbs(breadCrumbsUp);
this.props.history.push(`${ROUTES.TRANSFORM_DETAILS}?id=${id}`);
await this.getTransform(id);
this.forceUpdate();
} else {
Expand Down
4 changes: 2 additions & 2 deletions public/pages/Transforms/containers/Transforms/Transforms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ export class Transforms extends MDSEnabledComponent<TransformProps, TransformSta
button={actionButton}
isOpen={isPopOverOpen}
closePopover={this.closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
anchorPosition="downLeft"
data-test-subj="actionPopover"
>
Expand Down Expand Up @@ -374,7 +374,7 @@ export class Transforms extends MDSEnabledComponent<TransformProps, TransformSta
button={actionButton}
isOpen={isPopOverOpen}
closePopover={this.closePopover}
panelPaddingSize="none"
panelPaddingSize="s"
anchorPosition="downLeft"
data-test-subj="actionPopover"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ exports[`<EditTransform /> spec renders the component 1`] = `
class="euiSpacer euiSpacer--l"
/>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--justifyContentFlexEnd euiFlexGroup--directionRow euiFlexGroup--responsive"
class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--justifyContentFlexEnd euiFlexGroup--directionRow euiFlexGroup--responsive"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
Expand Down

0 comments on commit 3c1c7a3

Please sign in to comment.