Skip to content

Commit

Permalink
Minor changes to UI
Browse files Browse the repository at this point in the history
Signed-off-by: Kshitij Tandon <[email protected]>
  • Loading branch information
tandonks committed Aug 30, 2024
1 parent 0321da2 commit 2b76ce2
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 4 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 @@ -384,13 +384,14 @@ class Aliases extends MDSEnabledComponent<AliasesProps, AliasesState> {
) ? (
<EuiEmptyPrompt
body={
<EuiText>
<EuiText size="s">
<p>You have no aliases.</p>
</EuiText>
}
actions={[
<EuiSmallButton
fill
iconType="plus"
onClick={() => {
this.setState({
aliasCreateFlyoutVisible: true,
Expand All @@ -404,7 +405,7 @@ class Aliases extends MDSEnabledComponent<AliasesProps, AliasesState> {
) : (
<EuiEmptyPrompt
body={
<EuiText>
<EuiText size="s">
<p>There are no aliases matching your applied filters. Reset your filters to view your aliases.</p>
</EuiText>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ exports[`<Aliases /> spec renders the component 1`] = `
class="euiText euiText--medium"
>
<div
class="euiText euiText--medium"
class="euiText euiText--small"
>
<p>
You have no aliases.
Expand All @@ -428,6 +428,7 @@ exports[`<Aliases /> 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 @@ -232,6 +232,7 @@ HTMLCollection [
<span
class="euiButtonContent euiButton__content"
>
EuiIconMock
<span
class="euiButton__text"
>
Expand Down
1 change: 1 addition & 0 deletions public/pages/Aliases/containers/CreateAlias/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ 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 @@ -17,6 +17,10 @@ import {
EuiTabs,
EuiText,
EuiTitle,
EuiPanel,
EuiTextColor,
EuiAccordion,
htmlIdGenerator,
} from "@elastic/eui";
import queryString from "query-string";
import { TemplateItem, TemplateItemRemote } from "../../../../../models/interfaces";
Expand Down Expand Up @@ -398,6 +402,33 @@ 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 @@ -472,6 +503,7 @@ 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 @@ -40,7 +40,7 @@ const getActions: React.SFC<ManagedIndexEmptyPromptProps> = ({ history, filterIs
return (
<ModalConsumer>
{({ onShow }) => (
<EuiSmallButton fill onClick={() => onShow(CreatePolicyModal, { history, onClickContinue: onClickCreate })}>
<EuiSmallButton fill onClick={() => onShow(CreatePolicyModal, { history, onClickContinue: onClickCreate })} iconType={"plus"}>
Create policy
</EuiSmallButton>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ exports[`<ManagedIndexEmptyPrompt /> spec renders the component 1`] = `
<span
class="euiButtonContent euiButton__content"
>
EuiIconMock
<span
class="euiButton__text"
>
Expand Down

0 comments on commit 2b76ce2

Please sign in to comment.