From e03eb61117baae7f75be50ecc0d828edaaf02553 Mon Sep 17 00:00:00 2001 From: Bikram Choudhury Date: Wed, 31 Dec 2025 12:29:26 +0530 Subject: [PATCH] copy job content change --- .../ContainerCopy/ContainerCopyMessages.ts | 12 ++++-------- .../Components/MigrationType.test.tsx | 15 ++++++++++----- .../SelectAccount/Components/MigrationType.tsx | 8 +++----- .../Components/CopyJobActionMenu.test.tsx | 12 ++++++------ .../Components/CopyJobActionMenu.tsx | 17 +++++------------ src/Main.tsx | 1 + 6 files changed, 29 insertions(+), 36 deletions(-) diff --git a/src/Explorer/ContainerCopy/ContainerCopyMessages.ts b/src/Explorer/ContainerCopy/ContainerCopyMessages.ts index 6950a5e7e..65b308b9b 100644 --- a/src/Explorer/ContainerCopy/ContainerCopyMessages.ts +++ b/src/Explorer/ContainerCopy/ContainerCopyMessages.ts @@ -29,16 +29,12 @@ export default { offline: { title: "Offline mode", description: - "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", - learnMoreText: "Learn more", - learnMoreHref: "https://learn.microsoft.com/en-us/azure/cosmos-db/container-copy?tabs=offline-copy", + "Offline container copy jobs let you copy data from a source container to a destination Cosmos DB container for supported APIs. To ensure data integrity between the source and destination, we recommend stopping updates on the source container before creating the copy job. Learn more about [offline copy jobs](https://learn.microsoft.com/azure/cosmos-db/how-to-container-copy?tabs=offline-copy&pivots=api-nosql).", }, online: { title: "Online mode", description: - "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", - learnMoreText: "Learn more", - learnMoreHref: "https://learn.microsoft.com/en-us/azure/cosmos-db/container-copy?tabs=offline-copy", + "Online container copy jobs let you copy data from a source container to a destination Cosmos DB NoSQL API container using the [All Versions and Delete](https://learn.microsoft.com/azure/cosmos-db/change-feed-modes?tabs=all-versions-and-deletes#all-versions-and-deletes-change-feed-mode-preview) change feed. This allows updates to continue on the source while data is copied. A brief downtime is required at the end to safely switch over client applications to the destination container. Learn more about [online copy jobs](https://learn.microsoft.com/azure/cosmos-db/container-copy?tabs=online-copy&pivots=api-nosql#getting-started).", }, }, @@ -189,8 +185,8 @@ export default { Cancelled: "Cancelled", }, dialog: { - heading: "Confirm Action", - confirmButtonText: "OK", + heading: "", + confirmButtonText: "Confirm", cancelButtonText: "Cancel", }, }, diff --git a/src/Explorer/ContainerCopy/CreateCopyJob/Screens/SelectAccount/Components/MigrationType.test.tsx b/src/Explorer/ContainerCopy/CreateCopyJob/Screens/SelectAccount/Components/MigrationType.test.tsx index b2b41005a..81384feb3 100644 --- a/src/Explorer/ContainerCopy/CreateCopyJob/Screens/SelectAccount/Components/MigrationType.test.tsx +++ b/src/Explorer/ContainerCopy/CreateCopyJob/Screens/SelectAccount/Components/MigrationType.test.tsx @@ -103,12 +103,14 @@ describe("MigrationType", () => { expect(screen.getByTestId("migration-type-description-online")).toBeInTheDocument(); const learnMoreLink = screen.getByRole("link", { - name: ContainerCopyMessages.migrationTypeOptions.online.learnMoreText, + name: "online copy jobs", }); expect(learnMoreLink).toBeInTheDocument(); - expect(learnMoreLink).toHaveAttribute("href", ContainerCopyMessages.migrationTypeOptions.online.learnMoreHref); + expect(learnMoreLink).toHaveAttribute( + "href", + "https://learn.microsoft.com/azure/cosmos-db/container-copy?tabs=online-copy&pivots=api-nosql#getting-started", + ); expect(learnMoreLink).toHaveAttribute("target", "_blank"); - expect(learnMoreLink).toHaveAttribute("rel", "noopener noreferrer"); }); it("should render offline description and learn more link when offline is selected", () => { @@ -126,10 +128,13 @@ describe("MigrationType", () => { expect(screen.getByTestId("migration-type-description-offline")).toBeInTheDocument(); const learnMoreLink = screen.getByRole("link", { - name: ContainerCopyMessages.migrationTypeOptions.offline.learnMoreText, + name: "offline copy jobs", }); expect(learnMoreLink).toBeInTheDocument(); - expect(learnMoreLink).toHaveAttribute("href", ContainerCopyMessages.migrationTypeOptions.offline.learnMoreHref); + expect(learnMoreLink).toHaveAttribute( + "href", + "https://learn.microsoft.com/azure/cosmos-db/how-to-container-copy?tabs=offline-copy&pivots=api-nosql", + ); }); }); diff --git a/src/Explorer/ContainerCopy/CreateCopyJob/Screens/SelectAccount/Components/MigrationType.tsx b/src/Explorer/ContainerCopy/CreateCopyJob/Screens/SelectAccount/Components/MigrationType.tsx index ad94d0bc3..9f838d432 100644 --- a/src/Explorer/ContainerCopy/CreateCopyJob/Screens/SelectAccount/Components/MigrationType.tsx +++ b/src/Explorer/ContainerCopy/CreateCopyJob/Screens/SelectAccount/Components/MigrationType.tsx @@ -1,6 +1,7 @@ /* eslint-disable react/prop-types */ /* eslint-disable react/display-name */ -import { ChoiceGroup, IChoiceGroupOption, Link, Stack, Text } from "@fluentui/react"; +import { ChoiceGroup, IChoiceGroupOption, Stack, Text } from "@fluentui/react"; +import MarkdownRender from "@nteract/markdown"; import { useCopyJobContext } from "Explorer/ContainerCopy/Context/CopyJobContext"; import React from "react"; import ContainerCopyMessages from "../../../../ContainerCopyMessages"; @@ -53,10 +54,7 @@ export const MigrationType: React.FC = React.memo(() => { className="migrationTypeDescription" data-testid={`migration-type-description-${selectedKeyLowercase}`} > - {selectedKeyContent.description}{" "} - - {selectedKeyContent.learnMoreText} - + )} diff --git a/src/Explorer/ContainerCopy/MonitorCopyJobs/Components/CopyJobActionMenu.test.tsx b/src/Explorer/ContainerCopy/MonitorCopyJobs/Components/CopyJobActionMenu.test.tsx index 6b34996a1..abb614042 100644 --- a/src/Explorer/ContainerCopy/MonitorCopyJobs/Components/CopyJobActionMenu.test.tsx +++ b/src/Explorer/ContainerCopy/MonitorCopyJobs/Components/CopyJobActionMenu.test.tsx @@ -35,7 +35,7 @@ jest.mock("../../ContainerCopyMessages", () => ({ }, dialog: { heading: "Confirm Action", - confirmButtonText: "OK", + confirmButtonText: "Confirm", cancelButtonText: "Cancel", }, }, @@ -303,7 +303,7 @@ describe("CopyJobActionMenu", () => { expect(mockShowOkCancelModalDialog).toHaveBeenCalledWith( "Confirm Action", null, - "OK", + "Confirm", expect.any(Function), "Cancel", null, @@ -360,7 +360,7 @@ describe("CopyJobActionMenu", () => { expect(mockShowOkCancelModalDialog).toHaveBeenCalledWith( "Confirm Action", null, - "OK", + "Confirm", expect.any(Function), "Cancel", null, @@ -404,7 +404,7 @@ describe("CopyJobActionMenu", () => { expect(mockShowOkCancelModalDialog).toHaveBeenCalledWith( "Confirm Action", null, - "OK", + "Confirm", expect.any(Function), "Cancel", null, @@ -435,7 +435,7 @@ describe("CopyJobActionMenu", () => { expect(mockShowOkCancelModalDialog).toHaveBeenCalledWith( "Confirm Action", null, - "OK", + "Confirm", expect.any(Function), "Cancel", null, @@ -825,7 +825,7 @@ describe("CopyJobActionMenu", () => { expect(mockShowOkCancelModalDialog).toHaveBeenCalledWith( "Confirm Action", // title null, // subText - "OK", // okLabel + "Confirm", // confirmLabel expect.any(Function), // onOk "Cancel", // cancelLabel null, // onCancel diff --git a/src/Explorer/ContainerCopy/MonitorCopyJobs/Components/CopyJobActionMenu.tsx b/src/Explorer/ContainerCopy/MonitorCopyJobs/Components/CopyJobActionMenu.tsx index a838cf86e..7f2c96265 100644 --- a/src/Explorer/ContainerCopy/MonitorCopyJobs/Components/CopyJobActionMenu.tsx +++ b/src/Explorer/ContainerCopy/MonitorCopyJobs/Components/CopyJobActionMenu.tsx @@ -14,26 +14,19 @@ const dialogBody = { [CopyJobActions.cancel]: (jobName: string) => ( - You are about to cancel {jobName}: - - - Cancelling this job will stop it immediately. Any running or pending steps will not be completed. - - - This action cannot be undone. Do you want to continue? + You are about to cancel {jobName} copy job. + Cancelling will stop the job immediately. ), [CopyJobActions.complete]: (jobName: string) => ( - You are about to complete {jobName}: + You are about to complete {jobName} copy job. - Completing this job will stop the continuous data synchronization between the source and destination containers. - - - This action cannot be undone. Do you want to continue? + Once completed, continuous data copy will stop after any pending documents are processed. To maintain data + integrity, we recommend stopping updates to the source container before completing the job. ), diff --git a/src/Main.tsx b/src/Main.tsx index f30ff9902..af3d462a7 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -128,6 +128,7 @@ const App = (): JSX.Element => { <> + ) : (