diff --git a/.github/workflows/cypress-workflow.yml b/.github/workflows/cypress-workflow.yml index 7611bca86..8e1be8431 100644 --- a/.github/workflows/cypress-workflow.yml +++ b/.github/workflows/cypress-workflow.yml @@ -7,8 +7,8 @@ on: branches: - "*" env: - OPENSEARCH_DASHBOARDS_VERSION: '2.4' - OPENSEARCH_VERSION: '2.4.1-SNAPSHOT' + OPENSEARCH_DASHBOARDS_VERSION: '2.4.1' + OPENSEARCH_VERSION: '2.4.1.0' jobs: tests: name: Run Cypress E2E tests @@ -29,11 +29,11 @@ jobs: with: path: index-management repository: opensearch-project/index-management - ref: 'main' + ref: ${{ env.OPENSEARCH_VERSION }} - name: Run opensearch with plugin run: | cd index-management - ./gradlew run -Dopensearch.version=${{ env.OPENSEARCH_VERSION }} & + ./gradlew run & sleep 300 # timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done' - name: Checkout Index Management Dashboards plugin diff --git a/cypress/integration/managed_indices_spec.js b/cypress/integration/managed_indices_spec.js index aa08e7505..9dfec8036 100644 --- a/cypress/integration/managed_indices_spec.js +++ b/cypress/integration/managed_indices_spec.js @@ -217,7 +217,7 @@ describe("Managed indices", () => { cy.contains("Changed policy on 1 indices"); // Click back to Managed Indices page by clicking "Managed indices" breadcrumb - cy.contains("Managed indices").click(); + cy.contains("Policy managed indices").click(); // Speed up execution of managed index cy.updateManagedIndexConfigStartTime(SAMPLE_INDEX); diff --git a/cypress/integration/policies_spec.js b/cypress/integration/policies_spec.js index 9979a2283..92b3d7325 100644 --- a/cypress/integration/policies_spec.js +++ b/cypress/integration/policies_spec.js @@ -39,7 +39,7 @@ describe("Policies", () => { cy.contains("Continue").click({ force: true }); // Wait for input to load and then type in the policy ID - cy.get(`input[placeholder="hot_cold_workflow"]`).type(POLICY_ID, { force: true }); + cy.get(`input[placeholder="example_policy"]`).type(POLICY_ID, { force: true }); // Wait for default policy JSON to load cy.contains("A simple default policy"); @@ -188,5 +188,5 @@ describe("Policies", () => { cy.get(`[data-test-subj="viewButton"]`).click({ force: true }); cy.contains(`View JSON of ${POLICY_ID}`); }); - }) + }); }); diff --git a/public/components/ContentPanel/ContentPanel.tsx b/public/components/ContentPanel/ContentPanel.tsx index 5beae96e2..dd98691b6 100644 --- a/public/components/ContentPanel/ContentPanel.tsx +++ b/public/components/ContentPanel/ContentPanel.tsx @@ -15,6 +15,7 @@ interface ContentPanelProps { horizontalRuleClassName?: string; actions?: React.ReactNode | React.ReactNode[]; children: React.ReactNode | React.ReactNode[]; + itemCount?: number; } const renderSubTitleText = (subTitleText: string | JSX.Element): JSX.Element | null => { @@ -38,13 +39,17 @@ const ContentPanel: React.SFC = ({ horizontalRuleClassName = "", actions, children, + itemCount = 0, }) => ( {typeof title === "string" ? ( -

{title}

+

