diff --git a/public/components/ConfirmationModal/ConfirmationModal.tsx b/public/components/ConfirmationModal/ConfirmationModal.tsx index 4da8eb742..456bfcf73 100644 --- a/public/components/ConfirmationModal/ConfirmationModal.tsx +++ b/public/components/ConfirmationModal/ConfirmationModal.tsx @@ -13,6 +13,7 @@ import { EuiModalHeaderTitle, EuiOverlayMask, EuiSmallButtonEmpty, + EuiText, // @ts-ignore } from "@elastic/eui"; @@ -41,10 +42,18 @@ const ConfirmationModal: React.SFC = ({ // @ts-ignore */} - {title} + + +

{title}

+
+
- {bodyMessage} + + +

{bodyMessage}

+
+
diff --git a/public/components/ConfirmationModal/__snapshots__/ConfirmationModal.test.tsx.snap b/public/components/ConfirmationModal/__snapshots__/ConfirmationModal.test.tsx.snap index 914dab104..f8eb7969c 100644 --- a/public/components/ConfirmationModal/__snapshots__/ConfirmationModal.test.tsx.snap +++ b/public/components/ConfirmationModal/__snapshots__/ConfirmationModal.test.tsx.snap @@ -35,7 +35,13 @@ exports[` spec renders the component 1`] = `
- some title +
+

+ some title +

+
spec renders the component 1`] = `
- some body message +
+

+ some body message +

+
= ({ {title ? ( {typeof title === "string" ? ( - +

{title} {itemCount > 0 ? `(${itemCount})` : null}

-
+ ) : ( title )} diff --git a/public/components/ContentPanel/__snapshots__/ContentPanel.test.tsx.snap b/public/components/ContentPanel/__snapshots__/ContentPanel.test.tsx.snap index 7ab9e46e5..f78bebca4 100644 --- a/public/components/ContentPanel/__snapshots__/ContentPanel.test.tsx.snap +++ b/public/components/ContentPanel/__snapshots__/ContentPanel.test.tsx.snap @@ -12,17 +12,19 @@ exports[` spec renders the component 1`] = `
-

- Testing - - - - -

+

+ Testing + + + + +

+
- {props.title} + + +

{props.title}

+
+
-

{props.tips}

+ +

{props.tips}

+
    {selectedItems.map((item) => ( -
  • {item}
  • + +
  • {item}
  • +
    ))}
- To confirm your action, type delete. +

+ To confirm your action, type delete. +

- test +
+

+ test +

+
-

- test -

+
+

+ test +

+
    -
  • - test -
  • +
    +
  • + test +
  • +
- To confirm your action, type - - delete - - . +

+ To confirm your action, type + + delete + + . +

+

Number of primary shards

