Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Sandeep Kumawat <[email protected]>
  • Loading branch information
Sandeep Kumawat committed Aug 29, 2024
1 parent 27b739a commit 14c821b
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ exports[`<CreateDataStream /> spec it goes to data streams page when click cance
<div
class="euiFlexItem"
>
<h1
class="euiTitle euiTitle--large"
<div
class="euiText euiText--small euiTitle euiTitle--large"
>
Create data stream
</h1>
<h1>
Create data stream
</h1>
</div>
<div
class="euiFormRow euiFormRow--fullWidth euiFormRow--compressed"
id="some_html_id-row"
Expand Down Expand Up @@ -288,6 +290,7 @@ exports[`<CreateDataStream /> spec it goes to data streams page when click cance
<span
class="euiButtonContent euiButton__content"
>
EuiIconMock
<span
class="euiButton__text"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
TopNavControlLinkData,
TopNavControlDescriptionData,
} from "../../../../../../../src/plugins/navigation/public";
import { None } from "vega";

export interface DataStreamDetailProps {
dataStream?: string;
Expand Down Expand Up @@ -161,7 +162,11 @@ const DataStreamDetail = (props: DataStreamDetailProps, ref: Ref<FieldInstance>)
run: () => {
Modal.show({
"data-test-subj": "dataStreamJSONDetailModal",
title: values.name,
title: (
<EuiText size="s">
<h2>{values.name}</h2>
</EuiText>
),
content: <JSONEditor value={JSON.stringify(values, null, 2)} disabled />,
});
},
Expand Down Expand Up @@ -205,7 +210,9 @@ const DataStreamDetail = (props: DataStreamDetailProps, ref: Ref<FieldInstance>)
<>
<EuiFlexGroup alignItems="center">
<EuiFlexItem>
<EuiTitle size="l">{isEdit ? <h1 title={values.name}>{values.name}</h1> : <h1>Create data stream</h1>}</EuiTitle>
<EuiTitle size="l">
{<EuiText size="s">{isEdit ? <h1 title={values.name}>{values.name}</h1> : <h1>Create data stream</h1>}</EuiText>}
</EuiTitle>
{isEdit ? null : (
<CustomFormRow
fullWidth
Expand Down Expand Up @@ -308,7 +315,13 @@ const DataStreamDetail = (props: DataStreamDetailProps, ref: Ref<FieldInstance>)
</EuiSmallButtonEmpty>
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiSmallButton fill onClick={onSubmit} isLoading={isLoading} data-test-subj="CreateDataStreamCreateButton">
<EuiSmallButton
fill
onClick={onSubmit}
isLoading={isLoading}
iconType={isEdit ? undefined : "plus"}
data-test-subj="CreateDataStreamCreateButton"
>
{isEdit ? "Save changes" : "Create data stream"}
</EuiSmallButton>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ exports[`<DataStreamDetail /> spec render component 1`] = `
<div
class="euiFlexItem"
>
<h1
class="euiTitle euiTitle--large"
<div
class="euiText euiText--small euiTitle euiTitle--large"
>
Create data stream
</h1>
<h1>
Create data stream
</h1>
</div>
<div
class="euiFormRow euiFormRow--fullWidth euiFormRow--compressed"
id="some_html_id-row"
Expand Down Expand Up @@ -285,6 +287,7 @@ exports[`<DataStreamDetail /> spec render component 1`] = `
<span
class="euiButtonContent euiButton__content"
>
EuiIconMock
<span
class="euiButton__text"
>
Expand Down
21 changes: 15 additions & 6 deletions public/pages/DataStreams/containers/DataStreams/DataStreams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ class DataStreams extends MDSEnabledComponent<DataStreamsProps, DataStreamsState
onClick={() => {
this.props.history.push(ROUTES.CREATE_DATA_STREAM);
}}
iconType="plus"
>
Create data stream
</EuiSmallButton>,
Expand All @@ -424,7 +425,7 @@ class DataStreams extends MDSEnabledComponent<DataStreamsProps, DataStreamsState
) : (
<EuiEmptyPrompt
body={
<EuiText>
<EuiText size="s">
<p>There are no data streams matching your applied filters. Reset your filters to view your data streams.</p>
</EuiText>
}
Expand All @@ -436,6 +437,7 @@ class DataStreams extends MDSEnabledComponent<DataStreamsProps, DataStreamsState
this.getDataStreams();
});
}}
iconType="plus"
>
Reset filters
</EuiSmallButton>,
Expand Down Expand Up @@ -465,6 +467,7 @@ class DataStreams extends MDSEnabledComponent<DataStreamsProps, DataStreamsState
{
text: "Create data stream",
buttonProps: {
iconType: "plus",
fill: true,
onClick: () => {
this.props.history.push(ROUTES.CREATE_DATA_STREAM);
Expand All @@ -477,9 +480,13 @@ class DataStreams extends MDSEnabledComponent<DataStreamsProps, DataStreamsState
bodyStyles={{ padding: "initial" }}
title={
<>
<EuiTitle size="s">
<span>Data streams</span>
</EuiTitle>
<EuiText>
<EuiTitle size="s">
<h1>
<span>Data streams</span>
</h1>
</EuiTitle>
</EuiText>
<EuiCompressedFormRow
fullWidth
helpText={
Expand Down Expand Up @@ -582,7 +589,7 @@ class DataStreams extends MDSEnabledComponent<DataStreamsProps, DataStreamsState
) ? (
<EuiEmptyPrompt
body={
<EuiText>
<EuiText size="s">
<p>You have no data streams.</p>
</EuiText>
}
Expand All @@ -592,6 +599,7 @@ class DataStreams extends MDSEnabledComponent<DataStreamsProps, DataStreamsState
onClick={() => {
this.props.history.push(ROUTES.CREATE_DATA_STREAM);
}}
iconType="plus"
>
Create data stream
</EuiSmallButton>,
Expand All @@ -600,7 +608,7 @@ class DataStreams extends MDSEnabledComponent<DataStreamsProps, DataStreamsState
) : (
<EuiEmptyPrompt
body={
<EuiText>
<EuiText size="s">
<p>There are no data streams matching your applied filters. Reset your filters to view your data streams.</p>
</EuiText>
}
Expand All @@ -612,6 +620,7 @@ class DataStreams extends MDSEnabledComponent<DataStreamsProps, DataStreamsState
this.getDataStreams();
});
}}
iconType="plus"
>
Reset filters
</EuiSmallButton>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ exports[`<DataStreams /> spec renders the component 1`] = `
<div
class="euiFlexItem"
>
<span
class="euiTitle euiTitle--small"
<div
class="euiText euiText--medium"
>
Data streams
</span>
<h1
class="euiTitle euiTitle--small"
>
<span>
Data streams
</span>
</h1>
</div>
<div
class="euiFormRow euiFormRow--fullWidth euiFormRow--compressed"
id="some_html_id-row"
Expand Down Expand Up @@ -93,6 +99,7 @@ exports[`<DataStreams /> spec renders the component 1`] = `
<span
class="euiButtonContent euiButton__content"
>
EuiIconMock
<span
class="euiButton__text"
>
Expand Down Expand Up @@ -400,7 +407,7 @@ exports[`<DataStreams /> spec renders the component 1`] = `
class="euiText euiText--medium"
>
<div
class="euiText euiText--medium"
class="euiText euiText--small"
>
<p>
You have no data streams.
Expand All @@ -424,6 +431,7 @@ exports[`<DataStreams /> spec renders the component 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 @@ -50,7 +50,6 @@ export default function DataStreamsActions(props: DataStreamsActionsProps) {
<>
<SimplePopover
data-test-subj="moreAction"
panelPaddingSize="s"
button={
<EuiSmallButton iconType="arrowDown" iconSide="right">
Actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,12 @@ export class RollupDetails extends Component<RollupDetailsProps, RollupDetailsSt
<EuiOverlayMask>
<EuiModal onClose={this.closeModal} style={{ padding: "5px 30px" }}>
<EuiModalHeader>
<EuiModalHeaderTitle>{"View JSON of " + rollupId} </EuiModalHeaderTitle>
<EuiModalHeaderTitle>
{" "}
<EuiText size="s">
<h2>{"View JSON of " + rollupId}</h2>
</EuiText>{" "}
</EuiModalHeaderTitle>
</EuiModalHeader>

<EuiModalBody>
Expand Down
14 changes: 10 additions & 4 deletions public/pages/Rollups/components/DeleteModal/DeleteModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import React, { ChangeEvent, Component, Fragment } from "react";
import { EuiConfirmModal, EuiForm, EuiCompressedFormRow, EuiCompressedFieldText, EuiOverlayMask, EuiSpacer } from "@elastic/eui";
import { EuiConfirmModal, EuiForm, EuiCompressedFormRow, EuiCompressedFieldText, EuiOverlayMask, EuiSpacer, EuiText } from "@elastic/eui";

interface DeleteModalProps {
rollupId: string;
Expand All @@ -30,7 +30,11 @@ export default class DeleteModal extends Component<DeleteModalProps, DeleteModal
return (
<EuiOverlayMask>
<EuiConfirmModal
title="Delete job(s)"
title={
<EuiText size="s">
<h2>Delete job(s)</h2>
</EuiText>
}
onCancel={closeDeleteModal}
onConfirm={onClickDelete}
cancelButtonText="Cancel"
Expand All @@ -41,8 +45,10 @@ export default class DeleteModal extends Component<DeleteModalProps, DeleteModal
>
<EuiForm>
<Fragment>
By deleting "<strong>{rollupId}</strong>", all future scheduled rollup execution will be canceled. However, your target index
will remain as it is.
<EuiText size="s">
By deleting "<strong>{rollupId}</strong>", all future scheduled rollup execution will be canceled. However, your target
index will remain as it is.
</EuiText>
</Fragment>
<EuiSpacer size="s" />
<EuiCompressedFormRow helpText="To confirm deletion, enter delete in the text field">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ const getActions: React.SFC<RollupEmptyPromptProps> = ({ filterIsApplied, loadin
}

return (
<EuiSmallButton href={`${PLUGIN_NAME}#${ROUTES.CREATE_ROLLUP}`} data-test-subj="emptyPromptCreateRollupButton">
Create rollup
<EuiSmallButton
href={`${PLUGIN_NAME}#${ROUTES.CREATE_ROLLUP}`}
data-test-subj="emptyPromptCreateRollupButton"
iconType={"plus"}
fill={true}
>
Create rollup job
</EuiSmallButton>
);
};
Expand All @@ -49,7 +54,7 @@ const RollupEmptyPrompt: React.SFC<RollupEmptyPromptProps> = (props) => (
<EuiEmptyPrompt
style={{ maxWidth: "45em" }}
body={
<EuiText>
<EuiText size="s">
<p>{getMessagePrompt(props)}</p>
</EuiText>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ exports[`<Rollups /> spec renders the component 1`] = `
class="euiText euiText--medium"
>
<div
class="euiText euiText--medium"
class="euiText euiText--small"
>
<p>
Loading rollup jobs...
Expand Down

0 comments on commit 14c821b

Please sign in to comment.