+ {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 4ae35fa25..3e000f463 100644 --- a/public/components/ContentPanel/__snapshots__/ContentPanel.test.tsx.snap +++ b/public/components/ContentPanel/__snapshots__/ContentPanel.test.tsx.snap @@ -16,6 +16,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--large" > Testing + + + +
spec renders the component 1`] = ` class="euiTitle euiTitle--small" > Choose managed indices + + + +
diff --git a/public/pages/ChangePolicy/components/NewPolicy/__snapshots__/NewPolicy.test.tsx.snap b/public/pages/ChangePolicy/components/NewPolicy/__snapshots__/NewPolicy.test.tsx.snap index c906d0aea..94100bb2f 100644 --- a/public/pages/ChangePolicy/components/NewPolicy/__snapshots__/NewPolicy.test.tsx.snap +++ b/public/pages/ChangePolicy/components/NewPolicy/__snapshots__/NewPolicy.test.tsx.snap @@ -16,6 +16,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--small" > Choose new policy + + + + diff --git a/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap b/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap index 2542a1352..6e4ec487c 100644 --- a/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap +++ b/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap @@ -27,6 +27,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--small" > Choose managed indices + + + + @@ -221,6 +227,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--small" > Choose new policy + + + + diff --git a/public/pages/CreatePolicy/components/ConfigurePolicy/ConfigurePolicy.tsx b/public/pages/CreatePolicy/components/ConfigurePolicy/ConfigurePolicy.tsx index 4f9bb9d2b..20d471c9b 100644 --- a/public/pages/CreatePolicy/components/ConfigurePolicy/ConfigurePolicy.tsx +++ b/public/pages/CreatePolicy/components/ConfigurePolicy/ConfigurePolicy.tsx @@ -27,7 +27,7 @@ const ConfigurePolicy = ({ isEdit, policyId, policyIdError, onChange }: Configur isInvalid={!!policyIdError} error={policyIdError} > - +
diff --git a/public/pages/CreatePolicy/components/ConfigurePolicy/__snapshots__/ConfigurePolicy.test.tsx.snap b/public/pages/CreatePolicy/components/ConfigurePolicy/__snapshots__/ConfigurePolicy.test.tsx.snap index e2cd139f6..236b5c3cc 100644 --- a/public/pages/CreatePolicy/components/ConfigurePolicy/__snapshots__/ConfigurePolicy.test.tsx.snap +++ b/public/pages/CreatePolicy/components/ConfigurePolicy/__snapshots__/ConfigurePolicy.test.tsx.snap @@ -16,6 +16,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--small" > Name policy + + + + @@ -66,7 +72,7 @@ exports[` spec renders the component 1`] = ` aria-describedby="some_html_id-help-0" class="euiFieldText" id="some_html_id" - placeholder="hot_cold_workflow" + placeholder="example_policy" type="text" value="some_id" /> diff --git a/public/pages/CreatePolicy/components/DefinePolicy/__snapshots__/DefinePolicy.test.tsx.snap b/public/pages/CreatePolicy/components/DefinePolicy/__snapshots__/DefinePolicy.test.tsx.snap index c36be75f8..02aca8681 100644 --- a/public/pages/CreatePolicy/components/DefinePolicy/__snapshots__/DefinePolicy.test.tsx.snap +++ b/public/pages/CreatePolicy/components/DefinePolicy/__snapshots__/DefinePolicy.test.tsx.snap @@ -16,6 +16,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--small" > Define policy + + + +
spec", () => { await waitFor(() => getByDisplayValue("some_id")); - expect(getByPlaceholderText("hot_cold_workflow")).toHaveAttribute("readonly"); + expect(getByPlaceholderText("example_policy")).toHaveAttribute("readonly"); }); it("shows error for policyId input when clicking create", async () => { @@ -127,9 +127,9 @@ describe(" spec", () => { expect(queryByText("Required")).not.toBeNull(); - fireEvent.focus(getByPlaceholderText("hot_cold_workflow")); - userEvent.type(getByPlaceholderText("hot_cold_workflow"), `some_policy_id`); - fireEvent.blur(getByPlaceholderText("hot_cold_workflow")); + fireEvent.focus(getByPlaceholderText("example_policy")); + userEvent.type(getByPlaceholderText("example_policy"), `some_policy_id`); + fireEvent.blur(getByPlaceholderText("example_policy")); expect(queryByText("Required")).toBeNull(); }); @@ -138,9 +138,9 @@ describe(" spec", () => { browserServicesMock.policyService.putPolicy = jest.fn().mockResolvedValue({ ok: true, response: { _id: "some_policy_id" } }); const { getByText, getByTestId, getByPlaceholderText } = renderCreatePolicyWithRouter(); - fireEvent.focus(getByPlaceholderText("hot_cold_workflow")); - userEvent.type(getByPlaceholderText("hot_cold_workflow"), `some_policy_id`); - fireEvent.blur(getByPlaceholderText("hot_cold_workflow")); + fireEvent.focus(getByPlaceholderText("example_policy")); + userEvent.type(getByPlaceholderText("example_policy"), `some_policy_id`); + fireEvent.blur(getByPlaceholderText("example_policy")); userEvent.click(getByTestId("createPolicyCreateButton")); @@ -152,9 +152,9 @@ describe(" spec", () => { browserServicesMock.policyService.putPolicy = jest.fn().mockResolvedValue({ ok: false, error: "bad policy" }); const { getByText, getByTestId, getByPlaceholderText } = renderCreatePolicyWithRouter(); - fireEvent.focus(getByPlaceholderText("hot_cold_workflow")); - userEvent.type(getByPlaceholderText("hot_cold_workflow"), `some_policy_id`); - fireEvent.blur(getByPlaceholderText("hot_cold_workflow")); + fireEvent.focus(getByPlaceholderText("example_policy")); + userEvent.type(getByPlaceholderText("example_policy"), `some_policy_id`); + fireEvent.blur(getByPlaceholderText("example_policy")); userEvent.click(getByTestId("createPolicyCreateButton")); @@ -165,9 +165,9 @@ describe(" spec", () => { browserServicesMock.policyService.putPolicy = jest.fn().mockRejectedValue(new Error("this is an error")); const { getByText, getByTestId, getByPlaceholderText } = renderCreatePolicyWithRouter(); - fireEvent.focus(getByPlaceholderText("hot_cold_workflow")); - userEvent.type(getByPlaceholderText("hot_cold_workflow"), `some_policy_id`); - fireEvent.blur(getByPlaceholderText("hot_cold_workflow")); + fireEvent.focus(getByPlaceholderText("example_policy")); + userEvent.type(getByPlaceholderText("example_policy"), `some_policy_id`); + fireEvent.blur(getByPlaceholderText("example_policy")); userEvent.click(getByTestId("createPolicyCreateButton")); diff --git a/public/pages/CreatePolicy/containers/CreatePolicy/__snapshots__/CreatePolicy.test.tsx.snap b/public/pages/CreatePolicy/containers/CreatePolicy/__snapshots__/CreatePolicy.test.tsx.snap index 4831d922b..42fd980de 100644 --- a/public/pages/CreatePolicy/containers/CreatePolicy/__snapshots__/CreatePolicy.test.tsx.snap +++ b/public/pages/CreatePolicy/containers/CreatePolicy/__snapshots__/CreatePolicy.test.tsx.snap @@ -28,6 +28,12 @@ exports[` spec renders the create component 1`] = ` class="euiTitle euiTitle--small" > Name policy + + + +
@@ -78,7 +84,7 @@ exports[` spec renders the create component 1`] = ` aria-describedby="some_html_id-help-0" class="euiFieldText" id="some_html_id" - placeholder="hot_cold_workflow" + placeholder="example_policy" type="text" value="" /> @@ -113,6 +119,12 @@ exports[` spec renders the create component 1`] = ` class="euiTitle euiTitle--small" > Define policy + + + +
spec renders the create component 1`] = ` { "policy": { "description": "A simple default policy that changes the replica count between hot and cold states.", - "default_state": "hot", + "default_state": "example_hot_state", "states": [ { - "name": "hot", + "name": "example_hot_state", "actions": [ { "replica_count": { @@ -207,7 +219,7 @@ exports[` spec renders the create component 1`] = ` ], "transitions": [ { - "state_name": "cold", + "state_name": "example_cold_state", "conditions": { "min_index_age": "30d" } @@ -215,7 +227,7 @@ exports[` spec renders the create component 1`] = ` ] }, { - "name": "cold", + "name": "example_cold_state", "actions": [ { "replica_count": { @@ -225,7 +237,12 @@ exports[` spec renders the create component 1`] = ` ], "transitions": [] } - ] + ], + "ism_template": { + "index_patterns": [ + "example-index-*" + ] + } } } @@ -355,6 +372,12 @@ exports[` spec renders the edit component 1`] = ` class="euiTitle euiTitle--small" > Name policy + + + +
@@ -405,7 +428,7 @@ exports[` spec renders the edit component 1`] = ` aria-describedby="some_html_id-help-0" class="euiFieldText" id="some_html_id" - placeholder="hot_cold_workflow" + placeholder="example_policy" readonly="" type="text" value="some_policy" @@ -441,6 +464,12 @@ exports[` spec renders the edit component 1`] = ` class="euiTitle euiTitle--small" > Define policy + + + +
spec renders the edit component 1`] = ` "policy": { "policy": { "description": "A simple default policy that changes the replica count between hot and cold states.", - "default_state": "hot", + "default_state": "example_hot_state", "states": [ { - "name": "hot", + "name": "example_hot_state", "actions": [ { "replica_count": { @@ -536,7 +565,7 @@ exports[` spec renders the edit component 1`] = ` ], "transitions": [ { - "state_name": "cold", + "state_name": "example_cold_state", "conditions": { "min_index_age": "30d" } @@ -544,7 +573,7 @@ exports[` spec renders the edit component 1`] = ` ] }, { - "name": "cold", + "name": "example_cold_state", "actions": [ { "replica_count": { @@ -554,7 +583,12 @@ exports[` spec renders the edit component 1`] = ` ], "transitions": [] } - ] + ], + "ism_template": { + "index_patterns": [ + "example-index-*" + ] + } } } } diff --git a/public/pages/CreatePolicy/utils/constants.ts b/public/pages/CreatePolicy/utils/constants.ts index 76bca1689..8218d5dd5 100644 --- a/public/pages/CreatePolicy/utils/constants.ts +++ b/public/pages/CreatePolicy/utils/constants.ts @@ -7,19 +7,22 @@ export const DEFAULT_POLICY = JSON.stringify( { policy: { description: "A simple default policy that changes the replica count between hot and cold states.", - default_state: "hot", + default_state: "example_hot_state", states: [ { - name: "hot", + name: "example_hot_state", actions: [{ replica_count: { number_of_replicas: 5 } }], - transitions: [{ state_name: "cold", conditions: { min_index_age: "30d" } }], + transitions: [{ state_name: "example_cold_state", conditions: { min_index_age: "30d" } }], }, { - name: "cold", + name: "example_cold_state", actions: [{ replica_count: { number_of_replicas: 2 } }], transitions: [], }, ], + ism_template: { + index_patterns: ["example-index-*"], + }, }, }, null, diff --git a/public/pages/CreateRollup/containers/CreateRollupForm/__snapshots__/CreateRollupForm.test.tsx.snap b/public/pages/CreateRollup/containers/CreateRollupForm/__snapshots__/CreateRollupForm.test.tsx.snap index aa2980999..4a55683b4 100644 --- a/public/pages/CreateRollup/containers/CreateRollupForm/__snapshots__/CreateRollupForm.test.tsx.snap +++ b/public/pages/CreateRollup/containers/CreateRollupForm/__snapshots__/CreateRollupForm.test.tsx.snap @@ -174,6 +174,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--medium" > Job name and description + + + +
@@ -303,6 +309,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--medium" > Indices + + + + diff --git a/public/pages/CreateTransform/containers/CreateTransformForm/__snapshots__/CreateTransformForm.test.tsx.snap b/public/pages/CreateTransform/containers/CreateTransformForm/__snapshots__/CreateTransformForm.test.tsx.snap index 1b33b28e3..fb9f7e3b7 100644 --- a/public/pages/CreateTransform/containers/CreateTransformForm/__snapshots__/CreateTransformForm.test.tsx.snap +++ b/public/pages/CreateTransform/containers/CreateTransformForm/__snapshots__/CreateTransformForm.test.tsx.snap @@ -176,6 +176,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--medium" > Job name and description + + + + @@ -301,6 +307,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--medium" > Indices + + + + diff --git a/public/pages/EditRollup/containers/__snapshots__/EditRollup.test.tsx.snap b/public/pages/EditRollup/containers/__snapshots__/EditRollup.test.tsx.snap index 32266757f..910e314ee 100644 --- a/public/pages/EditRollup/containers/__snapshots__/EditRollup.test.tsx.snap +++ b/public/pages/EditRollup/containers/__snapshots__/EditRollup.test.tsx.snap @@ -27,6 +27,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--medium" > Job name and description + + + + @@ -157,6 +163,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--small" > Schedule + + + + diff --git a/public/pages/Indices/components/IndexControls/IndexControls.test.tsx b/public/pages/Indices/components/IndexControls/IndexControls.test.tsx index 5b8cd9488..b177e13e6 100644 --- a/public/pages/Indices/components/IndexControls/IndexControls.test.tsx +++ b/public/pages/Indices/components/IndexControls/IndexControls.test.tsx @@ -50,35 +50,6 @@ describe(" spec", () => { expect(onSearchChange).toHaveBeenCalledTimes(4); }); - it("calls onRefresh on an interval", async () => { - const onRefresh = jest.fn(); - const { getByTestId } = render( - {}} - onPageClick={() => {}} - onRefresh={onRefresh} - showDataStreams={false} - getDataStreams={async () => []} - toggleShowDataStreams={() => {}} - /> - ); - - fireEvent.click(getByTestId("superDatePickerToggleQuickMenuButton")); - - expect(getByTestId("superDatePickerToggleRefreshButton")).toBeDisabled(); - - userEvent.type(getByTestId("superDatePickerRefreshIntervalInput"), "1"); - - expect(getByTestId("superDatePickerToggleRefreshButton")).toBeEnabled(); - - fireEvent.click(getByTestId("superDatePickerToggleRefreshButton")); - - await waitFor(() => expect(onRefresh).toHaveBeenCalledTimes(2), { timeout: 10000 }); - }); - it("calls toggleShowDataStreams when clicked", async () => { const toggleShowDataStreams = jest.fn(); const { getByTestId } = render( diff --git a/public/pages/Indices/components/IndexControls/IndexControls.tsx b/public/pages/Indices/components/IndexControls/IndexControls.tsx index 2aea2bb5c..50323c89b 100644 --- a/public/pages/Indices/components/IndexControls/IndexControls.tsx +++ b/public/pages/Indices/components/IndexControls/IndexControls.tsx @@ -5,7 +5,6 @@ import React, { Component } from "react"; import { ArgsWithError, ArgsWithQuery, EuiFlexGroup, EuiFlexItem, EuiSearchBar, EuiSwitch } from "@elastic/eui"; -import EuiRefreshPicker from "../../../../temporary/EuiRefreshPicker"; import { DataStream } from "../../../../../server/models/interfaces"; interface IndexControlsProps { @@ -37,8 +36,7 @@ export default class IndexControls extends Component
- - -
); } diff --git a/public/pages/Indices/components/IndexControls/__snapshots__/IndexControls.test.tsx.snap b/public/pages/Indices/components/IndexControls/__snapshots__/IndexControls.test.tsx.snap index a3a51ff4a..d9b88089c 100644 --- a/public/pages/Indices/components/IndexControls/__snapshots__/IndexControls.test.tsx.snap +++ b/public/pages/Indices/components/IndexControls/__snapshots__/IndexControls.test.tsx.snap @@ -127,61 +127,6 @@ exports[` spec renders data streams selection field 1`] = ` -
-
-
-
-
-
- -
-
-
-
- - Off - -
-
-
-
-
-
`; @@ -274,60 +219,5 @@ exports[` spec renders the component 1`] = ` -
-
-
-
-
-
- -
-
-
-
- - Off - -
-
-
-
-
-
`; diff --git a/public/pages/Indices/containers/Indices/Indices.tsx b/public/pages/Indices/containers/Indices/Indices.tsx index e4e9040c0..e33aaa01b 100644 --- a/public/pages/Indices/containers/Indices/Indices.tsx +++ b/public/pages/Indices/containers/Indices/Indices.tsx @@ -215,6 +215,13 @@ export default class Indices extends Component { {({ onShow }) => ( { } bodyStyles={{ padding: "initial" }} title="Indices" + itemCount={totalIndices} > spec renders the component 1`] = ` class="euiTitle euiTitle--large" > Indices + + + +
spec renders the component 1`] = `
+
+ +
@@ -138,61 +164,6 @@ exports[` spec renders the component 1`] = `
-
-
-
-
-
-
- -
-
-
-
- - Off - -
-
-
-
-
-

spec", () => { /> ); - userEvent.type(getByPlaceholderText("Search"), "four"); + userEvent.type(getByPlaceholderText("Search index name"), "four"); expect(onSearchChange).toHaveBeenCalledTimes(4); }); - it("calls onRefresh on an interval", async () => { - const onRefresh = jest.fn(); - const { getByTestId } = render( - {}} - onPageClick={() => {}} - onRefresh={onRefresh} - showDataStreams={false} - getDataStreams={async () => []} - toggleShowDataStreams={() => {}} - /> - ); - - fireEvent.click(getByTestId("superDatePickerToggleQuickMenuButton")); - - expect(getByTestId("superDatePickerToggleRefreshButton")).toBeDisabled(); - - userEvent.type(getByTestId("superDatePickerRefreshIntervalInput"), "1"); - - expect(getByTestId("superDatePickerToggleRefreshButton")).toBeEnabled(); - - fireEvent.click(getByTestId("superDatePickerToggleRefreshButton")); - - await waitFor(() => expect(onRefresh).toHaveBeenCalledTimes(2), { timeout: 10000 }); - }); - it("calls toggleShowDataStreams when clicked", async () => { const toggleShowDataStreams = jest.fn(); const { getByTestId } = render( diff --git a/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx b/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx index d9be76d13..245cd8645 100644 --- a/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx +++ b/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx @@ -5,7 +5,6 @@ import React, { Component } from "react"; import { ArgsWithQuery, ArgsWithError, EuiFlexGroup, EuiFlexItem, EuiPagination, EuiSearchBar, EuiSwitch } from "@elastic/eui"; -import EuiRefreshPicker from "../../../../temporary/EuiRefreshPicker"; import { DataStream } from "../../../../../server/models/interfaces"; interface ManagedIndexControlsProps { @@ -32,8 +31,7 @@ export default class ManagedIndexControls extends Component @@ -79,14 +77,6 @@ export default class ManagedIndexControls extends Component - - - ); } diff --git a/public/pages/ManagedIndices/components/ManagedIndexControls/__snapshots__/ManagedIndexControls.test.tsx.snap b/public/pages/ManagedIndices/components/ManagedIndexControls/__snapshots__/ManagedIndexControls.test.tsx.snap index dae1f55a6..f5599270f 100644 --- a/public/pages/ManagedIndices/components/ManagedIndexControls/__snapshots__/ManagedIndexControls.test.tsx.snap +++ b/public/pages/ManagedIndices/components/ManagedIndexControls/__snapshots__/ManagedIndexControls.test.tsx.snap @@ -23,7 +23,7 @@ exports[` spec renders data streams selection field 1`] @@ -116,61 +116,6 @@ exports[` spec renders data streams selection field 1`] -
-
-
-
-
-
- -
-
-
-
- - Off - -
-
-
-
-
-
`; @@ -197,7 +142,7 @@ exports[` spec renders the component 1`] = ` @@ -263,60 +208,5 @@ exports[` spec renders the component 1`] = ` -
-
-
-
-
-
- -
-
-
-
- - Off - -
-
-
-
-
-
`; diff --git a/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx b/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx index b273d32a5..260104748 100644 --- a/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx +++ b/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx @@ -45,10 +45,7 @@ import RetryModal from "../../components/RetryModal"; import RolloverAliasModal from "../../components/RolloverAliasModal"; import { CoreServicesContext } from "../../../../components/core_services"; import { DataStream } from "../../../../../server/models/interfaces"; -import { - CUSTOM_DATA_STREAM_SECURITY_EXCEPTION, - DATA_STREAM_LACK_PERMISSION_WARNING, -} from "../../../../../server/services/DataStreamService"; +import { SECURITY_EXCEPTION_PREFIX } from "../../../../../server/utils/constants"; interface ManagedIndicesProps extends RouteComponentProps { managedIndexService: ManagedIndexService; @@ -152,7 +149,11 @@ export default class ManagedIndices extends Component ( - {({ onShow }) => onShow(InfoModal, { info })}>{_.get(info, "message", DEFAULT_EMPTY_DATA)}} + {({ onShow }) => ( + onShow(InfoModal, { info })}> + {_.get(info, "message", DEFAULT_EMPTY_DATA)} + + )} ), }, @@ -257,8 +258,8 @@ export default class ManagedIndices extends Component - - -

Managed Indices

-
+ + + + Refresh + @@ -437,7 +439,12 @@ export default class ManagedIndices extends Component - } bodyStyles={{ padding: "initial" }} title="Indices"> + } + bodyStyles={{ padding: "initial" }} + title="Policy managed indices" + itemCount={totalManagedIndices} + > spec renders the component 1`] = ` >
+
-

- Managed Indices -

+ + EuiIconMock + + Refresh + + +
spec renders the component 1`] = `

- Indices + Policy managed indices + + + +

spec renders the component 1`] = ` @@ -217,61 +237,6 @@ exports[` spec renders the component 1`] = `
-
-
-
-
-
-
- -
-
-
-
- - Off - -
-
-
-
-
-

spec", () => { expect(onPageClick).toHaveBeenCalledTimes(1); }); - - it("calls onRefresh on an interval", async () => { - const onRefresh = jest.fn(); - const { getByTestId } = render( - {}} onPageClick={() => {}} onRefresh={onRefresh} /> - ); - - fireEvent.click(getByTestId("superDatePickerToggleQuickMenuButton")); - - expect(getByTestId("superDatePickerToggleRefreshButton")).toBeDisabled(); - - userEvent.type(getByTestId("superDatePickerRefreshIntervalInput"), "1"); - - expect(getByTestId("superDatePickerToggleRefreshButton")).toBeEnabled(); - - fireEvent.click(getByTestId("superDatePickerToggleRefreshButton")); - - await waitFor(() => expect(onRefresh).toHaveBeenCalledTimes(2), { timeout: 10000 }); - }); }); diff --git a/public/pages/Policies/components/PolicyControls/PolicyControls.tsx b/public/pages/Policies/components/PolicyControls/PolicyControls.tsx index 8dcd4f1fa..433ca1910 100644 --- a/public/pages/Policies/components/PolicyControls/PolicyControls.tsx +++ b/public/pages/Policies/components/PolicyControls/PolicyControls.tsx @@ -5,7 +5,6 @@ import React, { Component } from "react"; import { EuiFieldSearch, EuiFlexGroup, EuiFlexItem, EuiPagination } from "@elastic/eui"; -import EuiRefreshPicker from "../../../../temporary/EuiRefreshPicker"; interface PolicyControlsProps { activePage: number; @@ -32,21 +31,12 @@ export default class PolicyControls extends Component - - - {pageCount > 1 && ( spec renders the component 1`] = ` -
-
-
-
-
-
- -
-
-
-
- - Off - -
-
-
-
-
-
`; diff --git a/public/pages/Policies/containers/Policies/Policies.tsx b/public/pages/Policies/containers/Policies/Policies.tsx index 9e7fbedb5..d36d1f8ee 100644 --- a/public/pages/Policies/containers/Policies/Policies.tsx +++ b/public/pages/Policies/containers/Policies/Policies.tsx @@ -273,7 +273,12 @@ export default class Policies extends Component { ]; return ( - } bodyStyles={{ padding: "initial" }} title="Index policies"> + } + bodyStyles={{ padding: "initial" }} + title="State management policies" + itemCount={totalPolicies} + > spec renders the component 1`] = `

- Index policies + State management policies + + + +

spec renders the component 1`] = `
-
-
-
-
-
-
- -
-
-
-
- - Off - -
-
-
-
-
-

spec renders the component 1`] = ` class="euiTitle euiTitle--small" > Policy settings + + + + diff --git a/public/pages/Transforms/containers/Transforms/__snapshots__/EditTransform.test.tsx.snap b/public/pages/Transforms/containers/Transforms/__snapshots__/EditTransform.test.tsx.snap index 088b2fd32..5046d44e6 100644 --- a/public/pages/Transforms/containers/Transforms/__snapshots__/EditTransform.test.tsx.snap +++ b/public/pages/Transforms/containers/Transforms/__snapshots__/EditTransform.test.tsx.snap @@ -27,6 +27,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--medium" > Job name and description + + + + @@ -157,6 +163,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--medium" > Indices + + + + @@ -330,6 +342,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--medium" > Schedule + + + + diff --git a/public/pages/VisualCreatePolicy/components/PolicyInfo/__snapshots__/PolicyInfo.test.tsx.snap b/public/pages/VisualCreatePolicy/components/PolicyInfo/__snapshots__/PolicyInfo.test.tsx.snap index 07cbf4c43..5c98151c3 100644 --- a/public/pages/VisualCreatePolicy/components/PolicyInfo/__snapshots__/PolicyInfo.test.tsx.snap +++ b/public/pages/VisualCreatePolicy/components/PolicyInfo/__snapshots__/PolicyInfo.test.tsx.snap @@ -16,6 +16,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--small" > Policy info + + + + diff --git a/public/pages/VisualCreatePolicy/components/States/__snapshots__/States.test.tsx.snap b/public/pages/VisualCreatePolicy/components/States/__snapshots__/States.test.tsx.snap index 9edd72715..27704ea90 100644 --- a/public/pages/VisualCreatePolicy/components/States/__snapshots__/States.test.tsx.snap +++ b/public/pages/VisualCreatePolicy/components/States/__snapshots__/States.test.tsx.snap @@ -16,6 +16,12 @@ exports[` spec renders the component 1`] = ` class="euiTitle euiTitle--small" > States (2) + + + +