From bb3612dc3c4458fd6e67aa198e3aff2b04954b8c Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 30 May 2023 16:23:13 +0800 Subject: [PATCH 01/29] Update release note and minor change to toast message. (#770) (#771) * Update 2.8 release note with original PR numbers to follow the standard. Signed-off-by: Xuesong Luo * If refresh all index fails, show red index names in the toast. Signed-off-by: Xuesong Luo --------- Signed-off-by: Xuesong Luo (cherry picked from commit 1b86a6fe4943d8c0fe586e222e4233b991aba0d1) Co-authored-by: Xuesong Luo --- public/containers/RefreshAction/index.tsx | 8 +++++++- .../containers/IndicesActions/IndicesActions.test.tsx | 2 +- ...-management-dashboards-plugin.release-notes-2.8.0.0.md | 8 ++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/public/containers/RefreshAction/index.tsx b/public/containers/RefreshAction/index.tsx index f76fa7c60..b1768b778 100644 --- a/public/containers/RefreshAction/index.tsx +++ b/public/containers/RefreshAction/index.tsx @@ -88,10 +88,16 @@ export default function RefreshActionModal(props: RefreshActionModalProps) { if (!selectedItems.length) { if (!blockedItems.length) { setLoading(false); + } else if (blockedItems.length === 1) { + coreServices.notifications.toasts.addDanger({ + title: `Unable to refresh indexes.`, + text: `Cannot refresh all open indexes because [${blockedItems.join(", ")}] is in red status.`, + }); + onClose(); } else { coreServices.notifications.toasts.addDanger({ title: `Unable to refresh indexes.`, - text: `Cannot refresh all open indexes because one or more indexes are in red status.`, + text: `Cannot refresh all open indexes because [${blockedItems.join(", ")}] are in red status.`, }); onClose(); } diff --git a/public/pages/Indices/containers/IndicesActions/IndicesActions.test.tsx b/public/pages/Indices/containers/IndicesActions/IndicesActions.test.tsx index 7099d2c4c..26f2568f6 100644 --- a/public/pages/Indices/containers/IndicesActions/IndicesActions.test.tsx +++ b/public/pages/Indices/containers/IndicesActions/IndicesActions.test.tsx @@ -1262,7 +1262,7 @@ describe(" spec", () => { await waitFor(() => { expect(coreServicesMock.notifications.toasts.addDanger).toHaveBeenCalledWith({ - text: "Cannot refresh all open indexes because one or more indexes are in red status.", + text: "Cannot refresh all open indexes because [red_index] is in red status.", title: "Unable to refresh indexes.", }); }); diff --git a/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.8.0.0.md b/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.8.0.0.md index f3e26ecad..27602a27a 100644 --- a/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.8.0.0.md +++ b/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.8.0.0.md @@ -3,11 +3,11 @@ Compatible with OpenSearch 2.8.0 ### Features -* Feature: Add refresh index operation to UI ([#762](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/762)) +* Feature: Add refresh index operation to UI ([#761](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/761)) * Feature: Add clear cache operation to UI ([#728](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/728)) -* Feature: Add flush index operation to UI ([#757](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/757),[#719](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/719),[#752](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/752),[#755](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/755)) -* Feature: Add notification settings page and runtime notification option for long running index operations ([#764](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/764),[#763](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/763)) -* Feature: Composable templates enhancement ([#759](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/759)) +* Feature: Add flush index operation to UI ([#713](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/713),[#718](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/718),[#751](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/751),[#753](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/753)) +* Feature: Add notification settings page and runtime notification option for long running index operations ([#731](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/731),[#732](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/732)) +* Feature: Composable templates enhancement ([#730](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/730)) ### Bug Fixes * Update path parameter to follow RFC/generic HTTP convention. ([#742](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/742)) From 5c882d761907d59c890759e799e1134a11c412c7 Mon Sep 17 00:00:00 2001 From: gaobinlong Date: Tue, 30 May 2023 18:00:51 +0800 Subject: [PATCH 02/29] Minor change for clear cache operation (#773) * Minor change for clear cache operation Signed-off-by: gaobinlong * Modify releate notes Signed-off-by: gaobinlong --------- Signed-off-by: gaobinlong --- .../ClearCacheModal/ClearCacheModal.test.tsx | 50 ++++++++++++++++--- .../ClearCacheModal/ClearCacheModal.tsx | 7 ++- ...dashboards-plugin.release-notes-2.8.0.0.md | 2 +- 3 files changed, 48 insertions(+), 11 deletions(-) diff --git a/public/containers/ClearCacheModal/ClearCacheModal.test.tsx b/public/containers/ClearCacheModal/ClearCacheModal.test.tsx index 45d8c1f82..23e4973b2 100644 --- a/public/containers/ClearCacheModal/ClearCacheModal.test.tsx +++ b/public/containers/ClearCacheModal/ClearCacheModal.test.tsx @@ -5,19 +5,57 @@ import React from "react"; import "@testing-library/jest-dom/extend-expect"; -import { render, fireEvent } from "@testing-library/react"; -import ClearCacheModal from "./ClearCacheModal"; +import { browserServicesMock, coreServicesMock } from "../../../test/mocks"; +import { CoreServicesContext } from "../../components/core_services"; +import { ServicesContext } from "../../services"; +import { BrowserServices } from "../../models/interfaces"; +import { ModalProvider } from "../../components/Modal"; +import { CoreStart } from "opensearch-dashboards/public"; +import { render, fireEvent, waitFor } from "@testing-library/react"; +import ClearCacheModal, { ClearCacheModalProps } from "./ClearCacheModal"; +import { INDEX_OP_TARGET_TYPE } from "../../utils/constants"; +import { act } from "react-dom/test-utils"; +function renderWithRouter( + coreServicesContext: CoreStart | null, + browserServicesContext: BrowserServices | null, + props: ClearCacheModalProps +) { + return { + ...render( + + + + + + + + ), + }; +} describe(" spec", () => { it("renders the component", async () => { - render( {}} type="indexes" />); - + renderWithRouter(coreServicesMock, browserServicesMock, { + selectedItems: [], + visible: true, + type: INDEX_OP_TARGET_TYPE.INDEX, + onClose: () => {}, + }); + await act(async () => {}); expect(document.body.children).toMatchSnapshot(); }); - it("calls close when cancel button clicked", () => { + it("calls close when cancel button clicked", async () => { const onClose = jest.fn(); - const { getByTestId } = render(); + const { getByTestId, getByText } = renderWithRouter(coreServicesMock, browserServicesMock, { + selectedItems: [], + visible: true, + type: INDEX_OP_TARGET_TYPE.INDEX, + onClose: onClose, + }); + await waitFor(() => { + expect(getByText("Cache will be cleared for all open indexes.")).toBeInTheDocument(); + }); fireEvent.click(getByTestId("ClearCacheCancelButton")); expect(onClose).toHaveBeenCalled(); }); diff --git a/public/containers/ClearCacheModal/ClearCacheModal.tsx b/public/containers/ClearCacheModal/ClearCacheModal.tsx index 4ddc39f9f..0855da739 100644 --- a/public/containers/ClearCacheModal/ClearCacheModal.tsx +++ b/public/containers/ClearCacheModal/ClearCacheModal.tsx @@ -23,7 +23,7 @@ import { EuiSpacer, } from "@elastic/eui"; -interface ClearCacheModalProps { +export interface ClearCacheModalProps { selectedItems: CatIndex[] | DataStream[] | IAlias[]; visible: boolean; onClose: () => void; @@ -36,7 +36,7 @@ export default function ClearCacheModal(props: ClearCacheModalProps) { const [blockHint, setBlockHint] = useState(""); const [unBlockedItems, setUnBlockedItems] = useState([] as string[]); const [blockedItems, setBlockedItems] = useState([] as string[]); - const [loading, setLoading] = useState(false); + const [loading, setLoading] = useState(true); const services = useContext(ServicesContext); const coreServices = useContext(CoreServicesContext) as CoreStart; @@ -49,7 +49,6 @@ export default function ClearCacheModal(props: ClearCacheModalProps) { INDEX_OP_BLOCKS_TYPE.READ_ONLY_ALLOW_DELETE, ]; if (!!services && visible) { - setLoading(true); switch (type) { case INDEX_OP_TARGET_TYPE.DATA_STREAM: setHint("Cache will be cleared for the following data streams."); @@ -106,7 +105,7 @@ export default function ClearCacheModal(props: ClearCacheModalProps) { setBlockedItems([] as string[]); setLoading(true); } - }, [services, visible, type, selectedItems, setLoading]); + }, [services, visible, type, selectedItems]); const onConfirm = useCallback(async () => { if (!!services) { diff --git a/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.8.0.0.md b/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.8.0.0.md index 27602a27a..c5f185df8 100644 --- a/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.8.0.0.md +++ b/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.8.0.0.md @@ -4,7 +4,7 @@ Compatible with OpenSearch 2.8.0 ### Features * Feature: Add refresh index operation to UI ([#761](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/761)) -* Feature: Add clear cache operation to UI ([#728](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/728)) +* Feature: Add clear cache operation to UI ([#728](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/728),[#773](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/773)) * Feature: Add flush index operation to UI ([#713](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/713),[#718](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/718),[#751](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/751),[#753](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/753)) * Feature: Add notification settings page and runtime notification option for long running index operations ([#731](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/731),[#732](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/732)) * Feature: Composable templates enhancement ([#730](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/730)) From 0aef2deca6606c95161edbdead9982744a80519a Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 31 May 2023 11:03:38 +0800 Subject: [PATCH 03/29] Fix flush flaky test (#779) (#782) * fix tests Signed-off-by: zhichao-aws * modify release notes Signed-off-by: zhichao-aws --------- Signed-off-by: zhichao-aws (cherry picked from commit 78964cd009f533498f7d333d429abd172c4330d6) Co-authored-by: zhichao-aws --- .../AliasActions/AliasActions.test.tsx | 12 +- .../__snapshots__/AliasActions.test.tsx.snap | 172 ------------------ .../DataStreamsActions.test.tsx | 11 +- .../DataStreamsActions.test.tsx.snap | 153 ---------------- .../IndicesActions/IndicesActions.test.tsx | 4 +- ...dashboards-plugin.release-notes-2.8.0.0.md | 2 +- 6 files changed, 14 insertions(+), 340 deletions(-) diff --git a/public/pages/Aliases/containers/AliasActions/AliasActions.test.tsx b/public/pages/Aliases/containers/AliasActions/AliasActions.test.tsx index 984bdf7ba..4ae8cc4ae 100644 --- a/public/pages/Aliases/containers/AliasActions/AliasActions.test.tsx +++ b/public/pages/Aliases/containers/AliasActions/AliasActions.test.tsx @@ -6,7 +6,6 @@ import React from "react"; import "@testing-library/jest-dom/extend-expect"; import { render, waitFor } from "@testing-library/react"; -// @ts-ignore import userEvent from "@testing-library/user-event"; import { browserServicesMock, coreServicesMock } from "../../../../../test/mocks"; import AliasesActions, { AliasesActionsProps } from "./index"; @@ -14,7 +13,6 @@ import { ModalProvider } from "../../../../components/Modal"; import { ServicesContext } from "../../../../services"; import { CoreServicesContext } from "../../../../components/core_services"; import { buildMockApiCallerForFlush, selectedAliases } from "../../../../containers/FlushIndexModal/FlushIndexModalTestHelper"; -import { act } from "react-dom/test-utils"; import { IAlias } from "../../interface"; function renderWithRouter(props: Omit) { @@ -359,7 +357,7 @@ describe(" spec", () => { it("renders flush component", async () => { browserServicesMock.commonService.apiCaller = buildMockApiCallerForFlush(); - const { getByTestId, getByText } = render( + const { getByTestId, getByText, queryByTestId } = render( @@ -370,9 +368,11 @@ describe(" spec", () => { ); userEvent.click(document.querySelector('[data-test-subj="moreAction"] button') as Element); userEvent.click(getByTestId("Flush Action")); - await act(async () => {}); - expect(getByText("The following aliases will be flushed:")).toBeInTheDocument(); - expect(document.body.children).toMatchSnapshot(); + await waitFor(() => { + expect(queryByTestId("Flush Action")).toBeNull(); + expect(getByText("The following aliases will be flushed:")).toBeInTheDocument(); + expect(document.body.children).toMatchSnapshot(); + }); }); it("flush all aliases disabled", async () => { diff --git a/public/pages/Aliases/containers/AliasActions/__snapshots__/AliasActions.test.tsx.snap b/public/pages/Aliases/containers/AliasActions/__snapshots__/AliasActions.test.tsx.snap index 2874e21ba..0db264c08 100644 --- a/public/pages/Aliases/containers/AliasActions/__snapshots__/AliasActions.test.tsx.snap +++ b/public/pages/Aliases/containers/AliasActions/__snapshots__/AliasActions.test.tsx.snap @@ -466,178 +466,6 @@ HTMLCollection [ , - @@ -425,7 +425,7 @@ exports[` spec renders 1`] = `
- Notify when any force merge operations has failed or completed. + Notify when any force merge operation has failed or completed.
@@ -547,7 +547,7 @@ exports[` spec renders 1`] = `
- Notify when any open operations has failed or completed. + Notify when any open operation has failed or completed.
diff --git a/public/pages/ShrinkIndex/container/ShrinkIndex/__snapshots__/ShrinkIndex.test.tsx.snap b/public/pages/ShrinkIndex/container/ShrinkIndex/__snapshots__/ShrinkIndex.test.tsx.snap index 5ff5f2009..85fd12d27 100644 --- a/public/pages/ShrinkIndex/container/ShrinkIndex/__snapshots__/ShrinkIndex.test.tsx.snap +++ b/public/pages/ShrinkIndex/container/ShrinkIndex/__snapshots__/ShrinkIndex.test.tsx.snap @@ -742,9 +742,7 @@ exports[` spec renders the component 1`] = `
- Notify on - shrink - status + Notifications
Date: Mon, 10 Jul 2023 16:37:02 +0800 Subject: [PATCH 07/29] Increment version to 2.9.0.0 (#795) Signed-off-by: opensearch-ci-bot Co-authored-by: opensearch-ci-bot --- opensearch_dashboards.json | 6 +-- package.json | 4 +- yarn.lock | 108 +++++++++++++++++++++++++++++++++---- 3 files changed, 102 insertions(+), 16 deletions(-) diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index 660a45309..46411eabc 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -1,7 +1,7 @@ { "id": "indexManagementDashboards", - "version": "2.8.0.0", - "opensearchDashboardsVersion": "2.8.0", + "version": "2.9.0.0", + "opensearchDashboardsVersion": "2.9.0", "configPath": [ "opensearch_index_management" ], @@ -11,4 +11,4 @@ ], "server": true, "ui": true -} +} \ No newline at end of file diff --git a/package.json b/package.json index d490617c1..f400177f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opensearch_index_management_dashboards", - "version": "2.8.0.0", + "version": "2.9.0.0", "description": "Opensearch Dashboards plugin for Index Management", "main": "index.js", "license": "Apache-2.0", @@ -70,4 +70,4 @@ "engines": { "yarn": "^1.21.1" } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 8b47c16e2..140acd3d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -94,6 +94,90 @@ "@types/istanbul-reports" "^1.1.1" "@types/yargs" "^13.0.0" +"@node-rs/xxhash-android-arm-eabi@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-android-arm-eabi/-/xxhash-android-arm-eabi-1.4.0.tgz#55ace4d3882686d1e379aaf613e1338d78f13fc8" + integrity sha512-JuZNqt5/znWkIGteikQdS+HT9S0JsMYi06S4yzU/sMKLCIPvD0MnCTXlYtuDcgRIKScCaepAsSQVomnAyLFNNA== + +"@node-rs/xxhash-android-arm64@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-android-arm64/-/xxhash-android-arm64-1.4.0.tgz#2290c53ceabda804afb4c45679613d833a6385a0" + integrity sha512-BZzQO5jlgsIr9HhiqTwZjYqlfVeZiu+7PaoAdNEOq+i/SjyAqv1jGSkyek4rBSAiodyNkXcbE0eQtomeN6a55w== + +"@node-rs/xxhash-darwin-arm64@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-darwin-arm64/-/xxhash-darwin-arm64-1.4.0.tgz#96df4f48b13deb6899e84ed0882bdbd0a4856f13" + integrity sha512-JlEAzTsQaqJaWVse/JP//6QKBIhzqzTlvNY4uEbi8TaZMfvDDhW//ClXM6CkSV799GJxAYPu1LXa4+OeBQpa7Q== + +"@node-rs/xxhash-darwin-x64@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-darwin-x64/-/xxhash-darwin-x64-1.4.0.tgz#9df3ca3a87354dd5386aadfa20ad032a299c2b8f" + integrity sha512-9ycVJfzLvw1wc6Tgq0giLkMn5nGOBawTeOA17t27dQFdY/scZPz583DO7w+eznMnlzUXwoLiloanUebRhy+piQ== + +"@node-rs/xxhash-freebsd-x64@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-freebsd-x64/-/xxhash-freebsd-x64-1.4.0.tgz#24b0c0bfd33429303688b4af78f9d323daa0fb5b" + integrity sha512-vFRDr6qA0gHWQDjuSxXcdzM4Ppk+5VebEhc76zkWrRVc6RG60fxLo5B4j6QwMwXGTYaG8HMv/nQhAgbnOCWWxQ== + +"@node-rs/xxhash-linux-arm-gnueabihf@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-linux-arm-gnueabihf/-/xxhash-linux-arm-gnueabihf-1.4.0.tgz#4c09f70cd39429fb1a52f3567085e949603d4817" + integrity sha512-0KS6y1caqbtPanos9XNMekWpozCHA6QSlQzaZyn9Hn+Z+mYpR5+NoWixefhp06jt59qF9+LkkF3C9fSEHYmq/w== + +"@node-rs/xxhash-linux-arm64-gnu@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-linux-arm64-gnu/-/xxhash-linux-arm64-gnu-1.4.0.tgz#e92d7026614506fb4db309977127fd8589fabd7c" + integrity sha512-QI97JK2qiQhVgRtUBMgA1ZjPLpwnz11SE2Mw1jryejmyH9EXKKiCyt2FweO6MVP7bEuMxcdajBho4pEL7s/QsA== + +"@node-rs/xxhash-linux-arm64-musl@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-linux-arm64-musl/-/xxhash-linux-arm64-musl-1.4.0.tgz#a8b16233a86c116e6af32a69278248d17b2d09e7" + integrity sha512-dtMid4OMkNBYGJkjoT1jdkENpV8m8MGp3lliDN8C+2znZUQM8KFRTXRkfaq4lgzu3Y2XeYzsLOoBsBd3Hgf7gA== + +"@node-rs/xxhash-linux-x64-gnu@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-linux-x64-gnu/-/xxhash-linux-x64-gnu-1.4.0.tgz#385ec91396ebaa2b73abf419be3971ec893dcbd1" + integrity sha512-OeOQL10cG62wL1IVoeC74xESmefHU7r3xiZMTP2hK5Dh3FdF2sa3x/Db9BcGXlaokg/lMGDxuTuzOLC2Rv/wlQ== + +"@node-rs/xxhash-linux-x64-musl@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-linux-x64-musl/-/xxhash-linux-x64-musl-1.4.0.tgz#715bb962502b0ec69e1fc19db22ac035c63d30c7" + integrity sha512-kZ8wNi5bH9b+ZpuPlSbFd6JXk8CKbfCvCPZ0Vk0IqLkzB6PihQflnZPM9r0QZ2jtFgyfWmpbFK4YxwX9YcyLog== + +"@node-rs/xxhash-win32-arm64-msvc@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-win32-arm64-msvc/-/xxhash-win32-arm64-msvc-1.4.0.tgz#4a3a4ebcb50c73e4309e429b28eb44dbf8f7f71f" + integrity sha512-Ggv66jlhQvj4XgQqNgl2JKQ7My/97PvPZi5jKbcS7t65wJC36J6XERQwRPdupO8UH63XfPqb7HJqrgmiz8tmlA== + +"@node-rs/xxhash-win32-ia32-msvc@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-win32-ia32-msvc/-/xxhash-win32-ia32-msvc-1.4.0.tgz#fdfdb43e41113a8baf15779ca53bb637d2e1bc8f" + integrity sha512-mYpF1+7unqKKGsPn7Y8X6SqP2Bc5BU5dsHBKhAGAuvrMg9W63zM+YWM8/fpNGfFlOrjiKRvXHZ96nrZyzoxeBw== + +"@node-rs/xxhash-win32-x64-msvc@1.4.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash-win32-x64-msvc/-/xxhash-win32-x64-msvc-1.4.0.tgz#aee714a4ae0121f3947f94139adf13f5b6d93d12" + integrity sha512-rKuqWHuQNlrfjIOkQW3oCBta/GUlyVoUkKB13aVr8uixOs/eneuDaYJx2h02FAAWlWCKADFnMxgDl0LVFBy53w== + +"@node-rs/xxhash@^1.3.0": + version "1.4.0" + resolved "https://registry.yarnpkg.com/@node-rs/xxhash/-/xxhash-1.4.0.tgz#1e75850e0e530c9224e8e5ba4056d52e8868291b" + integrity sha512-UpSOParhMqbQ7hsYovN2e+uqvWqHJiCDvFl8gDzMcXgBY/PkI2zo2zhdRAZdz48c6/dke+0WjCKy90wDVQxS6g== + optionalDependencies: + "@node-rs/xxhash-android-arm-eabi" "1.4.0" + "@node-rs/xxhash-android-arm64" "1.4.0" + "@node-rs/xxhash-darwin-arm64" "1.4.0" + "@node-rs/xxhash-darwin-x64" "1.4.0" + "@node-rs/xxhash-freebsd-x64" "1.4.0" + "@node-rs/xxhash-linux-arm-gnueabihf" "1.4.0" + "@node-rs/xxhash-linux-arm64-gnu" "1.4.0" + "@node-rs/xxhash-linux-arm64-musl" "1.4.0" + "@node-rs/xxhash-linux-x64-gnu" "1.4.0" + "@node-rs/xxhash-linux-x64-musl" "1.4.0" + "@node-rs/xxhash-win32-arm64-msvc" "1.4.0" + "@node-rs/xxhash-win32-ia32-msvc" "1.4.0" + "@node-rs/xxhash-win32-x64-msvc" "1.4.0" + "@samverschueren/stream-to-observable@^0.3.0": version "0.3.1" resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz#a21117b19ee9be70c379ec1877537ef2e1c63301" @@ -2906,7 +2990,7 @@ loader-runner@^2.4.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== -loader-utils@^1.0.2, loader-utils@^1.2.3, loader-utils@^1.4.1: +loader-utils@^1.0.2, loader-utils@^1.4.1, loader-utils@^2.0.4: version "1.4.2" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.2.tgz#29a957f3a63973883eb684f10ffd3d151fec01a3" integrity sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg== @@ -4405,11 +4489,12 @@ tapable@^1.0.0, tapable@^1.1.3: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== -terser-webpack-plugin@^1.4.3: - version "1.4.5" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b" - integrity sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw== +"terser-webpack-plugin@npm:@amoo-miki/terser-webpack-plugin@1.4.5-rc.2": + version "1.4.5-rc.2" + resolved "https://registry.yarnpkg.com/@amoo-miki/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5-rc.2.tgz#046c062ef22c126c2544718674bc6624e3651b9c" + integrity sha512-JFSGSzsWgSHEqQXlnHDh3gw+jdVdVlWM2Irdps9P/yWYNY/5VjuG8sdoW4mbuP8/HM893/k8N+ipbeqsd8/xpA== dependencies: + "@node-rs/xxhash" "^1.3.0" cacache "^12.0.2" find-cache-dir "^2.1.0" is-wsl "^1.1.0" @@ -4703,11 +4788,12 @@ webpack-sources@^1.4.0, webpack-sources@^1.4.1: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@^4.41.5: - version "4.46.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.46.0.tgz#bf9b4404ea20a073605e0a011d188d77cb6ad542" - integrity sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q== +"webpack@npm:@amoo-miki/webpack@4.46.0-rc.2": + version "4.46.0-rc.2" + resolved "https://registry.yarnpkg.com/@amoo-miki/webpack/-/webpack-4.46.0-rc.2.tgz#36824597c14557a7bb0a8e13203e30275e7b02bd" + integrity sha512-Y/ZqxTHOoDF1kz3SR63Y9SZGTDUpZNNFrisTRHofWhP8QvNX3LMN+TCmEP56UfLaiLVKMcaiFjx8kFb2TgyBaQ== dependencies: + "@node-rs/xxhash" "^1.3.0" "@webassemblyjs/ast" "1.9.0" "@webassemblyjs/helper-module-context" "1.9.0" "@webassemblyjs/wasm-edit" "1.9.0" @@ -4720,7 +4806,7 @@ webpack@^4.41.5: eslint-scope "^4.0.3" json-parse-better-errors "^1.0.2" loader-runner "^2.4.0" - loader-utils "^1.2.3" + loader-utils "^2.0.4" memory-fs "^0.4.1" micromatch "^3.1.10" mkdirp "^0.5.3" @@ -4728,7 +4814,7 @@ webpack@^4.41.5: node-libs-browser "^2.2.1" schema-utils "^1.0.0" tapable "^1.1.3" - terser-webpack-plugin "^1.4.3" + terser-webpack-plugin "npm:@amoo-miki/terser-webpack-plugin@1.4.5-rc.2" watchpack "^1.7.4" webpack-sources "^1.4.1" From 0d4cf8160bc5634ffd5539ebd651264ee75918b0 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 10 Jul 2023 16:48:06 +0800 Subject: [PATCH 08/29] fix: add validation on data.method when using transport.request (#801) (#803) * fix: add validation on data.method when using tranport.request * feat: add validation on endpoint * feat: add unit test * feat: add more protect --------- (cherry picked from commit 13fb97fac3db5d6af6ef03b2bee8e04c80de4094) Signed-off-by: SuZhoue-Joe Signed-off-by: SuZhou-Joe Co-authored-by: suzhou --- server/services/CommonService.test.ts | 97 +++++++++++++++++++++++++++ server/services/CommonService.ts | 34 +++++++++- 2 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 server/services/CommonService.test.ts diff --git a/server/services/CommonService.test.ts b/server/services/CommonService.test.ts new file mode 100644 index 000000000..945f5fedb --- /dev/null +++ b/server/services/CommonService.test.ts @@ -0,0 +1,97 @@ +import { + ILegacyCustomClusterClient, + OpenSearchDashboardsRequest, + OpenSearchDashboardsResponseFactory, + RequestHandlerContext, +} from "opensearch-dashboards/server"; +import CommonService from "./CommonService"; + +const contextMock = { + core: {}, +} as RequestHandlerContext; +const responseMock = ({ + custom: jest.fn((args) => args), +} as unknown) as OpenSearchDashboardsResponseFactory; + +const mockedClient = { + callAsCurrentUser: jest.fn(), + callAsInternalUser: jest.fn(), + close: jest.fn(), + asScoped: jest.fn(() => ({ + callAsCurrentUser: jest.fn((...args) => args), + callAsInternalUser: jest.fn(), + })), +} as any; + +describe("CommonService spec", () => { + it("http method should valid when calling transport.request", async () => { + const commonService = new CommonService(mockedClient); + const result = await commonService.apiCaller( + contextMock, + { + body: { + endpoint: "transport.request", + data: { + method: "invalid method", + }, + }, + } as OpenSearchDashboardsRequest, + responseMock + ); + expect(result).toEqual({ + statusCode: 200, + body: { + ok: false, + error: `Method must be one of, case insensitive ['HEAD', 'GET', 'POST', 'PUT', 'DELETE']. Received 'invalid method'.`, + }, + }); + }); + + it("should return error when no endpoint is provided", async () => { + const commonService = new CommonService(mockedClient); + const result = await commonService.apiCaller( + contextMock, + { + body: { + endpoint: "", + }, + } as OpenSearchDashboardsRequest, + responseMock + ); + expect(result).toEqual({ + statusCode: 200, + body: { + ok: false, + error: `Expected non-empty string on endpoint`, + }, + }); + }); + + it("should patch path when data.path does not start with /", async () => { + const commonService = new CommonService(mockedClient); + const result = await commonService.apiCaller( + contextMock, + { + body: { + endpoint: "transport.request", + data: { + path: "", + }, + }, + } as OpenSearchDashboardsRequest, + responseMock + ); + expect(result).toEqual({ + statusCode: 200, + body: { + ok: true, + response: [ + "transport.request", + { + path: "/", + }, + ], + }, + }); + }); +}); diff --git a/server/services/CommonService.ts b/server/services/CommonService.ts index f264b10e8..a4eff7946 100644 --- a/server/services/CommonService.ts +++ b/server/services/CommonService.ts @@ -14,11 +14,13 @@ import { } from "../../../../src/core/server"; import { IAPICaller } from "../../models/interfaces"; +const VALID_METHODS = ["HEAD", "GET", "POST", "PUT", "DELETE"]; + export interface ICommonCaller { (arg: any): T; } -export default class IndexService { +export default class CommonService { osDriver: ILegacyCustomClusterClient; constructor(osDriver: ILegacyCustomClusterClient) { @@ -36,12 +38,42 @@ export default class IndexService { try { const { callAsCurrentUser: callWithRequest } = this.osDriver.asScoped(request); const finalData = data; + + /** + * The endpoint must not be an empty string, reference from proxy caller + */ + if (!endpoint) { + return response.custom({ + statusCode: 200, + body: { + ok: false, + error: `Expected non-empty string on endpoint`, + }, + }); + } + /** * Update path parameter to follow RFC/generic HTTP convention */ if (endpoint === "transport.request" && typeof finalData?.path === "string" && !/^\//.test(finalData?.path || "")) { finalData.path = `/${finalData.path || ""}`; } + + /** + * Check valid method here + */ + if (endpoint === "transport.request" && data?.method) { + if (VALID_METHODS.indexOf(data.method.toUpperCase?.()) === -1) { + return response.custom({ + statusCode: 200, + body: { + ok: false, + error: `Method must be one of, case insensitive ['HEAD', 'GET', 'POST', 'PUT', 'DELETE']. Received '${data.method}'.`, + }, + }); + } + } + const payload = useQuery ? JSON.parse(finalData || "{}") : finalData; const commonCallerResponse = await callWithRequest(endpoint, payload || {}); return response.custom({ From f54155d45e60c338cdee4cd848fb1bdb6e94b730 Mon Sep 17 00:00:00 2001 From: Hailong Cui Date: Tue, 11 Jul 2023 10:19:02 +0800 Subject: [PATCH 09/29] Move index management from plugin section to management section (#741) (#805) * Move index management into management section Signed-off-by: Hailong Cui * Remove plugins pages for management overview registration Signed-off-by: Hailong Cui * wording changes Signed-off-by: Hailong Cui --------- Signed-off-by: Hailong Cui (cherry picked from commit 4352f54c564d02d36ce6b7b412a9875d6254ddb8) --- .eslintrc.js | 33 +++++++++++++++++++++ opensearch_dashboards.json | 3 ++ package.json | 2 +- public/pages/Main/Main.tsx | 6 ++-- public/plugin.ts | 59 +++++++++++++++++++++++++++----------- 5 files changed, 82 insertions(+), 21 deletions(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..562ff10ff --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ + +const LICENSE_HEADER = ` +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + */ +`; + +module.exports = { + root: true, + extends: ["@elastic/eslint-config-kibana", "plugin:@elastic/eui/recommended"], + rules: { + // "@osd/eslint/require-license-header": "off" + }, + overrides: [ + { + files: ["**/*.{js,ts,tsx}"], + rules: { + "@osd/eslint/require-license-header": [ + "error", + { + licenses: [LICENSE_HEADER], + }, + ], + "no-console": 0, + }, + }, + ], +}; diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index 46411eabc..e9ea67e8a 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -9,6 +9,9 @@ "navigation", "opensearchDashboardsReact" ], + "optionalPlugins": [ + "managementOverview" + ], "server": true, "ui": true } \ No newline at end of file diff --git a/package.json b/package.json index f400177f9..c39680ce3 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "cypress:open": "cypress open", "osd": "node ../../scripts/osd", "opensearch": "node ../../scripts/opensearch", - "lint": "node ../../scripts/eslint .", + "lint": "node ../../scripts/eslint . && node ../../scripts/stylelint", "plugin-helpers": "node ../../scripts/plugin_helpers", "test:jest": "../../node_modules/.bin/jest --config ./test/jest.config.js", "build": "yarn plugin-helpers build", diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index 423d5688d..af07627e6 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -54,11 +54,11 @@ enum Navigation { IndexPolicies = "State management policies", ManagedIndices = "Policy managed indices", Indices = "Indices", - Rollups = "Rollup Jobs", - Transforms = "Transform Jobs", + Rollups = "Rollup jobs", + Transforms = "Transform jobs", SnapshotManagement = "Snapshot Management", Snapshots = "Snapshots", - SnapshotPolicies = "Snapshot Policies", + SnapshotPolicies = "Snapshot policies", Repositories = "Repositories", Aliases = "Aliases", Templates = "Templates", diff --git a/public/plugin.ts b/public/plugin.ts index 059190ae1..ccc688e63 100644 --- a/public/plugin.ts +++ b/public/plugin.ts @@ -3,29 +3,58 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { AppMountParameters, CoreSetup, CoreStart, Plugin, PluginInitializerContext } from "../../../src/core/public"; -import { IndexManagementPluginSetup } from "."; -import { IndexManagementPluginStart } from "."; +import { i18n } from "@osd/i18n"; +import { IndexManagementPluginStart, IndexManagementPluginSetup } from "."; +import { + AppMountParameters, + CoreSetup, + CoreStart, + DEFAULT_APP_CATEGORIES, + Plugin, + PluginInitializerContext, +} from "../../../src/core/public"; import { actionRepoSingleton } from "./pages/VisualCreatePolicy/utils/helpers"; import { ROUTES } from "./utils/constants"; import { JobHandlerRegister } from "./JobHandler"; +import { ManagementOverViewPluginSetup } from "../../../src/plugins/management_overview/public"; -export class IndexManagementPlugin implements Plugin { +interface IndexManagementSetupDeps { + managementOverview?: ManagementOverViewPluginSetup; +} + +export class IndexManagementPlugin implements Plugin { constructor(private readonly initializerContext: PluginInitializerContext) { // can retrieve config from initializerContext } - public setup(core: CoreSetup): IndexManagementPluginSetup { + public setup(core: CoreSetup, { managementOverview }: IndexManagementSetupDeps): IndexManagementPluginSetup { JobHandlerRegister(core); + + if (managementOverview) { + managementOverview.register({ + id: "opensearch_index_management_dashboards", + title: "Index Management", + order: 9010, + description: i18n.translate("indexManagement.description", { + defaultMessage: "Manage your indexes with state polices, templates and aliases. You can also roll up or transform your indexes.", + }), + }); + managementOverview.register({ + id: "opensearch_snapshot_management_dashboards", + title: "Snapshot Management", + order: 9020, + description: i18n.translate("snapshotManagement.description", { + defaultMessage: + "Back up and restore your cluster's indexes and state. Setup a policy to automate snapshot creation and deletion.", + }), + }); + } + core.application.register({ id: "opensearch_index_management_dashboards", title: "Index Management", - order: 7000, - category: { - id: "opensearch", - label: "OpenSearch Plugins", - order: 2000, - }, + order: 9010, + category: DEFAULT_APP_CATEGORIES.management, mount: async (params: AppMountParameters) => { const { renderApp } = await import("./index_management_app"); const [coreStart, depsStart] = await core.getStartServices(); @@ -36,12 +65,8 @@ export class IndexManagementPlugin implements Plugin { const { renderApp } = await import("./index_management_app"); const [coreStart, depsStart] = await core.getStartServices(); From 252bd9bf5096d45b54c08c0a96a5f86b07a484f3 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 12 Jul 2023 14:56:59 -0700 Subject: [PATCH 10/29] Added 2.9 release notes. (#808) (#809) * Added 2.9 release notes. Signed-off-by: AWSHurneyt * Added 2.9 release notes. Signed-off-by: AWSHurneyt * Added 2.9 release notes. Signed-off-by: AWSHurneyt --------- Signed-off-by: AWSHurneyt (cherry picked from commit d7e44c2de1ea112c6b09fd2e9fb5937b0dfa3206) Co-authored-by: AWSHurneyt --- ...nt-dashboards-plugin.release-notes-2.9.0.0.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.9.0.0.md diff --git a/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.9.0.0.md b/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.9.0.0.md new file mode 100644 index 000000000..8fe44e8b3 --- /dev/null +++ b/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.9.0.0.md @@ -0,0 +1,16 @@ +## Version 2.9.0.0 2023-07-11 + +Compatible with OpenSearch 2.9.0 + +### Maintenance +* Increment version to 2.9.0.0. ([#795](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/795)) +* Move index management from plugin section to management section. ([#741](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/741)) + +### Features +* Implemented alias action UX. ([#754](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/754)) + +### Bug Fixes +* Fix: add validation on data.method when using transport.request. ([#801](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/801)) + +### Documentation +* Added 2.9 release notes. ([#808](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/808)) \ No newline at end of file From 497909276f07cb9f80b69a765d4ebdb578fa7cb2 Mon Sep 17 00:00:00 2001 From: AWSHurneyt Date: Fri, 14 Jul 2023 20:27:07 -0700 Subject: [PATCH 11/29] Bumped tough-cookie, and semver versions. (#813) * Bumped tough-cookie and semver versions. Signed-off-by: AWSHurneyt * Bumped tough-cookie and semver versions. Signed-off-by: AWSHurneyt --------- Signed-off-by: AWSHurneyt --- package.json | 6 +++-- yarn.lock | 64 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index c39680ce3..60460bc65 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,9 @@ "minimist": "^1.2.6", "moment": "^2.29.4", "async": "^3.2.3", - "terser": "^4.8.1" + "semver": "^7.5.3", + "terser": "^4.8.1", + "tough-cookie": "^4.1.3" }, "devDependencies": { "@elastic/elastic-eslint-config-kibana": "link:../../packages/opensearch-eslint-config-opensearch-dashboards", @@ -70,4 +72,4 @@ "engines": { "yarn": "^1.21.1" } -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 140acd3d5..9b0da666c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3073,6 +3073,13 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + lz-string@^1.4.4: version "1.4.4" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" @@ -3723,7 +3730,7 @@ pseudomap@^1.0.2: resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== -psl@^1.1.28: +psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== @@ -3797,6 +3804,11 @@ querystring@0.2.0: resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== +querystringify@^2.1.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6" + integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== + ramda@~0.27.1: version "0.27.2" resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.2.tgz#84463226f7f36dc33592f6f4ed6374c48306c3f1" @@ -3936,6 +3948,11 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== +requires-port@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" + integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== + resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" @@ -4078,15 +4095,12 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.0.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^6.0.0, semver@^7.5.3: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== + dependencies: + lru-cache "^6.0.0" serialize-javascript@^4.0.0: version "4.0.0" @@ -4583,13 +4597,15 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== +tough-cookie@^4.1.3, tough-cookie@~2.5.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" + integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== dependencies: - psl "^1.1.28" + psl "^1.1.33" punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" ts-loader@^6.2.1: version "6.2.2" @@ -4668,6 +4684,11 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" +universalify@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0" + integrity sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg== + universalify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" @@ -4703,6 +4724,14 @@ urix@^0.1.0: resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" integrity sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg== +url-parse@^1.5.3: + version "1.5.10" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== + dependencies: + querystringify "^2.1.1" + requires-port "^1.0.0" + url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -4928,6 +4957,11 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + yaml@^1.10.0: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" From eeffd64b8446f09ed1e8ae3951fb2ebc3cd5500b Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 11:56:21 -0700 Subject: [PATCH 12/29] fixed repo name in snapshot flyout; schedule entry during ploicy edit (#824) (#827) (cherry picked from commit 274d9bc43880ca6475ce659f28f275aaeffa0edd) Signed-off-by: Amardeepsingh Siglani Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../components/CronSchedule/CronSchedule.tsx | 19 +++++++++++++++++++ .../SnapshotFlyout/SnapshotFlyout.tsx | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx b/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx index 78ed71fcf..6536e4e8d 100644 --- a/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx +++ b/public/pages/CreateSnapshotPolicy/components/CronSchedule/CronSchedule.tsx @@ -55,6 +55,25 @@ const CronSchedule = ({ const [dayOfWeek, setWeek] = useState(initWeek); const [dayOfMonth, setMonth] = useState(initMonth); + // When edit policy is clicked, during the initial render DEFAULT values get passed + // As a result when the actual policy details are passed, the state does not get updated and we end up + // showing incorrect values in schedule controls. + if (initHour !== hour) { + setHour(initHour); + } + + if (initMin !== minute) { + setMinute(initMin); + } + + if (initWeek !== dayOfWeek) { + setWeek(initWeek); + } + + if (initMonth !== dayOfMonth) { + setMonth(initMonth); + } + useEffect(() => { changeCron(); }, [minute, hour, dayOfWeek, dayOfMonth]); diff --git a/public/pages/Snapshots/components/SnapshotFlyout/SnapshotFlyout.tsx b/public/pages/Snapshots/components/SnapshotFlyout/SnapshotFlyout.tsx index 8901f9ef6..bf3542a36 100644 --- a/public/pages/Snapshots/components/SnapshotFlyout/SnapshotFlyout.tsx +++ b/public/pages/Snapshots/components/SnapshotFlyout/SnapshotFlyout.tsx @@ -67,7 +67,7 @@ export default class SnapshotFlyout extends Component Date: Thu, 10 Aug 2023 14:20:30 +0800 Subject: [PATCH 13/29] Increment version to 2.10.0.0 (#833) Signed-off-by: opensearch-ci-bot Co-authored-by: opensearch-ci-bot --- opensearch_dashboards.json | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index e9ea67e8a..bf76fa7f0 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -1,7 +1,7 @@ { "id": "indexManagementDashboards", - "version": "2.9.0.0", - "opensearchDashboardsVersion": "2.9.0", + "version": "2.10.0.0", + "opensearchDashboardsVersion": "2.10.0", "configPath": [ "opensearch_index_management" ], diff --git a/package.json b/package.json index 60460bc65..06699610b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opensearch_index_management_dashboards", - "version": "2.9.0.0", + "version": "2.10.0.0", "description": "Opensearch Dashboards plugin for Index Management", "main": "index.js", "license": "Apache-2.0", @@ -72,4 +72,4 @@ "engines": { "yarn": "^1.21.1" } -} +} \ No newline at end of file From 639df0d996cbf0c2546ff3bf1e78122c5ede60e0 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 11 Aug 2023 13:45:30 +0800 Subject: [PATCH 14/29] Fix `exports is undefined` (#826) (#841) * Add allowTopLevelThis=true option for @babel/plugin-transform-modules-commonjs * remove override babel.config.js for build --------- (cherry picked from commit be25b8bd3b1c77865e1414aad215e645bc161711) Signed-off-by: Hailong Cui Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- babel.config.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/babel.config.js b/babel.config.js index 21b7ac48c..1d9ebbecf 100644 --- a/babel.config.js +++ b/babel.config.js @@ -5,11 +5,18 @@ // babelrc doesn't respect NODE_PATH anymore but using require does. // Alternative to install them locally in node_modules -module.exports = { - presets: [require("@babel/preset-env"), require("@babel/preset-react"), require("@babel/preset-typescript")], - plugins: [ - [require("@babel/plugin-transform-runtime"), { regenerator: true }], - require("@babel/plugin-proposal-class-properties"), - require("@babel/plugin-proposal-object-rest-spread"), - ], +module.exports = function (api) { + // ensure env is test so that this config won't impact build or dev server + if (api.env("test")) { + return { + presets: [require("@babel/preset-env"), require("@babel/preset-react"), require("@babel/preset-typescript")], + plugins: [ + [require("@babel/plugin-transform-runtime"), { regenerator: true }], + require("@babel/plugin-proposal-class-properties"), + require("@babel/plugin-proposal-object-rest-spread"), + [require("@babel/plugin-transform-modules-commonjs"), { allowTopLevelThis: true }], + ], + }; + } + return {}; }; From 8ad2340cab44c0c0ac149e7c451f07e0decf365a Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:17:51 -0700 Subject: [PATCH 15/29] bump @cypress/request to 3.0.0 due to CVE-2023-28155 (#858) (#860) (cherry picked from commit b066a6554e1d9fca5cd1126b99c912ff336dbf38) Signed-off-by: Ashish Agrawal Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- package.json | 3 ++- yarn.lock | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 06699610b..55ddd97d9 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,8 @@ "async": "^3.2.3", "semver": "^7.5.3", "terser": "^4.8.1", - "tough-cookie": "^4.1.3" + "tough-cookie": "^4.1.3", + "@cypress/request": "^3.0.0" }, "devDependencies": { "@elastic/elastic-eslint-config-kibana": "link:../../packages/opensearch-eslint-config-opensearch-dashboards", diff --git a/yarn.lock b/yarn.lock index 9b0da666c..c8564a124 100644 --- a/yarn.lock +++ b/yarn.lock @@ -45,10 +45,10 @@ date-fns "^1.27.2" figures "^1.7.0" -"@cypress/request@^2.88.5": - version "2.88.11" - resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.11.tgz#5a4c7399bc2d7e7ed56e92ce5acb620c8b187047" - integrity sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w== +"@cypress/request@^2.88.5", "@cypress/request@^3.0.0": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-3.0.1.tgz#72d7d5425236a2413bd3d8bb66d02d9dc3168960" + integrity sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -63,9 +63,9 @@ json-stringify-safe "~5.0.1" mime-types "~2.1.19" performance-now "^2.1.0" - qs "~6.10.3" + qs "6.10.4" safe-buffer "^5.1.2" - tough-cookie "~2.5.0" + tough-cookie "^4.1.3" tunnel-agent "^0.6.0" uuid "^8.3.2" @@ -3787,10 +3787,10 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== -qs@~6.10.3: - version "6.10.5" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.5.tgz#974715920a80ff6a262264acd2c7e6c2a53282b4" - integrity sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ== +qs@6.10.4: + version "6.10.4" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.4.tgz#6a3003755add91c0ec9eacdc5f878b034e73f9e7" + integrity sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g== dependencies: side-channel "^1.0.4" @@ -4597,7 +4597,7 @@ to-regex@^3.0.1, to-regex@^3.0.2: regex-not "^1.0.2" safe-regex "^1.1.0" -tough-cookie@^4.1.3, tough-cookie@~2.5.0: +tough-cookie@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== From dbddce1cd59ce0d6df9464450182cab6d3728289 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 6 Sep 2023 14:20:25 -0700 Subject: [PATCH 16/29] Upgrade the backport workflow (#821) (#825) (cherry picked from commit cdb2f21f75bd7c5584fadfd533a4c74e4814452e) Signed-off-by: Ashish Agrawal Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .github/workflows/backport.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index e47d8d88c..798e3d69e 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -22,7 +22,9 @@ jobs: installation_id: 22958780 - name: Backport - uses: VachaShah/backport@v1.1.4 + uses: VachaShah/backport@v2.2.0 with: github_token: ${{ steps.github_app_token.outputs.token }} branch_name: backport/backport-${{ github.event.number }} + labels_template: "<%= JSON.stringify([...labels, 'autocut']) %>" + failure_labels: "failed backport" From 3d7ed905a0c02058f059fbc015722c1addc55f06 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 7 Sep 2023 19:55:04 -0700 Subject: [PATCH 17/29] Added 2.10 release notes (#864) (#865) (cherry picked from commit 8ef2275e15dc985ac9ceb0aaa4a26b6fe9401db9) Signed-off-by: Ashish Agrawal Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- ...dashboards-plugin.release-notes-2.10.0.0.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.10.0.0.md diff --git a/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.10.0.0.md b/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.10.0.0.md new file mode 100644 index 000000000..db8f6737a --- /dev/null +++ b/release-notes/opensearch-index-management-dashboards-plugin.release-notes-2.10.0.0.md @@ -0,0 +1,18 @@ +## Version 2.10.0.0 2023-09-07 + +Compatible with OpenSearch 2.10.0 + +### Maintenance +* Increment version to 2.10.0.0. ([#833](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/833)) + +### Bug Fixes +* Fix exports is undefined. ([#826](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/826)) + +### Maintenance +* bump @cypress/request to 3.0.0 due to CVE-2023-28155. ([#858](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/858)) + +### Infrastructure +* Upgrade the backport workflow. ([#821](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/821)) + +### Documentation +* Added 2.10 release notes. ([#864](https://github.com/opensearch-project/index-management-dashboards-plugin/pull/864)) \ No newline at end of file From 58d9170136ab59708e2d72b089080d24cd856171 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 22 Sep 2023 14:33:36 -0700 Subject: [PATCH 18/29] Increment version to 2.11.0.0 (#871) Signed-off-by: opensearch-ci-bot Co-authored-by: opensearch-ci-bot --- opensearch_dashboards.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index bf76fa7f0..02626782f 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -1,7 +1,7 @@ { "id": "indexManagementDashboards", - "version": "2.10.0.0", - "opensearchDashboardsVersion": "2.10.0", + "version": "2.11.0.0", + "opensearchDashboardsVersion": "2.11.0", "configPath": [ "opensearch_index_management" ], diff --git a/package.json b/package.json index 55ddd97d9..936fd4843 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opensearch_index_management_dashboards", - "version": "2.10.0.0", + "version": "2.11.0.0", "description": "Opensearch Dashboards plugin for Index Management", "main": "index.js", "license": "Apache-2.0", From 1d1b0433cf674a039867888212a2c144c07ec256 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 18:42:56 -0400 Subject: [PATCH 19/29] Onboard jenkins prod docker images to github actions (#907) (#908) (cherry picked from commit 6390397400c49e7fc3ef60a545f685e32c0cea9b) Signed-off-by: Peter Zhu Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .github/workflows/dco.yml | 18 ----- .github/workflows/release-workflow.yml | 95 ----------------------- .github/workflows/unit-tests-workflow.yml | 46 +++++++++-- 3 files changed, 41 insertions(+), 118 deletions(-) delete mode 100644 .github/workflows/dco.yml delete mode 100644 .github/workflows/release-workflow.yml diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml deleted file mode 100644 index cf30ea89d..000000000 --- a/.github/workflows/dco.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Developer Certificate of Origin Check - -on: [pull_request] - -jobs: - check: - runs-on: ubuntu-latest - - steps: - - name: Get PR Commits - id: 'get-pr-commits' - uses: tim-actions/get-pr-commits@v1.1.0 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: DCO Check - uses: tim-actions/dco@v1.1.0 - with: - commits: ${{ steps.get-pr-commits.outputs.commits }} diff --git a/.github/workflows/release-workflow.yml b/.github/workflows/release-workflow.yml deleted file mode 100644 index 9bdf05da1..000000000 --- a/.github/workflows/release-workflow.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: Release workflow -# This workflow is triggered on creating tags to main or an opensearch release branch -on: - push: - tags: - - 'v*' - -jobs: - build: - name: Build Index Management Dashboards - runs-on: ubuntu-latest - steps: - - name: Checkout Index Management Dashboards plugin - uses: actions/checkout@v2 - with: - path: index-management-dashboards-plugin - - name: Get OpenSearch-Dashboards version - id: opensearch_dashboards_version - run: | - echo "::set-output name=opensearch_dashboards_version::$(node -p "(require('./index-management-dashboards-plugin/opensearch_dashboards.json').opensearchDashboardsVersion).match(/[.0-9]+/)[0]")" - - name: Checkout OpenSearch-Dashboards - uses: actions/checkout@v2 - with: - repository: opensearch-project/OpenSearch-Dashboards - ref: ${{ steps.opensearch_dashboards_version.outputs.opensearch_dashboards_version }} - token: ${{ secrets.GITHUB_OPENSEARCH_DASHBOARDS_OSS }} - path: OpenSearch-Dashboards - - name: Setup Node - uses: actions/setup-node@v3 - with: - node-version-file: './OpenSearch-Dashboards/.nvmrc' - registry-url: 'https://registry.npmjs.org' - - name: Install Yarn - # Need to use bash to avoid having a windows/linux specific step - shell: bash - run: | - YARN_VERSION=$(node -p "require('./OpenSearch-Dashboards/package.json').engines.yarn") - echo "Installing yarn@$YARN_VERSION" - npm i -g yarn@$YARN_VERSION - - run: node -v - - run: yarn -v - - name: Bootstrap plugin/OpenSearch-Dashboards - run: | - mkdir -p OpenSearch-Dashboards/plugins - mv index-management-dashboards-plugin OpenSearch-Dashboards/plugins - cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin - yarn osd bootstrap - - name: Build plugin - id: build_zip - run: | - cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin - yarn build - zip_path=`ls $(pwd)/build/*.zip` - echo "::set-output name=zip_path::$zip_path" - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_STAGING_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_STAGING_SECRET_ACCESS_KEY }} - aws-region: us-west-2 - - name: Upload Artifacts to S3 - run: | - zip=${{ steps.build_zip.outputs.zip_path }} - - # inject build number before the suffix - zip_outfile=`basename ${zip%.zip}-build-${GITHUB_RUN_NUMBER}.zip` - # TODO: Change s3 location - s3_prefix="s3://staging.artifacts.opendistroforelasticsearch.amazon.com/snapshots/kibana-plugins/index-management/" - - echo "Copying ${zip} to ${s3_prefix}${zip_outfile}" - aws s3 cp --quiet $zip ${s3_prefix}${zip_outfile} - - name: Create Github Draft Release - id: create_release - uses: actions/create-release@v1.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: true - prerelease: false - - name: Upload Release Asset - uses: actions/upload-release-asset@v1.0.1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_name: opendistro_index_management_dashboards.zip - asset_path: ${{ steps.build_zip.outputs.zip_path }} - asset_content_type: application/zip - - name: Upload Workflow Artifacts - uses: actions/upload-artifact@v1 - with: - name: index-management-plugin - path: ${{ steps.build_zip.outputs.zip_path }} diff --git a/.github/workflows/unit-tests-workflow.yml b/.github/workflows/unit-tests-workflow.yml index 6bc63e6c7..5e847a1c7 100644 --- a/.github/workflows/unit-tests-workflow.yml +++ b/.github/workflows/unit-tests-workflow.yml @@ -9,11 +9,50 @@ on: env: OPENSEARCH_DASHBOARDS_VERSION: '2.x' jobs: - tests: + Get-CI-Image-Tag: + uses: opensearch-project/opensearch-build/.github/workflows/get-ci-image-tag.yml@main + with: + product: opensearch-dashboards + + tests-linux: + needs: Get-CI-Image-Tag + name: Run unit tests + runs-on: ubuntu-latest + container: + # using the same image which is used by opensearch-build team to build the OpenSearch Distribution + # this image tag is subject to change as more dependencies and updates will arrive over time + image: ${{ needs.Get-CI-Image-Tag.outputs.ci-image-version-linux }} + # need to switch to root so that github actions can install runner binary on container without permission issues. + options: --user root + + steps: + # Enable longer filenames for windows + - name: Checkout OpenSearch-Dashboards + uses: actions/checkout@v2 + with: + repository: opensearch-project/OpenSearch-Dashboards + ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }} + path: OpenSearch-Dashboards + - name: Checkout Index Management Dashboards plugin + uses: actions/checkout@v2 + with: + path: OpenSearch-Dashboards/plugins/index-management-dashboards-plugin + - name: Bootstrap / Run tests + run: | + chown -R 1000:1000 `pwd` + cd ./OpenSearch-Dashboards/ + su `id -un 1000` -c "source $NVM_DIR/nvm.sh && nvm use && node -v && yarn -v && + cd ./plugins/index-management-dashboards-plugin && + whoami && yarn osd bootstrap && yarn run test:jest --coverage" + + - name: Uploads coverage + uses: codecov/codecov-action@v1 + + tests-windows-macos: name: Run unit tests strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: # Enable longer filenames for windows @@ -52,6 +91,3 @@ jobs: run: | cd OpenSearch-Dashboards/plugins/index-management-dashboards-plugin yarn run test:jest --coverage - - name: Uploads coverage - if: ${{ matrix.os == 'ubuntu-latest' }} - uses: codecov/codecov-action@v1 From 0f1c03fa43dd9105d107a373a5510ba4de337e8a Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 10:06:08 -0700 Subject: [PATCH 20/29] Update the unit tests (#909) (#912) (cherry picked from commit 44abf1d11b2dada6e36e1c2f86512cd6fab2561f) Signed-off-by: bowenlan-amzn Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../components/BottomBar/__snapshots__/BottomBar.test.tsx.snap | 1 - .../__snapshots__/UnsavedChangesBottomBar.test.tsx.snap | 1 - 2 files changed, 2 deletions(-) diff --git a/public/components/BottomBar/__snapshots__/BottomBar.test.tsx.snap b/public/components/BottomBar/__snapshots__/BottomBar.test.tsx.snap index 4b1cd7e25..4695fc0f2 100644 --- a/public/components/BottomBar/__snapshots__/BottomBar.test.tsx.snap +++ b/public/components/BottomBar/__snapshots__/BottomBar.test.tsx.snap @@ -7,7 +7,6 @@ HTMLCollection [

Date: Tue, 7 Nov 2023 15:32:57 -0800 Subject: [PATCH 21/29] Increment version to 2.12.0.0 (#896) Signed-off-by: opensearch-ci-bot Co-authored-by: opensearch-ci-bot --- opensearch_dashboards.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opensearch_dashboards.json b/opensearch_dashboards.json index 02626782f..adc64e750 100644 --- a/opensearch_dashboards.json +++ b/opensearch_dashboards.json @@ -1,7 +1,7 @@ { "id": "indexManagementDashboards", - "version": "2.11.0.0", - "opensearchDashboardsVersion": "2.11.0", + "version": "2.12.0.0", + "opensearchDashboardsVersion": "2.12.0", "configPath": [ "opensearch_index_management" ], diff --git a/package.json b/package.json index 936fd4843..f6865984a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "opensearch_index_management_dashboards", - "version": "2.11.0.0", + "version": "2.12.0.0", "description": "Opensearch Dashboards plugin for Index Management", "main": "index.js", "license": "Apache-2.0", From 84120da35379af539fb63336374c2af5a01e772c Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 8 Nov 2023 15:39:59 -0800 Subject: [PATCH 22/29] removed alias3 from testInputs (#918) (#923) (cherry picked from commit 461f563101d8664a369bacecb8c527377ef228b3) Signed-off-by: kohinoor98 Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: bowenlan-amzn --- .../plugins/index-management-dashboards-plugin/policies_spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/integration/plugins/index-management-dashboards-plugin/policies_spec.js b/cypress/integration/plugins/index-management-dashboards-plugin/policies_spec.js index 2a9f6d384..12cad98c1 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/policies_spec.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/policies_spec.js @@ -215,7 +215,7 @@ describe("Policies", () => { // Click on the test alias to navigate to the details page const testInputs = { add: ["alias4", "alias6"], - remove: ["alias1", "alias2", "alias3", "alias7"], + remove: ["alias1", "alias2", "alias7"], }; /* Edit the policy */ From 1ca623cdfead8400d510daa9b768d479b11ab9d1 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Fri, 10 Nov 2023 20:25:58 -0800 Subject: [PATCH 23/29] adding cancel button to change policy (#919) (#929) * adding cancel button to change policy * updated ChangePolicy snapshot to incl Cancel's div * auto fixing the ChangePolicy.test snapshot --------- (cherry picked from commit 1c8f0c660a6a7ef4960862e67ab8140a8d156691) Signed-off-by: kohinoor98 Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: bowenlan-amzn --- .../containers/ChangePolicy/ChangePolicy.tsx | 9 ++++++++- .../__snapshots__/ChangePolicy.test.tsx.snap | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx b/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx index b32f5a45b..df7fe9f9e 100644 --- a/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx +++ b/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx @@ -5,7 +5,7 @@ import React, { Component } from "react"; import { RouteComponentProps } from "react-router-dom"; -import { EuiSpacer, EuiTitle, EuiButton, EuiFlexGroup, EuiFlexItem } from "@elastic/eui"; +import { EuiSpacer, EuiTitle, EuiButton, EuiFlexGroup, EuiFlexItem, EuiButtonEmpty } from "@elastic/eui"; import { IndexService, ManagedIndexService } from "../../../../services"; import ChangeManagedIndices from "../../components/ChangeManagedIndices"; import NewPolicy from "../../components/NewPolicy"; @@ -115,6 +115,8 @@ export default class ChangePolicy extends Component this.props.history.goBack(); + onSubmit = async () => { const { selectedPolicies, selectedManagedIndices } = this.state; @@ -175,6 +177,11 @@ export default class ChangePolicy extends Component + + + Cancel + + Change 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 fc49473fa..1f40cb70b 100644 --- a/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap +++ b/public/pages/ChangePolicy/containers/ChangePolicy/__snapshots__/ChangePolicy.test.tsx.snap @@ -428,6 +428,25 @@ exports[` spec renders the component 1`] = `
+
+ +
From f1aff5b9913c17a8fda8f3d80fb0688f0748d841 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 16:16:20 -0800 Subject: [PATCH 24/29] Update the babel require (#935) (#936) (cherry picked from commit 669ac54ef32139603c2496882a68101b5aa77c5a) Signed-off-by: bowenlan-amzn Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- babel.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/babel.config.js b/babel.config.js index 1d9ebbecf..f8498b5fe 100644 --- a/babel.config.js +++ b/babel.config.js @@ -12,8 +12,8 @@ module.exports = function (api) { presets: [require("@babel/preset-env"), require("@babel/preset-react"), require("@babel/preset-typescript")], plugins: [ [require("@babel/plugin-transform-runtime"), { regenerator: true }], - require("@babel/plugin-proposal-class-properties"), - require("@babel/plugin-proposal-object-rest-spread"), + require("@babel/plugin-transform-class-properties"), + require("@babel/plugin-transform-object-rest-spread"), [require("@babel/plugin-transform-modules-commonjs"), { allowTopLevelThis: true }], ], }; From bfd11cccff82a36a62eb4562569bb380e45915e7 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 17:08:42 -0800 Subject: [PATCH 25/29] Increment version to 2.12.0.0 (#928) Signed-off-by: opensearch-ci-bot Co-authored-by: opensearch-ci-bot --- yarn.lock | 442 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 405 insertions(+), 37 deletions(-) diff --git a/yarn.lock b/yarn.lock index c8564a124..d27863082 100644 --- a/yarn.lock +++ b/yarn.lock @@ -655,16 +655,42 @@ arr-union@^3.1.0: resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" integrity sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q== -array-find@^1.0.0: +array-buffer-byte-length@^1.0.0: version "1.0.0" - resolved "https://registry.yarnpkg.com/array-find/-/array-find-1.0.0.tgz#6c8e286d11ed768327f8e62ecee87353ca3e78b8" - integrity sha512-kO/vVCacW9mnpn3WPWbTVlEnOabK2L7LWi2HViURtCM46y1zb6I8UMjx4LgbiqadTgHnLInUronwn3ampNTJtQ== + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" integrity sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ== +array.prototype.find@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.2.2.tgz#e862cf891e725d8f2a10e5e42d750629faaabd32" + integrity sha512-DRumkfW97iZGOfn+lIXbkVrXL04sfYKX+EfOodo8XboR5sxPDVvOjZTF/rysusa9lmhmSOeD6Vp6RKQP+eP4Tg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +arraybuffer.prototype.slice@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" + integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-array-buffer "^3.0.2" + is-shared-array-buffer "^1.0.2" + asn1.js@^5.2.0: version "5.4.1" resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" @@ -992,6 +1018,15 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.4, call-bind@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" + integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== + dependencies: + function-bind "^1.1.2" + get-intrinsic "^1.2.1" + set-function-length "^1.1.1" + caller-callsite@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caller-callsite/-/caller-callsite-2.0.0.tgz#847e0fce0a223750a9a027c54b33731ad3154134" @@ -1486,14 +1521,14 @@ debug@4.3.2: dependencies: ms "2.1.2" -debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: +debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@^3.1.0: +debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -1545,6 +1580,15 @@ deep-equal@^2.0.5: which-collection "^1.0.1" which-typed-array "^1.1.9" +define-data-property@^1.0.1, define-data-property@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== + dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + define-properties@^1.1.3, define-properties@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" @@ -1553,6 +1597,15 @@ define-properties@^1.1.3, define-properties@^1.1.4: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +define-properties@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" @@ -1670,6 +1723,15 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enhanced-resolve@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" + integrity sha512-kxpoMgrdtkXZ5h0SeraBS1iRntpTpQ3R8ussdb38+UAFnMGX5DDyJXePm+OCHOcoXvHDw7mc2erbJBpDnl7TPw== + dependencies: + graceful-fs "^4.1.2" + memory-fs "^0.2.0" + tapable "^0.1.8" + enhanced-resolve@^4.0.0, enhanced-resolve@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz#2f3cfd84dbe3b487f18f2db2ef1e064a571ca5ec" @@ -1679,15 +1741,6 @@ enhanced-resolve@^4.0.0, enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" -enhanced-resolve@~0.9.0: - version "0.9.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-0.9.1.tgz#4d6e689b3725f86090927ccc86cd9f1635b89e2e" - integrity sha512-kxpoMgrdtkXZ5h0SeraBS1iRntpTpQ3R8ussdb38+UAFnMGX5DDyJXePm+OCHOcoXvHDw7mc2erbJBpDnl7TPw== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.2.0" - tapable "^0.1.8" - enquirer@^2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -1709,6 +1762,51 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.22.1: + version "1.22.3" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.3.tgz#48e79f5573198de6dee3589195727f4f74bc4f32" + integrity sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA== + dependencies: + array-buffer-byte-length "^1.0.0" + arraybuffer.prototype.slice "^1.0.2" + available-typed-arrays "^1.0.5" + call-bind "^1.0.5" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.2" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.12" + is-weakref "^1.0.2" + object-inspect "^1.13.1" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.1" + safe-array-concat "^1.0.1" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.8" + string.prototype.trimend "^1.0.7" + string.prototype.trimstart "^1.0.7" + typed-array-buffer "^1.0.0" + typed-array-byte-length "^1.0.0" + typed-array-byte-offset "^1.0.0" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.13" + es-get-iterator@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" @@ -1724,6 +1822,31 @@ es-get-iterator@^1.1.2: isarray "^2.0.5" stop-iteration-iterator "^1.0.0" +es-set-tostringtag@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz#11f7cc9f63376930a5f20be4915834f4bc74f9c9" + integrity sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q== + dependencies: + get-intrinsic "^1.2.2" + has-tostringtag "^1.0.0" + hasown "^2.0.0" + +es-shim-unscopables@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763" + integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw== + dependencies: + hasown "^2.0.0" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1737,21 +1860,22 @@ eslint-import-resolver-node@0.3.2: debug "^2.6.9" resolve "^1.5.0" -eslint-import-resolver-webpack@0.11.1: - version "0.11.1" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.11.1.tgz#fcf1fd57a775f51e18f442915f85dd6ba45d2f26" - integrity sha512-eK3zR7xVQR/MaoBWwGuD+CULYVuqe5QFlDukman71aI6IboCGzggDUohHNfu1ZeBnbHcUHJc0ywWoXUBNB6qdg== +eslint-import-resolver-webpack@0.13.8: + version "0.13.8" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.13.8.tgz#5f64d1d653eefa19cdfd0f0165c996b6be7012f9" + integrity sha512-Y7WIaXWV+Q21Rz/PJgUxiW/FTBOWmU8NTLdz+nz9mMoiz5vAev/fOaQxwD7qRzTfE3HSm1qsxZ5uRd7eX+VEtA== dependencies: - array-find "^1.0.0" - debug "^2.6.8" - enhanced-resolve "~0.9.0" + array.prototype.find "^2.2.2" + debug "^3.2.7" + enhanced-resolve "^0.9.1" find-root "^1.1.0" - has "^1.0.1" - interpret "^1.0.0" - lodash "^4.17.4" - node-libs-browser "^1.0.0 || ^2.0.0" - resolve "^1.10.0" - semver "^5.3.0" + hasown "^2.0.0" + interpret "^1.4.0" + is-core-module "^2.13.1" + is-regex "^1.1.4" + lodash "^4.17.21" + resolve "^2.0.0-next.5" + semver "^5.7.2" eslint-plugin-no-unsanitized@^3.0.2: version "3.2.0" @@ -2110,7 +2234,22 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -functions-have-names@^1.2.2: +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + +functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== @@ -2129,6 +2268,16 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3: has "^1.0.3" has-symbols "^1.0.3" +get-intrinsic@^1.2.0, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" + integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA== + dependencies: + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz#b5fde77f22cbe35f390b4e089922c50bce6ef664" @@ -2153,6 +2302,14 @@ get-stream@^5.0.0: dependencies: pump "^3.0.0" +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -2206,6 +2363,13 @@ global-dirs@^2.0.1: dependencies: ini "1.3.7" +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -2225,7 +2389,7 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" -has-bigints@^1.0.1: +has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== @@ -2247,6 +2411,11 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -2290,7 +2459,7 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.1, has@^1.0.3: +has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== @@ -2314,6 +2483,13 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasown@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" + integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + dependencies: + function-bind "^1.1.2" + hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -2447,7 +2623,16 @@ internal-slot@^1.0.4: has "^1.0.3" side-channel "^1.0.4" -interpret@^1.0.0: +internal-slot@^1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.6.tgz#37e756098c4911c5e912b8edbf71ed3aa116f930" + integrity sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg== + dependencies: + get-intrinsic "^1.2.2" + hasown "^2.0.0" + side-channel "^1.0.4" + +interpret@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== @@ -2483,6 +2668,15 @@ is-array-buffer@^3.0.1: get-intrinsic "^1.1.3" is-typed-array "^1.1.10" +is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -2517,7 +2711,7 @@ is-boolean-object@^1.1.0: call-bind "^1.0.2" has-tostringtag "^1.0.0" -is-callable@^1.1.3: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== @@ -2529,6 +2723,13 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" +is-core-module@^2.13.0, is-core-module@^2.13.1: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== + dependencies: + hasown "^2.0.0" + is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" @@ -2550,7 +2751,7 @@ is-data-descriptor@^1.0.0: dependencies: kind-of "^6.0.0" -is-date-object@^1.0.5: +is-date-object@^1.0.1, is-date-object@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== @@ -2634,6 +2835,11 @@ is-map@^2.0.1, is-map@^2.0.2: resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + is-number-object@^1.0.4: version "1.0.7" resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" @@ -2724,7 +2930,7 @@ is-string@^1.0.5, is-string@^1.0.7: dependencies: has-tostringtag "^1.0.0" -is-symbol@^1.0.3: +is-symbol@^1.0.2, is-symbol@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== @@ -2742,6 +2948,13 @@ is-typed-array@^1.1.10: gopd "^1.0.1" has-tostringtag "^1.0.0" +is-typed-array@^1.1.12, is-typed-array@^1.1.9: + version "1.1.12" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" + integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== + dependencies: + which-typed-array "^1.1.11" + is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -2757,6 +2970,13 @@ is-weakmap@^2.0.1: resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + is-weakset@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" @@ -3019,7 +3239,7 @@ lodash.once@^4.1.1: resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" integrity sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg== -lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.4: +lodash@^4.17.19, lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -3314,7 +3534,7 @@ nice-try@^1.0.4: resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== -"node-libs-browser@^1.0.0 || ^2.0.0", node-libs-browser@^2.2.1: +node-libs-browser@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== @@ -3398,6 +3618,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-inspect@^1.13.1: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== + object-inspect@^1.9.0: version "1.12.3" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" @@ -3916,6 +4141,15 @@ regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" +regexp.prototype.flags@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" + integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + set-function-name "^2.0.0" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -3977,6 +4211,15 @@ resolve@^1.10.0, resolve@^1.5.0, resolve@^1.7.1: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" +resolve@^2.0.0-next.5: + version "2.0.0-next.5" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c" + integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + restore-cursor@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" @@ -4059,6 +4302,16 @@ rxjs@^7.5.1: dependencies: tslib "^2.1.0" +safe-array-concat@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" + integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -4069,6 +4322,15 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" + safe-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" @@ -4095,7 +4357,7 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0, semver@^6.0.0, semver@^7.5.3: +"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0, semver@^5.7.2, semver@^6.0.0, semver@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -4114,6 +4376,25 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.1.1.tgz#4bc39fafb0307224a33e106a7d35ca1218d659ed" + integrity sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ== + dependencies: + define-data-property "^1.1.1" + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + +set-function-name@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" + integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== + dependencies: + define-data-property "^1.0.1" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.0" + set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" @@ -4410,6 +4691,33 @@ string-width@^4.1.0, string-width@^4.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -4655,11 +4963,60 @@ type-fest@^0.6.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" integrity sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg== +typed-array-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" + integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-typed-array "^1.1.10" + +typed-array-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" + integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" + integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + typedarray@^0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -4873,6 +5230,17 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== +which-typed-array@^1.1.11, which-typed-array@^1.1.13: + version "1.1.13" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.13.tgz#870cd5be06ddb616f504e7b039c4c24898184d36" + integrity sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.4" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + which-typed-array@^1.1.9: version "1.1.9" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" From 9d754af2e05167c01f6da9c4173a51cd51fc6669 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Thu, 16 Nov 2023 19:26:40 -0800 Subject: [PATCH 26/29] Rename indices to indexes (#926) (#939) * OSCI: rename indices to indexes * OSCI: rename indices to indexes * update test snapshot * updated files based on cypress test result --------- (cherry picked from commit 03f268dbc1a081cb745646ea18d1c6030cf06ed4) Signed-off-by: Mansi Shinde Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: bowenlan-amzn --- .../indices_spec.js | 10 +++++----- .../managed_indices_spec.js | 14 +++++++------- .../rollups_spec.js | 2 +- .../snapshots_spec.js | 2 +- cypress/utils/commands.js | 4 ++-- .../containers/ChangePolicy/ChangePolicy.tsx | 2 +- .../JobNameAndIndices/JobNameAndIndices.tsx | 2 +- .../CreateRollupForm/CreateRollupForm.test.tsx | 4 ++-- .../components/CloseIndexModal/CloseIndexModal.tsx | 2 +- .../__snapshots__/CloseIndexModal.test.tsx.snap | 2 +- .../DeleteIndexModal/DeleteIndexModal.tsx | 2 +- .../__snapshots__/DeleteIndexModal.test.tsx.snap | 2 +- .../components/IndexControls/IndexControls.tsx | 2 +- .../__snapshots__/IndexControls.test.tsx.snap | 4 ++-- .../components/OpenIndexModal/OpenIndexModal.tsx | 2 +- .../__snapshots__/OpenIndexModal.test.tsx.snap | 2 +- .../pages/Indices/containers/Indices/Indices.tsx | 2 +- .../Indices/__snapshots__/Indices.test.tsx.snap | 4 ++-- public/pages/Main/Main.tsx | 4 ++-- .../ManagedIndexControls/ManagedIndexControls.tsx | 2 +- .../ManagedIndexControls.test.tsx.snap | 4 ++-- .../ManagedIndexEmptyPrompt.tsx | 6 +++--- .../ManagedIndexEmptyPrompt.test.tsx.snap | 2 +- .../components/RetryModal/RetryModal.test.tsx | 2 +- .../components/RetryModal/RetryModal.tsx | 6 +++--- .../__snapshots__/RetryModal.test.tsx.snap | 2 +- .../ManagedIndices/ManagedIndices.test.tsx | 2 +- .../containers/ManagedIndices/ManagedIndices.tsx | 10 +++++----- .../__snapshots__/ManagedIndices.test.tsx.snap | 6 +++--- public/utils/constants.ts | 4 ++-- 30 files changed, 57 insertions(+), 57 deletions(-) diff --git a/cypress/integration/plugins/index-management-dashboards-plugin/indices_spec.js b/cypress/integration/plugins/index-management-dashboards-plugin/indices_spec.js index 4d32227c8..0989b017a 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/indices_spec.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/indices_spec.js @@ -9,7 +9,7 @@ import samplePolicy from "../../../fixtures/plugins/index-management-dashboards- const POLICY_ID = "test_policy_id"; const SAMPLE_INDEX = "sample_index"; -describe("Indices", () => { +describe("Indexes", () => { beforeEach(() => { // Set welcome screen tracking to false localStorage.setItem("home:welcome:show", "false"); @@ -52,7 +52,7 @@ describe("Indices", () => { }); }); - describe("can show data stream indices", () => { + describe("can show data stream indexes", () => { before(() => { cy.deleteAllIndices(); cy.deleteIMJobs(); @@ -169,7 +169,7 @@ describe("Indices", () => { }); }); - describe("can make indices deleted", () => { + describe("can make indexes deleted", () => { before(() => { cy.deleteAllIndices(); cy.deleteIMJobs(); @@ -417,7 +417,7 @@ describe("Indices", () => { cy.get('[data-test-subj="Close Action"]').should("exist").should("not.have.class", "euiContextMenuItem-isDisabled").click(); // Check for close index modal - cy.contains("Close indices"); + cy.contains("Close indexes"); // Close confirm button should be disabled cy.get('[data-test-subj="Close Confirm button"]').should("have.class", "euiButton-isDisabled"); @@ -457,7 +457,7 @@ describe("Indices", () => { cy.get('[data-test-subj="Open Action"]').should("exist").should("not.have.class", "euiContextMenuItem-isDisabled").click(); // Check for open index modal - cy.contains("Open indices"); + cy.contains("Open indexes"); cy.get('[data-test-subj="Open Confirm button"]').click(); diff --git a/cypress/integration/plugins/index-management-dashboards-plugin/managed_indices_spec.js b/cypress/integration/plugins/index-management-dashboards-plugin/managed_indices_spec.js index 40e1a49cb..f9335e318 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/managed_indices_spec.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/managed_indices_spec.js @@ -14,7 +14,7 @@ const POLICY_ID_ROLLOVER = "test_policy_rollover"; const SAMPLE_INDEX = "sample_index"; const SAMPLE_INDEX_ROLLOVER = "sample_index-01"; -describe("Managed indices", () => { +describe("Managed indexes", () => { beforeEach(() => { // Set welcome screen tracking to false localStorage.setItem("home:welcome:show", "false"); @@ -58,13 +58,13 @@ describe("Managed indices", () => { }); // Confirm we got a remove policy toaster - cy.contains("Removed policy from 1 managed indices"); + cy.contains("Removed policy from 1 managed indexes"); // Wait some time for remove policy to execute before reload cy.wait(3000).reload(); // Confirm we are back to empty loading state, give 20 seconds as OSD takes a while to load - cy.contains("There are no existing managed indices.", { timeout: 20000 }); + cy.contains("There are no existing managed indexes.", { timeout: 20000 }); }); }); @@ -121,7 +121,7 @@ describe("Managed indices", () => { cy.get(`[data-test-subj="retryModalRetryButton"]`).click({ force: true }); // Confirm we got retry toaster - cy.contains("Retried 1 managed indices"); + cy.contains("Retried 1 managed indexes"); // Reload the page cy.reload(); @@ -238,10 +238,10 @@ describe("Managed indices", () => { }); // Confirm we got the change policy toaster - cy.contains("Changed policy on 1 indices"); + cy.contains("Changed policy on 1 indexes"); // Click back to Managed Indices page by clicking "Managed indices" breadcrumb - cy.contains("Policy managed indices").click(); + cy.contains("Policy managed indexes").click(); // Speed up execution of managed index cy.updateManagedIndexConfigStartTime(SAMPLE_INDEX); @@ -257,7 +257,7 @@ describe("Managed indices", () => { }); }); - describe("can manage data stream indices", () => { + describe("can manage data stream indexes", () => { before(() => { cy.deleteAllIndices(); cy.deleteIMJobs(); diff --git a/cypress/integration/plugins/index-management-dashboards-plugin/rollups_spec.js b/cypress/integration/plugins/index-management-dashboards-plugin/rollups_spec.js index 339ebaee2..570481f18 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/rollups_spec.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/rollups_spec.js @@ -142,7 +142,7 @@ describe("Rollups", () => { cy.get("button").contains("Next").click({ force: true }); // Confirm that we got to step 4 of creation page - cy.contains("Job name and indices"); + cy.contains("Job name and indexes"); // Click the create button cy.get("button").contains("Create").click({ force: true }); diff --git a/cypress/integration/plugins/index-management-dashboards-plugin/snapshots_spec.js b/cypress/integration/plugins/index-management-dashboards-plugin/snapshots_spec.js index 51560333a..2d1bc1afc 100644 --- a/cypress/integration/plugins/index-management-dashboards-plugin/snapshots_spec.js +++ b/cypress/integration/plugins/index-management-dashboards-plugin/snapshots_spec.js @@ -83,7 +83,7 @@ describe("Snapshots", () => { }); describe("Snapshot can be restored", () => { - it("Successfully restores indices from snapshot", () => { + it("Successfully restores indexes from snapshot", () => { // Must wait here before refreshing so snapshot status becomes 'success' cy.wait(5000); diff --git a/cypress/utils/commands.js b/cypress/utils/commands.js index 6e7ccbbc3..4dd68a224 100644 --- a/cypress/utils/commands.js +++ b/cypress/utils/commands.js @@ -97,13 +97,13 @@ Cypress.Commands.add("login", () => { }); Cypress.Commands.add("deleteAllIndices", () => { - cy.log("Deleting all indices"); + cy.log("Deleting all indexes"); cy.request("DELETE", `${Cypress.env("openSearchUrl")}/index*,sample*,opensearch_dashboards*`); cy.request("DELETE", `${Cypress.env("openSearchUrl")}/.opendistro-ism*?expand_wildcards=all`); }); Cypress.Commands.add("deleteADSystemIndices", () => { - cy.log("Deleting AD system indices"); + cy.log("Deleting AD system indexes"); cy.request("DELETE", `${Cypress.env("openSearchUrl")}/.opendistro-anomaly*`); }); diff --git a/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx b/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx index df7fe9f9e..ed7b9d500 100644 --- a/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx +++ b/public/pages/ChangePolicy/containers/ChangePolicy/ChangePolicy.tsx @@ -98,7 +98,7 @@ export default class ChangePolicy extends Component } bodyStyles={{ padding: "initial" }} - title="Job name and indices" + title="Job name and indexes" titleSize="m" >
diff --git a/public/pages/CreateRollup/containers/CreateRollupForm/CreateRollupForm.test.tsx b/public/pages/CreateRollup/containers/CreateRollupForm/CreateRollupForm.test.tsx index dfd17f797..e01642d13 100644 --- a/public/pages/CreateRollup/containers/CreateRollupForm/CreateRollupForm.test.tsx +++ b/public/pages/CreateRollup/containers/CreateRollupForm/CreateRollupForm.test.tsx @@ -303,7 +303,7 @@ describe(" creation", () => { userEvent.click(getByTestId("createRollupNextButton")); //Check that it routes to step 4 - expect(queryByText("Job name and indices")).not.toBeNull(); + expect(queryByText("Job name and indexes")).not.toBeNull(); //Test create userEvent.click(getByTestId("createRollupSubmitButton")); @@ -430,6 +430,6 @@ describe(" creation", () => { //Check that it routes to step 4 userEvent.click(getByTestId("createRollupNextButton")); - expect(queryByText("Job name and indices")).not.toBeNull(); + expect(queryByText("Job name and indexes")).not.toBeNull(); }); }); diff --git a/public/pages/Indices/components/CloseIndexModal/CloseIndexModal.tsx b/public/pages/Indices/components/CloseIndexModal/CloseIndexModal.tsx index 8da8bee1a..78af2117f 100644 --- a/public/pages/Indices/components/CloseIndexModal/CloseIndexModal.tsx +++ b/public/pages/Indices/components/CloseIndexModal/CloseIndexModal.tsx @@ -44,7 +44,7 @@ export default function CloseIndexModal(props: CloseIndexModalProps) { return ( - Close indices + Close indexes diff --git a/public/pages/Indices/components/CloseIndexModal/__snapshots__/CloseIndexModal.test.tsx.snap b/public/pages/Indices/components/CloseIndexModal/__snapshots__/CloseIndexModal.test.tsx.snap index 04fde70d1..dd244c1cf 100644 --- a/public/pages/Indices/components/CloseIndexModal/__snapshots__/CloseIndexModal.test.tsx.snap +++ b/public/pages/Indices/components/CloseIndexModal/__snapshots__/CloseIndexModal.test.tsx.snap @@ -39,7 +39,7 @@ HTMLCollection [
- Close indices + Close indexes
- Delete indices + Delete indexes diff --git a/public/pages/Indices/components/DeleteIndexModal/__snapshots__/DeleteIndexModal.test.tsx.snap b/public/pages/Indices/components/DeleteIndexModal/__snapshots__/DeleteIndexModal.test.tsx.snap index 19062a096..aca0331c2 100644 --- a/public/pages/Indices/components/DeleteIndexModal/__snapshots__/DeleteIndexModal.test.tsx.snap +++ b/public/pages/Indices/components/DeleteIndexModal/__snapshots__/DeleteIndexModal.test.tsx.snap @@ -39,7 +39,7 @@ HTMLCollection [
- Delete indices + Delete indexes
spec renders data streams selection field 1`] = ` class="euiSwitch__label" id="some_html_id" > - Show data stream indices + Show data stream indexes
@@ -215,7 +215,7 @@ exports[` spec renders the component 1`] = ` class="euiSwitch__label" id="some_html_id" > - Show data stream indices + Show data stream indexes

diff --git a/public/pages/Indices/components/OpenIndexModal/OpenIndexModal.tsx b/public/pages/Indices/components/OpenIndexModal/OpenIndexModal.tsx index a8dd8e4e6..d55d0137c 100644 --- a/public/pages/Indices/components/OpenIndexModal/OpenIndexModal.tsx +++ b/public/pages/Indices/components/OpenIndexModal/OpenIndexModal.tsx @@ -31,7 +31,7 @@ export default function OpenIndexModal(props: OpenIndexModalProps) { return ( - Open indices + Open indexes diff --git a/public/pages/Indices/components/OpenIndexModal/__snapshots__/OpenIndexModal.test.tsx.snap b/public/pages/Indices/components/OpenIndexModal/__snapshots__/OpenIndexModal.test.tsx.snap index d9053e8aa..02283748a 100644 --- a/public/pages/Indices/components/OpenIndexModal/__snapshots__/OpenIndexModal.test.tsx.snap +++ b/public/pages/Indices/components/OpenIndexModal/__snapshots__/OpenIndexModal.test.tsx.snap @@ -39,7 +39,7 @@ HTMLCollection [
- Open indices + Open indexes
{ /> } bodyStyles={{ padding: "initial" }} - title="Indices" + title="Indexes" itemCount={totalIndices} > spec renders the component 1`] = `

- Indices + Indexes @@ -187,7 +187,7 @@ exports[` spec renders the component 1`] = ` class="euiSwitch__label" id="some_html_id" > - Show data stream indices + Show data stream indexes

diff --git a/public/pages/Main/Main.tsx b/public/pages/Main/Main.tsx index af07627e6..f078730a6 100644 --- a/public/pages/Main/Main.tsx +++ b/public/pages/Main/Main.tsx @@ -52,8 +52,8 @@ import CreateComposableTemplate from "../CreateComposableTemplate"; enum Navigation { IndexManagement = "Index Management", IndexPolicies = "State management policies", - ManagedIndices = "Policy managed indices", - Indices = "Indices", + ManagedIndices = "Policy managed indexes", + Indices = "Indexes", Rollups = "Rollup jobs", Transforms = "Transform jobs", SnapshotManagement = "Snapshot Management", diff --git a/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx b/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx index 245cd8645..2c444326d 100644 --- a/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx +++ b/public/pages/ManagedIndices/components/ManagedIndexControls/ManagedIndexControls.tsx @@ -71,7 +71,7 @@ export default class ManagedIndexControls extends Component spec renders data streams selection field 1`] class="euiSwitch__label" id="some_html_id" > - Show data stream indices + Show data stream indexes @@ -204,7 +204,7 @@ exports[` spec renders the component 1`] = ` class="euiSwitch__label" id="some_html_id" > - Show data stream indices + Show data stream indexes diff --git a/public/pages/ManagedIndices/components/ManagedIndexEmptyPrompt/ManagedIndexEmptyPrompt.tsx b/public/pages/ManagedIndices/components/ManagedIndexEmptyPrompt/ManagedIndexEmptyPrompt.tsx index e06b5e20d..0d9eb8b5a 100644 --- a/public/pages/ManagedIndices/components/ManagedIndexEmptyPrompt/ManagedIndexEmptyPrompt.tsx +++ b/public/pages/ManagedIndices/components/ManagedIndexEmptyPrompt/ManagedIndexEmptyPrompt.tsx @@ -11,9 +11,9 @@ import CreatePolicyModal from "../../../../components/CreatePolicyModal"; import { ROUTES } from "../../../../utils/constants"; export const TEXT = { - RESET_FILTERS: "There are no managed indices matching your applied filters. Reset your filters to view your managed indices.", - NO_MANAGED_INDICES: "There are no existing managed indices. Create a policy to add to an index.", - LOADING: "Loading managed indices...", + RESET_FILTERS: "There are no managed indexes matching your applied filters. Reset your filters to view your managed indexes.", + NO_MANAGED_INDICES: "There are no existing managed indexes. Create a policy to add to an index.", + LOADING: "Loading managed indexes...", }; const getMessagePrompt = ({ filterIsApplied, loading }: ManagedIndexEmptyPromptProps): string => { diff --git a/public/pages/ManagedIndices/components/ManagedIndexEmptyPrompt/__snapshots__/ManagedIndexEmptyPrompt.test.tsx.snap b/public/pages/ManagedIndices/components/ManagedIndexEmptyPrompt/__snapshots__/ManagedIndexEmptyPrompt.test.tsx.snap index 01dd27e23..b3000d8e9 100644 --- a/public/pages/ManagedIndices/components/ManagedIndexEmptyPrompt/__snapshots__/ManagedIndexEmptyPrompt.test.tsx.snap +++ b/public/pages/ManagedIndices/components/ManagedIndexEmptyPrompt/__snapshots__/ManagedIndexEmptyPrompt.test.tsx.snap @@ -15,7 +15,7 @@ exports[` spec renders the component 1`] = ` class="euiText euiText--medium" >

- There are no existing managed indices. Create a policy to add to an index. + There are no existing managed indexes. Create a policy to add to an index.

diff --git a/public/pages/ManagedIndices/components/RetryModal/RetryModal.test.tsx b/public/pages/ManagedIndices/components/RetryModal/RetryModal.test.tsx index 019afb2c6..620a3db0a 100644 --- a/public/pages/ManagedIndices/components/RetryModal/RetryModal.test.tsx +++ b/public/pages/ManagedIndices/components/RetryModal/RetryModal.test.tsx @@ -191,7 +191,7 @@ describe(" spec", () => { expect(browserServicesMock.managedIndexService.retryManagedIndexPolicy).toHaveBeenCalledWith(["some_index"], "two"); expect(coreServicesMock.notifications.toasts.addSuccess).toHaveBeenCalledTimes(1); - expect(coreServicesMock.notifications.toasts.addSuccess).toHaveBeenCalledWith("Retried 1 managed indices"); + expect(coreServicesMock.notifications.toasts.addSuccess).toHaveBeenCalledWith("Retried 1 managed indexes"); }); it("shows error toaster when error is thrown", async () => { diff --git a/public/pages/ManagedIndices/components/RetryModal/RetryModal.tsx b/public/pages/ManagedIndices/components/RetryModal/RetryModal.tsx index a8ea1ed22..0ea23909f 100644 --- a/public/pages/ManagedIndices/components/RetryModal/RetryModal.tsx +++ b/public/pages/ManagedIndices/components/RetryModal/RetryModal.tsx @@ -103,14 +103,14 @@ export default class RetryModal extends Component - + spec renders the component 1`] = ` class="euiFormHelpText euiFormRow__text" id="some_html_id-help-0" > - Only common states shared across all selected indices are available + Only common states shared across all selected indexes are available diff --git a/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.test.tsx b/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.test.tsx index 51478c29b..f1319ec49 100644 --- a/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.test.tsx +++ b/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.test.tsx @@ -156,7 +156,7 @@ describe(" spec", () => { await waitFor(() => {}); expect(coreServicesMock.notifications.toasts.addSuccess).toHaveBeenCalledTimes(1); - expect(coreServicesMock.notifications.toasts.addSuccess).toHaveBeenCalledWith("Removed policy from 1 managed indices"); + expect(coreServicesMock.notifications.toasts.addSuccess).toHaveBeenCalledWith("Removed policy from 1 managed indexes"); }); it("sorts/paginates the table", async () => { diff --git a/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx b/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx index 260104748..f393d6168 100644 --- a/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx +++ b/public/pages/ManagedIndices/containers/ManagedIndices/ManagedIndices.tsx @@ -246,7 +246,7 @@ export default class ManagedIndices extends Component void) => () => onShow(ConfirmationModal, { title: `Remove ${ - selectedItems.length === 1 ? `policy from ${selectedItems[0].index}` : `policies from ${selectedItems.length} indices` + selectedItems.length === 1 ? `policy from ${selectedItems[0].index}` : `policies from ${selectedItems.length} indexes` }`, bodyMessage: `Remove ${ - selectedItems.length === 1 ? `policy from ${selectedItems[0].index}` : `policies from ${selectedItems.length} indices` + selectedItems.length === 1 ? `policy from ${selectedItems[0].index}` : `policies from ${selectedItems.length} indexes` } permanently? This action cannot be undone.`, actionMessage: "Remove", onAction: () => this.onClickRemovePolicy(selectedItems.map((item) => item.index)), @@ -442,7 +442,7 @@ export default class ManagedIndices extends Component} bodyStyles={{ padding: "initial" }} - title="Policy managed indices" + title="Policy managed indexes" itemCount={totalManagedIndices} > spec renders the component 1`] = `

- Policy managed indices + Policy managed indexes @@ -233,7 +233,7 @@ exports[` spec renders the component 1`] = ` class="euiSwitch__label" id="some_html_id" > - Show data stream indices + Show data stream indexes @@ -497,7 +497,7 @@ exports[` spec renders the component 1`] = ` class="euiText euiText--medium" >

- Loading managed indices... + Loading managed indexes...

diff --git a/public/utils/constants.ts b/public/utils/constants.ts index 93e6efd85..a924b2bc9 100644 --- a/public/utils/constants.ts +++ b/public/utils/constants.ts @@ -72,9 +72,9 @@ export const ROUTES = Object.freeze({ export const BREADCRUMBS = Object.freeze({ INDEX_MANAGEMENT: { text: "Index Management", href: "#/" }, - INDICES: { text: "Indices", href: `#${ROUTES.INDICES}` }, + INDICES: { text: "Indexes", href: `#${ROUTES.INDICES}` }, INDEX_POLICIES: { text: "State management policies", href: `#${ROUTES.INDEX_POLICIES}` }, - MANAGED_INDICES: { text: "Policy managed indices", href: `#${ROUTES.MANAGED_INDICES}` }, + MANAGED_INDICES: { text: "Policy managed indexes", href: `#${ROUTES.MANAGED_INDICES}` }, EDIT_POLICY: { text: "Edit policy" }, CREATE_POLICY: { text: "Create policy" }, CHANGE_POLICY: { text: "Change policy" }, From fa2a1646a0e4db32d561d0a74ddc519831a7fe19 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 11:56:45 -0800 Subject: [PATCH 27/29] update background color in "state" block (#903) (#942) * update background color in "state" block * fix unit test failure * fix unit test failure * update test snapshot --------- (cherry picked from commit 44da2aba76a52ebde7772d4d636bd0ca649dfa03) Signed-off-by: Ruochen Wang <106004210+wrch0712@users.noreply.github.com> Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] Co-authored-by: bowenlan-amzn --- public/pages/VisualCreatePolicy/components/States/State.tsx | 2 +- .../components/States/__snapshots__/State.test.tsx.snap | 1 - .../components/States/__snapshots__/States.test.tsx.snap | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/public/pages/VisualCreatePolicy/components/States/State.tsx b/public/pages/VisualCreatePolicy/components/States/State.tsx index 47e0ce6e4..87bd87d00 100644 --- a/public/pages/VisualCreatePolicy/components/States/State.tsx +++ b/public/pages/VisualCreatePolicy/components/States/State.tsx @@ -102,7 +102,7 @@ const State = ({ state, isInitialState, idx, onClickEditState, onClickDeleteStat } paddingSize="l" > - +

Actions

diff --git a/public/pages/VisualCreatePolicy/components/States/__snapshots__/State.test.tsx.snap b/public/pages/VisualCreatePolicy/components/States/__snapshots__/State.test.tsx.snap index e602ff46a..aeade8c53 100644 --- a/public/pages/VisualCreatePolicy/components/States/__snapshots__/State.test.tsx.snap +++ b/public/pages/VisualCreatePolicy/components/States/__snapshots__/State.test.tsx.snap @@ -157,7 +157,6 @@ exports[` spec renders the component 1`] = ` >
spec renders the component 1`] = ` >
spec renders the component 1`] = ` >
Date: Tue, 12 Dec 2023 16:31:54 -0800 Subject: [PATCH 28/29] sort by managed policy feature (#950) (#952) * sort by managed policy feature * add customSort function and remove comment * update managed by policy sorting logic --------- (cherry picked from commit b5169330dc9865e8b0f49fd02a9e89c3b31a0381) Signed-off-by: Mansi Shinde Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../BackingIndices/BackingIndices.tsx | 2 +- .../__snapshots__/Indices.test.tsx.snap | 20 +++++++--- public/pages/Indices/utils/constants.tsx | 2 +- server/services/IndexService.ts | 38 ++++++++++++------- 4 files changed, 40 insertions(+), 22 deletions(-) diff --git a/public/pages/CreateDataStream/containers/BackingIndices/BackingIndices.tsx b/public/pages/CreateDataStream/containers/BackingIndices/BackingIndices.tsx index b7f327a83..9f941c933 100644 --- a/public/pages/CreateDataStream/containers/BackingIndices/BackingIndices.tsx +++ b/public/pages/CreateDataStream/containers/BackingIndices/BackingIndices.tsx @@ -103,7 +103,7 @@ export default function BackingIndices(props: SubDetailProps) { { field: "managed", name: "Managed by policy", - sortable: false, + sortable: true, truncateText: true, textOnly: true, render: renderNumber, diff --git a/public/pages/Indices/containers/Indices/__snapshots__/Indices.test.tsx.snap b/public/pages/Indices/containers/Indices/__snapshots__/Indices.test.tsx.snap index 6eba9f596..191b4b655 100644 --- a/public/pages/Indices/containers/Indices/__snapshots__/Indices.test.tsx.snap +++ b/public/pages/Indices/containers/Indices/__snapshots__/Indices.test.tsx.snap @@ -349,21 +349,29 @@ exports[` spec renders the component 1`] = ` - - Managed by policy + + Managed by policy + - + { + function customSort(array, key, sortDirection) { + return array.sort((a, b) => { let flag; - const aStatus = a.extraStatus as string; - const bStatus = b.extraStatus as string; + const aValue = a[key] as string; + const bValue = b[key] as string; + if (sortDirection === "asc") { - flag = aStatus < bStatus; + flag = aValue < bValue; } else { - flag = aStatus > bStatus; + flag = aValue > bValue; } return flag ? -1 : 1; }); } + if (sortField === "status") { + // add new more status to status field so we need to sort + customSort(indicesResponse, "extraStatus", sortDirection); + } + // Filtering out indices that belong to a data stream. This must be done before pagination. const filteredIndices = showDataStreams ? indicesResponse : indicesResponse.filter((index) => index.data_stream === null); @@ -169,17 +177,19 @@ export default class IndexService { const managedStatus = await this._getManagedStatus(request, indexNames); + const allIndices = paginatedIndices.map((catIndex: CatIndex) => ({ + ...catIndex, + managed: managedStatus[catIndex.index] ? "Yes" : "No", + managedPolicy: managedStatus[catIndex.index], + })); + // NOTE: Cannot use response.ok due to typescript type checking return response.custom({ statusCode: 200, body: { ok: true, response: { - indices: paginatedIndices.map((catIndex: CatIndex) => ({ - ...catIndex, - managed: managedStatus[catIndex.index] ? "Yes" : "No", - managedPolicy: managedStatus[catIndex.index], - })), + indices: sortField === "managed" ? customSort(allIndices, "managed", sortDirection) : allIndices, totalIndices: filteredIndices.length, }, }, From 5da75d1e1f402824436b5b635127a52f9af7a554 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 13 Dec 2023 16:27:29 -0800 Subject: [PATCH 29/29] Remove unused integtest.sh file (#954) (#955) (cherry picked from commit be76a290cb60d667087c1a6f85401688114649fe) Signed-off-by: Derek Ho Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- integtest.sh | 77 ---------------------------------------------------- 1 file changed, 77 deletions(-) delete mode 100755 integtest.sh diff --git a/integtest.sh b/integtest.sh deleted file mode 100755 index 9081d879d..000000000 --- a/integtest.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/bash - -set -e - -function usage() { - echo "" - echo "This script is used to run integration tests for plugin installed on a remote OpenSearch/Dashboards cluster." - echo "--------------------------------------------------------------------------" - echo "Usage: $0 [args]" - echo "" - echo "Required arguments:" - echo "None" - echo "" - echo "Optional arguments:" - echo -e "-b BIND_ADDRESS\t, defaults to localhost | 127.0.0.1, can be changed to any IP or domain name for the cluster location." - echo -e "-p BIND_PORT\t, defaults to 9200 or 5601 depends on OpenSearch or Dashboards, can be changed to any port for the cluster location." - echo -e "-s SECURITY_ENABLED\t(true | false), defaults to true. Specify the OpenSearch/Dashboards have security enabled or not." - echo -e "-c CREDENTIAL\t(usename:password), no defaults, effective when SECURITY_ENABLED=true." - echo -e "-h\tPrint this message." - echo "--------------------------------------------------------------------------" -} - -while getopts ":hb:p:s:c:" arg; do - case $arg in - h) - usage - exit 1 - ;; - b) - BIND_ADDRESS=$OPTARG - ;; - p) - BIND_PORT=$OPTARG - ;; - s) - SECURITY_ENABLED=$OPTARG - ;; - c) - CREDENTIAL=$OPTARG - ;; - :) - echo "-${OPTARG} requires an argument" - usage - exit 1 - ;; - ?) - echo "Invalid option: -${OPTARG}" - exit 1 - ;; - esac -done - - -if [ -z "$BIND_ADDRESS" ] -then - BIND_ADDRESS="localhost" -fi - -if [ -z "$BIND_PORT" ] -then - BIND_PORT="5601" -fi - -if [ -z "$SECURITY_ENABLED" ] -then - SECURITY_ENABLED="true" -fi - -if [ -z "$CREDENTIAL" ] -then - CREDENTIAL="admin:admin" - USERNAME=`echo $CREDENTIAL | awk -F ':' '{print $1}'` - PASSWORD=`echo $CREDENTIAL | awk -F ':' '{print $2}'` -fi - -yarn osd bootstrap -cypress run --env security_enabled=$SECURITY_ENABLED opensearch_dashboards=${BIND_ADDRESS}:${BIND_PORT}