+ + ), helpText: ( <>
Specify the number of primary shards for the index. Default is 1.
@@ -287,7 +294,11 @@ const IndexDetail = ( }, { rowProps: { - label: "Number of replicas", + label: ( + +

Number of replicas

+
+ ), helpText: REPLICA_NUMBER_MESSAGE, direction: isEdit ? "hoz" : "ver", }, @@ -317,7 +328,11 @@ const IndexDetail = ( }, { rowProps: { - label: "Refresh interval", + label: ( + +

Refresh interval

+
+ ), helpText: "Specify how often the index should refresh, which publishes the most recent changes and make them available for search. Default is 1 second.", direction: isEdit ? "hoz" : "ver", @@ -358,7 +373,11 @@ const IndexDetail = ( { name: "index", rowProps: { - label: "Index name", + label: ( + +

Index name

+
+ ), helpText:
{INDEX_NAMING_MESSAGE}
, position: "bottom", style: isEdit ? { display: "none" } : {}, @@ -388,10 +407,15 @@ const IndexDetail = ( { name: "aliases", rowProps: { - label: "Index alias", + label: ( + +

+ Index alias +

+
+ ), helpText: "Allow this index to be referenced by existing aliases or specify a new alias.", direction: isEdit ? "hoz" : "ver", - isOptional: true, }, options: { props: { @@ -432,9 +456,14 @@ const IndexDetail = ( return ( <> - + + + {" "} +

{title}

{" "} +
+ {content} -
+ ); @@ -455,6 +484,7 @@ const IndexDetail = ( // The EuiContextMenu has bug when testing in jest // the props change won't make it rerender key={sourceIndices.join(",")} + size="s" panels={[ { id: 0, @@ -499,7 +529,7 @@ const IndexDetail = ( accordionProps: { initialIsOpen: false, id: "accordionForCreateIndexSettings", - buttonContent:

Advanced settings

, + buttonContent:

Advanced settings

, }, rowProps: { label: "Specify advanced index settings", @@ -550,9 +580,14 @@ const IndexDetail = ( return ( <> - + + + {" "} +

Index settings

{" "} +
+ {content} -
+ ); @@ -592,37 +627,32 @@ const IndexDetail = ( } return ( - - + + +

+ Index mapping + +

+
+
- Index mapping - + Define how documents and their fields are stored and indexed.{" "} + + Learn more +
-
- -
- Define how documents and their fields are stored and indexed.{" "} - - Learn more - -
-
Mappings and field types cannot be changed after the index is created.
- - } - > - <> -
- - } - titleSize="s" - > +
Mappings and field types cannot be changed after the index is created.
+ + } + > + <> + + {content} -
+ ); })()} {templateSimulateLoading ? ( diff --git a/public/components/IndexDetail/__snapshots__/IndexDetail.test.tsx.snap b/public/components/IndexDetail/__snapshots__/IndexDetail.test.tsx.snap index 5ec73e06d..e1640db67 100644 --- a/public/components/IndexDetail/__snapshots__/IndexDetail.test.tsx.snap +++ b/public/components/IndexDetail/__snapshots__/IndexDetail.test.tsx.snap @@ -3,182 +3,178 @@ exports[` spec renders the component 1`] = `
-
-

- Define index - - - - -

-
+ +

+ Define index +

+

-
- -
-
+ Index name + +
+ +
+
+ -
-
- -
-
-
-
-
- Must be in lowercase letters. Cannot begin with underscores or hyphens. Spaces, commas, and characters :, ", *, +, /, , |, ?, #, > are not allowed. +
+
+
+
+ Must be in lowercase letters. Cannot begin with underscores or hyphens. Spaces, commas, and characters :, ", *, +, /, , |, ?, #, > are not allowed. +
+
+
+
+
+
-
+
- + Allow this index to be referenced by existing aliases or specify a new alias.
-
- Allow this index to be referenced by existing aliases or specify a new alias. -
-
diff --git a/public/components/IndexMapping/IndexMapping.tsx b/public/components/IndexMapping/IndexMapping.tsx index f7b38ab0b..1a12991b4 100644 --- a/public/components/IndexMapping/IndexMapping.tsx +++ b/public/components/IndexMapping/IndexMapping.tsx @@ -14,6 +14,7 @@ import { EuiButtonGroup, EuiLink, EuiCallOut, + EuiText, } from "@elastic/eui"; import { set, get, isEmpty } from "lodash"; import MonacoJSONEditor, { IJSONEditorRef } from "../MonacoJSONEditor"; @@ -166,6 +167,7 @@ const IndexMapping = ( idSelected={editorMode as string} onChange={(id) => setEditorMode(id as EDITOR_MODE)} legend="Editor Type" + buttonSize="s" options={[ { label: readonly ? "Tree view" : "Visual Editor", @@ -184,7 +186,7 @@ const IndexMapping = ( <> {noAdditionalPropertiesValidator(transformArrayToObject(newValue)) ? null : ( <> - + To view or modify all of your configurations, switch to the JSON editor. @@ -199,7 +201,9 @@ const IndexMapping = ( items={transformValueToTreeItems(value)} /> ) : ( -

You have no field mappings.

+ +

You have no field mappings.

+
)} {readonly ? null : ( <> diff --git a/public/components/PolicyModal/PolicyModal.tsx b/public/components/PolicyModal/PolicyModal.tsx index 48523d9cd..b27067b6f 100644 --- a/public/components/PolicyModal/PolicyModal.tsx +++ b/public/components/PolicyModal/PolicyModal.tsx @@ -18,6 +18,7 @@ import { EuiCopy, EuiFlexGroup, EuiFlexItem, + EuiText, } from "@elastic/eui"; interface PolicyModalProps { @@ -36,11 +37,15 @@ const PolicyModal: React.SFC = ({ policyId, policy, errorMessa // @ts-ignore */} - {policyId} + + +

{policyId}

+
+
- + {errorMessage != null ? errorMessage : policyString} diff --git a/public/components/PolicyModal/__snapshots__/PolicyModal.test.tsx.snap b/public/components/PolicyModal/__snapshots__/PolicyModal.test.tsx.snap index c18d7500b..84e34e995 100644 --- a/public/components/PolicyModal/__snapshots__/PolicyModal.test.tsx.snap +++ b/public/components/PolicyModal/__snapshots__/PolicyModal.test.tsx.snap @@ -35,7 +35,13 @@ exports[` spec renders the component 1`] = `
- some-id +
+

+ some-id +

+
spec renders the component 1`] = ` class="euiModalBody__overflow" >
         {unBlockedItems.length > 0 && (
           <>
-            

{hint}

-
    - {unBlockedItems.map((item) => ( -
  • {item}
  • - ))} -
+ +

{hint}

+
+ +
    + {unBlockedItems.map((item) => ( +
  • {item}
  • + ))} +
+
)} @@ -200,7 +205,9 @@ export default function ClearCacheModal(props: ClearCacheModalProps) { const noSpecificIndexesChildren: React.ReactChild = ( <>
-

Cache will be cleared for all open indexes.

+ +

Cache will be cleared for all open indexes.

+
@@ -209,7 +216,13 @@ export default function ClearCacheModal(props: ClearCacheModalProps) { return ( - Clear cache for {type} + + {" "} + + {" "} +

Clear cache for {type}

{" "} +
{" "} +
{!!selectedItems && selectedItems.length > 0 ? specificIndexesChildren : noSpecificIndexesChildren} diff --git a/public/containers/ClearCacheModal/__snapshots__/ClearCacheModal.test.tsx.snap b/public/containers/ClearCacheModal/__snapshots__/ClearCacheModal.test.tsx.snap index a6e05da19..0050fe07f 100644 --- a/public/containers/ClearCacheModal/__snapshots__/ClearCacheModal.test.tsx.snap +++ b/public/containers/ClearCacheModal/__snapshots__/ClearCacheModal.test.tsx.snap @@ -39,8 +39,18 @@ HTMLCollection [
- Clear cache for - indexes + +
+ +

+ Clear cache for + indexes +

+ +
+
-

- Cache will be cleared for all open indexes. -

+
+

+ Cache will be cleared for all open indexes. +

+
diff --git a/public/containers/FlushIndexModal/FlushIndexModal.tsx b/public/containers/FlushIndexModal/FlushIndexModal.tsx index ff1a278fb..9c6a8ef04 100644 --- a/public/containers/FlushIndexModal/FlushIndexModal.tsx +++ b/public/containers/FlushIndexModal/FlushIndexModal.tsx @@ -14,6 +14,7 @@ import { EuiModalHeader, EuiModalHeaderTitle, EuiSpacer, + EuiText, } from "@elastic/eui"; import { CoreStart } from "opensearch-dashboards/public"; import { CoreServicesContext } from "../../components/core_services"; @@ -157,7 +158,13 @@ export default function FlushIndexModal(props: FlushIndexModalProps) { return ( - Flush {flushTarget} + + {" "} + + {" "} +

Flush {flushTarget}

{" "} +
{" "} +
@@ -166,12 +173,16 @@ export default function FlushIndexModal(props: FlushIndexModalProps) { {flushAll &&

{flushAllMessage}

} {!!unBlockedItems.length && ( <> -

{`The following ${flushTarget} will be flushed:`}

-
    - {unBlockedItems.map((item) => ( -
  • {item}
  • - ))} -
+ +

{`The following ${flushTarget} will be flushed:`}

+
+ +
    + {unBlockedItems.map((item) => ( +
  • {item}
  • + ))} +
+
)} diff --git a/public/containers/FlushIndexModal/__snapshots__/FlushIndexModal.test.tsx.snap b/public/containers/FlushIndexModal/__snapshots__/FlushIndexModal.test.tsx.snap index bb47eb31f..24b648ed7 100644 --- a/public/containers/FlushIndexModal/__snapshots__/FlushIndexModal.test.tsx.snap +++ b/public/containers/FlushIndexModal/__snapshots__/FlushIndexModal.test.tsx.snap @@ -40,8 +40,18 @@ HTMLCollection [ class="euiModalHeader__title" data-test-subj="flushModalTitle" > - Flush - aliases + +
+ +

+ Flush + aliases +

+ +
+
-

- The following aliases will be flushed: -

-
    -
  • - alias2 -
  • -
+

+ The following aliases will be flushed: +

+
+
+
    +
  • + alias2 +
  • +
+
@@ -186,8 +204,18 @@ HTMLCollection [ class="euiModalHeader__title" data-test-subj="flushModalTitle" > - Flush - data streams + +
+ +

+ Flush + data streams +

+ +
+
-

- The following data streams will be flushed: -

-
    +

    + The following data streams will be flushed: +

    +
+
-
  • - ds2 -
  • - +
      +
    • + ds2 +
    • +
    +
    @@ -332,8 +368,18 @@ HTMLCollection [ class="euiModalHeader__title" data-test-subj="flushModalTitle" > - Flush - indexes + +
    + +

    + Flush + indexes +

    + +
    +
    -

    - The following indexes will be flushed: -

    -
      +

      + The following indexes will be flushed: +

      +
    +
    -
  • - test_index2 -
  • -
  • - test_index3 -
  • - +
      +
    • + test_index2 +
    • +
    • + test_index3 +
    • +
    +
    @@ -481,8 +535,18 @@ HTMLCollection [ class="euiModalHeader__title" data-test-subj="flushModalTitle" > - Flush - indexes + +
    + +

    + Flush + indexes +

    + +
    +
    - Flush - indexes + +
    + +

    + Flush + indexes +

    + +
    +
    -

    - The following indexes will be flushed: -

    -
      -
    • - test_index2 -
    • -
    • - test_index3 -
    • -
    +

    + The following indexes will be flushed: +

    +
    +
    +
      +
    • + test_index2 +
    • +
    • + test_index3 +
    • +
    +
    diff --git a/public/containers/IndexDetail/__snapshots__/IndexDetail.test.tsx.snap b/public/containers/IndexDetail/__snapshots__/IndexDetail.test.tsx.snap index 34610a986..1a6374a6a 100644 --- a/public/containers/IndexDetail/__snapshots__/IndexDetail.test.tsx.snap +++ b/public/containers/IndexDetail/__snapshots__/IndexDetail.test.tsx.snap @@ -4,41 +4,23 @@ exports[` spec render the component 1`] = `
    -
    -

    - Source index details - - - - -

    -
    +

    + Source index details +


    -
    -
    -
    + class="euiSpacer euiSpacer--l" + /> +
    `; diff --git a/public/containers/IndexDetail/index.tsx b/public/containers/IndexDetail/index.tsx index 0faa0aa2d..44b21cf36 100644 --- a/public/containers/IndexDetail/index.tsx +++ b/public/containers/IndexDetail/index.tsx @@ -2,10 +2,9 @@ * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ -import { EuiSpacer } from "@elastic/eui"; +import { EuiSpacer, EuiText, EuiTitle, EuiHorizontalRule, EuiPanel } from "@elastic/eui"; import React, { useContext, useEffect, useState } from "react"; import { CatIndex } from "../../../server/models/interfaces"; -import { ContentPanel } from "../../components/ContentPanel"; import { CoreServicesContext } from "../../components/core_services"; import { ServicesContext } from "../../services"; import DescriptionListHoz from "../../components/DescriptionListHoz"; @@ -43,10 +42,15 @@ export default function IndexDetail(props: IIndexDetailProps) { })(); }, [props.indices.join(","), setLoading, setItems, coreServices]); return ( - + + +

    Source index details

    +
    + {items && items.length ? ( {loading ? null : props.children} -
    + ); } diff --git a/public/containers/IndexForm/__snapshots__/IndexForm.test.tsx.snap b/public/containers/IndexForm/__snapshots__/IndexForm.test.tsx.snap index 2caffbb4c..7b76a6aed 100644 --- a/public/containers/IndexForm/__snapshots__/IndexForm.test.tsx.snap +++ b/public/containers/IndexForm/__snapshots__/IndexForm.test.tsx.snap @@ -4,179 +4,175 @@ exports[` spec render page 1`] = `
    -
    -

    - Define index - - - - -

    -
    + +

    + Define index +

    +

    -
    - -
    -
    + Index name + +
    + +
    +
    + -
    -
    - -
    -
    -
    -
    -
    - Must be in lowercase letters. Cannot begin with underscores or hyphens. Spaces, commas, and characters :, ", *, +, /, , |, ?, #, > are not allowed. +
    +
    +
    +
    + Must be in lowercase letters. Cannot begin with underscores or hyphens. Spaces, commas, and characters :, ", *, +, /, , |, ?, #, > are not allowed. +
    +
    +
    +
    +
    +
    -
    +
    - + Allow this index to be referenced by existing aliases or specify a new alias.
    -
    - Allow this index to be referenced by existing aliases or specify a new alias. -
    -
    @@ -186,399 +182,401 @@ exports[` spec render page 1`] = ` />
    -
    -

    - Index settings - - - - -

    -
    + +

    + Index settings +

    +

    -
    - -
    +

    + Number of primary shards +

    +
    + +
    +
    -
    -
    - Specify the number of primary shards for the index. Default is 1. -
    -
    - The number of primary shards cannot be changed after the index is created. -
    +
    + Specify the number of primary shards for the index. Default is 1.
    - + The number of primary shards cannot be changed after the index is created. +
    +
    + +
    -
    - -
    +
    - -
    +
    +
    +
    +
    -
    - -
    +

    + Number of replicas +

    +
    + +
    +
    + Specify the number of replicas each primary shard should have. Default is 1. +
    +
    - Specify the number of replicas each primary shard should have. Default is 1. -
    -
    -
    - -
    +
    -
    -
    +
    +
    +
    +
    -
    - -
    +

    + Refresh interval +

    +
    + +
    +
    + Specify how often the index should refresh, which publishes the most recent changes and make them available for search. Default is 1 second. +
    +
    - Specify how often the index should refresh, which publishes the most recent changes and make them available for search. Default is 1 second. -
    -
    -
    - -
    +
    -
    -
    +
    +
    +
    +
    +
    -
    - +
    +
    +
    - - EuiIconMock - - -

    - Advanced settings -

    -
    - -
    -
    -
    +
    + class="euiFormRow__labelWrapper" + > + +
    - +

    + Specify a comma-delimited list of settings. + + + View index settings. + EuiIconMock + + (opens in a new tab or window) + + +

    +

    + All the settings will be handled in flat structure. + + + Learn more + EuiIconMock + + (opens in a new tab or window) + + + . +

    +
    -
    -

    - Specify a comma-delimited list of settings. - - - View index settings. - EuiIconMock - - (opens in a new tab or window) - - +

    + Press Enter to start editing.

    -

    - All the settings will be handled in flat structure. - - - Learn more - EuiIconMock - - (opens in a new tab or window) - - - . +

    + When you're done, press Escape to stop editing.

    -
    - +
    - + -
    +
    + + Press Enter to start editing. +

    +

    + When you're done, press Escape to stop editing. +

    + +
    +