Skip to content

Commit

Permalink
Worked on review
Browse files Browse the repository at this point in the history
Signed-off-by: Kshitij Tandon <[email protected]>
  • Loading branch information
tandonks committed Aug 29, 2024
1 parent 020e686 commit 51a290e
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 19 deletions.
12 changes: 8 additions & 4 deletions public/pages/IndexDetail/containers/IndexDetail/IndexDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ export default function IndexDetail(props: IndexDetailModalProps) {
<h2>Index alias</h2>
</EuiText>
<EuiHorizontalRule margin="xs" />
<EuiSpacer size="s" />
<IndexFormWrapper {...indexFormReadonlyCommonProps} key={IndicesUpdateMode.alias} mode={IndicesUpdateMode.alias} />
</EuiPanel>
</>
Expand Down Expand Up @@ -270,7 +269,7 @@ export default function IndexDetail(props: IndexDetailModalProps) {
</EuiText>
<EuiHorizontalRule margin="xs" />
<EuiDescriptionList compressed>
<EuiSpacer />
<EuiSpacer size="s" />
<div>
{OVERVIEW_DISPLAY_INFO.map((item) => {
let valueContent = null;
Expand All @@ -282,11 +281,16 @@ export default function IndexDetail(props: IndexDetailModalProps) {
}
return (
<div
style={{ display: "inline-block", width: "33%", verticalAlign: "top", marginBottom: "20px", padding: "0 1%" }}
style={{ display: "inline-block", width: "33%", verticalAlign: "top", marginBottom: "20px" }}
key={item.label}
data-test-subj={`indexDetailOverviewItem-${item.label}`}
>
<EuiDescriptionListTitle>{item.label}</EuiDescriptionListTitle>
<EuiDescriptionListTitle>
<EuiText size="s">
{" "}
<h4>{item.label}</h4>{" "}
</EuiText>
</EuiDescriptionListTitle>
<EuiDescriptionListDescription style={{ wordBreak: item.label === "Index name" ? "break-word" : undefined }}>
{valueContent}
</EuiDescriptionListDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
EuiPanel,
EuiEmptyPrompt,
EuiSmallButton,
EuiText,
} from "@elastic/eui";
import { ServicesContext } from "../../../../services";
import { BrowserServices } from "../../../../models/interfaces";
Expand Down Expand Up @@ -182,7 +183,12 @@ const Notifications = ({ onClose, visible }: NotificationsProps) => {
return (
<EuiModal onClose={onClose} maxWidth={false}>
<EuiModalHeader>
<EuiModalHeaderTitle>Notification settings</EuiModalHeaderTitle>
<EuiModalHeaderTitle>
<EuiText size="s">
{" "}
<h2>Notification settings</h2>{" "}
</EuiText>
</EuiModalHeaderTitle>
<EuiFlexItem grow={false}>
<EuiSmallButton iconType="popout" href="notifications-dashboards#/channels" target="_blank">
Manage channels
Expand All @@ -196,8 +202,18 @@ const Notifications = ({ onClose, visible }: NotificationsProps) => {
<EuiEmptyPrompt
iconType="alert"
iconColor="danger"
title={<h2>Error loading Notification settings</h2>}
body={<p>You do not have permissions to view Notification settings. Contact your administrator to request permissions.</p>}
title={
<EuiText size="s">
{" "}
<h2>Error loading Notification settings</h2>{" "}
</EuiText>
}
body={
<EuiText size="s">
{" "}
<p>You do not have permissions to view Notification settings. Contact your administrator to request permissions.</p>
</EuiText>
}
/>
</EuiPanel>
) : (
Expand Down Expand Up @@ -253,7 +269,14 @@ const Notifications = ({ onClose, visible }: NotificationsProps) => {
});
return (
<CustomFormRow
label={<div className="ISM-notifications-first-letter-uppercase">{record.title}</div>}
label={
<div className="ISM-notifications-first-letter-uppercase">
<EuiText size="s">
{" "}
<h3>{record.title}</h3>{" "}
</EuiText>
</div>
}
helpText={ActionTypeMapDescription[getKeyByValue(ActionTypeMapTitle, record.title) as ActionType]}
direction="hoz"
key={record.action_name}
Expand Down
9 changes: 4 additions & 5 deletions public/pages/Indices/containers/Indices/Indices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
ArgsWithError,
ArgsWithQuery,
Query,
EuiTitle,
EuiPanel,
} from "@elastic/eui";
import { ContentPanel, ContentPanelActions } from "../../../../components/ContentPanel";
import IndexControls from "../../components/IndexControls";
Expand All @@ -41,8 +41,7 @@ import "./index.scss";
import { DataSourceMenuContext, DataSourceMenuProperties } from "../../../../services/DataSourceMenuContext";
import MDSEnabledComponent from "../../../../components/MDSEnabledComponent";
import { getApplication, getNavigationUI, getUISettings } from "../../../../services/Services";
import { TopNavControlButtonData, TopNavControlIconData, TopNavControlTextData } from "src/plugins/navigation/public";
import { EuiSpacer } from "@opensearch-project/oui";
import { TopNavControlButtonData } from "src/plugins/navigation/public";
import NotificationModal from "../../components/NotificationModal";

interface IndicesProps extends RouteComponentProps, DataSourceMenuProperties {
Expand Down Expand Up @@ -316,7 +315,7 @@ export class Indices extends MDSEnabledComponent<IndicesProps, IndicesState> {
]}
/>
<div id="test" style={{ padding: "0px" }}>
<ContentPanel>
<EuiPanel>
<IndexControls
search={search}
onSearchChange={this.onSearchChange}
Expand Down Expand Up @@ -344,7 +343,7 @@ export class Indices extends MDSEnabledComponent<IndicesProps, IndicesState> {
selection={selection}
sorting={sorting}
/>
</ContentPanel>
</EuiPanel>
</div>
{this.state.isNotificationModalVisible && (
<NotificationModal onClose={this.onCloseNotification} visible={this.state.isNotificationModalVisible} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const getActions: React.SFC<TransformEmptyPromptProps> = ({ filterIsApplied, loa
}

return (
<EuiSmallButton href={`${PLUGIN_NAME}#${ROUTES.CREATE_TRANSFORM}`} data-test-subj="emptyPromptCreateTransformButton">
<EuiSmallButton href={`${PLUGIN_NAME}#${ROUTES.CREATE_TRANSFORM}`} data-test-subj="emptyPromptCreateTransformButton" iconType="plus">
Create transform
</EuiSmallButton>
);
Expand All @@ -53,7 +53,7 @@ const TransformEmptyPrompt: React.SFC<TransformEmptyPromptProps> = (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 @@ -101,7 +101,7 @@ export default class TransformSettings extends Component<TransformSettingsProps,
</EuiFlexGrid>
<EuiSpacer size="m" />
</div>
<div style={{ padding: "10px" }}>
<div>
<EuiAccordion
id={htmlIdGenerator()()}
buttonContent={
Expand All @@ -119,7 +119,6 @@ export default class TransformSettings extends Component<TransformSettingsProps,
<EuiText>
<h5>Preview result based on sample data</h5>
</EuiText>
<EuiSpacer size={"s"} />
<PreviewTransforms
onRemoveTransformation={() => {}}
previewTransform={this.state.previewTransform}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export class Transforms extends MDSEnabledComponent<TransformProps, TransformSta
} as TopNavControlButtonData,
]}
/>
<EuiPanel style={{ paddingLeft: "10px", paddingRight: "10px", paddingTop: "10px" }}>
<EuiPanel>
<div>
<EuiFlexGroup gutterSize="s">
<EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ exports[`<Transforms /> spec renders the component 1`] = `
class="euiText euiText--medium"
>
<div
class="euiText euiText--medium"
class="euiText euiText--small"
>
<p>
Loading transform jobs...
Expand Down

0 comments on commit 51a290e

Please sign in to comment.