Skip to content

Commit

Permalink
Worked on reviews
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 9d1daed commit 774ea9c
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 25 deletions.
5 changes: 3 additions & 2 deletions public/pages/Aliases/containers/Aliases/Aliases.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
EuiCompressedFormRow,
EuiEmptyPrompt,
EuiSmallButton,
EuiPanel,
} from "@elastic/eui";
import { ContentPanel, ContentPanelActions } from "../../../../components/ContentPanel";
import { DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_QUERY_PARAMS } from "../../utils/constants";
Expand Down Expand Up @@ -471,7 +472,7 @@ class Aliases extends MDSEnabledComponent<AliasesProps, AliasesState> {
} as TopNavControlButtonData,
]}
/>
<ContentPanel>
<EuiPanel>
<IndexControls
value={{
search: this.state.search,
Expand All @@ -486,7 +487,7 @@ class Aliases extends MDSEnabledComponent<AliasesProps, AliasesState> {
history={this.props.history}
/>
{commonRender()}
</ContentPanel>
</EuiPanel>
</div>
) : (
<ContentPanel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,37 @@ export default function OverviewTemplate(props: SubDetailProps) {
columns={columns}
listItems={[
{
title: "Template type",
title: (
<EuiText size="s">
<h4>Template type</h4>
</EuiText>
),
description: TemplateConvert({
value: values.data_stream,
}),
},
{
title: "Index patterns",
title: (
<EuiText size="s">
<h4>Index patterns</h4>
</EuiText>
),
description: values.index_patterns?.join(", "),
},
{
title: "Priority",
title: (
<EuiText size="s">
<h4>Priority</h4>
</EuiText>
),
description: values.priority,
},
{
title: "Associated component templates",
title: (
<EuiText size="s">
<h4>Associated component templates</h4>
</EuiText>
),
description: (values.composed_of || []).length
? (values.composed_of || []).map((item) => (
<div key={item}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,27 @@ export default function IndexSettings(props: SubDetailProps) {
columns={columns}
listItems={[
{
title: "Number of primary shards",
title: (
<EuiText size="s">
<h4>Number of primary shards</h4>
</EuiText>
),
description: values.template?.settings?.["index.number_of_shards"] || "-",
},
{
title: "Number of replicas",
title: (
<EuiText size="s">
<h4>Number of replicas</h4>
</EuiText>
),
description: values.template?.settings?.["index.number_of_replicas"] || "-",
},
{
title: "Refresh interval",
title: (
<EuiText size="s">
<h4>Refresh interval</h4>
</EuiText>
),
description: values.template?.settings?.["index.refresh_interval"] || "-",
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright OpenSearch Contributors
* SPDX-License-Identifier: Apache-2.0
*/
import { EuiCompressedRadio, EuiSpacer } from "@elastic/eui";
import { EuiCompressedRadio, EuiSpacer, EuiText } from "@elastic/eui";
import { TEMPLATE_TYPE } from "../../../../utils/constants";
import React from "react";
import { AllBuiltInComponents } from "../../../../components/FormGenerator";
Expand Down Expand Up @@ -43,7 +43,13 @@ export default function TemplateType(props: ITemplateTypeProps) {
{value !== undefined ? (
<>
<EuiSpacer />
<CustomFormRow label="Time field">
<CustomFormRow
label={
<EuiText size="s">
<h4>Time field</h4>
</EuiText>
}
>
<AllBuiltInComponents.Input
value={value?.timestamp_field?.name}
onChange={(val) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ exports[`<CreateIndexTemplate /> spec render template pages 1`] = `
<dt
class="euiDescriptionList__title"
>
Template type
<div
class="euiText euiText--small"
>
<h4>
Template type
</h4>
</div>
</dt>
<dd
class="euiDescriptionList__description"
Expand All @@ -102,7 +108,13 @@ exports[`<CreateIndexTemplate /> spec render template pages 1`] = `
<dt
class="euiDescriptionList__title"
>
Index patterns
<div
class="euiText euiText--small"
>
<h4>
Index patterns
</h4>
</div>
</dt>
<dd
class="euiDescriptionList__description"
Expand All @@ -120,7 +132,13 @@ exports[`<CreateIndexTemplate /> spec render template pages 1`] = `
<dt
class="euiDescriptionList__title"
>
Priority
<div
class="euiText euiText--small"
>
<h4>
Priority
</h4>
</div>
</dt>
<dd
class="euiDescriptionList__description"
Expand All @@ -138,7 +156,13 @@ exports[`<CreateIndexTemplate /> spec render template pages 1`] = `
<dt
class="euiDescriptionList__title"
>
Associated component templates
<div
class="euiText euiText--small"
>
<h4>
Associated component templates
</h4>
</div>
</dt>
<dd
class="euiDescriptionList__description"
Expand Down Expand Up @@ -261,7 +285,13 @@ exports[`<CreateIndexTemplate /> spec render template pages 1`] = `
<dt
class="euiDescriptionList__title"
>
Alias names
<div
class="euiText euiText--small"
>
<h4>
Alias names
</h4>
</div>
</dt>
<dd
class="euiDescriptionList__description"
Expand Down Expand Up @@ -296,7 +326,13 @@ exports[`<CreateIndexTemplate /> spec render template pages 1`] = `
<dt
class="euiDescriptionList__title"
>
Number of primary shards
<div
class="euiText euiText--small"
>
<h4>
Number of primary shards
</h4>
</div>
</dt>
<dd
class="euiDescriptionList__description"
Expand All @@ -314,7 +350,13 @@ exports[`<CreateIndexTemplate /> spec render template pages 1`] = `
<dt
class="euiDescriptionList__title"
>
Number of replicas
<div
class="euiText euiText--small"
>
<h4>
Number of replicas
</h4>
</div>
</dt>
<dd
class="euiDescriptionList__description"
Expand All @@ -332,7 +374,13 @@ exports[`<CreateIndexTemplate /> spec render template pages 1`] = `
<dt
class="euiDescriptionList__title"
>
Refresh interval
<div
class="euiText euiText--small"
>
<h4>
Refresh interval
</h4>
</div>
</dt>
<dd
class="euiDescriptionList__description"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default function IndexAlias(props: SubDetailProps) {
compressed
listItems={[
{
title: "Alias names",
title: (
<EuiText size="s">
<h4>Alias names</h4>
</EuiText>
),
description: Object.keys(values?.template?.aliases || {}).join(",") || "-",
},
]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
EuiContextMenuItem,
EuiPopover,
EuiContextMenuPanel,
EuiPanel,
} from "@elastic/eui";
import queryString from "query-string";
import _ from "lodash";
Expand Down Expand Up @@ -656,7 +657,7 @@ export class ManagedIndices extends MDSEnabledComponent<ManagedIndicesProps, Man
/>

<div style={{ padding: "0px" }}>
<ContentPanel>
<EuiPanel>
<ManagedIndexControls
search={search}
onSearchChange={this.onSearchChange}
Expand All @@ -667,7 +668,7 @@ export class ManagedIndices extends MDSEnabledComponent<ManagedIndicesProps, Man
Actions={Action()}
/>
{CommonTable()}
</ContentPanel>
</EuiPanel>
{RemovePolicyModal()}
</div>
</>
Expand Down
8 changes: 5 additions & 3 deletions public/pages/Templates/containers/Templates/Templates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
EuiText,
EuiToolTip,
EuiSmallButtonIcon,
EuiPanel,
} from "@elastic/eui";
import { ContentPanel, ContentPanelActions } from "../../../../components/ContentPanel";
import { DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_QUERY_PARAMS } from "../../utils/constants";
Expand Down Expand Up @@ -343,6 +344,7 @@ class Templates extends MDSEnabledComponent<TemplatesProps, TemplatesState> {
onClick={() => {
this.props.history.push(ROUTES.CREATE_TEMPLATE);
}}
iconType="plus"
>
Create template
</EuiSmallButton>,
Expand All @@ -351,7 +353,7 @@ class Templates extends MDSEnabledComponent<TemplatesProps, TemplatesState> {
) : (
<EuiEmptyPrompt
body={
<EuiText>
<EuiText size="s">
<p>There are no templates matching your applied filters. Reset your filters to view your templates.</p>
</EuiText>
}
Expand Down Expand Up @@ -415,7 +417,7 @@ class Templates extends MDSEnabledComponent<TemplatesProps, TemplatesState> {
} as TopNavControlButtonData,
]}
/>
<ContentPanel>
<EuiPanel>
<IndexControls
value={{
search: this.state.search,
Expand All @@ -427,7 +429,7 @@ class Templates extends MDSEnabledComponent<TemplatesProps, TemplatesState> {
/>

{commonTable()}
</ContentPanel>
</EuiPanel>
</div>
) : (
<ContentPanel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ exports[`<Templates /> spec renders the component 1`] = `
<span
class="euiButtonContent euiButton__content"
>
EuiIconMock
<span
class="euiButton__text"
>
Expand Down

0 comments on commit 774ea9c

Please sign in to comment.