Bladeren bron

Fully Refactor transfer/deployment nomenclature

Daniel Vincze 1 jaar geleden
bovenliggende
commit
8a4ac694f2
100 gewijzigde bestanden met toevoegingen van 714 en 2763 verwijderingen
  1. 1 1
      config.ts
  2. 4 4
      src/@types/Execution.ts
  3. 10 24
      src/@types/MainItem.ts
  4. 1 1
      src/@types/Schedule.ts
  5. 5 5
      src/components/App.tsx
  6. 10 10
      src/components/modules/DashboardModule/DashboardActivity/DashboardActivity.tsx
  7. 0 0
      src/components/modules/DashboardModule/DashboardActivity/images/transfer.svg
  8. 3 3
      src/components/modules/DashboardModule/DashboardContent/DashboardContent.spec.tsx
  9. 14 14
      src/components/modules/DashboardModule/DashboardContent/DashboardContent.tsx
  10. 2 2
      src/components/modules/DashboardModule/DashboardExecutions/DashboardExecutions.spec.tsx
  11. 5 5
      src/components/modules/DashboardModule/DashboardExecutions/DashboardExecutions.tsx
  12. 7 7
      src/components/modules/DashboardModule/DashboardTopEndpoints/DashboardTopEndpoints.spec.tsx
  13. 10 10
      src/components/modules/DashboardModule/DashboardTopEndpoints/DashboardTopEndpoints.tsx
  14. 5 5
      src/components/modules/EndpointModule/EndpointDetailsContent/EndpointDetailsContent.tsx
  15. 1 1
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolDetailsContent.spec.tsx
  16. 4 4
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolDetailsContent.tsx
  17. 1 1
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMachines.spec.tsx
  18. 9 9
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMachines.tsx
  19. 1 1
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMainDetails.spec.tsx
  20. 5 5
      src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMainDetails.tsx
  21. 5 5
      src/components/modules/NavigationModule/Navigation/Navigation.tsx
  22. 0 0
      src/components/modules/NavigationModule/Navigation/images/transfer-menu.svg
  23. 0 6
      src/components/modules/TransferModule/DeleteReplicaModal/package.json
  24. 7 7
      src/components/modules/TransferModule/DeleteTransferModal/DeleteReplicaModal.spec.tsx
  25. 9 9
      src/components/modules/TransferModule/DeleteTransferModal/DeleteTransferModal.tsx
  26. 6 0
      src/components/modules/TransferModule/DeleteTransferModal/package.json
  27. 2 2
      src/components/modules/TransferModule/DeploymentOptions/DeploymentFields.ts
  28. 8 8
      src/components/modules/TransferModule/DeploymentOptions/DeploymentOptions.tsx
  29. 1 1
      src/components/modules/TransferModule/DeploymentOptions/ReplicaDeploymentOptions.spec.tsx
  30. 0 0
      src/components/modules/TransferModule/DeploymentOptions/images/deployment.svg
  31. 6 0
      src/components/modules/TransferModule/DeploymentOptions/package.json
  32. 0 0
      src/components/modules/TransferModule/DeploymentOptions/story.tsx
  33. 6 6
      src/components/modules/TransferModule/MainDetails/MainDetails.tsx
  34. 0 74
      src/components/modules/TransferModule/MigrationDetailsContent/MigrationDetailsContent.spec.tsx
  35. 0 142
      src/components/modules/TransferModule/MigrationDetailsContent/MigrationDetailsContent.tsx
  36. 0 6
      src/components/modules/TransferModule/MigrationDetailsContent/package.json
  37. 0 95
      src/components/modules/TransferModule/MigrationDetailsContent/story.tsx
  38. 0 6
      src/components/modules/TransferModule/ReplicaDeploymentOptions/package.json
  39. 0 6
      src/components/modules/TransferModule/ReplicaDetailsContent/package.json
  40. 0 6
      src/components/modules/TransferModule/ReplicaExecutionOptions/package.json
  41. 0 154
      src/components/modules/TransferModule/ReplicaMigrationOptions/ReplicaMigrationOptions.spec.tsx
  42. 0 343
      src/components/modules/TransferModule/ReplicaMigrationOptions/ReplicaMigrationOptions.tsx
  43. 0 15
      src/components/modules/TransferModule/ReplicaMigrationOptions/images/replica-migration.svg
  44. 0 6
      src/components/modules/TransferModule/ReplicaMigrationOptions/package.json
  45. 0 33
      src/components/modules/TransferModule/ReplicaMigrationOptions/replicaMigrationFields.ts
  46. 0 25
      src/components/modules/TransferModule/ReplicaMigrationOptions/story.tsx
  47. 2 2
      src/components/modules/TransferModule/Schedule/Schedule.tsx
  48. 1 1
      src/components/modules/TransferModule/TransferDetailsContent/ReplicaDetailsContent.spec.tsx
  49. 6 6
      src/components/modules/TransferModule/TransferDetailsContent/TransferDetailsContent.tsx
  50. 6 0
      src/components/modules/TransferModule/TransferDetailsContent/package.json
  51. 0 0
      src/components/modules/TransferModule/TransferDetailsContent/story.tsx
  52. 5 5
      src/components/modules/TransferModule/TransferDetailsTable/TransferDetailsTable.tsx
  53. 1 1
      src/components/modules/TransferModule/TransferExecutionOptions/ReplicaExecutionOptions.spec.tsx
  54. 2 2
      src/components/modules/TransferModule/TransferExecutionOptions/TransferExecutionOptions.tsx
  55. 0 0
      src/components/modules/TransferModule/TransferExecutionOptions/images/execution.svg
  56. 6 0
      src/components/modules/TransferModule/TransferExecutionOptions/package.json
  57. 0 0
      src/components/modules/TransferModule/TransferExecutionOptions/story.tsx
  58. 60 100
      src/components/modules/TransferModule/TransferItemModal/TransferItemModal.tsx
  59. 7 12
      src/components/modules/TransferModule/TransferListItem/TransferListItem.tsx
  60. 2 23
      src/components/modules/WizardModule/WizardOptions/WizardOptions.tsx
  61. 3 4
      src/components/modules/WizardModule/WizardPageContent/WizardPageContent.tsx
  62. 0 21
      src/components/modules/WizardModule/WizardSummary/WizardSummary.tsx
  63. 1 1
      src/components/smart/AssessmentDetailsPage/AssessmentDetailsPage.tsx
  64. 5 5
      src/components/smart/DashboardPage/DashboardPage.tsx
  65. 32 32
      src/components/smart/DeploymentDetailsPage/DeploymentDetailsPage.tsx
  66. 9 9
      src/components/smart/DeploymentsPage/DeploymentsPage.tsx
  67. 13 13
      src/components/smart/EndpointDetailsPage/EndpointDetailsPage.tsx
  68. 6 6
      src/components/smart/EndpointsPage/EndpointsPage.tsx
  69. 1 1
      src/components/smart/MetalHubServerDetailsPage/MetalHubServerDetailsPage.tsx
  70. 0 600
      src/components/smart/MigrationDetailsPage/MigrationDetailsPage.tsx
  71. 0 10
      src/components/smart/MigrationDetailsPage/images/migration.svg
  72. 0 6
      src/components/smart/MigrationDetailsPage/package.json
  73. 0 377
      src/components/smart/MigrationsPage/MigrationsPage.tsx
  74. 0 10
      src/components/smart/MigrationsPage/images/migration-large.svg
  75. 0 10
      src/components/smart/MigrationsPage/images/migration.svg
  76. 0 6
      src/components/smart/MigrationsPage/package.json
  77. 6 6
      src/components/smart/MinionPoolDetailsPage/MinionPoolDetailsPage.tsx
  78. 0 6
      src/components/smart/ReplicaDetailsPage/package.json
  79. 0 6
      src/components/smart/ReplicasPage/package.json
  80. 165 165
      src/components/smart/TransferDetailsPage/TransferDetailsPage.tsx
  81. 0 0
      src/components/smart/TransferDetailsPage/images/live_migration.svg
  82. 0 0
      src/components/smart/TransferDetailsPage/images/replica.svg
  83. 6 0
      src/components/smart/TransferDetailsPage/package.json
  84. 97 97
      src/components/smart/TransfersPage/TransfersPage.tsx
  85. 0 0
      src/components/smart/TransfersPage/images/live-migration.svg
  86. 0 0
      src/components/smart/TransfersPage/images/replica-large.svg
  87. 0 0
      src/components/smart/TransfersPage/images/replica.svg
  88. 6 0
      src/components/smart/TransfersPage/package.json
  89. 11 11
      src/components/smart/WizardPage/WizardPage.tsx
  90. 0 12
      src/components/ui/Dropdowns/NewItemDropdown/NewItemDropdown.tsx
  91. 7 7
      src/components/ui/Dropdowns/NotificationDropdown/NotificationDropdown.tsx
  92. 2 24
      src/constants.ts
  93. 1 2
      src/plugins/default/OptionsSchemaPlugin.ts
  94. 1 1
      src/plugins/openstack/ContentPlugin.tsx
  95. 11 11
      src/sources/DeploymentSource.ts
  96. 1 1
      src/sources/MigrationSource.ts
  97. 7 7
      src/sources/NotificationSource.ts
  98. 2 2
      src/sources/ProviderSource.ts
  99. 13 13
      src/sources/ScheduleSource.ts
  100. 62 62
      src/sources/TransferSource.ts

+ 1 - 1
config.ts

@@ -176,7 +176,7 @@ const conf: Config = {
   ],
 
   // The number of items per page applicable to main lists:
-  // replicas, migrations, endpoints, users etc.
+  // transfers, deployments, endpoints, users etc.
   mainListItemsPerPage: 20,
 
   maxMinionPoolEventsPerPage: 50,

+ 4 - 4
src/@types/Execution.ts

@@ -22,10 +22,10 @@ export type Execution = {
   updated_at: string;
   deleted_at?: string;
   type:
-    | "replica_execution"
-    | "replica_disks_delete"
-    | "replica_deploy"
-    | "replica_update";
+    | "transfer_execution"
+    | "transfer_disks_delete"
+    | "transfer_deploy"
+    | "transfer_update";
 };
 
 export type ExecutionTasks = Execution & {

+ 10 - 24
src/@types/MainItem.ts

@@ -83,7 +83,7 @@ type BaseItem = {
   destination_environment: { [prop: string]: any };
   source_environment: { [prop: string]: any };
   transfer_result: { [prop: string]: Instance } | null;
-  replication_count?: number;
+  // replication_count?: number;
   storage_mappings?: StorageMapping | null;
   network_map?: TransferNetworkMap;
   last_execution_status: string;
@@ -92,9 +92,9 @@ type BaseItem = {
   user_scripts?: UserScriptData;
 };
 
-export type ReplicaItem = BaseItem & {
-  type: "replica";
-  scenario?: string;
+export type TransferItem = BaseItem & {
+  type: "transfer";
+  scenario: string;
 };
 
 export type UserScriptData = {
@@ -107,20 +107,10 @@ export type UserScriptData = {
   };
 };
 
-export type MigrationItem = BaseItem & {
-  type: "migration";
-  replica_id?: string;
-};
-
-export type MigrationItemOptions = MigrationItem & {
-  skip_os_morphing: boolean;
-  shutdown_instances: boolean;
-};
-
 export type DeploymentItem = BaseItem & {
   type: "deployment";
-  replica_id: string;
-  replica_scenario: string;
+  transfer_id: string;
+  transfer_scenario: string;
 };
 
 export type DeploymentItemOptions = DeploymentItem & {
@@ -128,23 +118,19 @@ export type DeploymentItemOptions = DeploymentItem & {
   shutdown_instances: boolean;
 };
 
-export type TransferItem = ReplicaItem | DeploymentItem;
+export type ActionItem = TransferItem | DeploymentItem;
 
-export type ReplicaItemDetails = ReplicaItem & {
+export type TransferItemDetails = TransferItem & {
   executions: Execution[];
 };
 
-export type MigrationItemDetails = MigrationItem & {
-  tasks: Task[];
-};
-
 export type DeploymentItemDetails = DeploymentItem & {
   tasks: Task[];
 };
 
-export type TransferItemDetails = ReplicaItemDetails | DeploymentItemDetails;
+export type ActionItemDetails = TransferItemDetails | DeploymentItemDetails;
 
-export const getTransferItemTitle = (item: TransferItem | null) => {
+export const getTransferItemTitle = (item: ActionItem | null) => {
   if (!item) {
     return null;
   }

+ 1 - 1
src/@types/Schedule.ts

@@ -31,6 +31,6 @@ export type Schedule = {
 };
 
 export type ScheduleBulkItem = {
-  replicaId: string;
+  transferId: string;
   schedules: Schedule[];
 };

+ 5 - 5
src/components/App.tsx

@@ -21,9 +21,9 @@ import { observe } from "mobx";
 import Fonts from "@src/components/ui/Fonts";
 import NotificationsModule from "@src/components/modules/NotificationsModule";
 import LoginPage from "@src/components/smart/LoginPage";
-import ReplicasPage from "@src/components/smart/ReplicasPage";
+import TransfersPage from "@src/components/smart/TransfersPage/TransfersPage";
 import MessagePage from "@src/components/smart/MessagePage";
-import ReplicaDetailsPage from "@src/components/smart/ReplicaDetailsPage";
+import TransferDetailsPage from "@src/components/smart/TransferDetailsPage/TransferDetailsPage";
 import DeploymentsPage from "@src/components/smart/DeploymentsPage";
 import DeploymentDetailsPage from "@src/components/smart/DeploymentDetailsPage";
 import MetalHubServersPage from "@src/components/smart/MetalHubServersPage";
@@ -211,9 +211,9 @@ class App extends React.Component<Record<string, unknown>, State> {
               <Route path="/login" component={LoginPage} />
             }
             {renderRoute("/dashboard", DashboardPage)}
-            {renderRoute("/transfers", ReplicasPage, true)}
-            {renderRoute("/transfers/:id", ReplicaDetailsPage, true)}
-            {renderRoute("/transfers/:id/:page", ReplicaDetailsPage)}
+            {renderRoute("/transfers", TransfersPage, true)}
+            {renderRoute("/transfers/:id", TransferDetailsPage, true)}
+            {renderRoute("/transfers/:id/:page", TransferDetailsPage)}
             {renderRoute("/deployments", DeploymentsPage, true)}
             {renderRoute("/deployments/:id", DeploymentDetailsPage, true)}
             {renderRoute("/deployments/:id/:page", DeploymentDetailsPage)}

+ 10 - 10
src/components/modules/DashboardModule/DashboardActivity/DashboardActivity.tsx

@@ -23,7 +23,7 @@ import Button from "@src/components/ui/Button";
 import {
   InfoColumn,
   MainItemInfo,
-  ItemReplicaBadge,
+  ItemTransferBadge,
   ItemTitle,
   ItemDescription,
 } from "@src/components/ui/Dropdowns/NotificationDropdown";
@@ -31,7 +31,7 @@ import {
 import type { NotificationItemData } from "@src/@types/NotificationItem";
 
 import { ThemePalette, ThemeProps } from "@src/components/Theme";
-import replicaImage from "./images/replica.svg";
+import transferImage from "./images/transfer.svg";
 
 const Wrapper = styled.div<any>`
   flex-grow: 1;
@@ -80,9 +80,9 @@ const NoItems = styled.div<any>`
   align-items: center;
   width: 100%;
 `;
-const ReplicaImage = styled.div<any>`
+const TransferImage = styled.div<any>`
   ${ThemeProps.exactSize("148px")}
-  background: url('${replicaImage}') center no-repeat;
+  background: url('${transferImage}') center no-repeat;
 `;
 const Message = styled.div<any>`
   text-align: center;
@@ -105,12 +105,12 @@ class DashboardActivity extends React.Component<Props> {
           .filter((_, i) => i < (this.props.large ? 10 : 5))
           .map((item, i) => {
             const actionHref =
-              item.type === "replica"
+              item.type === "transfer"
                 ? "transfers" : "deployments"
 
             const executionsHref =
               item.status === "RUNNING"
-                ? item.type === "replica"
+                ? item.type === "transfer"
                   ? "/executions"
                   : item.type === "deployment"
                   ? "/tasks"
@@ -129,9 +129,9 @@ class DashboardActivity extends React.Component<Props> {
                 <InfoColumn>
                   <MainItemInfo>
                     <StatusIcon status={item.status} hollow />
-                    <ItemReplicaBadge type={item.type}>
-                      {item.type === "replica" ? "TR" : "DE"}
-                    </ItemReplicaBadge>
+                    <ItemTransferBadge type={item.type}>
+                      {item.type === "transfer" ? "TR" : "DE"}
+                    </ItemTransferBadge>
                     <ItemTitle nowrap>{item.name}</ItemTitle>
                   </MainItemInfo>
                   <ItemDescription>{item.description}</ItemDescription>
@@ -146,7 +146,7 @@ class DashboardActivity extends React.Component<Props> {
   renderNoItems() {
     return (
       <NoItems>
-        <ReplicaImage />
+        <TransferImage />
         <Message>
           There is no recent activity
           <br />

+ 0 - 0
src/components/modules/DashboardModule/DashboardActivity/images/replica.svg → src/components/modules/DashboardModule/DashboardActivity/images/transfer.svg


+ 3 - 3
src/components/modules/DashboardModule/DashboardContent/DashboardContent.spec.tsx

@@ -35,11 +35,11 @@ describe("DashboardContent", () => {
 
   beforeEach(() => {
     defaultProps = {
-      replicas: [],
+      transfers: [],
       migrations: [],
       endpoints: [],
       projects: [],
-      replicasLoading: false,
+      transfersLoading: false,
       migrationsLoading: false,
       endpointsLoading: false,
       usersLoading: false,
@@ -52,7 +52,7 @@ describe("DashboardContent", () => {
       licenceError: null,
       notificationItems: [],
       isAdmin: false,
-      onNewReplicaClick: jest.fn(),
+      onNewTransferClick: jest.fn(),
       onNewEndpointClick: jest.fn(),
       onAddLicenceClick: jest.fn(),
     };

+ 14 - 14
src/components/modules/DashboardModule/DashboardContent/DashboardContent.tsx

@@ -30,7 +30,7 @@ import type { Project } from "@src/@types/Project";
 import type { User } from "@src/@types/User";
 import type { Licence, LicenceServerStatus } from "@src/@types/Licence";
 import type { NotificationItemData } from "@src/@types/NotificationItem";
-import { ReplicaItem, DeploymentItem } from "@src/@types/MainItem";
+import { TransferItem, DeploymentItem } from "@src/@types/MainItem";
 
 const MIDDLE_WIDTHS = ["264px", "264px", "264px"];
 
@@ -52,11 +52,11 @@ const MiddleMobileLayout = styled.div<any>`
 `;
 
 type Props = {
-  replicas: ReplicaItem[];
+  transfers: TransferItem[];
   deployments: DeploymentItem[];
   endpoints: Endpoint[];
   projects: Project[];
-  replicasLoading: boolean;
+  transfersLoading: boolean;
   deploymentsLoading: boolean;
   endpointsLoading: boolean;
   usersLoading: boolean;
@@ -69,7 +69,7 @@ type Props = {
   licenceError: string | null;
   notificationItems: NotificationItemData[];
   isAdmin: boolean;
-  onNewReplicaClick: () => void;
+  onNewTransferClick: () => void;
   onNewEndpointClick: () => void;
   onAddLicenceClick: () => void;
 };
@@ -122,14 +122,14 @@ class DashboardContent extends React.Component<Props, State> {
                 width: MIDDLE_WIDTHS[0],
               }
         }
-        onNewClick={this.props.onNewReplicaClick}
+        onNewClick={this.props.onNewTransferClick}
       />,
       <DashboardTopEndpoints
         key="top-endpoints"
-        replicas={this.props.replicas}
+        transfers={this.props.transfers}
         endpoints={this.props.endpoints}
         loading={
-          this.props.replicasLoading ||
+          this.props.transfersLoading ||
           this.props.deploymentsLoading ||
           this.props.endpointsLoading
         }
@@ -175,13 +175,13 @@ class DashboardContent extends React.Component<Props, State> {
   }
 
   getReplicas() {
-    return this.props.replicas.filter(
-      (r: ReplicaItem) => r.scenario === "replica");
+    return this.props.transfers.filter(
+      (r: TransferItem) => r.scenario === "replica");
   }
 
   getLiveMigrations() {
-    return this.props.replicas.filter(
-      (r: ReplicaItem) => r.scenario === "live_migration");
+    return this.props.transfers.filter(
+      (r: TransferItem) => r.scenario === "live_migration");
   }
 
   render() {
@@ -191,13 +191,13 @@ class DashboardContent extends React.Component<Props, State> {
         value: this.getReplicas().length,
         color: ThemePalette.alert,
         link: "/transfers",
-        loading: this.props.replicasLoading,
+        loading: this.props.transfersLoading,
       },
       {
         label: "Migrations",
         value: this.getLiveMigrations().length,
         link: "/transfers",
-        loading: this.props.replicasLoading,
+        loading: this.props.transfersLoading,
       },
       {
         label: "Endpoints",
@@ -234,7 +234,7 @@ class DashboardContent extends React.Component<Props, State> {
         <DashboardExecutions
           replicas={this.getReplicas()}
           migrations={this.getLiveMigrations()}
-          loading={this.props.replicasLoading || this.props.deploymentsLoading}
+          loading={this.props.transfersLoading || this.props.deploymentsLoading}
         />
       </Wrapper>
     );

+ 2 - 2
src/components/modules/DashboardModule/DashboardExecutions/DashboardExecutions.spec.tsx

@@ -15,7 +15,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import { DateTime } from "luxon";
 import React from "react";
 
-import { MigrationItem, ReplicaItem } from "@src/@types/MainItem";
+import { MigrationItem, TransferItem } from "@src/@types/MainItem";
 import { render } from "@testing-library/react";
 import userEvent from "@testing-library/user-event";
 import TestUtils from "@tests/TestUtils";
@@ -23,7 +23,7 @@ import TestUtils from "@tests/TestUtils";
 import DashboardExecutions from "./DashboardExecutions";
 
 type BuildType<T extends "replica" | "migration"> = T extends "replica"
-  ? ReplicaItem
+  ? TransferItem
   : MigrationItem;
 
 const buildItem = <T extends "replica" | "migration">(

+ 5 - 5
src/components/modules/DashboardModule/DashboardExecutions/DashboardExecutions.tsx

@@ -17,7 +17,7 @@ import { observer } from "mobx-react";
 import * as React from "react";
 import styled from "styled-components";
 
-import { MigrationItem, ReplicaItem, TransferItem } from "@src/@types/MainItem";
+import { TransferItem, ActionItem } from "@src/@types/MainItem";
 import DashboardBarChart from "@src/components/modules/DashboardModule/DashboardBarChart";
 import { ThemePalette, ThemeProps } from "@src/components/Theme";
 import DropdownLink from "@src/components/ui/Dropdowns/DropdownLink";
@@ -129,8 +129,8 @@ const EmptyBackgroundImage = styled.div<any>`
 
 type Props = {
   // eslint-disable-next-line react/no-unused-prop-types
-  replicas: ReplicaItem[];
-  migrations: ReplicaItem[];
+  replicas: TransferItem[];
+  migrations: TransferItem[];
   loading: boolean;
 };
 type GroupedData = {
@@ -169,7 +169,7 @@ class DashboardExecutions extends React.Component<Props, State> {
   }
 
   groupCreations(props: Props) {
-    let creations: ReplicaItem[] = [...props.replicas, ...props.migrations];
+    let creations: TransferItem[] = [...props.replicas, ...props.migrations];
 
     const periodUnit: any = this.state.selectedPeriod.split("-")[1];
     const periodValue: any = Number(this.state.selectedPeriod.split("-")[0]);
@@ -187,7 +187,7 @@ class DashboardExecutions extends React.Component<Props, State> {
     this.groupByPeriod(creations, periodUnit);
   }
 
-  groupByPeriod(transferItems: ReplicaItem[], periodUnit: string) {
+  groupByPeriod(transferItems: TransferItem[], periodUnit: string) {
     const groupedData: GroupedData[] = [];
     const periods: {
       [period: string]: { replicas: number; migrations: number };

+ 7 - 7
src/components/modules/DashboardModule/DashboardTopEndpoints/DashboardTopEndpoints.spec.tsx

@@ -15,7 +15,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 import React from "react";
 
 import { Endpoint } from "@src/@types/Endpoint";
-import { MigrationItem, ReplicaItem } from "@src/@types/MainItem";
+import { MigrationItem, TransferItem } from "@src/@types/MainItem";
 import { fireEvent, render } from "@testing-library/react";
 import TestUtils from "@tests/TestUtils";
 
@@ -24,7 +24,7 @@ import DashboardTopEndpoints from "./DashboardTopEndpoints";
 jest.mock("react-router-dom", () => ({ Link: "a" }));
 
 type BuildType<T extends "replica" | "migration"> = T extends "replica"
-  ? ReplicaItem
+  ? TransferItem
   : MigrationItem;
 
 const buildItem = <T extends "replica" | "migration">(
@@ -64,7 +64,7 @@ const buildEndpoint = (id: string): Endpoint => ({
   connection_info: {},
 });
 
-const replicas: DashboardTopEndpoints["props"]["replicas"] = [
+const replicas: DashboardTopEndpoints["props"]["transfers"] = [
   buildItem("replica", "a", "b"),
   buildItem("replica", "a", "b"),
   buildItem("replica", "c", "d"),
@@ -86,7 +86,7 @@ const endpoints: DashboardTopEndpoints["props"]["endpoints"] = [
 
 describe("DashboardTopEndpoints", () => {
   const defaultProps: DashboardTopEndpoints["props"] = {
-    replicas,
+    transfers: replicas,
     migrations,
     endpoints,
     style: {},
@@ -98,7 +98,7 @@ describe("DashboardTopEndpoints", () => {
     render(
       <DashboardTopEndpoints
         {...defaultProps}
-        replicas={[]}
+        transfers={[]}
         migrations={[]}
         endpoints={[]}
         loading={true}
@@ -111,7 +111,7 @@ describe("DashboardTopEndpoints", () => {
     render(
       <DashboardTopEndpoints
         {...defaultProps}
-        replicas={[]}
+        transfers={[]}
         migrations={[]}
         endpoints={[]}
       />
@@ -125,7 +125,7 @@ describe("DashboardTopEndpoints", () => {
       <DashboardTopEndpoints
         {...defaultProps}
         onNewClick={onNewClickMock}
-        replicas={[]}
+        transfers={[]}
         migrations={[]}
         endpoints={[]}
       />

+ 10 - 10
src/components/modules/DashboardModule/DashboardTopEndpoints/DashboardTopEndpoints.tsx

@@ -26,7 +26,7 @@ import { ThemePalette, ThemeProps } from "@src/components/Theme";
 
 import type { Endpoint } from "@src/@types/Endpoint";
 
-import { ReplicaItem } from "@src/@types/MainItem";
+import { TransferItem } from "@src/@types/MainItem";
 import endpointImage from "./images/endpoint.svg";
 
 const Wrapper = styled.div<any>`
@@ -131,12 +131,12 @@ const Message = styled.div<any>`
 type GroupedEndpoint = {
   endpoint: Endpoint;
   replicasCount: number;
-  deploymentsCount: number;
+  migrationsCount: number;
   value: number;
 };
 type Props = {
   // eslint-disable-next-line react/no-unused-prop-types
-  replicas: ReplicaItem[];
+  transfers: TransferItem[];
   // eslint-disable-next-line react/no-unused-prop-types
   endpoints: Endpoint[];
   style: React.CSSProperties;
@@ -176,7 +176,7 @@ class DashboardTopEndpoints extends React.Component<Props, State> {
 
   calculateGroupedEndpoints(props: Props) {
     const groupedEndpoints: GroupedEndpoint[] = [];
-    const count = (mainItems: ReplicaItem[], endpointId: string, scenario: string) =>
+    const count = (mainItems: TransferItem[], endpointId: string, scenario: string) =>
       mainItems.filter(
         r =>
           r.scenario === scenario && (
@@ -185,13 +185,13 @@ class DashboardTopEndpoints extends React.Component<Props, State> {
       ).length;
 
     props.endpoints.forEach(endpoint => {
-      const replicasCount = count(props.replicas, endpoint.id, "replica");
-      const deploymentsCount = count(props.replicas, endpoint.id, "live_migration");
+      const replicasCount = count(props.transfers, endpoint.id, "replica");
+      const migrationsCount = count(props.transfers, endpoint.id, "live_migration");
       groupedEndpoints.push({
         endpoint,
-        replicasCount,
-        deploymentsCount,
-        value: replicasCount + deploymentsCount,
+        replicasCount: replicasCount,
+        migrationsCount: migrationsCount,
+        value: replicasCount + migrationsCount,
       });
     });
     this.setState({ groupedEndpoints });
@@ -262,7 +262,7 @@ class DashboardTopEndpoints extends React.Component<Props, State> {
           <TooltipRows>
             <TooltipRow>{groupedEndpoint.replicasCount} Replicas</TooltipRow>
             <TooltipRow>
-              {groupedEndpoint.deploymentsCount} Deployments
+              {groupedEndpoint.migrationsCount} Migrations
             </TooltipRow>
             <TooltipRow>{groupedEndpoint.value} Total</TooltipRow>
           </TooltipRows>

+ 5 - 5
src/components/modules/EndpointModule/EndpointDetailsContent/EndpointDetailsContent.tsx

@@ -20,7 +20,7 @@ import styled from "styled-components";
 import { Field as FieldType } from "@src/@types/Field";
 import {
   getTransferItemTitle,
-  ReplicaItem,
+  TransferItem,
 } from "@src/@types/MainItem";
 import { Region } from "@src/@types/Region";
 import EndpointLogos from "@src/components/modules/EndpointModule/EndpointLogos";
@@ -100,7 +100,7 @@ type Props = {
   regions: Region[];
   connectionInfo: Endpoint["connection_info"] | null;
   loading: boolean;
-  replicas: ReplicaItem[],
+  transfers: TransferItem[],
   connectionInfoSchema: FieldType[];
   onDeleteClick: () => void;
   onValidateClick: () => void;
@@ -225,7 +225,7 @@ class EndpointDetailsContent extends React.Component<Props> {
     );
   }
 
-  renderUsage(items: ReplicaItem[]) {
+  renderUsage(items: TransferItem[]) {
     return (
       <TransferItems>
         {items.map(item => (
@@ -288,8 +288,8 @@ class EndpointDetailsContent extends React.Component<Props> {
             )}
           </Field>
           <Field>
-            <Label>Used in transfers ({this.props.replicas.length})</Label>
-            {this.props.replicas.length > 0 ? this.renderUsage(this.props.replicas) : <Value>-</Value>}
+            <Label>Used in transfers ({this.props.transfers.length})</Label>
+            {this.props.transfers.length > 0 ? this.renderUsage(this.props.transfers) : <Value>-</Value>}
           </Field>
           {!this.props.connectionInfo
             ? this.renderConnectionInfoLoading()

+ 1 - 1
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolDetailsContent.spec.tsx

@@ -44,7 +44,7 @@ describe("MinionPoolDetailsContent", () => {
     defaultProps = {
       item: MINION_POOL_DETAILS_MOCK,
       itemId: "minion-pool-id",
-      replicas: [REPLICA_MOCK],
+      transfers: [REPLICA_MOCK],
       migrations: [],
       endpoints: [OPENSTACK_ENDPOINT_MOCK],
       schema: [

+ 4 - 4
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolDetailsContent.tsx

@@ -20,7 +20,7 @@ import Button from "@src/components/ui/Button";
 import DetailsNavigation from "@src/components/modules/NavigationModule/DetailsNavigation";
 import type { Endpoint } from "@src/@types/Endpoint";
 import type { Field } from "@src/@types/Field";
-import { ReplicaItem, DeploymentItem } from "@src/@types/MainItem";
+import { TransferItem, DeploymentItem } from "@src/@types/MainItem";
 import { MinionPoolDetails } from "@src/@types/MinionPool";
 import StatusImage from "@src/components/ui/StatusComponents/StatusImage";
 import { ThemeProps } from "@src/components/Theme";
@@ -75,7 +75,7 @@ const NavigationItems = [
 type Props = {
   item?: MinionPoolDetails | null;
   itemId: string;
-  replicas: ReplicaItem[];
+  transfers: TransferItem[];
   deployments: DeploymentItem[];
   endpoints: Endpoint[];
   schema: Field[];
@@ -144,7 +144,7 @@ class MinionPoolDetailsContent extends React.Component<Props> {
     return (
       <MinionPoolMachines
         item={this.props.item}
-        replicas={this.props.replicas}
+        transfers={this.props.transfers}
         deployments={this.props.deployments}
       />
     );
@@ -166,7 +166,7 @@ class MinionPoolDetailsContent extends React.Component<Props> {
     return (
       <MinionPoolMainDetails
         item={this.props.item}
-        replicas={this.props.replicas}
+        transfers={this.props.transfers}
         deployments={this.props.deployments}
         schema={this.props.schema}
         schemaLoading={this.props.schemaLoading}

+ 1 - 1
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMachines.spec.tsx

@@ -29,7 +29,7 @@ describe("MinionPoolMachines", () => {
   beforeEach(() => {
     defaultProps = {
       item: MINION_POOL_MOCK,
-      replicas: [REPLICA_MOCK],
+      transfers: [REPLICA_MOCK],
       migrations: [MIGRATION_MOCK],
     };
   });

+ 9 - 9
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMachines.tsx

@@ -17,12 +17,12 @@ import { Collapse } from "react-collapse";
 import { Link } from "react-router-dom";
 import styled, { createGlobalStyle, css } from "styled-components";
 
-import { DeploymentItem, ReplicaItem, TransferItem } from "@src/@types/MainItem";
+import { DeploymentItem, TransferItem, ActionItem } from "@src/@types/MainItem";
 import { MinionMachine, MinionPool } from "@src/@types/MinionPool";
 import { ThemePalette, ThemeProps } from "@src/components/Theme";
 import Arrow from "@src/components/ui/Arrow";
 import DropdownLink from "@src/components/ui/Dropdowns/DropdownLink";
-import { ItemReplicaBadge } from "@src/components/ui/Dropdowns/NotificationDropdown";
+import { ItemTransferBadge } from "@src/components/ui/Dropdowns/NotificationDropdown";
 import StatusPill from "@src/components/ui/StatusComponents/StatusPill";
 import DateUtils from "@src/utils/DateUtils";
 
@@ -144,7 +144,7 @@ const ValueLink = styled(Link)`
 type FilterType = "all" | "allocated" | "not-allocated";
 type Props = {
   item?: MinionPool | null;
-  replicas: ReplicaItem[];
+  transfers: TransferItem[];
   deployments: DeploymentItem[];
 };
 type State = {
@@ -278,10 +278,10 @@ class MinionPoolMachines extends React.Component<Props, State> {
     return (
       <MachinesWrapper>
         {this.filteredMachines.map(machine => {
-          const findTransferItem = (transferItems: TransferItem[]) =>
+          const findTransferItem = (transferItems: ActionItem[]) =>
             transferItems.find(i => i.id === machine.allocated_action);
           const allocatedAction = machine.allocated_action
-            ? findTransferItem(this.props.replicas) ||
+            ? findTransferItem(this.props.transfers) ||
               findTransferItem(this.props.deployments)
             : null;
           return (
@@ -329,11 +329,11 @@ class MinionPoolMachines extends React.Component<Props, State> {
                     Allocated Action:
                     {allocatedAction ? (
                       <>
-                        <ItemReplicaBadge style={{ margin: "0px 4px 0 5px" }}>
-                          {allocatedAction.type === "replica" ? "TR" : "DE"}
-                        </ItemReplicaBadge>
+                        <ItemTransferBadge style={{ margin: "0px 4px 0 5px" }}>
+                          {allocatedAction.type === "transfer" ? "TR" : "DE"}
+                        </ItemTransferBadge>
                         <ValueLink
-                          to={`/${allocatedAction.type === "replica" ? "transfers" : "deployments"}/${allocatedAction.id}`}
+                          to={`/${allocatedAction.type === "transfer" ? "transfers" : "deployments"}/${allocatedAction.id}`}
                         >
                           {allocatedAction.instances[0]}
                         </ValueLink>

+ 1 - 1
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMainDetails.spec.tsx

@@ -35,7 +35,7 @@ describe("MinionPoolMainDetails", () => {
   beforeEach(() => {
     defaultProps = {
       item: MINION_POOL_MOCK,
-      replicas: [REPLICA_MOCK],
+      transfers: [REPLICA_MOCK],
       migrations: [MIGRATION_MOCK],
       schema: [],
       schemaLoading: false,

+ 5 - 5
src/components/modules/MinionModule/MinionPoolDetailsContent/MinionPoolMainDetails.tsx

@@ -18,7 +18,7 @@ import { Link } from "react-router-dom";
 import styled, { css } from "styled-components";
 
 import fieldHelper from "@src/@types/Field";
-import { DeploymentItem, ReplicaItem, TransferItem } from "@src/@types/MainItem";
+import { DeploymentItem, TransferItem, ActionItem } from "@src/@types/MainItem";
 import { MinionPool } from "@src/@types/MinionPool";
 import EndpointLogos from "@src/components/modules/EndpointModule/EndpointLogos";
 import { ThemePalette, ThemeProps } from "@src/components/Theme";
@@ -101,7 +101,7 @@ const PropertyValue = styled.div<any>`
 
 type Props = {
   item?: MinionPool | null;
-  replicas: ReplicaItem[];
+  transfers: TransferItem[];
   deployments: DeploymentItem[];
   schema: FieldType[];
   schemaLoading: boolean;
@@ -235,10 +235,10 @@ class MinionPoolMainDetails extends React.Component<Props> {
     );
   }
 
-  renderUsage(items: TransferItem[]) {
+  renderUsage(items: ActionItem[]) {
     return items.map(item => {
       const actionHref =
-        item.type === "replica"
+        item.type === "transfer"
           ? "transfers" : "deployments"
 
       return (<div key={item.id}>
@@ -267,7 +267,7 @@ class MinionPoolMainDetails extends React.Component<Props> {
         : [];
     };
 
-    const usage: TransferItem[] = this.props.replicas.concat(
+    const usage: ActionItem[] = this.props.transfers.concat(
       this.props.deployments as any[]
     );
 

+ 5 - 5
src/components/modules/NavigationModule/Navigation/Navigation.tsx

@@ -29,7 +29,7 @@ import cbsImage from "./images/cbsl-logo.svg";
 import cbsImageSmall from "./images/cbsl-logo-small.svg";
 import tinyLogo from "./images/logo-small.svg";
 
-import replicaImage from "./images/replica-menu.svg";
+import transferImage from "./images/transfer-menu.svg";
 import endpointImage from "./images/endpoint-menu.svg";
 import planningImage from "./images/planning-menu.svg";
 import projectImage from "./images/project-menu.svg";
@@ -179,7 +179,7 @@ const SmallMenuItemBullet = styled.div<any>`
   border-radius: 50%;
   position: absolute;
   left: -12px;
-  background: ${props => (props.bullet === "replica" ? "#E62565" : "#0044CA")};
+  background: ${props => (props.bullet === "transfer" ? "#E62565" : "#0044CA")};
 `;
 
 const MenuImage = styled.div<any>`
@@ -407,12 +407,12 @@ class Navigation extends React.Component<Props> {
               style = { width: "19px", height: "19px" };
               break;
             case "transfers":
-              bullet = "replica";
-              menuImage = replicaImage;
+              bullet = "transfer";
+              menuImage = transferImage;
               break;
             case "deployments":
               bullet = "deployment";
-              menuImage = replicaImage;
+              menuImage = transferImage;
               break;
             case "endpoints":
               menuImage = endpointImage;

+ 0 - 0
src/components/modules/NavigationModule/Navigation/images/replica-menu.svg → src/components/modules/NavigationModule/Navigation/images/transfer-menu.svg


+ 0 - 6
src/components/modules/TransferModule/DeleteReplicaModal/package.json

@@ -1,6 +0,0 @@
-{
-  "name": "DeleteReplicaModal",
-  "version": "0.0.0",
-  "private": true,
-  "main": "./DeleteReplicaModal.tsx"
-}

+ 7 - 7
src/components/modules/TransferModule/DeleteReplicaModal/DeleteReplicaModal.spec.tsx → src/components/modules/TransferModule/DeleteTransferModal/DeleteReplicaModal.spec.tsx

@@ -17,27 +17,27 @@ import React from "react";
 import { render } from "@testing-library/react";
 import TestUtils from "@tests/TestUtils";
 
-import DeleteReplicaModal from "./";
+import DeleteTransferModal from "./DeleteTransferModal";
 
 describe("DeleteReplicaModal", () => {
-  let defaultProps: DeleteReplicaModal["props"];
+  let defaultProps: DeleteTransferModal["props"];
 
   beforeEach(() => {
     defaultProps = {
       hasDisks: false,
-      onDeleteReplica: jest.fn(),
+      onDeleteTransfer: jest.fn(),
       onDeleteDisks: jest.fn(),
       onRequestClose: jest.fn(),
     };
   });
 
   it("renders without crashing", () => {
-    const { getByText } = render(<DeleteReplicaModal {...defaultProps} />);
+    const { getByText } = render(<DeleteTransferModal {...defaultProps} />);
     expect(getByText("Delete Replica")).toBeTruthy();
   });
 
   it("renders with disks", () => {
-    render(<DeleteReplicaModal {...defaultProps} hasDisks />);
+    render(<DeleteTransferModal {...defaultProps} hasDisks />);
     expect(
       TestUtils.select("DeleteReplicaModal__ExtraMessage")?.textContent
     ).toContain("has been executed at least once");
@@ -45,7 +45,7 @@ describe("DeleteReplicaModal", () => {
 
   it("is multiple replica selection with disks", () => {
     render(
-      <DeleteReplicaModal {...defaultProps} hasDisks isMultiReplicaSelection />
+      <DeleteTransferModal {...defaultProps} hasDisks isMultiTransferSelection />
     );
     expect(
       TestUtils.select("DeleteReplicaModal__ExtraMessage")?.textContent
@@ -53,7 +53,7 @@ describe("DeleteReplicaModal", () => {
   });
 
   it("renders loading", () => {
-    render(<DeleteReplicaModal {...defaultProps} loading />);
+    render(<DeleteTransferModal {...defaultProps} loading />);
     expect(TestUtils.select("DeleteReplicaModal__Loading")).toBeTruthy();
   });
 });

+ 9 - 9
src/components/modules/TransferModule/DeleteReplicaModal/DeleteReplicaModal.tsx → src/components/modules/TransferModule/DeleteTransferModal/DeleteTransferModal.tsx

@@ -71,18 +71,18 @@ const LoadingSubtitle = styled.div<any>`
 
 type Props = {
   hasDisks: boolean;
-  isMultiReplicaSelection?: boolean;
+  isMultiTransferSelection?: boolean;
   loading?: boolean;
-  onDeleteReplica: () => void;
+  onDeleteTransfer: () => void;
   onDeleteDisks: () => void;
   onRequestClose: () => void;
 };
 
 @observer
-class DeleteReplicaModal extends React.Component<Props> {
+class DeleteTransferModal extends React.Component<Props> {
   renderExtraMessage() {
     if (this.props.hasDisks) {
-      if (this.props.isMultiReplicaSelection) {
+      if (this.props.isMultiTransferSelection) {
         return (
           <ExtraMessage>
             Some of the selected Transfer have been executed at least once and
@@ -124,7 +124,7 @@ class DeleteReplicaModal extends React.Component<Props> {
   }
 
   renderContent() {
-    const message = this.props.isMultiReplicaSelection
+    const message = this.props.isMultiTransferSelection
       ? "Are you sure you want to delete the selected transfers?"
       : "Are you sure you want to delete this transfer?";
 
@@ -148,8 +148,8 @@ class DeleteReplicaModal extends React.Component<Props> {
                 Delete Transfer Disks
               </Button>
             ) : null}
-            <Button onClick={this.props.onDeleteReplica} alert>
-              Delete Transfer{this.props.isMultiReplicaSelection ? "s" : ""}
+            <Button onClick={this.props.onDeleteTransfer} alert>
+              Delete Transfer{this.props.isMultiTransferSelection ? "s" : ""}
             </Button>
           </ButtonsColumn>
         </Buttons>
@@ -158,7 +158,7 @@ class DeleteReplicaModal extends React.Component<Props> {
   }
 
   render() {
-    const title = this.props.isMultiReplicaSelection
+    const title = this.props.isMultiTransferSelection
       ? "Delete Selected Transfers?"
       : "Delete Transfer?";
     return (
@@ -169,4 +169,4 @@ class DeleteReplicaModal extends React.Component<Props> {
   }
 }
 
-export default DeleteReplicaModal;
+export default DeleteTransferModal;

+ 6 - 0
src/components/modules/TransferModule/DeleteTransferModal/package.json

@@ -0,0 +1,6 @@
+{
+  "name": "DeleteTransferModal",
+  "version": "0.0.0",
+  "private": true,
+  "main": "./DeleteTransferModal.tsx"
+}

+ 2 - 2
src/components/modules/TransferModule/ReplicaDeploymentOptions/replicaDeploymentFields.ts → src/components/modules/TransferModule/DeploymentOptions/DeploymentFields.ts

@@ -14,7 +14,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import { Field } from "@src/@types/Field";
 
-const replicaDeploymentFields: Field[] = [
+const deploymentFields: Field[] = [
   {
     name: "clone_disks",
     type: "boolean",
@@ -30,4 +30,4 @@ const replicaDeploymentFields: Field[] = [
   },
 ];
 
-export default replicaDeploymentFields;
+export default deploymentFields;

+ 8 - 8
src/components/modules/TransferModule/ReplicaDeploymentOptions/ReplicaDeploymentOptions.tsx → src/components/modules/TransferModule/DeploymentOptions/DeploymentOptions.tsx

@@ -16,7 +16,7 @@ import { observer } from "mobx-react";
 import React from "react";
 import styled from "styled-components";
 
-import { TransferItemDetails } from "@src/@types/MainItem";
+import { ActionItemDetails } from "@src/@types/MainItem";
 import { MinionPool } from "@src/@types/MinionPool";
 import { INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS } from "@src/components/modules/WizardModule/WizardOptions";
 import WizardScripts from "@src/components/modules/WizardModule/WizardScripts";
@@ -28,8 +28,8 @@ import ToggleButtonBar from "@src/components/ui/ToggleButtonBar";
 import KeyboardManager from "@src/utils/KeyboardManager";
 import LabelDictionary from "@src/utils/LabelDictionary";
 
-import replicaDeploymentImage from "./images/replica-deployment.svg";
-import replicaDeploymentFields from "./replicaDeploymentFields";
+import deploymentImage from "./images/deployment.svg";
+import deploymentFields from "./DeploymentFields";
 
 import type { Field } from "@src/@types/Field";
 import type { Instance, InstanceScript } from "@src/@types/Instance";
@@ -43,7 +43,7 @@ const Wrapper = styled.div<any>`
 const Image = styled.div<any>`
   ${ThemeProps.exactWidth("288px")}
   ${ThemeProps.exactHeight("96px")}
-  background: url('${replicaDeploymentImage}') center no-repeat;
+  background: url('${deploymentImage}') center no-repeat;
   margin: 80px 0;
 `;
 const OptionsBody = styled.div<any>`
@@ -78,7 +78,7 @@ const FieldInputStyled = styled(FieldInput)`
 
 type Props = {
   instances: Instance[];
-  transferItem: TransferItemDetails | null;
+  transferItem: ActionItemDetails | null;
   minionPools: MinionPool[];
   loadingInstances: boolean;
   defaultSkipOsMorphing?: boolean | null;
@@ -101,7 +101,7 @@ type State = {
 };
 
 @observer
-class ReplicaDeploymentOptions extends React.Component<Props, State> {
+class DeploymentOptions extends React.Component<Props, State> {
   state: State = {
     fields: [],
     selectedBarButton: "options",
@@ -117,7 +117,7 @@ class ReplicaDeploymentOptions extends React.Component<Props, State> {
       this.props.transferItem?.instance_osmorphing_minion_pool_mappings || {};
 
     this.setState({
-      fields: replicaDeploymentFields.map(f =>
+      fields: deploymentFields.map(f =>
         f.name === "skip_os_morphing"
           ? { ...f, value: this.props.defaultSkipOsMorphing || null }
           : f
@@ -340,4 +340,4 @@ class ReplicaDeploymentOptions extends React.Component<Props, State> {
   }
 }
 
-export default ReplicaDeploymentOptions;
+export default DeploymentOptions;

+ 1 - 1
src/components/modules/TransferModule/ReplicaDeploymentOptions/ReplicaDeploymentOptions.spec.tsx → src/components/modules/TransferModule/DeploymentOptions/ReplicaDeploymentOptions.spec.tsx

@@ -21,7 +21,7 @@ import { MINION_POOL_MOCK } from "@tests/mocks/MinionPoolMock";
 import { REPLICA_ITEM_DETAILS_MOCK } from "@tests/mocks/TransferMock";
 import TestUtils from "@tests/TestUtils";
 
-import ReplicaDeploymentOptions from "./";
+import ReplicaDeploymentOptions from ".";
 
 jest.mock("@src/plugins/default/ContentPlugin", () => jest.fn(() => null));
 jest.mock("@src/components/modules/WizardModule/WizardScripts", () => ({

+ 0 - 0
src/components/modules/TransferModule/ReplicaDeploymentOptions/images/replica-deployment.svg → src/components/modules/TransferModule/DeploymentOptions/images/deployment.svg


+ 6 - 0
src/components/modules/TransferModule/DeploymentOptions/package.json

@@ -0,0 +1,6 @@
+{
+  "name": "DeploymentOptions",
+  "version": "0.0.0",
+  "private": true,
+  "main": "./DeploymentOptions.tsx"
+}

+ 0 - 0
src/components/modules/TransferModule/ReplicaDeploymentOptions/story.tsx → src/components/modules/TransferModule/DeploymentOptions/story.tsx


+ 6 - 6
src/components/modules/TransferModule/MainDetails/MainDetails.tsx

@@ -18,7 +18,7 @@ import { Link } from "react-router-dom";
 import styled, { css } from "styled-components";
 
 import fieldHelper from "@src/@types/Field";
-import { TransferItem } from "@src/@types/MainItem";
+import { ActionItem } from "@src/@types/MainItem";
 import { MinionPool } from "@src/@types/MinionPool";
 import EndpointLogos from "@src/components/modules/EndpointModule/EndpointLogos";
 import TransferDetailsTable from "@src/components/modules/TransferModule/TransferDetailsTable";
@@ -128,7 +128,7 @@ const PropertyValue = styled.div<any>`
 `;
 
 type Props = {
-  item?: TransferItem | null;
+  item?: ActionItem | null;
   minionPools: MinionPool[];
   storageBackends: StorageBackend[];
   destinationSchema: FieldType[];
@@ -423,13 +423,13 @@ class MainDetails extends React.Component<Props, State> {
               </Field>
             </Row>
           ) : null}
-          {this.props.item?.type === "migration" &&
-          this.props.item.replica_id ? (
+          {this.props.item?.type === "deployment" &&
+          this.props.item.transfer_id ? (
             <Row>
               <Field>
                 <Label>Created from Transfer</Label>
-                <ValueLink to={`/transfers/${this.props.item.replica_id}`}>
-                  {this.props.item.replica_id}
+                <ValueLink to={`/transfers/${this.props.item.transfer_id}`}>
+                  {this.props.item.transfer_id}
                 </ValueLink>
               </Field>
             </Row>

+ 0 - 74
src/components/modules/TransferModule/MigrationDetailsContent/MigrationDetailsContent.spec.tsx

@@ -1,74 +0,0 @@
-/*
-Copyright (C) 2023  Cloudbase Solutions SRL
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-You should have received a copy of the GNU Affero General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-import React from "react";
-
-import { render } from "@testing-library/react";
-
-import MigrationDetailsContent from ".";
-import { MIGRATION_ITEM_DETAILS_MOCK } from "@tests/mocks/TransferMock";
-import { MINION_POOL_MOCK } from "@tests/mocks/MinionPoolMock";
-import { STORAGE_BACKEND_MOCK } from "@tests/mocks/StoragesMock";
-import { INSTANCE_MOCK } from "@tests/mocks/InstancesMock";
-import { NETWORK_MOCK } from "@tests/mocks/NetworksMock";
-import {
-  OPENSTACK_ENDPOINT_MOCK,
-  VMWARE_ENDPOINT_MOCK,
-} from "@tests/mocks/EndpointsMock";
-
-jest.mock("@src/components/modules/EndpointModule/EndpointLogos", () => ({
-  __esModule: true,
-  default: (props: any) => <div>{props.endpoint}</div>,
-}));
-jest.mock("react-router-dom", () => ({ Link: "a" }));
-
-describe("MigrationDetailsContent", () => {
-  let defaultProps: MigrationDetailsContent["props"];
-
-  beforeEach(() => {
-    defaultProps = {
-      item: MIGRATION_ITEM_DETAILS_MOCK,
-      itemId: MIGRATION_ITEM_DETAILS_MOCK.id,
-      minionPools: [MINION_POOL_MOCK],
-      detailsLoading: false,
-      storageBackends: [STORAGE_BACKEND_MOCK],
-      instancesDetails: [INSTANCE_MOCK],
-      instancesDetailsLoading: false,
-      networks: [NETWORK_MOCK],
-      sourceSchema: [],
-      sourceSchemaLoading: false,
-      destinationSchema: [],
-      destinationSchemaLoading: false,
-      endpoints: [OPENSTACK_ENDPOINT_MOCK, VMWARE_ENDPOINT_MOCK],
-      page: "",
-      onDeleteMigrationClick: jest.fn(),
-    };
-  });
-
-  it("renders without crashing", () => {
-    const { getByText } = render(<MigrationDetailsContent {...defaultProps} />);
-    expect(getByText(MIGRATION_ITEM_DETAILS_MOCK.id)).toBeTruthy();
-  });
-
-  it("renders tasks page", () => {
-    const { getByText } = render(
-      <MigrationDetailsContent {...defaultProps} page="tasks" />
-    );
-    expect(
-      getByText(
-        MIGRATION_ITEM_DETAILS_MOCK.tasks[0].task_type.replace("_", " ")
-      )
-    ).toBeTruthy();
-  });
-});

+ 0 - 142
src/components/modules/TransferModule/MigrationDetailsContent/MigrationDetailsContent.tsx

@@ -1,142 +0,0 @@
-/*
-Copyright (C) 2017  Cloudbase Solutions SRL
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-You should have received a copy of the GNU Affero General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-import { observer } from "mobx-react";
-import React from "react";
-import styled from "styled-components";
-
-import { MigrationItemDetails } from "@src/@types/MainItem";
-import { MinionPool } from "@src/@types/MinionPool";
-import { Network } from "@src/@types/Network";
-import DetailsNavigation from "@src/components/modules/NavigationModule/DetailsNavigation";
-import MainDetails from "@src/components/modules/TransferModule/MainDetails";
-import Tasks from "@src/components/modules/TransferModule/Tasks";
-import { ThemeProps } from "@src/components/Theme";
-import Button from "@src/components/ui/Button";
-
-import type { Instance } from "@src/@types/Instance";
-import type { Endpoint, StorageBackend } from "@src/@types/Endpoint";
-import type { Field } from "@src/@types/Field";
-const Wrapper = styled.div<any>`
-  display: flex;
-  justify-content: center;
-`;
-
-const Buttons = styled.div<any>`
-  margin-top: 24px;
-  & > button:last-child {
-    float: right;
-  }
-`;
-const DetailsBody = styled.div<any>`
-  ${ThemeProps.exactWidth(ThemeProps.contentWidth)}
-`;
-
-const NavigationItems = [
-  {
-    label: "Migration",
-    value: "",
-  },
-  {
-    label: "Tasks",
-    value: "tasks",
-  },
-];
-
-type Props = {
-  item: MigrationItemDetails | null;
-  itemId: string;
-  minionPools: MinionPool[];
-  detailsLoading: boolean;
-  storageBackends: StorageBackend[];
-  instancesDetails: Instance[];
-  instancesDetailsLoading: boolean;
-  networks: Network[];
-  sourceSchema: Field[];
-  sourceSchemaLoading: boolean;
-  destinationSchema: Field[];
-  destinationSchemaLoading: boolean;
-  endpoints: Endpoint[];
-  page: string;
-  onDeleteMigrationClick: () => void;
-};
-@observer
-class MigrationDetailsContent extends React.Component<Props> {
-  renderBottomControls() {
-    return (
-      <Buttons>
-        <Button alert hollow onClick={this.props.onDeleteMigrationClick}>
-          Delete Migration
-        </Button>
-      </Buttons>
-    );
-  }
-
-  renderMainDetails() {
-    if (this.props.page !== "") {
-      return null;
-    }
-
-    return (
-      <MainDetails
-        item={this.props.item}
-        storageBackends={this.props.storageBackends}
-        minionPools={this.props.minionPools}
-        instancesDetails={this.props.instancesDetails}
-        instancesDetailsLoading={this.props.instancesDetailsLoading}
-        networks={this.props.networks}
-        sourceSchema={this.props.sourceSchema}
-        sourceSchemaLoading={this.props.sourceSchemaLoading}
-        destinationSchema={this.props.destinationSchema}
-        destinationSchemaLoading={this.props.destinationSchemaLoading}
-        endpoints={this.props.endpoints}
-        bottomControls={this.renderBottomControls()}
-        loading={this.props.detailsLoading}
-      />
-    );
-  }
-
-  renderTasks() {
-    if (this.props.page !== "tasks" || !this.props.item?.tasks) {
-      return null;
-    }
-
-    return (
-      <Tasks
-        items={this.props.item.tasks}
-        loading={this.props.detailsLoading}
-        instancesDetails={this.props.instancesDetails}
-      />
-    );
-  }
-
-  render() {
-    return (
-      <Wrapper>
-        <DetailsNavigation
-          items={NavigationItems}
-          selectedValue={this.props.page}
-          itemId={this.props.itemId}
-          itemType="migration"
-        />
-        <DetailsBody>
-          {this.renderMainDetails()}
-          {this.renderTasks()}
-        </DetailsBody>
-      </Wrapper>
-    );
-  }
-}
-
-export default MigrationDetailsContent;

+ 0 - 6
src/components/modules/TransferModule/MigrationDetailsContent/package.json

@@ -1,6 +0,0 @@
-{
-  "name": "MigrationDetailsContent",
-  "version": "0.0.0",
-  "private": true,
-  "main": "./MigrationDetailsContent.tsx"
-}

+ 0 - 95
src/components/modules/TransferModule/MigrationDetailsContent/story.tsx

@@ -1,95 +0,0 @@
-/*
-Copyright (C) 2017  Cloudbase Solutions SRL
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-You should have received a copy of the GNU Affero General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/* eslint-disable react/jsx-props-no-spreading */
-
-import React from "react";
-import { storiesOf } from "@storybook/react";
-import MigrationDetailsContent from ".";
-
-const tasks: any = [
-  {
-    progress_updates: [
-      { message: "the task has a progress of 10%", created_at: new Date() },
-    ],
-    exception_details: "Exception details",
-    status: "COMPLETED",
-    created_at: new Date(),
-    depends_on: ["depends on id"],
-    id: "task-1",
-    task_type: "Task name 1",
-  },
-  {
-    progress_updates: [
-      { message: "the task has a progress of 50%", created_at: new Date() },
-      { message: "the task is almost done", created_at: new Date() },
-    ],
-    exception_details: "Exception details",
-    status: "RUNNING",
-    created_at: new Date(),
-    depends_on: ["depends on id"],
-    id: "task-2",
-    task_type: "Task name 2",
-  },
-];
-const endpoints: any = [
-  { id: "endpoint-1", name: "Endpoint OPS", type: "openstack" },
-  { id: "endpoint-2", name: "Endpoint AZURE", type: "azure" },
-];
-const item: any = {
-  origin_endpoint_id: "endpoint-1",
-  destination_endpoint_id: "endpoint-2",
-  id: "item-id",
-  created_at: new Date(2017, 10, 24, 16, 15),
-  info: {
-    instance: {
-      export_info: { devices: { nics: [{ network_name: "map_1" }] } },
-    },
-  },
-  tasks,
-  destination_environment: {
-    description: "A description",
-    network_map: {
-      map_1: "Mapping 1",
-    },
-  },
-  type: "Migration",
-};
-const props: any = {};
-storiesOf("MigrationDetailsContent", module)
-  .add("default", () => (
-    <MigrationDetailsContent
-      item={item}
-      endpoints={endpoints}
-      page=""
-      {...props}
-    />
-  ))
-  .add("details loading", () => (
-    <MigrationDetailsContent
-      item={item}
-      endpoints={endpoints}
-      page=""
-      detailsLoading
-      {...props}
-    />
-  ))
-  .add("tasks", () => (
-    <MigrationDetailsContent
-      item={item}
-      endpoints={endpoints}
-      page="tasks"
-      {...props}
-    />
-  ));

+ 0 - 6
src/components/modules/TransferModule/ReplicaDeploymentOptions/package.json

@@ -1,6 +0,0 @@
-{
-  "name": "ReplicaDeploymentOptions",
-  "version": "0.0.0",
-  "private": true,
-  "main": "./ReplicaDeploymentOptions.tsx"
-}

+ 0 - 6
src/components/modules/TransferModule/ReplicaDetailsContent/package.json

@@ -1,6 +0,0 @@
-{
-  "name": "ReplicaDetailsContent",
-  "version": "0.0.0",
-  "private": true,
-  "main": "./ReplicaDetailsContent.tsx"
-}

+ 0 - 6
src/components/modules/TransferModule/ReplicaExecutionOptions/package.json

@@ -1,6 +0,0 @@
-{
-  "name": "ReplicaExecutionOptions",
-  "version": "0.0.0",
-  "private": true,
-  "main": "./ReplicaExecutionOptions.tsx"
-}

+ 0 - 154
src/components/modules/TransferModule/ReplicaMigrationOptions/ReplicaMigrationOptions.spec.tsx

@@ -1,154 +0,0 @@
-/*
-Copyright (C) 2023  Cloudbase Solutions SRL
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-You should have received a copy of the GNU Affero General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-import React from "react";
-
-import WizardScripts from "@src/components/modules/WizardModule/WizardScripts";
-import { fireEvent, render } from "@testing-library/react";
-import { INSTANCE_MOCK } from "@tests/mocks/InstancesMock";
-import { MINION_POOL_MOCK } from "@tests/mocks/MinionPoolMock";
-import { REPLICA_ITEM_DETAILS_MOCK } from "@tests/mocks/TransferMock";
-import TestUtils from "@tests/TestUtils";
-
-import ReplicaMigrationOptions from "./";
-
-jest.mock("@src/plugins/default/ContentPlugin", () => jest.fn(() => null));
-jest.mock("@src/components/modules/WizardModule/WizardScripts", () => ({
-  __esModule: true,
-  default: (props: WizardScripts["props"]) => (
-    <div data-testid="ScriptsComponent">
-      <div data-testid="ScriptsUploaded">
-        {props.uploadedScripts.map(s => s.scriptContent).join(", ")}
-      </div>
-      <div
-        data-testid="ScriptsRemove"
-        onClick={() => {
-          props.onScriptDataRemove(props.uploadedScripts[0]);
-        }}
-      />
-      <div data-testid="ScriptsRemoved">
-        {props.removedScripts.map(s => s.scriptContent).join(", ")}
-      </div>
-      <div
-        data-testid="ScriptsCancel"
-        onClick={() => {
-          props.onCancelScript("windows", null);
-          props.scrollableRef &&
-            props.scrollableRef(null as any as HTMLElement);
-        }}
-      />
-      <div
-        data-testid="ScriptsUpload"
-        onClick={() => {
-          props.onScriptUpload({
-            scriptContent: `script-content-${Math.random()}`,
-            fileName: `script-name.ps1`,
-            global: "windows",
-          });
-        }}
-      />
-    </div>
-  ),
-}));
-
-describe("ReplicaMigrationOptions", () => {
-  let defaultProps: ReplicaMigrationOptions["props"];
-
-  beforeEach(() => {
-    defaultProps = {
-      instances: [INSTANCE_MOCK],
-      transferItem: REPLICA_ITEM_DETAILS_MOCK,
-      minionPools: [
-        MINION_POOL_MOCK,
-        { ...MINION_POOL_MOCK, id: "pool2", name: "Pool2" },
-      ],
-      loadingInstances: false,
-      onCancelClick: jest.fn(),
-      onMigrateClick: jest.fn(),
-      onResizeUpdate: jest.fn(),
-    };
-  });
-
-  it("renders without crashing", () => {
-    const { getByText } = render(<ReplicaMigrationOptions {...defaultProps} />);
-    expect(getByText("Migrate")).toBeTruthy();
-  });
-
-  it("executes on Enter", () => {
-    render(<ReplicaMigrationOptions {...defaultProps} />);
-    fireEvent.keyDown(document.body, { key: "Enter" });
-    expect(defaultProps.onMigrateClick).toHaveBeenCalled();
-  });
-
-  it("calls onResizeUpdate on selectedBarButton state change", () => {
-    render(<ReplicaMigrationOptions {...defaultProps} />);
-    fireEvent.click(TestUtils.selectAll("ToggleButtonBar__Item-")[1]);
-    expect(defaultProps.onResizeUpdate).toHaveBeenCalled();
-  });
-
-  it("handles value change", () => {
-    render(<ReplicaMigrationOptions {...defaultProps} />);
-    expect(TestUtils.select("Switch__Wrapper")?.textContent).toBe("Yes");
-    fireEvent.click(TestUtils.select("Switch__InputWrapper")!);
-    expect(TestUtils.select("Switch__Wrapper")?.textContent).toBe("No");
-  });
-
-  it("handles script operations", () => {
-    const { getByTestId } = render(
-      <ReplicaMigrationOptions {...defaultProps} />
-    );
-    fireEvent.click(TestUtils.selectAll("ToggleButtonBar__Item-")[1]);
-    fireEvent.click(getByTestId("ScriptsUpload"));
-    expect(getByTestId("ScriptsUploaded").textContent).toContain(
-      "script-content"
-    );
-    fireEvent.click(getByTestId("ScriptsCancel"));
-    expect(getByTestId("ScriptsUploaded").textContent).toBe("");
-
-    fireEvent.click(getByTestId("ScriptsUpload"));
-    expect(getByTestId("ScriptsUploaded").textContent).toContain(
-      "script-content"
-    );
-    expect(getByTestId("ScriptsRemoved").textContent).toBe("");
-    fireEvent.click(getByTestId("ScriptsRemove"));
-    expect(getByTestId("ScriptsRemoved").textContent).toContain(
-      "script-content"
-    );
-  });
-
-  it("doesn't render minion pool mappings", () => {
-    const { rerender } = render(<ReplicaMigrationOptions {...defaultProps} />);
-    expect(document.body.textContent).toContain("Minion Pool Mappings");
-
-    rerender(<ReplicaMigrationOptions {...defaultProps} minionPools={[]} />);
-    expect(document.body.textContent).not.toContain("Minion Pool Mappings");
-  });
-
-  it("changes minion pool mappings value", () => {
-    render(<ReplicaMigrationOptions {...defaultProps} />);
-    fireEvent.click(TestUtils.select("DropdownButton__Wrapper-")!);
-    const dropdownItem = TestUtils.selectAll("Dropdown__ListItem-")[2];
-    expect(dropdownItem.textContent).toBe("Pool2");
-    fireEvent.click(dropdownItem);
-    expect(TestUtils.select("DropdownButton__Label-")?.textContent).toBe(
-      "Pool2"
-    );
-  });
-
-  it("handles migrate click", () => {
-    const { getByText } = render(<ReplicaMigrationOptions {...defaultProps} />);
-    fireEvent.click(getByText("Migrate"));
-    expect(defaultProps.onMigrateClick).toHaveBeenCalled();
-  });
-});

+ 0 - 343
src/components/modules/TransferModule/ReplicaMigrationOptions/ReplicaMigrationOptions.tsx

@@ -1,343 +0,0 @@
-/*
-Copyright (C) 2017  Cloudbase Solutions SRL
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-You should have received a copy of the GNU Affero General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-import { observer } from "mobx-react";
-import React from "react";
-import styled from "styled-components";
-
-import { TransferItemDetails } from "@src/@types/MainItem";
-import { MinionPool } from "@src/@types/MinionPool";
-import { INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS } from "@src/components/modules/WizardModule/WizardOptions";
-import WizardScripts from "@src/components/modules/WizardModule/WizardScripts";
-import { ThemeProps } from "@src/components/Theme";
-import Button from "@src/components/ui/Button";
-import FieldInput from "@src/components/ui/FieldInput";
-import LoadingButton from "@src/components/ui/LoadingButton";
-import ToggleButtonBar from "@src/components/ui/ToggleButtonBar";
-import KeyboardManager from "@src/utils/KeyboardManager";
-import LabelDictionary from "@src/utils/LabelDictionary";
-
-import replicaMigrationImage from "./images/replica-migration.svg";
-import replicaMigrationFields from "./replicaMigrationFields";
-
-import type { Field } from "@src/@types/Field";
-import type { Instance, InstanceScript } from "@src/@types/Instance";
-const Wrapper = styled.div<any>`
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  padding: 0 32px 32px 32px;
-  min-height: 0;
-`;
-const Image = styled.div<any>`
-  ${ThemeProps.exactWidth("288px")}
-  ${ThemeProps.exactHeight("96px")}
-  background: url('${replicaMigrationImage}') center no-repeat;
-  margin: 80px 0;
-`;
-const OptionsBody = styled.div<any>`
-  display: flex;
-  flex-direction: column;
-`;
-const ScriptsBody = styled.div<any>`
-  display: flex;
-  flex-direction: column;
-  width: 100%;
-  overflow: auto;
-  min-height: 0;
-  margin-bottom: 32px;
-`;
-const Form = styled.div<any>`
-  display: flex;
-  flex-wrap: wrap;
-  margin-left: -64px;
-  justify-content: space-between;
-  margin: 0 auto;
-`;
-const Buttons = styled.div<any>`
-  display: flex;
-  justify-content: space-between;
-  width: 100%;
-`;
-const FieldInputStyled = styled(FieldInput)`
-  width: 224px;
-  justify-content: space-between;
-  margin-bottom: 32px;
-`;
-
-type Props = {
-  instances: Instance[];
-  transferItem: TransferItemDetails | null;
-  minionPools: MinionPool[];
-  loadingInstances: boolean;
-  defaultSkipOsMorphing?: boolean | null;
-  migrating?: boolean;
-  onCancelClick: () => void;
-  onMigrateClick: (opts: {
-    fields: Field[];
-    uploadedUserScripts: InstanceScript[];
-    removedUserScripts: InstanceScript[];
-    minionPoolMappings: { [instance: string]: string };
-  }) => void;
-  onResizeUpdate?: (scrollableRef: HTMLElement, scrollOffset?: number) => void;
-};
-type State = {
-  fields: Field[];
-  selectedBarButton: string;
-  uploadedScripts: InstanceScript[];
-  removedScripts: InstanceScript[];
-  minionPoolMappings: { [instance: string]: string };
-};
-
-@observer
-class ReplicaMigrationOptions extends React.Component<Props, State> {
-  state: State = {
-    fields: [],
-    selectedBarButton: "options",
-    uploadedScripts: [],
-    removedScripts: [],
-    minionPoolMappings: {},
-  };
-
-  scrollableRef!: HTMLElement;
-
-  UNSAFE_componentWillMount() {
-    const mappings =
-      this.props.transferItem?.instance_osmorphing_minion_pool_mappings || {};
-
-    this.setState({
-      fields: replicaMigrationFields.map(f =>
-        f.name === "skip_os_morphing"
-          ? { ...f, value: this.props.defaultSkipOsMorphing || null }
-          : f
-      ),
-      minionPoolMappings: { ...mappings },
-    });
-  }
-
-  componentDidMount() {
-    KeyboardManager.onEnter(
-      "migration-options",
-      () => {
-        this.migrate();
-      },
-      2
-    );
-  }
-
-  componentDidUpdate(_: Props, prevState: State) {
-    if (prevState.selectedBarButton !== this.state.selectedBarButton) {
-      if (this.props.onResizeUpdate) {
-        this.props.onResizeUpdate(this.scrollableRef, 0);
-      }
-    }
-  }
-
-  componentWillUnmount() {
-    KeyboardManager.removeKeyDown("migration-options");
-  }
-
-  migrate() {
-    this.props.onMigrateClick({
-      fields: this.state.fields,
-      uploadedUserScripts: this.state.uploadedScripts,
-      removedUserScripts: this.state.removedScripts,
-      minionPoolMappings: this.state.minionPoolMappings,
-    });
-  }
-
-  handleValueChange(field: Field, value: boolean) {
-    this.setState(prevState => {
-      const fields = prevState.fields.map(f => {
-        const newField = { ...f };
-        if (f.name === field.name) {
-          newField.value = value;
-        }
-        return newField;
-      });
-
-      return { fields };
-    });
-  }
-
-  handleCancelScript(global: string | null, instanceName: string | null) {
-    this.setState(prevState => ({
-      uploadedScripts: prevState.uploadedScripts.filter(s =>
-        global ? s.global !== global : s.instanceId !== instanceName
-      ),
-    }));
-  }
-
-  handleScriptUpload(script: InstanceScript) {
-    this.setState(prevState => ({
-      uploadedScripts: [...prevState.uploadedScripts, script],
-    }));
-  }
-
-  handleScriptRemove(script: InstanceScript) {
-    this.setState(prevState => ({
-      removedScripts: [...prevState.removedScripts, script],
-    }));
-  }
-
-  renderField(field: Field) {
-    return (
-      <FieldInputStyled
-        width={224}
-        key={field.name}
-        name={field.name}
-        type={field.type}
-        value={field.value || field.default}
-        minimum={field.minimum}
-        maximum={field.maximum}
-        layout="page"
-        label={field.label || LabelDictionary.get(field.name)}
-        onChange={value => this.handleValueChange(field, value)}
-        description={LabelDictionary.getDescription(field.name)}
-      />
-    );
-  }
-
-  renderMinionPoolMappings() {
-    const minionPools = this.props.minionPools.filter(
-      m => m.endpoint_id === this.props.transferItem?.destination_endpoint_id
-    );
-    if (!minionPools.length) {
-      return null;
-    }
-
-    const properties: Field[] = this.props.instances.map(instance => ({
-      name: instance.instance_name || instance.id,
-      label: instance.name,
-      type: "string",
-      enum: minionPools.map(minionPool => ({
-        name: minionPool.name,
-        id: minionPool.id,
-      })),
-    }));
-
-    return (
-      <FieldInputStyled
-        width={500}
-        style={{ marginBottom: "64px" }}
-        name={INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS}
-        type="object"
-        valueCallback={field =>
-          this.state.minionPoolMappings &&
-          this.state.minionPoolMappings[field.name]
-        }
-        layout="page"
-        label="Instance OSMorphing Minion Pool Mappings"
-        onChange={(value, field) =>
-          this.setState(prevState => {
-            const minionPoolMappings = { ...prevState.minionPoolMappings };
-            minionPoolMappings[field!.name] = value;
-            return { minionPoolMappings };
-          })
-        }
-        properties={properties}
-        labelRenderer={(propName: string) =>
-          propName.indexOf("/") > -1
-            ? propName.split("/")[propName.split("/").length - 1]
-            : propName
-        }
-      />
-    );
-  }
-
-  renderOptions() {
-    return (
-      <>
-        <Form>{this.state.fields.map(field => this.renderField(field))}</Form>
-        {this.renderMinionPoolMappings()}
-      </>
-    );
-  }
-
-  renderScripts() {
-    return (
-      <WizardScripts
-        instances={this.props.instances}
-        loadingInstances={this.props.loadingInstances}
-        onScriptUpload={s => {
-          this.handleScriptUpload(s);
-        }}
-        onScriptDataRemove={s => {
-          this.handleScriptRemove(s);
-        }}
-        onCancelScript={(g, i) => {
-          this.handleCancelScript(g, i);
-        }}
-        uploadedScripts={this.state.uploadedScripts}
-        removedScripts={this.state.removedScripts}
-        userScriptData={this.props.transferItem?.user_scripts}
-        scrollableRef={(r: HTMLElement) => {
-          this.scrollableRef = r;
-        }}
-        layout="modal"
-      />
-    );
-  }
-
-  renderBody() {
-    const Body =
-      this.state.selectedBarButton === "options" ? OptionsBody : ScriptsBody;
-
-    return (
-      <Body>
-        <ToggleButtonBar
-          items={[
-            { label: "Options", value: "options" },
-            { label: "User Scripts", value: "script" },
-          ]}
-          selectedValue={this.state.selectedBarButton}
-          onChange={item => {
-            this.setState({ selectedBarButton: item.value });
-          }}
-          style={{ marginBottom: "32px" }}
-        />
-        {this.state.selectedBarButton === "options"
-          ? this.renderOptions()
-          : this.renderScripts()}
-      </Body>
-    );
-  }
-
-  render() {
-    return (
-      <Wrapper>
-        <Image />
-        {this.renderBody()}
-        <Buttons>
-          <Button secondary onClick={this.props.onCancelClick}>
-            Cancel
-          </Button>
-          {this.props.migrating ? (
-            <LoadingButton>Migrating ...</LoadingButton>
-          ) : (
-            <Button
-              onClick={() => {
-                this.migrate();
-              }}
-            >
-              Migrate
-            </Button>
-          )}
-        </Buttons>
-      </Wrapper>
-    );
-  }
-}
-
-export default ReplicaMigrationOptions;

File diff suppressed because it is too large
+ 0 - 15
src/components/modules/TransferModule/ReplicaMigrationOptions/images/replica-migration.svg


+ 0 - 6
src/components/modules/TransferModule/ReplicaMigrationOptions/package.json

@@ -1,6 +0,0 @@
-{
-  "name": "ReplicaMigrationOptions",
-  "version": "0.0.0",
-  "private": true,
-  "main": "./ReplicaMigrationOptions.tsx"
-}

+ 0 - 33
src/components/modules/TransferModule/ReplicaMigrationOptions/replicaMigrationFields.ts

@@ -1,33 +0,0 @@
-/*
-Copyright (C) 2020  Cloudbase Solutions SRL
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-You should have received a copy of the GNU Affero General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-import { Field } from "@src/@types/Field";
-
-const replicaMigrationFields: Field[] = [
-  {
-    name: "clone_disks",
-    type: "boolean",
-    value: true,
-  },
-  {
-    name: "force",
-    type: "boolean",
-  },
-  {
-    name: "skip_os_morphing",
-    type: "boolean",
-  },
-];
-
-export default replicaMigrationFields;

+ 0 - 25
src/components/modules/TransferModule/ReplicaMigrationOptions/story.tsx

@@ -1,25 +0,0 @@
-/*
-Copyright (C) 2017  Cloudbase Solutions SRL
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-You should have received a copy of the GNU Affero General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-import React from "react";
-import { storiesOf } from "@storybook/react";
-import ReplicaMigrationOptions from ".";
-
-const props: any = {};
-storiesOf("ReplicaMigrationOptions", module).add("default", () => (
-  // eslint-disable-next-line react/jsx-props-no-spreading
-  <div style={{ width: "562px" }}>
-    <ReplicaMigrationOptions {...props} />
-  </div>
-));

+ 2 - 2
src/components/modules/TransferModule/Schedule/Schedule.tsx

@@ -17,7 +17,7 @@ import { observer } from "mobx-react";
 import React from "react";
 import styled from "styled-components";
 
-import ReplicaExecutionOptions from "@src/components/modules/TransferModule/ReplicaExecutionOptions";
+import TransferExecutionOptions from "@src/components/modules/TransferModule/TransferExecutionOptions";
 import ScheduleItem from "@src/components/modules/TransferModule/ScheduleItem";
 import { ThemePalette, ThemeProps } from "@src/components/Theme";
 import AlertModal from "@src/components/ui/AlertModal";
@@ -407,7 +407,7 @@ class Schedule extends React.Component<Props, State> {
               this.handleCloseOptionsModal();
             }}
           >
-            <ReplicaExecutionOptions
+            <TransferExecutionOptions
               disableExecutionOptions={this.props.disableExecutionOptions}
               options={this.state.executionOptions}
               onChange={(fieldName, value) => {

+ 1 - 1
src/components/modules/TransferModule/ReplicaDetailsContent/ReplicaDetailsContent.spec.tsx → src/components/modules/TransferModule/TransferDetailsContent/ReplicaDetailsContent.spec.tsx

@@ -31,7 +31,7 @@ import { NETWORK_MOCK } from "@tests/mocks/NetworksMock";
 import { STORAGE_BACKEND_MOCK } from "@tests/mocks/StoragesMock";
 import { REPLICA_ITEM_DETAILS_MOCK } from "@tests/mocks/TransferMock";
 
-import ReplicaDetailsContent from "./";
+import ReplicaDetailsContent from ".";
 
 const scheduleStoreMock = jest.createMockFromModule<typeof ScheduleStore>(
   "@src/stores/ScheduleStore"

+ 6 - 6
src/components/modules/TransferModule/ReplicaDetailsContent/ReplicaDetailsContent.tsx → src/components/modules/TransferModule/TransferDetailsContent/TransferDetailsContent.tsx

@@ -16,7 +16,7 @@ import { observer } from "mobx-react";
 import React from "react";
 import styled from "styled-components";
 
-import { ReplicaItemDetails } from "@src/@types/MainItem";
+import { TransferItemDetails } from "@src/@types/MainItem";
 import { MinionPool } from "@src/@types/MinionPool";
 import DetailsNavigation from "@src/components/modules/NavigationModule/DetailsNavigation";
 import Executions from "@src/components/modules/TransferModule/Executions";
@@ -74,7 +74,7 @@ const NavigationItems = [
 
 type TimezoneValue = "utc" | "local";
 type Props = {
-  item?: ReplicaItemDetails | null;
+  item?: TransferItemDetails | null;
   itemId: string;
   endpoints: Endpoint[];
   sourceSchema: Field[];
@@ -101,7 +101,7 @@ type Props = {
   onDeleteExecutionClick: (execution: Execution | null) => void;
   onExecuteClick: () => void;
   onCreateDeploymentClick: () => void;
-  onDeleteReplicaClick: () => void;
+  onDeleteTransferClick: () => void;
   onAddScheduleClick: (schedule: ScheduleType) => void;
   onScheduleChange: (
     scheduleId: string | null,
@@ -115,7 +115,7 @@ type State = {
   timezone: TimezoneValue;
 };
 @observer
-class ReplicaDetailsContent extends React.Component<Props, State> {
+class TransferDetailsContent extends React.Component<Props, State> {
   state: State = {
     timezone: "local",
   };
@@ -164,7 +164,7 @@ class ReplicaDetailsContent extends React.Component<Props, State> {
           </Button>
         </ButtonColumn>
         <ButtonColumn>
-          <Button alert hollow onClick={this.props.onDeleteReplicaClick}>
+          <Button alert hollow onClick={this.props.onDeleteTransferClick}>
             Delete
           </Button>
         </ButtonColumn>
@@ -268,4 +268,4 @@ class ReplicaDetailsContent extends React.Component<Props, State> {
   }
 }
 
-export default ReplicaDetailsContent;
+export default TransferDetailsContent;

+ 6 - 0
src/components/modules/TransferModule/TransferDetailsContent/package.json

@@ -0,0 +1,6 @@
+{
+  "name": "TransferDetailsContent",
+  "version": "0.0.0",
+  "private": true,
+  "main": "./TransferDetailsContent.tsx"
+}

+ 0 - 0
src/components/modules/TransferModule/ReplicaDetailsContent/story.tsx → src/components/modules/TransferModule/TransferDetailsContent/story.tsx


+ 5 - 5
src/components/modules/TransferModule/TransferDetailsTable/TransferDetailsTable.tsx

@@ -20,7 +20,7 @@ import { EndpointUtils, StorageBackend } from "@src/@types/Endpoint";
 import {
   isNetworkMapSecurityGroups,
   isNetworkMapSourceDest,
-  TransferItem,
+  ActionItem,
   TransferNetworkMap,
 } from "@src/@types/MainItem";
 import { MinionPool } from "@src/@types/MinionPool";
@@ -156,7 +156,7 @@ export const ArrowIcon = styled.div`
 `;
 
 export type Props = {
-  item?: TransferItem | null;
+  item?: ActionItem | null;
   instancesDetails: Instance[];
   networks?: Network[];
   minionPools: MinionPool[];
@@ -338,7 +338,7 @@ class TransferDetailsTable extends React.Component<Props, State> {
           destinationBody = destinationBody.concat(getBody(transferDisk));
         }
       } else if (
-        this.props.item?.type === "migration" &&
+        this.props.item?.type === "deployment" &&
         (this.props.item.last_execution_status === "RUNNING" ||
           this.props.item.last_execution_status ===
             "AWAITING_MINION_ALLOCATIONS")
@@ -446,7 +446,7 @@ class TransferDetailsTable extends React.Component<Props, State> {
             destinationBody = getBody(destinationNic);
           }
         } else if (
-          this.props.item?.type === "migration" &&
+          this.props.item?.type === "deployment" &&
           (this.props.item.last_execution_status === "RUNNING" ||
             this.props.item.last_execution_status ===
               "AWAITING_MINION_ALLOCATIONS")
@@ -501,7 +501,7 @@ class TransferDetailsTable extends React.Component<Props, State> {
       destinationName = transferResult.instance_name || transferResult.name;
       destinationBody = getBody(transferResult);
     } else if (
-      this.props.item?.type === "migration" &&
+      this.props.item?.type === "deployment" &&
       (this.props.item.last_execution_status === "RUNNING" ||
         this.props.item.last_execution_status === "AWAITING_MINION_ALLOCATIONS")
     ) {

+ 1 - 1
src/components/modules/TransferModule/ReplicaExecutionOptions/ReplicaExecutionOptions.spec.tsx → src/components/modules/TransferModule/TransferExecutionOptions/ReplicaExecutionOptions.spec.tsx

@@ -17,7 +17,7 @@ import React from "react";
 import { fireEvent, render } from "@testing-library/react";
 import TestUtils from "@tests/TestUtils";
 
-import ReplicaExecutionOptions from "./";
+import ReplicaExecutionOptions from ".";
 
 jest.mock("@src/plugins/default/ContentPlugin", () => jest.fn(() => null));
 

+ 2 - 2
src/components/modules/TransferModule/ReplicaExecutionOptions/ReplicaExecutionOptions.tsx → src/components/modules/TransferModule/TransferExecutionOptions/TransferExecutionOptions.tsx

@@ -65,7 +65,7 @@ type State = {
   fields: Field[];
 };
 @observer
-class ReplicaExecutionOptions extends React.Component<Props, State> {
+class TransferExecutionOptions extends React.Component<Props, State> {
   static defaultProps = {
     executionLabel: "Execute",
     executing: false,
@@ -157,4 +157,4 @@ class ReplicaExecutionOptions extends React.Component<Props, State> {
   }
 }
 
-export default ReplicaExecutionOptions;
+export default TransferExecutionOptions;

+ 0 - 0
src/components/modules/TransferModule/ReplicaExecutionOptions/images/execution.svg → src/components/modules/TransferModule/TransferExecutionOptions/images/execution.svg


+ 6 - 0
src/components/modules/TransferModule/TransferExecutionOptions/package.json

@@ -0,0 +1,6 @@
+{
+  "name": "TransferExecutionOptions",
+  "version": "0.0.0",
+  "private": true,
+  "main": "./TransferExecutionOptions.tsx"
+}

+ 0 - 0
src/components/modules/TransferModule/ReplicaExecutionOptions/story.tsx → src/components/modules/TransferModule/TransferExecutionOptions/story.tsx


+ 60 - 100
src/components/modules/TransferModule/TransferItemModal/TransferItemModal.tsx

@@ -19,8 +19,7 @@ import styled from "styled-components";
 import providerStore, {
   getFieldChangeOptions,
 } from "@src/stores/ProviderStore";
-import replicaStore from "@src/stores/ReplicaStore";
-import migrationStore from "@src/stores/MigrationStore";
+import transferStore from "@src/stores/TransferStore";
 import endpointStore from "@src/stores/EndpointStore";
 import { OptionsSchemaPlugin } from "@src/plugins";
 
@@ -39,8 +38,8 @@ import WizardStorage from "@src/components/modules/WizardModule/WizardStorage";
 
 import type {
   UpdateData,
-  TransferItemDetails,
-  MigrationItemDetails,
+  ActionItemDetails,
+  DeploymentItemDetails,
 } from "@src/@types/MainItem";
 import {
   Endpoint,
@@ -57,7 +56,7 @@ import {
   SecurityGroup,
 } from "@src/@types/Network";
 
-import { providerTypes, migrationFields } from "@src/constants";
+import { providerTypes } from "@src/constants";
 import configLoader from "@src/utils/Config";
 import LoadingButton from "@src/components/ui/LoadingButton";
 import minionPoolStore from "@src/stores/MinionPoolStore";
@@ -105,11 +104,11 @@ const Buttons = styled.div<any>`
 type Width = "normal" | "wide";
 
 type Props = {
-  type?: "replica" | "migration";
+  type?: "transfer" | "deployment";
   isOpen: boolean;
   onRequestClose: () => void;
   onUpdateComplete: (redirectTo: string) => void;
-  replica: TransferItemDetails;
+  transfer: ActionItemDetails;
   destinationEndpoint: Endpoint;
   sourceEndpoint: Endpoint;
   instancesDetails: Instance[];
@@ -187,7 +186,7 @@ class TransferItemModal extends React.Component<Props, State> {
 
   getStorageMap(storageBackends: StorageBackend[]): StorageMap[] {
     const storageMap: StorageMap[] = [];
-    const currentStorage = this.props.replica.storage_mappings;
+    const currentStorage = this.props.transfer.storage_mappings;
     const buildStorageMap = (
       type: "backend" | "disk",
       mapping: any
@@ -246,7 +245,7 @@ class TransferItemModal extends React.Component<Props, State> {
 
   getSelectedNetworks(): NetworkMap[] {
     const selectedNetworks: NetworkMap[] = [];
-    const networkMap: any = this.props.replica.network_map;
+    const networkMap: any = this.props.transfer.network_map;
 
     if (networkMap) {
       Object.keys(networkMap).forEach(sourceNetworkName => {
@@ -334,8 +333,8 @@ class TransferItemModal extends React.Component<Props, State> {
       return defaultStorage;
     };
 
-    if (this.props.replica.storage_mappings?.default) {
-      return buildDefaultStorage(this.props.replica.storage_mappings.default);
+    if (this.props.transfer.storage_mappings?.default) {
+      return buildDefaultStorage(this.props.transfer.storage_mappings.default);
     }
 
     if (endpointStore.storageConfigDefault) {
@@ -354,8 +353,8 @@ class TransferItemModal extends React.Component<Props, State> {
     const currentData =
       type === "source" ? this.state.sourceData : this.state.destinationData;
 
-    const replicaMinionMappings =
-      this.props.replica[INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS];
+    const transferMinionMappings =
+      this.props.transfer[INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS];
 
     if (parentFieldName) {
       if (
@@ -366,10 +365,10 @@ class TransferItemModal extends React.Component<Props, State> {
       }
       if (
         parentFieldName === INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS &&
-        replicaMinionMappings &&
-        replicaMinionMappings[fieldName] !== undefined
+        transferMinionMappings &&
+        transferMinionMappings[fieldName] !== undefined
       ) {
-        return replicaMinionMappings[fieldName];
+        return transferMinionMappings[fieldName];
       }
     }
 
@@ -378,8 +377,8 @@ class TransferItemModal extends React.Component<Props, State> {
     }
 
     if (fieldName === "title") {
-      if (this.props.replica.notes) {
-        return this.props.replica.notes;
+      if (this.props.transfer.notes) {
+        return this.props.transfer.notes;
       }
       let title = this.props.instancesDetails?.[0]?.name;
       if (
@@ -393,22 +392,22 @@ class TransferItemModal extends React.Component<Props, State> {
 
     if (fieldName === "minion_pool_id") {
       return type === "source"
-        ? this.props.replica.origin_minion_pool_id
-        : this.props.replica.destination_minion_pool_id;
+        ? this.props.transfer.origin_minion_pool_id
+        : this.props.transfer.destination_minion_pool_id;
     }
 
-    const replicaData: any =
+    const transferData: any =
       type === "source"
-        ? this.props.replica.source_environment
-        : this.props.replica.destination_environment;
+        ? this.props.transfer.source_environment
+        : this.props.transfer.destination_environment;
 
     if (parentFieldName) {
-      if (replicaData[parentFieldName]?.[fieldName] !== undefined) {
-        return replicaData[parentFieldName][fieldName];
+      if (transferData[parentFieldName]?.[fieldName] !== undefined) {
+        return transferData[parentFieldName][fieldName];
       }
     }
-    if (replicaData[fieldName] !== undefined) {
-      return replicaData[fieldName];
+    if (transferData[fieldName] !== undefined) {
+      return transferData[fieldName];
     }
     const endpoint =
       type === "source"
@@ -419,16 +418,10 @@ class TransferItemModal extends React.Component<Props, State> {
     const osMapping = /^(windows|linux)/.exec(fieldName);
     if (osMapping) {
       const osData =
-        replicaData[`${plugin.migrationImageMapFieldName}/${osMapping[0]}`];
+        transferData[`${plugin.migrationImageMapFieldName}/${osMapping[0]}`];
       return osData;
     }
-    const anyData = this.props.replica as any;
-    if (migrationFields.find(f => f.name === fieldName) && anyData[fieldName]) {
-      return anyData[fieldName];
-    }
-    if (fieldName === "skip_os_morphing" && this.props.type === "migration") {
-      return migrationStore.getDefaultSkipOsMorphing(anyData);
-    }
+
     return defaultValue;
   }
 
@@ -474,11 +467,9 @@ class TransferItemModal extends React.Component<Props, State> {
         useCache,
       });
     } catch (err) {
-      if (optionsType === "destination" || this.props.type === "migration") {
+      if (optionsType === "destination") {
         const destinationFailedMessage =
-          this.props.type === "replica"
-            ? "An error has occurred during the loading of the Replica's options for editing. There could be connection issues with the destination platform. Please retry the operation."
-            : "An error has occurred during loading of the source or destination platforms' environment options for editing of the Migration's parameters. You may still recreate the Migration with the same parameters as the original one by clicking \"Create\".";
+          "An error has occurred during the loading of the Transfer's options for editing. There could be connection issues with the destination platform. Please retry the operation.";
         this.setState({ destinationFailedMessage });
       }
       throw err;
@@ -505,8 +496,8 @@ class TransferItemModal extends React.Component<Props, State> {
         : this.props.destinationEndpoint;
     const env = ObjectUtils.clone(
       type === "source"
-        ? this.props.replica.source_environment
-        : this.props.replica.destination_environment
+        ? this.props.transfer.source_environment
+        : this.props.transfer.destination_environment
     );
     const stateEnv =
       type === "source" ? this.state.sourceData : this.state.destinationData;
@@ -555,7 +546,7 @@ class TransferItemModal extends React.Component<Props, State> {
 
   isUpdateDisabled() {
     const isDestFailed =
-      this.props.type === "replica" && this.state.destinationFailedMessage;
+      this.props.type === "transfer" && this.state.destinationFailedMessage;
     return this.state.updateDisabled || isDestFailed;
   }
 
@@ -593,8 +584,8 @@ class TransferItemModal extends React.Component<Props, State> {
   validateOptions(type: "source" | "destination") {
     const env = ObjectUtils.clone(
       type === "source"
-        ? this.props.replica.source_environment
-        : this.props.replica.destination_environment
+        ? this.props.transfer.source_environment
+        : this.props.transfer.destination_environment
     );
 
     const data =
@@ -632,13 +623,13 @@ class TransferItemModal extends React.Component<Props, State> {
         ? { ...this.state.sourceData }
         : { ...this.state.destinationData };
 
-    const replicaData: any =
+    const transferData: any =
       type === "source"
-        ? this.props.replica.source_environment
-        : this.props.replica.destination_environment;
+        ? this.props.transfer.source_environment
+        : this.props.transfer.destination_environment;
     if (field.type === "array") {
       const currentValues: string[] = data[field.name] || [];
-      const oldValues: string[] = replicaData[field.name] || [];
+      const oldValues: string[] = transferData[field.name] || [];
       let values: string[] = currentValues;
       if (!currentValues.length) {
         values = [...oldValues];
@@ -658,7 +649,7 @@ class TransferItemModal extends React.Component<Props, State> {
       // existing fields from Object options from the previous Migration/Replica,
       // we always re-merge all the values on an object field update.
       data[parentFieldName] =
-        data[parentFieldName] || replicaData[parentFieldName] || {};
+        data[parentFieldName] || transferData[parentFieldName] || {};
       data[parentFieldName][field.name] = value;
     } else {
       data[field.name] = value;
@@ -706,51 +697,21 @@ class TransferItemModal extends React.Component<Props, State> {
       uploadedScripts: this.state.uploadedScripts,
       removedScripts: this.state.removedScripts,
     };
-    if (this.props.type === "replica") {
-      try {
-        await replicaStore.update({
-          replica: this.props.replica as any,
-          sourceEndpoint: this.props.sourceEndpoint,
-          destinationEndpoint: this.props.destinationEndpoint,
-          updateData,
-          defaultStorage: this.getDefaultStorage(),
-          storageConfigDefault: endpointStore.storageConfigDefault,
-        });
-        this.props.onRequestClose();
-        this.props.onUpdateComplete(
-          `/transfers/${this.props.replica.id}/executions`
-        );
-      } catch (err) {
-        this.setState({ updating: false });
-      }
-    } else {
-      try {
-        const defaultStorage = EndpointUtils.getBusTypeStorageId(
-          endpointStore.storageBackends,
-          this.props.replica.storage_mappings?.default || null
-        );
-        const replicaDefaultStorage: {
-          value: string | null;
-          busType?: string | null;
-        } = {
-          value: defaultStorage.id,
-          busType: defaultStorage.busType,
-        };
-        const migration: MigrationItemDetails = await migrationStore.recreate({
-          migration: this.props.replica as any,
-          sourceEndpoint: this.props.sourceEndpoint,
-          destEndpoint: this.props.destinationEndpoint,
-          updateData,
-          defaultStorage: replicaDefaultStorage,
-          updatedDefaultStorage: this.state.defaultStorage,
-          replicationCount: this.props.replica.replication_count,
-        });
-        migrationStore.clearDetails();
-        this.props.onRequestClose();
-        this.props.onUpdateComplete(`/migrations/${migration.id}/tasks`);
-      } catch (err) {
-        this.setState({ updating: false });
-      }
+    try {
+      await transferStore.update({
+        transfer: this.props.transfer as any,
+        sourceEndpoint: this.props.sourceEndpoint,
+        destinationEndpoint: this.props.destinationEndpoint,
+        updateData,
+        defaultStorage: this.getDefaultStorage(),
+        storageConfigDefault: endpointStore.storageConfigDefault,
+      });
+      this.props.onRequestClose();
+      this.props.onUpdateComplete(
+        `/transfers/${this.props.transfer.id}/executions`
+      );
+    } catch (err) {
+      this.setState({ updating: false });
     }
   }
 
@@ -842,7 +803,7 @@ class TransferItemModal extends React.Component<Props, State> {
         ? providerStore.sourceSchema
         : providerStore.destinationSchema;
     const fields =
-      this.props.type === "replica" ? schema.filter(f => !f.readOnly) : schema;
+      this.props.type === "transfer" ? schema.filter(f => !f.readOnly) : schema;
     const extraOptionsConfig = configLoader.config.extraOptionsApiCalls.find(
       o => {
         const provider =
@@ -870,7 +831,7 @@ class TransferItemModal extends React.Component<Props, State> {
     return (
       <WizardOptions
         minionPools={minionPools}
-        wizardType={`${this.props.type || "replica"}-${type}-options-edit`}
+        wizardType={`${this.props.type || "transfer"}-${type}-options-edit`}
         getFieldValue={(f, d, pf) =>
           this.getFieldValue({
             type,
@@ -918,7 +879,6 @@ class TransferItemModal extends React.Component<Props, State> {
           "description",
           "execute_now",
           "execute_now_options",
-          ...migrationFields.map(f => f.name),
         ]}
         dictionaryKey={dictionaryKey}
         executeNowOptionsDisabled={
@@ -989,7 +949,7 @@ class TransferItemModal extends React.Component<Props, State> {
         }}
         uploadedScripts={this.state.uploadedScripts}
         removedScripts={this.state.removedScripts}
-        userScriptData={this.props.replica?.user_scripts}
+        userScriptData={this.props.transfer?.user_scripts}
         scrollableRef={(r: HTMLElement) => {
           this.scrollableRef = r;
         }}
@@ -1030,7 +990,7 @@ class TransferItemModal extends React.Component<Props, State> {
             <LoadingButton large>Loading ...</LoadingButton>
           ) : this.state.updating ? (
             <LoadingButton large>
-              {this.props.type === "replica" ? "Updating" : "Creating"} ...
+              {this.props.type === "transfer" ? "Updating" : "Creating"} ...
             </LoadingButton>
           ) : (
             <Button
@@ -1040,7 +1000,7 @@ class TransferItemModal extends React.Component<Props, State> {
               }}
               disabled={this.isUpdateDisabled()}
             >
-              {this.props.type === "replica" ? "Update" : "Create"}
+              {this.props.type === "transfer" ? "Update" : "Create"}
             </Button>
           )}
         </Buttons>

+ 7 - 12
src/components/modules/TransferModule/TransferListItem/TransferListItem.tsx

@@ -16,7 +16,7 @@ import { observer } from "mobx-react";
 import React from "react";
 import styled from "styled-components";
 
-import { getTransferItemTitle, TransferItem } from "@src/@types/MainItem";
+import { getTransferItemTitle, ActionItem } from "@src/@types/MainItem";
 import EndpointLogos from "@src/components/modules/EndpointModule/EndpointLogos";
 import { ThemePalette, ThemeProps } from "@src/components/Theme";
 import Checkbox from "@src/components/ui/Checkbox";
@@ -106,10 +106,10 @@ const Column = styled.div`
 `;
 
 type Props = {
-  item: TransferItem;
+  item: ActionItem;
   onClick: () => void;
   selected: boolean;
-  getListItemImage: (item: TransferItem) => string;
+  getListItemImage: (item: ActionItem) => string;
   showScheduleIcon?: boolean;
   endpointType: (endpointId: string) => string;
   getUserName: (userId: string) => string | undefined;
@@ -122,19 +122,14 @@ class TransferListItem extends React.Component<Props> {
     return this.props.item.last_execution_status;
   }
 
-  getReplicaScenarioType() {
+  getTransferScenarioType() {
     let scenario = "";
     switch(this.props.item.type) {
-      case "replica":
+      case "transfer":
         scenario = this.props.item.scenario;
         break;
       case "deployment":
-        scenario = this.props.item.replica_scenario;
-        break;
-      case "migration":
-        if (this.props.item.replica_id) {
-          scenario = "replica";
-        }
+        scenario = this.props.item.transfer_scenario;
         break;
       default:
     }
@@ -223,7 +218,7 @@ class TransferListItem extends React.Component<Props> {
                 <StatusPill status={status} style={{ marginRight: "8px" }} />
               ) : null}
               {this.props.showScheduleIcon ? (
-                <ScheduleImage data-tip="The Replica has scheduling enabled and will execute automatically" />
+                <ScheduleImage data-tip="The Transfer has scheduling enabled and will execute automatically" />
               ) : null}
             </StatusWrapper>
           </Title>

+ 2 - 23
src/components/modules/WizardModule/WizardOptions/WizardOptions.tsx

@@ -24,7 +24,7 @@ import { ThemePalette, ThemeProps } from "@src/components/Theme";
 import FieldInput from "@src/components/ui/FieldInput";
 import StatusImage from "@src/components/ui/StatusComponents/StatusImage";
 import ToggleButtonBar from "@src/components/ui/ToggleButtonBar";
-import { executionOptions, migrationFields } from "@src/constants";
+import { executionOptions } from "@src/constants";
 import { MinionPoolStoreUtils } from "@src/stores/MinionPoolStore";
 import configLoader from "@src/utils/Config";
 import LabelDictionary from "@src/utils/LabelDictionary";
@@ -297,10 +297,7 @@ class WizardOptions extends React.Component<Props> {
       });
     }
 
-    if (
-      this.props.wizardType === "migration" ||
-      this.props.wizardType === "migration-destination-options-edit"
-    ) {
+    if (this.props.wizardType === "migration-destination-options-edit") {
       fieldsSchema.push({
         name: "skip_os_morphing",
         type: "boolean",
@@ -351,24 +348,6 @@ class WizardOptions extends React.Component<Props> {
           : `Set the options for ${this.props.wizardType} execution`,
       });
     }
-    // } else if (
-    //   this.props.wizardType === "migration" ||
-    //   this.props.wizardType === "migration-destination-options-edit"
-    // ) {
-    //   const shutdownInstanceField = migrationFields.find(
-    //     f => f.name === "shutdown_instances"
-    //   )!;
-    //   shutdownInstanceField.disabled = this.props.executeNowOptionsDisabled;
-    //   shutdownInstanceField.description = this.props.executeNowOptionsDisabled
-    //     ? "The 'Shutdown Instances' option is disabled for the source provider"
-    //     : shutdownInstanceField.description;
-    //   fieldsSchema = [
-    //     ...fieldsSchema,
-    //     ...migrationFields.map(f =>
-    //       f.name === "shutdown_instances" ? shutdownInstanceField : f
-    //     ),
-    //   ];
-    // }
 
     return fieldsSchema;
   }

+ 3 - 4
src/components/modules/WizardModule/WizardPageContent/WizardPageContent.tsx

@@ -35,7 +35,7 @@ import { ThemePalette, ThemeProps } from "@src/components/Theme";
 import Button from "@src/components/ui/Button";
 import InfoIcon from "@src/components/ui/InfoIcon";
 import LoadingButton from "@src/components/ui/LoadingButton";
-import { migrationFields, providerTypes, wizardPages } from "@src/constants";
+import { providerTypes, wizardPages } from "@src/constants";
 import endpointStore from "@src/stores/EndpointStore";
 import instanceStore from "@src/stores/InstanceStore";
 import minionPoolStore from "@src/stores/MinionPoolStore";
@@ -197,8 +197,8 @@ class WizardPageContent extends React.Component<Props, State> {
 
   getProvidersType(type: string) {
     return type === "source"
-      ? providerTypes.SOURCE_REPLICA
-      : providerTypes.TARGET_REPLICA;
+      ? providerTypes.SOURCE_TRANSFER
+      : providerTypes.TARGET_TRANSFER;
   }
 
   getProviders(direction: string): ProviderTypes[] {
@@ -524,7 +524,6 @@ class WizardPageContent extends React.Component<Props, State> {
               "title",
               "execute_now",
               "execute_now_options",
-              ...migrationFields.map(f => f.name),
             ]}
             selectedInstances={this.props.wizardData.selectedInstances}
             showSeparatePerVm={Boolean(

+ 0 - 21
src/components/modules/WizardModule/WizardSummary/WizardSummary.tsx

@@ -24,7 +24,6 @@ import { INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS } from "@src/components/module
 import { getDisks } from "@src/components/modules/WizardModule/WizardStorage";
 import { ThemePalette, ThemeProps } from "@src/components/Theme";
 import StatusPill from "@src/components/ui/StatusComponents/StatusPill";
-import { migrationFields } from "@src/constants";
 import configLoader from "@src/utils/Config";
 import DateUtils from "@src/utils/DateUtils";
 import LabelDictionary from "@src/utils/LabelDictionary";
@@ -448,25 +447,6 @@ class WizardSummary extends React.Component<Props> {
       </Option>
     );
 
-    // const migrationOptions = [
-    //   <Option key="shutdown">
-    //     <OptionLabel>Shutdown Instances</OptionLabel>
-    //     <OptionValue>
-    //       {this.getDefaultBooleanOption("shutdown_instances", false)
-    //         ? "Yes"
-    //         : "No"}
-    //     </OptionValue>
-    //   </Option>,
-    //   <Option key="count">
-    //     <OptionLabel>Replication Count</OptionLabel>
-    //     <OptionValue>
-    //       {(this.props.data.destOptions &&
-    //         this.props.data.destOptions.replication_count) ||
-    //         2}
-    //     </OptionValue>
-    //   </Option>,
-    // ];
-
     const renderDefaultStorageOption = () => (
       <Option>
         <OptionLabel>Default Storage</OptionLabel>
@@ -498,7 +478,6 @@ class WizardSummary extends React.Component<Props> {
                 if (
                   optionName === "execute_now" ||
                   optionName === "separate_vm" ||
-                  migrationFields.find(f => f.name === optionName) ||
                   !data.destOptions ||
                   data.destOptions[optionName] == null ||
                   data.destOptions[optionName] === "" ||

+ 1 - 1
src/components/smart/AssessmentDetailsPage/AssessmentDetailsPage.tsx

@@ -33,7 +33,7 @@ import azureStore from "@src/stores/AzureStore";
 import type { LocalData } from "@src/stores/AzureStore";
 import endpointStore from "@src/stores/EndpointStore";
 import notificationStore from "@src/stores/NotificationStore";
-import replicaStore from "@src/stores/ReplicaStore";
+import replicaStore from "@src/stores/TransferStore";
 import instanceStore from "@src/stores/InstanceStore";
 import networkStore from "@src/stores/NetworkStore";
 import userStore from "@src/stores/UserStore";

+ 5 - 5
src/components/smart/DashboardPage/DashboardPage.tsx

@@ -25,7 +25,7 @@ import licenceStore from "@src/stores/LicenceStore";
 import deploymentStore from "@src/stores/DeploymentStore";
 import notificationStore from "@src/stores/NotificationStore";
 import projectStore from "@src/stores/ProjectStore";
-import replicaStore from "@src/stores/ReplicaStore";
+import transferStore from "@src/stores/TransferStore";
 import userStore from "@src/stores/UserStore";
 import configLoader from "@src/utils/Config";
 import Utils from "@src/utils/ObjectUtils";
@@ -99,7 +99,7 @@ class ProjectsPage extends React.Component<{ history: any }, State> {
     this.loadAdminData(showLoading);
 
     await Promise.all([
-      replicaStore.getReplicas({ skipLog: true, showLoading }),
+      transferStore.getTransfers({ skipLog: true, showLoading }),
       deploymentStore.getDeployments({ skipLog: true, showLoading }),
       endpointStore.getEndpoints({ skipLog: true, showLoading }),
       projectStore.getProjects({ skipLog: true, showLoading }),
@@ -128,7 +128,7 @@ class ProjectsPage extends React.Component<{ history: any }, State> {
           listNoMargin
           listComponent={
             <DashboardContent
-              replicas={replicaStore.replicas}
+              transfers={transferStore.transfers}
               deployments={deploymentStore.deployments}
               endpoints={endpointStore.endpoints}
               users={userStore.users}
@@ -146,8 +146,8 @@ class ProjectsPage extends React.Component<{ history: any }, State> {
               usersLoading={userStore.users.length === 0}
               licenceLoading={licenceStore.loadingLicenceInfo}
               licenceError={licenceStore.licenceInfoError}
-              replicasLoading={replicaStore.loading}
-              onNewReplicaClick={() => {
+              transfersLoading={transferStore.loading}
+              onNewTransferClick={() => {
                 this.props.history.push("/wizard/replica");
               }}
               onNewEndpointClick={() => {

+ 32 - 32
src/components/smart/DeploymentDetailsPage/DeploymentDetailsPage.tsx

@@ -21,7 +21,7 @@ import DetailsContentHeader from "@src/components/modules/DetailsModule/DetailsC
 import DetailsPageHeader from "@src/components/modules/DetailsModule/DetailsPageHeader";
 import DetailsTemplate from "@src/components/modules/TemplateModule/DetailsTemplate";
 import DeploymentDetailsContent from "@src/components/modules/TransferModule/DeploymentDetailsContent";
-import ReplicaDeploymentOptions from "@src/components/modules/TransferModule/ReplicaDeploymentOptions";
+import DeploymentOptions from "@src/components/modules/TransferModule/DeploymentOptions";
 import TransferItemModal from "@src/components/modules/TransferModule/TransferItemModal";
 import { ThemePalette } from "@src/components/Theme";
 import AlertModal from "@src/components/ui/AlertModal";
@@ -53,7 +53,7 @@ type State = {
   showCancelConfirmation: boolean;
   showForceCancelConfirmation: boolean;
   showEditModal: boolean;
-  showFromReplicaModal: boolean;
+  showFromTransferModal: boolean;
   pausePolling: boolean;
   initialLoading: boolean;
   deploying: boolean;
@@ -65,7 +65,7 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
     showCancelConfirmation: false,
     showForceCancelConfirmation: false,
     showEditModal: false,
-    showFromReplicaModal: false,
+    showFromTransferModal: false,
     pausePolling: false,
     initialLoading: true,
     deploying: false,
@@ -102,18 +102,18 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
     return deploymentStore.deploymentDetails?.last_execution_status;
   }
 
-  getDeploymentReplicaScenarioItemType(details: DeploymentItemDetails | null): string {
+  getDeploymentScenarioItemType(details: DeploymentItemDetails | null): string {
     let item_type = "replica";
-    let scenario = details?.replica_scenario_type;
+    let scenario = details?.transfer_scenario;
     if (scenario && scenario === "live_migration") {
       item_type = "migration";
     }
     return item_type;
   }
 
-  getReplicaTypePillShouldRed(details: DeploymentItemDetails | null): bool {
+  getTransferTypePillShouldRed(details: DeploymentItemDetails | null): boolean {
     let should_red = true;
-    let scenario = details?.replica_scenario_type;
+    let scenario = details?.transfer_scenario;
     if (scenario && scenario === "live_migration") {
       should_red = false;
     }
@@ -122,7 +122,7 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
 
   getDeploymentScenarioTypeImage(details: DeploymentItemDetails | null): string {
     let image = replicaDeploymentImage;
-    let scenario = details?.replica_scenario_type;
+    let scenario = details?.transfer_scenario;
     if (scenario && scenario === "live_migration") {
       image = liveMigrationDeploymentImage;
     }
@@ -288,15 +288,15 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
   }
 
   handleRecreateClick() {
-    if (!deploymentStore.deploymentDetails?.replica_id) {
+    if (!deploymentStore.deploymentDetails?.transfer_id) {
       this.setState({ showEditModal: true, pausePolling: true });
       return;
     }
-    this.setState({ showFromReplicaModal: true, pausePolling: true });
+    this.setState({ showFromTransferModal: true, pausePolling: true });
   }
 
-  handleCloseFromReplicaModal() {
-    this.setState({ showFromReplicaModal: false, pausePolling: false });
+  handleCloseFromTransferModal() {
+    this.setState({ showFromTransferModal: false, pausePolling: false });
   }
 
   handleCloseCancelConfirmation() {
@@ -322,7 +322,7 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
     }
   }
 
-  async recreateFromReplica(opts: {
+  async recreateFromTransfer(opts: {
     fields: Field[];
     uploadedUserScripts: InstanceScript[];
     removedUserScripts: InstanceScript[];
@@ -334,15 +334,15 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
       removedUserScripts,
       minionPoolMappings,
     } = opts;
-    const replicaId = deploymentStore.deploymentDetails?.replica_id;
-    if (!replicaId) {
+    const transferId = deploymentStore.deploymentDetails?.transfer_id;
+    if (!transferId) {
       return;
     }
 
     this.setState({ deploying: true });
     try {
       const deployment = await this.deploy({
-        replicaId,
+        transferId: transferId,
         fields,
         uploadedUserScripts,
         removedUserScripts,
@@ -352,25 +352,25 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
     } finally {
       this.setState({ deploying: false });
     }
-    this.handleCloseFromReplicaModal();
+    this.handleCloseFromTransferModal();
   }
 
   async deploy(opts: {
-    replicaId: string;
+    transferId: string;
     fields: Field[];
     uploadedUserScripts: InstanceScript[];
     removedUserScripts: InstanceScript[];
     minionPoolMappings: { [instance: string]: string };
   }) {
     const {
-      replicaId,
+      transferId: transferId,
       fields,
       uploadedUserScripts,
       removedUserScripts,
       minionPoolMappings,
     } = opts;
-    const deployment = await deploymentStore.deployReplica({
-      replicaId,
+    const deployment = await deploymentStore.deployTransfer({
+      transferId: transferId,
       fields,
       uploadedUserScripts,
       removedUserScripts,
@@ -399,7 +399,7 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
     });
   }
 
-  handleEditReplicaReload() {
+  handleEditTransferReload() {
     this.loadDeploymentWithInstances({
       deploymentId: this.props.match.params.id,
       cache: false,
@@ -442,14 +442,14 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
           this.handleUpdateComplete(url);
         }}
         sourceEndpoint={sourceEndpoint}
-        replica={deploymentStore.deploymentDetails}
+        transfer={deploymentStore.deploymentDetails}
         destinationEndpoint={destinationEndpoint}
         instancesDetails={instanceStore.instancesDetails}
         instancesDetailsLoading={instanceStore.loadingInstancesDetails}
         networks={networkStore.networks}
         networksLoading={networkStore.loading}
         onReloadClick={() => {
-          this.handleEditReplicaReload();
+          this.handleEditTransferReload();
         }}
       />
     );
@@ -508,7 +508,7 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
               }
               itemTitle={getTransferItemTitle(deploymentStore.deploymentDetails)}
               itemType={
-                this.getDeploymentReplicaScenarioItemType(
+                this.getDeploymentScenarioItemType(
                   deploymentStore.deploymentDetails)
               }
               itemDescription={deploymentStore.deploymentDetails?.description}
@@ -519,11 +519,11 @@ class DeploymentDetailsPage extends React.Component<Props, State> {
               }
               dropdownActions={dropdownActions}
               alertInfoPill={
-                this.getReplicaTypePillShouldRed(
+                this.getTransferTypePillShouldRed(
                   deploymentStore.deploymentDetails)
               }
               primaryInfoPill={
-                !this.getReplicaTypePillShouldRed(
+                !this.getTransferTypePillShouldRed(
                   deploymentStore.deploymentDetails)
               }
             />
@@ -606,22 +606,22 @@ Note that this may lead to scheduled cleanup tasks being forcibly skipped, and t
             this.handleCloseCancelConfirmation();
           }}
         />
-        {this.state.showFromReplicaModal ? (
+        {this.state.showFromTransferModal ? (
           <Modal
             isOpen
             title="Recreate Deployment"
             onRequestClose={() => {
-              this.handleCloseFromReplicaModal();
+              this.handleCloseFromTransferModal();
             }}
           >
-            <ReplicaDeploymentOptions
+            <DeploymentOptions
               transferItem={deploymentStore.deploymentDetails}
               minionPools={minionPoolStore.minionPools}
               onCancelClick={() => {
-                this.handleCloseFromReplicaModal();
+                this.handleCloseFromTransferModal();
               }}
               onDeployClick={opts => {
-                this.recreateFromReplica(opts);
+                this.recreateFromTransfer(opts);
               }}
               instances={instanceStore.instancesDetails}
               loadingInstances={instanceStore.loadingInstancesDetails}

+ 9 - 9
src/components/smart/DeploymentsPage/DeploymentsPage.tsx

@@ -29,7 +29,7 @@ import notificationStore from "@src/stores/NotificationStore";
 import configLoader from "@src/utils/Config";
 
 import { ThemePalette } from "@src/components/Theme";
-import replicaDeploymentFields from "@src/components/modules/TransferModule/ReplicaDeploymentOptions/replicaDeploymentFields";
+import deploymentFields from "@src/components/modules/TransferModule/DeploymentOptions/DeploymentFields";
 import { DeploymentItem } from "@src/@types/MainItem";
 import userStore from "@src/stores/UserStore";
 import TransferListItem from "@src/components/modules/TransferModule/TransferListItem";
@@ -98,14 +98,14 @@ class DeploymentsPage extends React.Component<{ history: any }, State> {
     return deployment ? deployment.last_execution_status : "";
   }
 
-  getDeploymentReplicaType(deploymentId: string): string {
+  getDeploymentType(deploymentId: string): string {
     const deployment = deploymentStore.deployments.find(m => m.id === deploymentId);
-    return deployment ? deployment.replica_scenario_type : "";
+    return deployment ? deployment.transfer_scenario : "";
   }
 
   getDeploymentItemImage(item: DeploymentItem): string {
     let image = replicaDeploymentItemImage;
-    if (item.replica_scenario_type === "live_migration") {
+    if (item.transfer_scenario === "live_migration") {
       image = liveMigrationDeploymentItemImage;
     }
     return image;
@@ -155,10 +155,10 @@ class DeploymentsPage extends React.Component<{ history: any }, State> {
 
     await Promise.all(
       this.state.selectedDeployments.map(async deployment => {
-        if (deployment.replica_id) {
-          await deploymentStore.deployReplica({
-            replicaId: deployment.replica_id,
-            fields: replicaDeploymentFields,
+        if (deployment.transfer_id) {
+          await deploymentStore.deployTransfer({
+            transferId: deployment.transfer_id,
+            fields: deploymentFields,
             uploadedUserScripts: [],
             removedUserScripts: [],
             userScriptData: deployment.user_scripts,
@@ -372,7 +372,7 @@ class DeploymentsPage extends React.Component<{ history: any }, State> {
             isOpen
             title="Recreate Selected Deployments?"
             message="Are you sure you want to recreate the selected deployments?"
-            extraMessage="Deployments created from replicas will be recreated using default options and regular deployments will be recreated using their original source and destination environment options."
+            extraMessage="Deployments will be recreated using current transfer source and destination options."
             onConfirmation={() => {
               this.recreateDeployments();
             }}

+ 13 - 13
src/components/smart/EndpointDetailsPage/EndpointDetailsPage.tsx

@@ -28,7 +28,7 @@ import EndpointDuplicateOptions from "@src/components/modules/EndpointModule/End
 
 import endpointStore from "@src/stores/EndpointStore";
 import deploymentStore from "@src/stores/DeploymentStore";
-import replicaStore from "@src/stores/ReplicaStore";
+import transferStore from "@src/stores/TransferStore";
 import userStore from "@src/stores/UserStore";
 import projectStore from "@src/stores/ProjectStore";
 
@@ -37,7 +37,7 @@ import type { Endpoint as EndpointType } from "@src/@types/Endpoint";
 import { ThemePalette } from "@src/components/Theme";
 
 import regionStore from "@src/stores/RegionStore";
-import { DeploymentItem, ReplicaItem } from "@src/@types/MainItem";
+import { DeploymentItem, TransferItem } from "@src/@types/MainItem";
 import providerStore from "@src/stores/ProviderStore";
 import endpointImage from "./images/endpoint.svg";
 
@@ -53,7 +53,7 @@ type State = {
   showEndpointModal: boolean;
   showEndpointInUseModal: boolean;
   showEndpointInUseLoadingModal: boolean;
-  endpointUsage: { replicas: ReplicaItem[]; deployments: DeploymentItem[] };
+  endpointUsage: { transfers: TransferItem[]; deployments: DeploymentItem[] };
   showDuplicateModal: boolean;
   duplicating: boolean;
 };
@@ -67,7 +67,7 @@ class EndpointDetailsPage extends React.Component<Props, State> {
     showEndpointInUseLoadingModal: false,
     showDuplicateModal: false,
     duplicating: false,
-    endpointUsage: { replicas: [], deployments: [] },
+    endpointUsage: { transfers: [], deployments: [] },
   };
 
   componentDidMount() {
@@ -87,9 +87,9 @@ class EndpointDetailsPage extends React.Component<Props, State> {
     );
   }
 
-  getEndpointUsage(): { deployments: DeploymentItem[]; replicas: ReplicaItem[] } {
+  getEndpointUsage(): { deployments: DeploymentItem[]; transfers: TransferItem[] } {
     const endpointId = this.props.match.params.id;
-    const replicas = replicaStore.replicas.filter(
+    const transfers = transferStore.transfers.filter(
       r =>
         r.origin_endpoint_id === endpointId ||
         r.destination_endpoint_id === endpointId
@@ -100,7 +100,7 @@ class EndpointDetailsPage extends React.Component<Props, State> {
         r.destination_endpoint_id === endpointId
     );
 
-    return { deployments, replicas };
+    return { deployments, transfers: transfers };
   }
 
   handleUserItemClick(item: { value: string }) {
@@ -116,14 +116,14 @@ class EndpointDetailsPage extends React.Component<Props, State> {
     this.setState({ showEndpointInUseLoadingModal: true });
 
     await Promise.all([
-      replicaStore.getReplicas(),
+      transferStore.getTransfers(),
       deploymentStore.getDeployments(),
     ]);
     const endpointUsage = this.getEndpointUsage();
 
     if (
       endpointUsage.deployments.length === 0 &&
-      endpointUsage.replicas.length === 0
+      endpointUsage.transfers.length === 0
     ) {
       this.setState({
         showDeleteEndpointConfirmation: true,
@@ -219,7 +219,7 @@ class EndpointDetailsPage extends React.Component<Props, State> {
     this.loadEndpoints();
 
     await Promise.all([
-      replicaStore.getReplicas(),
+      transferStore.getTransfers(),
       deploymentStore.getDeployments(),
       regionStore.getRegions(),
     ]);
@@ -306,7 +306,7 @@ class EndpointDetailsPage extends React.Component<Props, State> {
             <EndpointDetailsContent
               item={endpoint}
               regions={regionStore.regions}
-              replicas={this.state.endpointUsage.replicas}
+              transfers={this.state.endpointUsage.transfers}
               loading={
                 endpointStore.connectionInfoLoading ||
                 endpointStore.loading ||
@@ -339,8 +339,8 @@ class EndpointDetailsPage extends React.Component<Props, State> {
           type="error"
           isOpen={this.state.showEndpointInUseModal}
           title="Endpoint is in use"
-          message="The endpoint can't be deleted because it is in use by replicas or deployments."
-          extraMessage="You must first delete the replica or deployment which uses this endpoint."
+          message="The endpoint can't be deleted because it is in use by transfers or deployments."
+          extraMessage="You must first delete the transfer or deployment which uses this endpoint."
           onRequestClose={() => {
             this.handleCloseEndpointInUseModal();
           }}

+ 6 - 6
src/components/smart/EndpointsPage/EndpointsPage.tsx

@@ -31,7 +31,7 @@ import projectStore from "@src/stores/ProjectStore";
 import userStore from "@src/stores/UserStore";
 import endpointStore from "@src/stores/EndpointStore";
 import deploymentStore from "@src/stores/DeploymentStore";
-import replicaStore from "@src/stores/ReplicaStore";
+import transferStore from "@src/stores/TransferStore";
 import providerStore from "@src/stores/ProviderStore";
 import EndpointDuplicateOptions from "@src/components/modules/EndpointModule/EndpointDuplicateOptions";
 
@@ -106,13 +106,13 @@ class EndpointsPage extends React.Component<{ history: any }, State> {
   }
 
   getEndpointUsage(endpointId: string) {
-    const replicasCount = replicaStore.replicas.filter(
+    const replicasCount = transferStore.transfers.filter(
       r =>
         (r.origin_endpoint_id === endpointId ||
          r.destination_endpoint_id === endpointId) &&
          r.scenario === "replica"
     ).length;
-    const migrationsCount = replicaStore.replicas.filter(
+    const migrationsCount = transferStore.transfers.filter(
       r =>
         (r.origin_endpoint_id === endpointId ||
          r.destination_endpoint_id === endpointId) &&
@@ -125,14 +125,14 @@ class EndpointsPage extends React.Component<{ history: any }, State> {
   handleProjectChange() {
     endpointStore.getEndpoints({ showLoading: true });
     deploymentStore.getDeployments();
-    replicaStore.getReplicas();
+    transferStore.getTransfers();
   }
 
   handleReloadButtonClick() {
     projectStore.getProjects();
     endpointStore.getEndpoints({ showLoading: true });
     deploymentStore.getDeployments();
-    replicaStore.getReplicas();
+    transferStore.getTransfers();
   }
 
   handleItemClick(item: EndpointType) {
@@ -257,7 +257,7 @@ class EndpointsPage extends React.Component<{ history: any }, State> {
     await Promise.all([
       endpointStore.getEndpoints({ showLoading, skipLog: true }),
       deploymentStore.getDeployments({ skipLog: true }),
-      replicaStore.getReplicas({ skipLog: true }),
+      transferStore.getTransfers({ skipLog: true }),
     ]);
     this.pollTimeout = window.setTimeout(() => {
       this.pollData();

+ 1 - 1
src/components/smart/MetalHubServerDetailsPage/MetalHubServerDetailsPage.tsx

@@ -240,7 +240,7 @@ class MetalHubServerDetailsPage extends React.Component<Props, State> {
             isOpen
             title="Remove Bare Metal Server?"
             message="Are you sure you want to remove this server?"
-            extraMessage="By removing a server from the hub, Coriolis will not be able to migrate it or do any other replica executions of it."
+            extraMessage="By removing a server from the hub, Coriolis will not be able to migrate it or ensure disaster recovery of it."
             onConfirmation={() => {
               this.handleDeleteConfirmation();
             }}

+ 0 - 600
src/components/smart/MigrationDetailsPage/MigrationDetailsPage.tsx

@@ -1,600 +0,0 @@
-/*
-Copyright (C) 2017  Cloudbase Solutions SRL
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-You should have received a copy of the GNU Affero General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-import { observer } from "mobx-react";
-import React from "react";
-import styled from "styled-components";
-
-import { getTransferItemTitle } from "@src/@types/MainItem";
-import DetailsContentHeader from "@src/components/modules/DetailsModule/DetailsContentHeader";
-import DetailsPageHeader from "@src/components/modules/DetailsModule/DetailsPageHeader";
-import DetailsTemplate from "@src/components/modules/TemplateModule/DetailsTemplate";
-import MigrationDetailsContent from "@src/components/modules/TransferModule/MigrationDetailsContent";
-import ReplicaMigrationOptions from "@src/components/modules/TransferModule/ReplicaMigrationOptions";
-import TransferItemModal from "@src/components/modules/TransferModule/TransferItemModal";
-import { ThemePalette } from "@src/components/Theme";
-import AlertModal from "@src/components/ui/AlertModal";
-import Modal from "@src/components/ui/Modal";
-import { providerTypes } from "@src/constants";
-import endpointStore from "@src/stores/EndpointStore";
-import instanceStore from "@src/stores/InstanceStore";
-import migrationStore from "@src/stores/MigrationStore";
-import minionPoolStore from "@src/stores/MinionPoolStore";
-import networkStore from "@src/stores/NetworkStore";
-import notificationStore from "@src/stores/NotificationStore";
-import providerStore from "@src/stores/ProviderStore";
-import userStore from "@src/stores/UserStore";
-import configLoader from "@src/utils/Config";
-
-import migrationImage from "./images/migration.svg";
-
-import type { Field } from "@src/@types/Field";
-import type { InstanceScript } from "@src/@types/Instance";
-const Wrapper = styled.div<any>``;
-
-type Props = {
-  match: any;
-  history: any;
-};
-type State = {
-  showDeleteMigrationConfirmation: boolean;
-  showCancelConfirmation: boolean;
-  showForceCancelConfirmation: boolean;
-  showEditModal: boolean;
-  showFromReplicaModal: boolean;
-  pausePolling: boolean;
-  initialLoading: boolean;
-  migrating: boolean;
-};
-@observer
-class MigrationDetailsPage extends React.Component<Props, State> {
-  state: State = {
-    showDeleteMigrationConfirmation: false,
-    showCancelConfirmation: false,
-    showForceCancelConfirmation: false,
-    showEditModal: false,
-    showFromReplicaModal: false,
-    pausePolling: false,
-    initialLoading: true,
-    migrating: false,
-  };
-
-  stopPolling: boolean | null = null;
-
-  timeoutRef: any = null;
-
-  componentDidMount() {
-    document.title = "Migration Details";
-
-    this.loadMigrationAndPollData();
-  }
-
-  UNSAFE_componentWillReceiveProps(newProps: any) {
-    if (newProps.match.params.id === this.props.match.params.id) {
-      return;
-    }
-    this.timeoutRef && clearTimeout(this.timeoutRef);
-    migrationStore.cancelMigrationDetails();
-    migrationStore.clearDetails();
-    endpointStore.getEndpoints();
-    this.loadMigrationAndPollData();
-  }
-
-  componentWillUnmount() {
-    migrationStore.cancelMigrationDetails();
-    migrationStore.clearDetails();
-    this.stopPolling = true;
-  }
-
-  getStatus() {
-    return migrationStore.migrationDetails?.last_execution_status;
-  }
-
-  async loadMigrationAndPollData() {
-    const loadMigration = async () => {
-      await endpointStore.getEndpoints({ showLoading: true });
-      this.setState({ initialLoading: false });
-      await this.loadMigrationWithInstances({
-        migrationId: this.props.match.params.id,
-        cache: true,
-        onDetailsLoaded: async () => {
-          const details = migrationStore.migrationDetails;
-          if (!details) {
-            return;
-          }
-          const sourceEndpoint = endpointStore.endpoints.find(
-            e => e.id === details.origin_endpoint_id
-          );
-          const destinationEndpoint = endpointStore.endpoints.find(
-            e => e.id === details.destination_endpoint_id
-          );
-          if (!sourceEndpoint || !destinationEndpoint) {
-            return;
-          }
-          const loadOptions = async (optionsType: "source" | "destination") => {
-            const providerName =
-              optionsType === "source"
-                ? sourceEndpoint.type
-                : destinationEndpoint.type;
-            // This allows the values to be displayed with their allocated names instead of their IDs
-            await providerStore.loadOptionsSchema({
-              providerName,
-              optionsType,
-              useCache: true,
-              quietError: true,
-            });
-            const getOptionsValuesConfig = {
-              optionsType,
-              endpointId:
-                optionsType === "source"
-                  ? details.origin_endpoint_id
-                  : details.destination_endpoint_id,
-              providerName,
-              useCache: true,
-              quietError: true,
-              allowMultiple: true,
-            };
-            // For some providers, the API doesn't return the required fields values
-            // if those required fields are sent in env data,
-            // so to retrieve those values a request without env data must be made
-            await providerStore.getOptionsValues(getOptionsValuesConfig);
-            await providerStore.getOptionsValues({
-              ...getOptionsValuesConfig,
-              envData:
-                optionsType === "source"
-                  ? details.source_environment
-                  : details.destination_environment,
-            });
-          };
-
-          await Promise.all([
-            loadOptions("source"),
-            loadOptions("destination"),
-          ]);
-        },
-      });
-    };
-    await loadMigration();
-    this.pollData();
-  }
-
-  async loadMigrationWithInstances(options: {
-    migrationId: string;
-    cache: boolean;
-    onDetailsLoaded?: () => void;
-  }) {
-    await migrationStore.getMigration(options.migrationId, {
-      showLoading: true,
-    });
-    const details = migrationStore.migrationDetails;
-    if (!details) {
-      return;
-    }
-    if (options.onDetailsLoaded) {
-      options.onDetailsLoaded();
-    }
-    if (details.origin_minion_pool_id || details.destination_minion_pool_id) {
-      minionPoolStore.loadMinionPools();
-    }
-
-    await providerStore.loadProviders();
-
-    const targetEndpoint = endpointStore.endpoints.find(
-      e => e.id === details.destination_endpoint_id
-    );
-    const hasStorageMap = targetEndpoint
-      ? providerStore.providers && providerStore.providers[targetEndpoint.type]
-        ? !!providerStore.providers[targetEndpoint.type].types.find(
-            t => t === providerTypes.STORAGE
-          )
-        : false
-      : false;
-    if (hasStorageMap) {
-      endpointStore.loadStorage(
-        details.destination_endpoint_id,
-        details.destination_environment
-      );
-    }
-
-    networkStore.loadNetworks(
-      details.destination_endpoint_id,
-      details.destination_environment,
-      {
-        quietError: true,
-        cache: options.cache,
-      }
-    );
-
-    instanceStore.loadInstancesDetails({
-      endpointId: details.origin_endpoint_id,
-      instances: details.instances.map(n => ({ id: n })),
-      cache: options.cache,
-      quietError: false,
-      env: details.source_environment,
-      targetProvider: targetEndpoint?.type,
-    });
-  }
-
-  handleUserItemClick(item: { value: string }) {
-    switch (item.value) {
-      case "signout":
-        userStore.logout();
-        break;
-      default:
-    }
-  }
-
-  handleDeleteMigrationClick() {
-    this.setState({ showDeleteMigrationConfirmation: true });
-  }
-
-  handleDeleteMigrationConfirmation() {
-    this.setState({ showDeleteMigrationConfirmation: false });
-    this.props.history.push("/migrations");
-    if (migrationStore.migrationDetails) {
-      migrationStore.delete(migrationStore.migrationDetails.id);
-    }
-  }
-
-  handleCloseDeleteMigrationConfirmation() {
-    this.setState({ showDeleteMigrationConfirmation: false });
-  }
-
-  handleCancelMigrationClick(force?: boolean) {
-    if (force) {
-      this.setState({ showForceCancelConfirmation: true });
-    } else {
-      this.setState({ showCancelConfirmation: true });
-    }
-  }
-
-  handleRecreateClick() {
-    if (!migrationStore.migrationDetails?.replica_id) {
-      this.setState({ showEditModal: true, pausePolling: true });
-      return;
-    }
-    this.setState({ showFromReplicaModal: true, pausePolling: true });
-  }
-
-  handleCloseFromReplicaModal() {
-    this.setState({ showFromReplicaModal: false, pausePolling: false });
-  }
-
-  handleCloseCancelConfirmation() {
-    this.setState({
-      showCancelConfirmation: false,
-      showForceCancelConfirmation: false,
-    });
-  }
-
-  async handleCancelConfirmation(force?: boolean) {
-    this.setState({
-      showCancelConfirmation: false,
-      showForceCancelConfirmation: false,
-    });
-    if (!migrationStore.migrationDetails) {
-      return;
-    }
-    await migrationStore.cancel(migrationStore.migrationDetails.id, force);
-    if (force) {
-      notificationStore.alert("Force Canceled", "success");
-    } else {
-      notificationStore.alert("Canceled", "success");
-    }
-  }
-
-  async recreateFromReplica(opts: {
-    fields: Field[];
-    uploadedUserScripts: InstanceScript[];
-    removedUserScripts: InstanceScript[];
-    minionPoolMappings: { [instance: string]: string };
-  }) {
-    const {
-      fields,
-      uploadedUserScripts,
-      removedUserScripts,
-      minionPoolMappings,
-    } = opts;
-    const replicaId = migrationStore.migrationDetails?.replica_id;
-    if (!replicaId) {
-      return;
-    }
-
-    this.setState({ migrating: true });
-    try {
-      const migration = await this.migrate({
-        replicaId,
-        fields,
-        uploadedUserScripts,
-        removedUserScripts,
-        minionPoolMappings,
-      });
-      this.props.history.push(`/migrations/${migration.id}/tasks`);
-    } finally {
-      this.setState({ migrating: false });
-    }
-    this.handleCloseFromReplicaModal();
-  }
-
-  async migrate(opts: {
-    replicaId: string;
-    fields: Field[];
-    uploadedUserScripts: InstanceScript[];
-    removedUserScripts: InstanceScript[];
-    minionPoolMappings: { [instance: string]: string };
-  }) {
-    const {
-      replicaId,
-      fields,
-      uploadedUserScripts,
-      removedUserScripts,
-      minionPoolMappings,
-    } = opts;
-    const migration = await migrationStore.migrateReplica({
-      replicaId,
-      fields,
-      uploadedUserScripts,
-      removedUserScripts,
-      userScriptData: migrationStore.migrationDetails?.user_scripts,
-      minionPoolMappings,
-    });
-    return migration;
-  }
-
-  async pollData() {
-    if (this.state.pausePolling || this.stopPolling) {
-      return;
-    }
-    await migrationStore.getMigration(this.props.match.params.id, {
-      showLoading: false,
-      skipLog: true,
-    });
-    this.timeoutRef = setTimeout(() => {
-      this.pollData();
-    }, configLoader.config.requestPollTimeout);
-  }
-
-  closeEditModal() {
-    this.setState({ showEditModal: false, pausePolling: false }, () => {
-      this.pollData();
-    });
-  }
-
-  handleEditReplicaReload() {
-    this.loadMigrationWithInstances({
-      migrationId: this.props.match.params.id,
-      cache: false,
-    });
-  }
-
-  handleUpdateComplete(redirectTo: string) {
-    this.props.history.push(redirectTo);
-  }
-
-  renderEditModal() {
-    const sourceEndpoint = endpointStore.endpoints.find(
-      e =>
-        migrationStore.migrationDetails &&
-        e.id === migrationStore.migrationDetails.origin_endpoint_id
-    );
-    const destinationEndpoint = endpointStore.endpoints.find(
-      e =>
-        migrationStore.migrationDetails &&
-        e.id === migrationStore.migrationDetails.destination_endpoint_id
-    );
-
-    if (
-      !this.state.showEditModal ||
-      !migrationStore.migrationDetails ||
-      !destinationEndpoint ||
-      !sourceEndpoint
-    ) {
-      return null;
-    }
-
-    return (
-      <TransferItemModal
-        type="migration"
-        isOpen
-        onRequestClose={() => {
-          this.closeEditModal();
-        }}
-        onUpdateComplete={url => {
-          this.handleUpdateComplete(url);
-        }}
-        sourceEndpoint={sourceEndpoint}
-        replica={migrationStore.migrationDetails}
-        destinationEndpoint={destinationEndpoint}
-        instancesDetails={instanceStore.instancesDetails}
-        instancesDetailsLoading={instanceStore.loadingInstancesDetails}
-        networks={networkStore.networks}
-        networksLoading={networkStore.loading}
-        onReloadClick={() => {
-          this.handleEditReplicaReload();
-        }}
-      />
-    );
-  }
-
-  render() {
-    const dropdownActions = [
-      {
-        label: "Cancel",
-        disabled:
-          this.getStatus() !== "RUNNING" &&
-          this.getStatus() !== "AWAITING_MINION_ALLOCATIONS",
-        hidden: this.getStatus() === "CANCELLING",
-        action: () => {
-          this.handleCancelMigrationClick();
-        },
-      },
-      {
-        label: "Force Cancel",
-        hidden: this.getStatus() !== "CANCELLING",
-        action: () => {
-          this.handleCancelMigrationClick(true);
-        },
-      },
-      {
-        label: "Recreate Migration",
-        color: ThemePalette.primary,
-        action: () => {
-          this.handleRecreateClick();
-        },
-      },
-      {
-        label: "Delete Migration",
-        color: ThemePalette.alert,
-        action: () => {
-          this.handleDeleteMigrationClick();
-        },
-      },
-    ];
-
-    return (
-      <Wrapper>
-        <DetailsTemplate
-          pageHeaderComponent={
-            <DetailsPageHeader
-              user={userStore.loggedUser}
-              onUserItemClick={item => {
-                this.handleUserItemClick(item);
-              }}
-            />
-          }
-          contentHeaderComponent={
-            <DetailsContentHeader
-              statusPill={
-                migrationStore.migrationDetails?.last_execution_status
-              }
-              itemTitle={getTransferItemTitle(migrationStore.migrationDetails)}
-              itemType="migration"
-              itemDescription={migrationStore.migrationDetails?.description}
-              backLink="/migrations"
-              typeImage={migrationImage}
-              dropdownActions={dropdownActions}
-              primaryInfoPill
-            />
-          }
-          contentComponent={
-            <MigrationDetailsContent
-              item={migrationStore.migrationDetails}
-              itemId={this.props.match.params.id}
-              instancesDetails={instanceStore.instancesDetails}
-              instancesDetailsLoading={
-                instanceStore.loadingInstancesDetails ||
-                endpointStore.storageLoading ||
-                providerStore.providersLoading
-              }
-              storageBackends={endpointStore.storageBackends}
-              networks={networkStore.networks}
-              sourceSchema={providerStore.sourceSchema}
-              sourceSchemaLoading={
-                providerStore.sourceSchemaLoading ||
-                providerStore.sourceOptionsPrimaryLoading ||
-                providerStore.sourceOptionsSecondaryLoading
-              }
-              destinationSchema={providerStore.destinationSchema}
-              destinationSchemaLoading={
-                providerStore.destinationSchemaLoading ||
-                providerStore.destinationOptionsPrimaryLoading ||
-                providerStore.destinationOptionsSecondaryLoading
-              }
-              endpoints={endpointStore.endpoints}
-              page={this.props.match.params.page || ""}
-              minionPools={minionPoolStore.minionPools}
-              detailsLoading={
-                migrationStore.detailsLoading ||
-                endpointStore.loading ||
-                minionPoolStore.loadingMinionPools ||
-                this.state.initialLoading
-              }
-              onDeleteMigrationClick={() => {
-                this.handleDeleteMigrationClick();
-              }}
-            />
-          }
-        />
-        <AlertModal
-          isOpen={this.state.showDeleteMigrationConfirmation}
-          title="Delete Migration?"
-          message="Are you sure you want to delete this migration?"
-          extraMessage="Deleting a Coriolis Migration is permanent!"
-          onConfirmation={() => {
-            this.handleDeleteMigrationConfirmation();
-          }}
-          onRequestClose={() => {
-            this.handleCloseDeleteMigrationConfirmation();
-          }}
-        />
-        <AlertModal
-          isOpen={this.state.showCancelConfirmation}
-          title="Cancel Migration?"
-          message="Are you sure you want to cancel the migration?"
-          extraMessage=" "
-          onConfirmation={() => {
-            this.handleCancelConfirmation();
-          }}
-          onRequestClose={() => {
-            this.handleCloseCancelConfirmation();
-          }}
-        />
-        <AlertModal
-          isOpen={this.state.showForceCancelConfirmation}
-          title="Force Cancel Migration?"
-          message="Are you sure you want to force cancel the migration?"
-          extraMessage={`
-The migration is currently being cancelled.
-Would you like to force its cancellation?
-Note that this may lead to scheduled cleanup tasks being forcibly skipped, and thus manual cleanup of temporary resources on the source/destination platforms may be required.`}
-          onConfirmation={() => {
-            this.handleCancelConfirmation(true);
-          }}
-          onRequestClose={() => {
-            this.handleCloseCancelConfirmation();
-          }}
-        />
-        {this.state.showFromReplicaModal ? (
-          <Modal
-            isOpen
-            title="Recreate Migration from Replica"
-            onRequestClose={() => {
-              this.handleCloseFromReplicaModal();
-            }}
-          >
-            <ReplicaMigrationOptions
-              transferItem={migrationStore.migrationDetails}
-              minionPools={minionPoolStore.minionPools}
-              onCancelClick={() => {
-                this.handleCloseFromReplicaModal();
-              }}
-              onMigrateClick={opts => {
-                this.recreateFromReplica(opts);
-              }}
-              instances={instanceStore.instancesDetails}
-              loadingInstances={instanceStore.loadingInstancesDetails}
-              defaultSkipOsMorphing={migrationStore.getDefaultSkipOsMorphing(
-                migrationStore.migrationDetails
-              )}
-              migrating={this.state.migrating}
-            />
-          </Modal>
-        ) : null}
-        {this.renderEditModal()}
-      </Wrapper>
-    );
-  }
-}
-
-export default MigrationDetailsPage;

File diff suppressed because it is too large
+ 0 - 10
src/components/smart/MigrationDetailsPage/images/migration.svg


+ 0 - 6
src/components/smart/MigrationDetailsPage/package.json

@@ -1,6 +0,0 @@
-{
-  "name": "MigrationDetailsPage",
-  "version": "0.0.0",
-  "private": true,
-  "main": "./MigrationDetailsPage.tsx"
-}

+ 0 - 377
src/components/smart/MigrationsPage/MigrationsPage.tsx

@@ -1,377 +0,0 @@
-/*
-Copyright (C) 2017  Cloudbase Solutions SRL
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as
-published by the Free Software Foundation, either version 3 of the
-License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU Affero General Public License for more details.
-You should have received a copy of the GNU Affero General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-import React from "react";
-import styled from "styled-components";
-import { observer } from "mobx-react";
-
-import MainTemplate from "@src/components/modules/TemplateModule/MainTemplate";
-import Navigation from "@src/components/modules/NavigationModule/Navigation";
-import FilterList from "@src/components/ui/Lists/FilterList";
-import PageHeader from "@src/components/smart/PageHeader";
-import AlertModal from "@src/components/ui/AlertModal";
-
-import projectStore from "@src/stores/ProjectStore";
-import migrationStore from "@src/stores/MigrationStore";
-import endpointStore from "@src/stores/EndpointStore";
-import notificationStore from "@src/stores/NotificationStore";
-import configLoader from "@src/utils/Config";
-
-import { ThemePalette } from "@src/components/Theme";
-import replicaMigrationFields from "@src/components/modules/TransferModule/ReplicaMigrationOptions/replicaMigrationFields";
-import { MigrationItem } from "@src/@types/MainItem";
-import userStore from "@src/stores/UserStore";
-import TransferListItem from "@src/components/modules/TransferModule/TransferListItem";
-import migrationLargeImage from "./images/migration-large.svg";
-import migrationItemImage from "./images/migration.svg";
-
-const Wrapper = styled.div<any>``;
-
-type State = {
-  selectedMigrations: MigrationItem[];
-  modalIsOpen: boolean;
-  showDeleteMigrationModal: boolean;
-  showCancelMigrationModal: boolean;
-  showRecreateMigrationsModal: boolean;
-};
-@observer
-class MigrationsPage extends React.Component<{ history: any }, State> {
-  state: State = {
-    showDeleteMigrationModal: false,
-    showCancelMigrationModal: false,
-    showRecreateMigrationsModal: false,
-    selectedMigrations: [],
-    modalIsOpen: false,
-  };
-
-  pollTimeout = 0;
-
-  stopPolling = false;
-
-  componentDidMount() {
-    document.title = "Coriolis Migrations";
-
-    projectStore.getProjects();
-    endpointStore.getEndpoints({ showLoading: true });
-    userStore.getAllUsers({
-      showLoading: userStore.users.length === 0,
-      quietError: true,
-    });
-
-    this.stopPolling = false;
-    this.pollData();
-  }
-
-  componentWillUnmount() {
-    clearTimeout(this.pollTimeout);
-    this.stopPolling = true;
-  }
-
-  getEndpoint(endpointId: string) {
-    return endpointStore.endpoints.find(endpoint => endpoint.id === endpointId);
-  }
-
-  getFilterItems() {
-    return [
-      { label: "All", value: "all" },
-      { label: "Running", value: "RUNNING" },
-      { label: "Error", value: "ERROR" },
-      { label: "Completed", value: "COMPLETED" },
-      { label: "Canceled", value: "CANCELED" },
-    ];
-  }
-
-  getStatus(migrationId: string): string {
-    const migration = migrationStore.migrations.find(m => m.id === migrationId);
-    return migration ? migration.last_execution_status : "";
-  }
-
-  handleProjectChange() {
-    endpointStore.getEndpoints({ showLoading: true });
-    migrationStore.getMigrations({ showLoading: true });
-  }
-
-  handleReloadButtonClick() {
-    projectStore.getProjects();
-    endpointStore.getEndpoints({ showLoading: true });
-    migrationStore.getMigrations({ showLoading: true });
-    userStore.getAllUsers({ showLoading: true, quietError: true });
-  }
-
-  handleItemClick(item: MigrationItem) {
-    if (item.last_execution_status === "RUNNING") {
-      this.props.history.push(`/migrations/${item.id}/tasks`);
-    } else {
-      this.props.history.push(`/migrations/${item.id}`);
-    }
-  }
-
-  deleteSelectedMigrations() {
-    this.state.selectedMigrations.forEach(migration => {
-      migrationStore.delete(migration.id);
-    });
-    this.setState({ showDeleteMigrationModal: false });
-  }
-
-  cancelSelectedMigrations() {
-    this.state.selectedMigrations.forEach(migration => {
-      const status = this.getStatus(migration.id);
-      if (status === "RUNNING" || status === "AWAITING_MINION_ALLOCATIONS") {
-        migrationStore.cancel(migration.id);
-      }
-    });
-    notificationStore.alert("Canceling migrations");
-    this.setState({ showCancelMigrationModal: false });
-  }
-
-  async recreateMigrations() {
-    notificationStore.alert("Recreating migrations");
-    this.setState({ showRecreateMigrationsModal: false });
-
-    await Promise.all(
-      this.state.selectedMigrations.map(async migration => {
-        if (migration.replica_id) {
-          await migrationStore.migrateReplica({
-            replicaId: migration.replica_id,
-            fields: replicaMigrationFields,
-            uploadedUserScripts: [],
-            removedUserScripts: [],
-            userScriptData: migration.user_scripts,
-            minionPoolMappings:
-              migration.instance_osmorphing_minion_pool_mappings || {},
-          });
-        } else {
-          await migrationStore.recreateFullCopy(migration as any);
-        }
-      })
-    );
-
-    migrationStore.getMigrations();
-  }
-
-  handleEmptyListButtonClick() {
-    this.props.history.push("/wizard/migration");
-  }
-
-  handleModalOpen() {
-    this.setState({ modalIsOpen: true });
-  }
-
-  handleModalClose() {
-    this.setState({ modalIsOpen: false }, () => {
-      this.pollData();
-    });
-  }
-
-  searchText(item: MigrationItem, text: string) {
-    let result = false;
-    if (item.instances[0].toLowerCase().indexOf(text) > -1) {
-      return true;
-    }
-    if (item.notes && item.notes.toLowerCase().indexOf(text) > -1) {
-      return true;
-    }
-    if (item.destination_environment) {
-      Object.keys(item.destination_environment).forEach(prop => {
-        if (
-          item.destination_environment[prop]?.toLowerCase &&
-          item.destination_environment[prop].toLowerCase().indexOf(text) > -1
-        ) {
-          result = true;
-        }
-      });
-    }
-    return result;
-  }
-
-  itemFilterFunction(
-    item: MigrationItem,
-    filterStatus?: string | null,
-    filterText?: string
-  ) {
-    if (
-      (filterStatus !== "all" && item.last_execution_status !== filterStatus) ||
-      !this.searchText(
-        item,
-        (filterText?.toLowerCase && filterText.toLowerCase()) || ""
-      )
-    ) {
-      return false;
-    }
-
-    return true;
-  }
-
-  async pollData() {
-    if (this.state.modalIsOpen || this.stopPolling) {
-      return;
-    }
-
-    await Promise.all([
-      migrationStore.getMigrations({ skipLog: true }),
-      endpointStore.getEndpoints({ skipLog: true }),
-      userStore.getAllUsers({ skipLog: true, quietError: true }),
-    ]);
-    this.pollTimeout = window.setTimeout(() => {
-      this.pollData();
-    }, configLoader.config.requestPollTimeout);
-  }
-
-  render() {
-    let atLeaseOneIsRunning = false;
-    this.state.selectedMigrations.forEach(migration => {
-      const status = this.getStatus(migration.id);
-      atLeaseOneIsRunning =
-        atLeaseOneIsRunning ||
-        status === "RUNNING" ||
-        status === "AWAITING_MINION_ALLOCATIONS";
-    });
-    const BulkActions = [
-      {
-        label: "Cancel",
-        disabled: !atLeaseOneIsRunning,
-        action: () => {
-          this.setState({ showCancelMigrationModal: true });
-        },
-      },
-      {
-        label: "Recreate Migrations",
-        disabled: atLeaseOneIsRunning,
-        color: ThemePalette.primary,
-        action: () => {
-          this.setState({ showRecreateMigrationsModal: true });
-        },
-      },
-      {
-        label: "Delete Migrations",
-        color: ThemePalette.alert,
-        action: () => {
-          this.setState({ showDeleteMigrationModal: true });
-        },
-      },
-    ];
-
-    return (
-      <Wrapper>
-        <MainTemplate
-          navigationComponent={<Navigation currentPage="migrations" />}
-          listComponent={
-            <FilterList
-              filterItems={this.getFilterItems()}
-              selectionLabel="migration"
-              loading={migrationStore.loading}
-              items={migrationStore.migrations}
-              onItemClick={item => {
-                this.handleItemClick(item);
-              }}
-              onReloadButtonClick={() => {
-                this.handleReloadButtonClick();
-              }}
-              itemFilterFunction={(...args) => this.itemFilterFunction(...args)}
-              onSelectedItemsChange={selectedMigrations => {
-                this.setState({ selectedMigrations });
-              }}
-              dropdownActions={BulkActions}
-              renderItemComponent={options => (
-                <TransferListItem
-                  {...options}
-                  getListItemImage={item => migrationItemImage}
-                  endpointType={id => {
-                    const endpoint = this.getEndpoint(id);
-                    if (endpoint) {
-                      return endpoint.type;
-                    }
-                    if (endpointStore.loading) {
-                      return "Loading...";
-                    }
-                    return "Not Found";
-                  }}
-                  getUserName={id =>
-                    userStore.users.find(u => u.id === id)?.name
-                  }
-                  userNameLoading={userStore.allUsersLoading}
-                />
-              )}
-              emptyListImage={migrationLargeImage}
-              emptyListMessage="It seems like you don't have any Migrations in this project."
-              emptyListExtraMessage="A Coriolis Migration is a full virtual machine migration between two cloud endpoints."
-              emptyListButtonLabel="Create a Migration"
-              onEmptyListButtonClick={() => {
-                this.handleEmptyListButtonClick();
-              }}
-            />
-          }
-          headerComponent={
-            <PageHeader
-              title="Coriolis Migrations"
-              onProjectChange={() => {
-                this.handleProjectChange();
-              }}
-              onModalOpen={() => {
-                this.handleModalOpen();
-              }}
-              onModalClose={() => {
-                this.handleModalClose();
-              }}
-            />
-          }
-        />
-        {this.state.showDeleteMigrationModal ? (
-          <AlertModal
-            isOpen
-            title="Delete Selected Migrations?"
-            message="Are you sure you want to delete the selected migrations?"
-            extraMessage="Deleting a Coriolis Migration is permanent!"
-            onConfirmation={() => {
-              this.deleteSelectedMigrations();
-            }}
-            onRequestClose={() => {
-              this.setState({ showDeleteMigrationModal: false });
-            }}
-          />
-        ) : null}
-        {this.state.showCancelMigrationModal ? (
-          <AlertModal
-            isOpen
-            title="Cancel Selected Migrations?"
-            message="Are you sure you want to cancel the selected migrations?"
-            extraMessage="Canceling a Coriolis Migration is permanent!"
-            onConfirmation={() => {
-              this.cancelSelectedMigrations();
-            }}
-            onRequestClose={() => {
-              this.setState({ showCancelMigrationModal: false });
-            }}
-          />
-        ) : null}
-        {this.state.showRecreateMigrationsModal ? (
-          <AlertModal
-            isOpen
-            title="Recreate Selected Migrations?"
-            message="Are you sure you want to recreate the selected migrations?"
-            extraMessage="Migrations created from replicas will be recreated using default options and regular migrations will be recreated using their original source and destination environment options."
-            onConfirmation={() => {
-              this.recreateMigrations();
-            }}
-            onRequestClose={() => {
-              this.setState({ showRecreateMigrationsModal: false });
-            }}
-          />
-        ) : null}
-      </Wrapper>
-    );
-  }
-}
-
-export default MigrationsPage;

File diff suppressed because it is too large
+ 0 - 10
src/components/smart/MigrationsPage/images/migration-large.svg


File diff suppressed because it is too large
+ 0 - 10
src/components/smart/MigrationsPage/images/migration.svg


+ 0 - 6
src/components/smart/MigrationsPage/package.json

@@ -1,6 +0,0 @@
-{
-  "name": "MigrationsPage",
-  "version": "0.0.0",
-  "private": true,
-  "main": "./MigrationsPage.tsx"
-}

+ 6 - 6
src/components/smart/MinionPoolDetailsPage/MinionPoolDetailsPage.tsx

@@ -34,12 +34,12 @@ import { ThemePalette } from "@src/components/Theme";
 import minionPoolStore from "@src/stores/MinionPoolStore";
 import MinionPoolModal from "@src/components/modules/MinionModule/MinionPoolModal";
 import MinionPoolDetailsContent from "@src/components/modules/MinionModule/MinionPoolDetailsContent";
-import replicaStore from "@src/stores/ReplicaStore";
+import transferStore from "@src/stores/TransferStore";
 import deploymentStore from "@src/stores/DeploymentStore";
 import MinionPoolConfirmationModal from "@src/components/modules/MinionModule/MinionPoolConfirmationModal";
 import providerStore from "@src/stores/ProviderStore";
 import { Field } from "@src/@types/Field";
-import { TransferItem } from "@src/@types/MainItem";
+import { ActionItem } from "@src/@types/MainItem";
 import minionPoolImage from "./images/minion-pool.svg";
 
 const Wrapper = styled.div<any>``;
@@ -135,7 +135,7 @@ class MinionPoolDetailsPage extends React.Component<Props, State> {
       minionPoolStore.loadMinionPoolDetails(this.minionPoolId, {
         showLoading: true,
       }),
-      replicaStore.getReplicas(),
+      transferStore.getTransfers(),
       deploymentStore.getDeployments(),
     ]);
     const minionPool = this.minionPool;
@@ -204,7 +204,7 @@ class MinionPoolDetailsPage extends React.Component<Props, State> {
         showLoading,
         skipLog: true,
       }),
-      replicaStore.getReplicas(),
+      transferStore.getTransfers(),
       deploymentStore.getDeployments(),
     ]);
 
@@ -354,7 +354,7 @@ class MinionPoolDetailsPage extends React.Component<Props, State> {
       },
     ];
 
-    const checkPoolUsed = (i: TransferItem): Boolean|undefined => {
+    const checkPoolUsed = (i: ActionItem): Boolean|undefined => {
       return i.origin_minion_pool_id === this.minionPool?.id
         || i.destination_minion_pool_id === this.minionPool?.id
         || (i.instance_osmorphing_minion_pool_mappings
@@ -388,7 +388,7 @@ class MinionPoolDetailsPage extends React.Component<Props, State> {
             <MinionPoolDetailsContent
               item={this.minionPool}
               itemId={this.minionPoolId}
-              replicas={replicaStore.replicas.filter(checkPoolUsed)}
+              transfers={transferStore.transfers.filter(checkPoolUsed)}
               deployments={deploymentStore.deployments.filter(checkPoolUsed)}
               endpoints={endpointStore.endpoints}
               schema={minionPoolStore.minionPoolCombinedSchema}

+ 0 - 6
src/components/smart/ReplicaDetailsPage/package.json

@@ -1,6 +0,0 @@
-{
-  "name": "ReplicaDetailsPage",
-  "version": "0.0.0",
-  "private": true,
-  "main": "./ReplicaDetailsPage.tsx"
-}

+ 0 - 6
src/components/smart/ReplicasPage/package.json

@@ -1,6 +0,0 @@
-{
-  "name": "ReplicasPage",
-  "version": "0.0.0",
-  "private": true,
-  "main": "./ReplicasPage.tsx"
-}

+ 165 - 165
src/components/smart/ReplicaDetailsPage/ReplicaDetailsPage.tsx → src/components/smart/TransferDetailsPage/TransferDetailsPage.tsx

@@ -16,14 +16,14 @@ import { observer } from "mobx-react";
 import React from "react";
 import styled from "styled-components";
 
-import { getTransferItemTitle, ReplicaItemDetails } from "@src/@types/MainItem";
+import { getTransferItemTitle, TransferItemDetails } from "@src/@types/MainItem";
 import DetailsContentHeader from "@src/components/modules/DetailsModule/DetailsContentHeader";
 import DetailsPageHeader from "@src/components/modules/DetailsModule/DetailsPageHeader";
 import DetailsTemplate from "@src/components/modules/TemplateModule/DetailsTemplate";
-import DeleteReplicaModal from "@src/components/modules/TransferModule/DeleteReplicaModal";
-import ReplicaDetailsContent from "@src/components/modules/TransferModule/ReplicaDetailsContent";
-import ReplicaExecutionOptions from "@src/components/modules/TransferModule/ReplicaExecutionOptions";
-import ReplicaDeploymentOptions from "@src/components/modules/TransferModule/ReplicaDeploymentOptions";
+import DeleteTransferModal from "@src/components/modules/TransferModule/DeleteTransferModal/DeleteTransferModal";
+import TransferDetailsContent from "@src/components/modules/TransferModule/TransferDetailsContent";
+import TransferExecutionOptions from "@src/components/modules/TransferModule/TransferExecutionOptions";
+import DeploymentOptions from "@src/components/modules/TransferModule/DeploymentOptions";
 import TransferItemModal from "@src/components/modules/TransferModule/TransferItemModal";
 import { ThemePalette } from "@src/components/Theme";
 import AlertModal from "@src/components/ui/AlertModal";
@@ -35,7 +35,7 @@ import deploymentStore from "@src/stores/DeploymentStore";
 import minionPoolStore from "@src/stores/MinionPoolStore";
 import networkStore from "@src/stores/NetworkStore";
 import providerStore from "@src/stores/ProviderStore";
-import replicaStore from "@src/stores/ReplicaStore";
+import transferStore from "@src/stores/TransferStore";
 import scheduleStore from "@src/stores/ScheduleStore";
 import userStore from "@src/stores/UserStore";
 import configLoader from "@src/utils/Config";
@@ -62,9 +62,9 @@ type State = {
   showEditModal: boolean;
   showDeleteExecutionConfirmation: boolean;
   showForceCancelConfirmation: boolean;
-  showDeleteReplicaConfirmation: boolean;
-  showDeleteReplicaDisksConfirmation: boolean;
-  confirmationItem?: ReplicaItemDetails | null | Execution | null;
+  showDeleteTransferConfirmation: boolean;
+  showDeleteTransferDisksConfirmation: boolean;
+  confirmationItem?: TransferItemDetails | null | Execution | null;
   showCancelConfirmation: boolean;
   isEditable: boolean;
   isEditableLoading: boolean;
@@ -74,14 +74,14 @@ type State = {
   executing: boolean;
 };
 @observer
-class ReplicaDetailsPage extends React.Component<Props, State> {
+class TransferDetailsPage extends React.Component<Props, State> {
   state: State = {
     showOptionsModal: false,
     showDeploymentModal: false,
     showEditModal: false,
     showDeleteExecutionConfirmation: false,
-    showDeleteReplicaConfirmation: false,
-    showDeleteReplicaDisksConfirmation: false,
+    showDeleteTransferConfirmation: false,
+    showDeleteTransferDisksConfirmation: false,
     confirmationItem: null,
     showCancelConfirmation: false,
     showForceCancelConfirmation: false,
@@ -98,21 +98,21 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
   componentDidMount() {
     document.title = "Transfer Details";
 
-    const loadReplica = async () => {
+    const loadTransfer = async () => {
       await endpointStore.getEndpoints({ showLoading: true });
       this.setState({ initialLoading: false });
-      this.loadReplicaWithInstances({
+      this.loadTransferWithInstances({
         cache: true,
         showLoading: true,
         onDetailsLoaded: async () => {
-          if (!this.replica) {
+          if (!this.transfer) {
             return;
           }
           const sourceEndpoint = endpointStore.endpoints.find(
-            e => e.id === this.replica!.origin_endpoint_id
+            e => e.id === this.transfer!.origin_endpoint_id
           );
           const destinationEndpoint = endpointStore.endpoints.find(
-            e => e.id === this.replica!.destination_endpoint_id
+            e => e.id === this.transfer!.destination_endpoint_id
           );
           if (!sourceEndpoint || !destinationEndpoint) {
             return;
@@ -133,8 +133,8 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
               optionsType,
               endpointId:
                 optionsType === "source"
-                  ? this.replica!.origin_endpoint_id
-                  : this.replica!.destination_endpoint_id,
+                  ? this.transfer!.origin_endpoint_id
+                  : this.transfer!.destination_endpoint_id,
               providerName,
               useCache: true,
               quietError: true,
@@ -148,8 +148,8 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
               ...getOptionsValuesConfig,
               envData:
                 optionsType === "source"
-                  ? this.replica!.source_environment
-                  : this.replica!.destination_environment,
+                  ? this.transfer!.source_environment
+                  : this.transfer!.destination_environment,
             });
           };
 
@@ -161,45 +161,45 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
       });
     };
 
-    const loadReplicaAndPollData = async () => {
-      await loadReplica();
+    const loadTransferAndPollData = async () => {
+      await loadTransfer();
       this.pollData();
     };
-    loadReplicaAndPollData();
-    scheduleStore.getSchedules(this.replicaId);
+    loadTransferAndPollData();
+    scheduleStore.getSchedules(this.transferId);
   }
 
   UNSAFE_componentWillReceiveProps(newProps: Props) {
     if (newProps.match.params.id !== this.props.match.params.id) {
-      this.loadReplicaWithInstances({
+      this.loadTransferWithInstances({
         cache: true,
-        replicaId: newProps.match.params.id,
+        transferId: newProps.match.params.id,
       });
       scheduleStore.getSchedules(newProps.match.params.id);
     }
   }
 
   componentWillUnmount() {
-    replicaStore.cancelReplicaDetails();
-    replicaStore.clearDetails();
+    transferStore.cancelTransferDetails();
+    transferStore.clearDetails();
     scheduleStore.clearUnsavedSchedules();
     this.stopPolling = true;
   }
 
-  get replicaId() {
+  get transferId() {
     if (!this.props.match?.params?.id) {
       throw new Error("Invalid transfer id");
     }
     return this.props.match.params.id;
   }
 
-  get replica() {
-    return replicaStore.replicaDetails;
+  get transfer() {
+    return transferStore.transferDetails;
   }
 
   getLastExecution() {
-    if (this.replica?.executions?.length) {
-      return this.replica.executions[this.replica.executions.length - 1];
+    if (this.transfer?.executions?.length) {
+      return this.transfer.executions[this.transfer.executions.length - 1];
     }
     return null;
   }
@@ -208,36 +208,36 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     return this.getLastExecution()?.status;
   }
 
-  getReplicaItemType(): string {
+  getTransferItemType(): string {
     let item_type = "replica";
-    let scenario = this.replica?.scenario;
+    let scenario = this.transfer?.scenario;
     if (scenario && scenario === "live_migration") {
       item_type = "migration";
     }
     return item_type;
   }
 
-  getReplicaTypePillShouldRed(): bool {
+  getTransferTypePillShouldRed(): bool {
     let should_red = true;
-    let scenario = this.replica?.scenario;
+    let scenario = this.transfer?.scenario;
     if (scenario && scenario === "live_migration") {
       should_red = false;
     }
     return should_red;
   }
 
-  getReplicaScenarioTypeImage(): string {
+  getTransferScenarioTypeImage(): string {
     let image = replicaImage;
-    let scenario = this.replica?.scenario;
+    let scenario = this.transfer?.scenario;
     if (scenario && scenario === "live_migration") {
       image = liveMigrationImage;
     }
     return image;
   }
 
-  async loadIsEditable(replicaDetails: ReplicaItemDetails) {
-    const targetEndpointId = replicaDetails.destination_endpoint_id;
-    const sourceEndpointId = replicaDetails.origin_endpoint_id;
+  async loadIsEditable(transferDetails: TransferItemDetails) {
+    const targetEndpointId = transferDetails.destination_endpoint_id;
+    const sourceEndpointId = transferDetails.origin_endpoint_id;
     await ObjectUtils.waitFor(() => endpointStore.endpoints.length > 0);
     const sourceEndpoint = endpointStore.endpoints.find(
       e => e.id === sourceEndpointId
@@ -263,18 +263,18 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     this.setState({ isEditable, isEditableLoading: false });
   }
 
-  async loadReplicaWithInstances(options: {
+  async loadTransferWithInstances(options: {
     cache: boolean;
-    replicaId?: string;
+    transferId?: string;
     showLoading?: boolean;
     onDetailsLoaded?: () => void;
   }) {
-    await replicaStore.getReplicaDetails({
-      replicaId: options.replicaId || this.replicaId,
+    await transferStore.getTransferDetails({
+      transferId: options.transferId || this.transferId,
       showLoading: options.showLoading,
     });
-    const replica = this.replica;
-    if (!replica) {
+    const transfer = this.transfer;
+    if (!transfer) {
       return null;
     }
     if (options.onDetailsLoaded) {
@@ -284,11 +284,11 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
 
     await providerStore.loadProviders();
 
-    this.loadIsEditable(replica);
+    this.loadIsEditable(transfer);
 
     networkStore.loadNetworks(
-      replica.destination_endpoint_id,
-      replica.destination_environment,
+      transfer.destination_endpoint_id,
+      transfer.destination_environment,
       {
         quietError: true,
         cache: options.cache,
@@ -296,7 +296,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     );
 
     const targetEndpoint = endpointStore.endpoints.find(
-      e => e.id === replica.destination_endpoint_id
+      e => e.id === transfer.destination_endpoint_id
     );
 
     const hasStorageMap = targetEndpoint
@@ -308,32 +308,32 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
       : false;
     if (hasStorageMap) {
       endpointStore.loadStorage(
-        replica.destination_endpoint_id,
-        replica.destination_environment
+        transfer.destination_endpoint_id,
+        transfer.destination_environment
       );
     }
 
     instanceStore.loadInstancesDetails({
-      endpointId: replica.origin_endpoint_id,
-      instances: replica.instances.map(n => ({ id: n })),
+      endpointId: transfer.origin_endpoint_id,
+      instances: transfer.instances.map(n => ({ id: n })),
       cache: options.cache,
       quietError: false,
-      env: replica.source_environment,
+      env: transfer.source_environment,
       targetProvider: targetEndpoint?.type,
     });
-    return replica;
+    return transfer;
   }
 
   isExecuteDisabled() {
-    const replica = this.replica;
-    if (!replica) {
+    const transfer = this.transfer;
+    if (!transfer) {
       return true;
     }
     const originEndpoint = endpointStore.endpoints.find(
-      e => e.id === replica.origin_endpoint_id
+      e => e.id === transfer.origin_endpoint_id
     );
     const targetEndpoint = endpointStore.endpoints.find(
-      e => e.id === replica.destination_endpoint_id
+      e => e.id === transfer.destination_endpoint_id
     );
     const status = this.getStatus();
 
@@ -364,11 +364,11 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
   }
 
   handleDeleteExecutionConfirmation() {
-    const replica = this.replica;
-    if (!this.state.confirmationItem || !replica) {
+    const transfer = this.transfer;
+    if (!this.state.confirmationItem || !transfer) {
       return;
     }
-    replicaStore.deleteExecution(replica.id, this.state.confirmationItem.id);
+    transferStore.deleteExecution(transfer.id, this.state.confirmationItem.id);
     this.handleCloseExecutionConfirmation();
   }
 
@@ -386,43 +386,43 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     });
   }
 
-  handleDeleteReplicaClick() {
-    this.setState({ showDeleteReplicaConfirmation: true });
+  handleDeleteTransferClick() {
+    this.setState({ showDeleteTransferConfirmation: true });
   }
 
-  handleDeleteReplicaDisksClick() {
-    this.setState({ showDeleteReplicaDisksConfirmation: true });
+  handleDeleteTransferDisksClick() {
+    this.setState({ showDeleteTransferDisksConfirmation: true });
   }
 
-  handleDeleteReplicaConfirmation() {
-    this.setState({ showDeleteReplicaConfirmation: false });
-    const replica = this.replica;
-    if (!replica) {
+  handleDeleteTransferConfirmation() {
+    this.setState({ showDeleteTransferConfirmation: false });
+    const transfer = this.transfer;
+    if (!transfer) {
       return;
     }
     this.props.history.push("/transfers");
-    replicaStore.delete(replica.id);
+    transferStore.delete(transfer.id);
   }
 
-  handleCloseDeleteReplicaConfirmation() {
-    this.setState({ showDeleteReplicaConfirmation: false });
+  handleCloseDeleteTransferConfirmation() {
+    this.setState({ showDeleteTransferConfirmation: false });
   }
 
-  handleDeleteReplicaDisksConfirmation() {
+  handleDeleteTransferDisksConfirmation() {
     this.setState({
-      showDeleteReplicaDisksConfirmation: false,
-      showDeleteReplicaConfirmation: false,
+      showDeleteTransferDisksConfirmation: false,
+      showDeleteTransferConfirmation: false,
     });
-    const replica = this.replica;
-    if (!replica) {
+    const transfer = this.transfer;
+    if (!transfer) {
       return;
     }
-    replicaStore.deleteDisks(replica.id);
-    this.props.history.push(`/transfers/${replica.id}/executions`);
+    transferStore.deleteDisks(transfer.id);
+    this.props.history.push(`/transfers/${transfer.id}/executions`);
   }
 
-  handleCloseDeleteReplicaDisksConfirmation() {
-    this.setState({ showDeleteReplicaDisksConfirmation: false });
+  handleCloseDeleteTransferDisksConfirmation() {
+    this.setState({ showDeleteTransferDisksConfirmation: false });
   }
 
   handleCloseDeploymentModal() {
@@ -433,12 +433,12 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     this.setState({ showDeploymentModal: true, pausePolling: true });
   }
 
-  handleReplicaEditClick() {
+  handleTransferEditClick() {
     this.setState({ showEditModal: true, pausePolling: true });
   }
 
   handleAddScheduleClick(schedule: Schedule) {
-    scheduleStore.addSchedule(this.replicaId, schedule);
+    scheduleStore.addSchedule(this.transferId, schedule);
   }
 
   handleScheduleChange(
@@ -453,7 +453,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
 
     if (scheduleId) {
       scheduleStore.updateSchedule({
-        replicaId: this.replicaId,
+        transferId: this.transferId,
         scheduleId,
         data,
         oldData,
@@ -466,7 +466,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
   handleScheduleSave(schedule: Schedule) {
     if (schedule.id) {
       scheduleStore.updateSchedule({
-        replicaId: this.replicaId,
+        transferId: this.transferId,
         scheduleId: schedule.id,
         data: schedule,
         oldData: schedule,
@@ -478,7 +478,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
 
   handleScheduleRemove(scheduleId: string | null) {
     if (scheduleId) {
-      scheduleStore.removeSchedule(this.replicaId, scheduleId);
+      scheduleStore.removeSchedule(this.transferId, scheduleId);
     }
   }
 
@@ -505,12 +505,12 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
   }
 
   handleCancelConfirmation(force?: boolean) {
-    const replica = this.replica;
-    if (!this.state.confirmationItem || !replica) {
+    const transfer = this.transfer;
+    if (!this.state.confirmationItem || !transfer) {
       return;
     }
-    replicaStore.cancelExecution({
-      replicaId: replica.id,
+    transferStore.cancelExecution({
+      transferId: transfer.id,
       executionId: this.state.confirmationItem.id,
       force,
     });
@@ -525,8 +525,8 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     removedUserScripts: InstanceScript[];
     minionPoolMappings: { [instance: string]: string };
   }) {
-    const replica = this.replica;
-    if (!replica) {
+    const transfer = this.transfer;
+    if (!transfer) {
       return;
     }
     this.setState({ deploying: true });
@@ -537,12 +537,12 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
       minionPoolMappings,
     } = opts;
     try {
-      const deployment = await deploymentStore.deployReplica({
-        replicaId: replica.id,
+      const deployment = await deploymentStore.deployTransfer({
+        transferId: transfer.id,
         fields,
         uploadedUserScripts,
         removedUserScripts,
-        userScriptData: replica.user_scripts,
+        userScriptData: transfer.user_scripts,
         minionPoolMappings,
       });
       this.props.history.push(`/deployments/${deployment.id}/tasks/`);
@@ -551,17 +551,17 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     }
   }
 
-  async executeReplica(fields: Field[]) {
-    const replica = this.replica;
-    if (!replica) {
+  async executeTransfer(fields: Field[]) {
+    const transfer = this.transfer;
+    if (!transfer) {
       return;
     }
     this.setState({ executing: true });
     try {
-      await replicaStore.execute(replica.id, fields);
+      await transferStore.execute(transfer.id, fields);
 
       this.handleCloseOptionsModal();
-      this.props.history.push(`/transfers/${replica.id}/executions`);
+      this.props.history.push(`/transfers/${transfer.id}/executions`);
     } finally {
       this.setState({ executing: false });
     }
@@ -578,14 +578,14 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     }
 
     await Promise.all([
-      replicaStore.getReplicaDetails({
-        replicaId: this.replicaId,
+      transferStore.getTransferDetails({
+        transferId: this.transferId,
         polling: true,
       }),
       (async () => {
         if (window.location.pathname.indexOf("executions") > -1) {
-          await replicaStore.getExecutionTasks({
-            replicaId: this.replicaId,
+          await transferStore.getExecutionTasks({
+            transferId: this.transferId,
             polling: true,
           });
         }
@@ -603,8 +603,8 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     });
   }
 
-  handleEditReplicaReload() {
-    this.loadReplicaWithInstances({ cache: false });
+  handleEditTransferReload() {
+    this.loadTransferWithInstances({ cache: false });
   }
 
   handleUpdateComplete(redirectTo: string) {
@@ -613,26 +613,26 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
   }
 
   async handleExecutionChange(executionId: string) {
-    await ObjectUtils.waitFor(() => Boolean(replicaStore.replicaDetails));
-    if (!replicaStore.replicaDetails?.id) {
+    await ObjectUtils.waitFor(() => Boolean(transferStore.transferDetails));
+    if (!transferStore.transferDetails?.id) {
       return;
     }
-    replicaStore.getExecutionTasks({
-      replicaId: replicaStore.replicaDetails.id,
+    transferStore.getExecutionTasks({
+      transferId: transferStore.transferDetails.id,
       executionId,
     });
   }
 
-  renderEditReplica() {
-    const replica = this.replica;
-    if (!replica) {
+  renderEditTransfer() {
+    const transfer = this.transfer;
+    if (!transfer) {
       return null;
     }
     const sourceEndpoint = endpointStore.endpoints.find(
-      e => e.id === replica.origin_endpoint_id
+      e => e.id === transfer.origin_endpoint_id
     );
     const destinationEndpoint = endpointStore.endpoints.find(
-      e => e.id === replica.destination_endpoint_id
+      e => e.id === transfer.destination_endpoint_id
     );
 
     if (!this.state.showEditModal || !destinationEndpoint || !sourceEndpoint) {
@@ -642,7 +642,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     return (
       <TransferItemModal
         isOpen
-        type="replica"
+        type="transfer"
         sourceEndpoint={sourceEndpoint}
         onUpdateComplete={url => {
           this.handleUpdateComplete(url);
@@ -650,14 +650,14 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
         onRequestClose={() => {
           this.closeEditModal();
         }}
-        replica={replica}
+        transfer={transfer}
         destinationEndpoint={destinationEndpoint}
         instancesDetails={instanceStore.instancesDetails}
         instancesDetailsLoading={instanceStore.loadingInstancesDetails}
         networks={networkStore.networks}
         networksLoading={networkStore.loading}
         onReloadClick={() => {
-          this.handleEditReplicaReload();
+          this.handleEditTransferReload();
         }}
       />
     );
@@ -704,7 +704,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
         label: "Edit",
         title: editTitle,
         action: () => {
-          this.handleReplicaEditClick();
+          this.handleTransferEditClick();
         },
         disabled: !this.state.isEditable,
         loading: this.state.isEditableLoading,
@@ -712,18 +712,18 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
       {
         label: "Delete Disks",
         action: () => {
-          this.handleDeleteReplicaDisksClick();
+          this.handleDeleteTransferDisksClick();
         },
       },
       {
         label: "Delete",
         color: ThemePalette.alert,
         action: () => {
-          this.handleDeleteReplicaClick();
+          this.handleDeleteTransferClick();
         },
       },
     ];
-    const replica = this.replica;
+    const transfer = this.transfer;
 
     return (
       <Wrapper>
@@ -738,21 +738,21 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
           }
           contentHeaderComponent={
             <DetailsContentHeader
-              statusPill={replica?.last_execution_status}
-              itemTitle={getTransferItemTitle(this.replica)}
-              itemType={this.getReplicaItemType()}
-              itemDescription={replica?.description}
+              statusPill={transfer?.last_execution_status}
+              itemTitle={getTransferItemTitle(this.transfer)}
+              itemType={this.getTransferItemType()}
+              itemDescription={transfer?.description}
               dropdownActions={dropdownActions}
               backLink="/transfers"
-              typeImage={this.getReplicaScenarioTypeImage()}
-              alertInfoPill={this.getReplicaTypePillShouldRed()}
-              primaryInfoPill={!this.getReplicaTypePillShouldRed()}
+              typeImage={this.getTransferScenarioTypeImage()}
+              alertInfoPill={this.getTransferTypePillShouldRed()}
+              primaryInfoPill={!this.getTransferTypePillShouldRed()}
             />
           }
           contentComponent={
-            <ReplicaDetailsContent
-              item={replica}
-              itemId={this.replicaId}
+            <TransferDetailsContent
+              item={transfer}
+              itemId={this.transferId}
               instancesDetails={instanceStore.instancesDetails}
               instancesDetailsLoading={
                 instanceStore.loadingInstancesDetails ||
@@ -765,7 +765,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
               networks={networkStore.networks}
               minionPools={minionPoolStore.minionPools}
               detailsLoading={
-                replicaStore.replicaDetailsLoading ||
+                transferStore.transferDetailsLoading ||
                 endpointStore.loading ||
                 minionPoolStore.loadingMinionPools ||
                 this.state.initialLoading
@@ -783,19 +783,19 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
                 providerStore.destinationOptionsSecondaryLoading
               }
               executionsLoading={
-                replicaStore.startingExecution ||
-                replicaStore.replicaDetailsLoading
+                transferStore.startingExecution ||
+                transferStore.transferDetailsLoading
               }
               onExecutionChange={id => {
                 this.handleExecutionChange(id);
               }}
-              executions={replicaStore.replicaDetails?.executions || []}
+              executions={transferStore.transferDetails?.executions || []}
               executionsTasksLoading={
-                replicaStore.executionsTasksLoading ||
-                replicaStore.replicaDetailsLoading ||
-                replicaStore.startingExecution
+                transferStore.executionsTasksLoading ||
+                transferStore.transferDetailsLoading ||
+                transferStore.startingExecution
               }
-              executionsTasks={replicaStore.executionsTasks}
+              executionsTasks={transferStore.executionsTasks}
               page={this.props.match.params.page || ""}
               onCancelExecutionClick={(e, f) => {
                 this.handleCancelExecution(e, f);
@@ -809,8 +809,8 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
               onCreateDeploymentClick={() => {
                 this.handleCreateDeploymentClick();
               }}
-              onDeleteReplicaClick={() => {
-                this.handleDeleteReplicaClick();
+              onDeleteTransferClick={() => {
+                this.handleDeleteTransferClick();
               }}
               onAddScheduleClick={schedule => {
                 this.handleAddScheduleClick(schedule);
@@ -834,19 +834,19 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
             this.handleCloseOptionsModal();
           }}
         >
-          <ReplicaExecutionOptions
+          <TransferExecutionOptions
             disableExecutionOptions={configLoader.config.providersDisabledExecuteOptions.some(
               p =>
                 p ===
                 endpointStore.endpoints.find(
-                  e => e.id === replicaStore.replicaDetails?.origin_endpoint_id
+                  e => e.id === transferStore.transferDetails?.origin_endpoint_id
                 )?.type
             )}
             onCancelClick={() => {
               this.handleCloseOptionsModal();
             }}
             onExecuteClick={fields => {
-              this.executeReplica(fields);
+              this.executeTransfer(fields);
             }}
             executing={this.state.executing}
           />
@@ -859,11 +859,11 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
               this.handleCloseDeploymentModal();
             }}
           >
-            <ReplicaDeploymentOptions
-              transferItem={this.replica}
+            <DeploymentOptions
+              transferItem={this.transfer}
               minionPools={minionPoolStore.minionPools.filter(
                 m =>
-                  m.endpoint_id === this.replica?.destination_endpoint_id &&
+                  m.endpoint_id === this.transfer?.destination_endpoint_id &&
                   m.platform === "destination"
               )}
               loadingInstances={instanceStore.loadingInstancesDetails}
@@ -890,28 +890,28 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
             this.handleCloseExecutionConfirmation();
           }}
         />
-        {this.state.showDeleteReplicaConfirmation ? (
-          <DeleteReplicaModal
-            hasDisks={replicaStore.testReplicaHasDisks(this.replica)}
-            onRequestClose={() => this.handleCloseDeleteReplicaConfirmation()}
-            onDeleteReplica={() => {
-              this.handleDeleteReplicaConfirmation();
+        {this.state.showDeleteTransferConfirmation ? (
+          <DeleteTransferModal
+            hasDisks={transferStore.testTransferHasDisks(this.transfer)}
+            onRequestClose={() => this.handleCloseDeleteTransferConfirmation()}
+            onDeleteTransfer={() => {
+              this.handleDeleteTransferConfirmation();
             }}
             onDeleteDisks={() => {
-              this.handleDeleteReplicaDisksConfirmation();
+              this.handleDeleteTransferDisksConfirmation();
             }}
           />
         ) : null}
         <AlertModal
-          isOpen={this.state.showDeleteReplicaDisksConfirmation}
+          isOpen={this.state.showDeleteTransferDisksConfirmation}
           title="Delete Transferred Disks?"
           message="Are you sure you want to delete this tranfer's disks?"
           extraMessage="Deleting Coriolis Transfer Disks is permanent!"
           onConfirmation={() => {
-            this.handleDeleteReplicaDisksConfirmation();
+            this.handleDeleteTransferDisksConfirmation();
           }}
           onRequestClose={() => {
-            this.handleCloseDeleteReplicaDisksConfirmation();
+            this.handleCloseDeleteTransferDisksConfirmation();
           }}
         />
         <AlertModal
@@ -941,10 +941,10 @@ Note that this may lead to scheduled cleanup tasks being forcibly skipped, and t
             this.handleCloseCancelConfirmation();
           }}
         />
-        {this.renderEditReplica()}
+        {this.renderEditTransfer()}
       </Wrapper>
     );
   }
 }
 
-export default ReplicaDetailsPage;
+export default TransferDetailsPage;

+ 0 - 0
src/components/smart/ReplicaDetailsPage/images/live_migration.svg → src/components/smart/TransferDetailsPage/images/live_migration.svg


+ 0 - 0
src/components/smart/ReplicaDetailsPage/images/replica.svg → src/components/smart/TransferDetailsPage/images/replica.svg


+ 6 - 0
src/components/smart/TransferDetailsPage/package.json

@@ -0,0 +1,6 @@
+{
+  "name": "TransferDetailsPage",
+  "version": "0.0.0",
+  "private": true,
+  "main": "./TransferDetailsPage.tsx"
+}

+ 97 - 97
src/components/smart/ReplicasPage/ReplicasPage.tsx → src/components/smart/TransfersPage/TransfersPage.tsx

@@ -22,16 +22,16 @@ import FilterList from "@src/components/ui/Lists/FilterList";
 import PageHeader from "@src/components/smart/PageHeader";
 import AlertModal from "@src/components/ui/AlertModal";
 import Modal from "@src/components/ui/Modal";
-import ReplicaExecutionOptions from "@src/components/modules/TransferModule/ReplicaExecutionOptions";
-import ReplicaDeploymentOptions from "@src/components/modules/TransferModule/ReplicaDeploymentOptions";
-import DeleteReplicaModal from "@src/components/modules/TransferModule/DeleteReplicaModal";
+import TransferExecutionOptions from "@src/components/modules/TransferModule/TransferExecutionOptions";
+import DeploymentOptions from "@src/components/modules/TransferModule/DeploymentOptions";
+import DeleteTransferModal from "@src/components/modules/TransferModule/DeleteTransferModal/DeleteTransferModal";
 
 import type { DropdownAction } from "@src/components/ui/Dropdowns/ActionDropdown";
 import type { Field } from "@src/@types/Field";
 import type { InstanceScript } from "@src/@types/Instance";
 
 import projectStore from "@src/stores/ProjectStore";
-import replicaStore from "@src/stores/ReplicaStore";
+import transferStore from "@src/stores/TransferStore";
 import deploymentStore from "@src/stores/DeploymentStore";
 import scheduleStore from "@src/stores/ScheduleStore";
 import instanceStore from "@src/stores/InstanceStore";
@@ -40,7 +40,7 @@ import notificationStore from "@src/stores/NotificationStore";
 
 import { ThemePalette } from "@src/components/Theme";
 import configLoader from "@src/utils/Config";
-import { ReplicaItem } from "@src/@types/MainItem";
+import { TransferItem } from "@src/@types/MainItem";
 import userStore from "@src/stores/UserStore";
 import TransferListItem from "@src/components/modules/TransferModule/TransferListItem";
 import replicaLargeImage from "./images/replica-large.svg";
@@ -53,23 +53,23 @@ const SCHEDULE_POLL_TIMEOUT = 10000;
 
 type State = {
   modalIsOpen: boolean;
-  selectedReplicas: ReplicaItem[];
+  selectedTransfers: TransferItem[];
   showCancelExecutionModal: boolean;
   showExecutionOptionsModal: boolean;
   showCreateDeploymentsModal: boolean;
   showDeleteDisksModal: boolean;
-  showDeleteReplicasModal: boolean;
+  showDeleteTransfersModal: boolean;
 };
 @observer
-class ReplicasPage extends React.Component<{ history: any }, State> {
+class TransfersPage extends React.Component<{ history: any }, State> {
   state: State = {
     modalIsOpen: false,
-    selectedReplicas: [],
+    selectedTransfers: [],
     showCancelExecutionModal: false,
     showCreateDeploymentsModal: false,
     showExecutionOptionsModal: false,
     showDeleteDisksModal: false,
-    showDeleteReplicasModal: false,
+    showDeleteTransfersModal: false,
   };
 
   pollTimeout = 0;
@@ -80,7 +80,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
 
   schedulePollTimeout = 0;
 
-  paginatedReplicaIds: string[] = [];
+  paginatedTransferIds: string[] = [];
 
   componentDidMount() {
     document.title = "Coriolis Transfers";
@@ -115,11 +115,11 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
     ];
   }
 
-  getStatus(replica?: ReplicaItem | null): string {
-    return replica?.last_execution_status || "";
+  getStatus(transfer?: TransferItem | null): string {
+    return transfer?.last_execution_status || "";
   }
 
-  getReplicaItemImage(item: ReplicaItem): string {
+  getTransferItemImage(item: TransferItem): string {
     let image = replicaItemImage;
     if (item.scenario === "live_migration") {
       image = liveMigrationItemImage;
@@ -128,18 +128,18 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
  }
 
   handleProjectChange() {
-    replicaStore.getReplicas();
+    transferStore.getTransfers();
     endpointStore.getEndpoints({ showLoading: true });
   }
 
   handleReloadButtonClick() {
     projectStore.getProjects();
-    replicaStore.getReplicas({ showLoading: true });
+    transferStore.getTransfers({ showLoading: true });
     endpointStore.getEndpoints({ showLoading: true });
     userStore.getAllUsers({ showLoading: true, quietError: true });
   }
 
-  handleItemClick(item: ReplicaItem) {
+  handleItemClick(item: TransferItem) {
     if (item.last_execution_status === "RUNNING") {
       this.props.history.push(`/transfers/${item.id}/executions`);
     } else {
@@ -147,24 +147,24 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
     }
   }
 
-  handlePaginatedItemsChange(paginatedReplicas: ReplicaItem[]) {
-    this.paginatedReplicaIds = paginatedReplicas.map(r => r.id);
+  handlePaginatedItemsChange(paginatedTransfers: TransferItem[]) {
+    this.paginatedTransferIds = paginatedTransfers.map(r => r.id);
   }
 
-  executeSelectedReplicas(fields: Field[]) {
-    this.state.selectedReplicas.forEach(replica => {
-      const actualReplica = replicaStore.replicas.find(
-        r => r.id === replica.id
+  executeSelectedTransfers(fields: Field[]) {
+    this.state.selectedTransfers.forEach(transfer => {
+      const actualTransfer = transferStore.transfers.find(
+        r => r.id === transfer.id
       );
-      if (actualReplica && this.isExecuteEnabled(actualReplica)) {
-        replicaStore.execute(replica.id, fields);
+      if (actualTransfer && this.isExecuteEnabled(actualTransfer)) {
+        transferStore.execute(transfer.id, fields);
       }
     });
     notificationStore.alert("Executing selected transfers");
     this.setState({ showExecutionOptionsModal: false });
   }
 
-  deploySelectedReplicas(fields: Field[], uploadedScripts: InstanceScript[]) {
+  deploySelectedTransfers(fields: Field[], uploadedScripts: InstanceScript[]) {
     notificationStore.alert("Creating deployments from selected transfers");
     this.deploy(fields, uploadedScripts);
     this.setState({ showCreateDeploymentsModal: false, modalIsOpen: false });
@@ -172,18 +172,18 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
 
   async deploy(fields: Field[], uploadedScripts: InstanceScript[]) {
     await Promise.all(
-      this.state.selectedReplicas.map(replica =>
-        deploymentStore.deployReplica({
-          replicaId: replica.id,
+      this.state.selectedTransfers.map(transfer =>
+        deploymentStore.deployTransfer({
+          transferId: transfer.id,
           fields,
           uploadedUserScripts: uploadedScripts.filter(
             s =>
-              !s.instanceId || replica.instances.find(i => i === s.instanceId)
+              !s.instanceId || transfer.instances.find(i => i === s.instanceId)
           ),
           removedUserScripts: [],
-          userScriptData: replica.user_scripts,
+          userScriptData: transfer.user_scripts,
           minionPoolMappings:
-            replica.instance_osmorphing_minion_pool_mappings || {},
+            transfer.instance_osmorphing_minion_pool_mappings || {},
         })
       )
     );
@@ -194,49 +194,49 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
     this.props.history.push("/deployments");
   }
 
-  handleShowDeleteReplicas() {
-    replicaStore.loadHaveReplicasDisks(this.state.selectedReplicas);
-    this.setState({ showDeleteReplicasModal: true });
+  handleShowDeleteTransfers() {
+    transferStore.loadHaveTransfersDisks(this.state.selectedTransfers);
+    this.setState({ showDeleteTransfersModal: true });
   }
 
-  deleteReplicasDisks(replicas: ReplicaItem[]) {
-    replicas.forEach(replica => {
-      replicaStore.deleteDisks(replica.id);
+  deleteTransfersDisks(transfers: TransferItem[]) {
+    transfers.forEach(transfer => {
+      transferStore.deleteDisks(transfer.id);
     });
     this.setState({
       showDeleteDisksModal: false,
-      showDeleteReplicasModal: false,
+      showDeleteTransfersModal: false,
     });
     notificationStore.alert("Deleting selected transfers' disks");
   }
 
   cancelExecutions() {
-    this.state.selectedReplicas.forEach(replica => {
-      const actualReplica = replicaStore.replicas.find(
-        r => r.id === replica.id
+    this.state.selectedTransfers.forEach(transfer => {
+      const actualTransfer = transferStore.transfers.find(
+        r => r.id === transfer.id
       );
       if (
-        actualReplica?.last_execution_status === "RUNNING" ||
-        actualReplica?.last_execution_status === "AWAITING_MINION_ALLOCATIONS"
+        actualTransfer?.last_execution_status === "RUNNING" ||
+        actualTransfer?.last_execution_status === "AWAITING_MINION_ALLOCATIONS"
       ) {
-        replicaStore.cancelExecution({ replicaId: replica.id });
+        transferStore.cancelExecution({ transferId: transfer.id });
       }
     });
     this.setState({ showCancelExecutionModal: false });
   }
 
-  isExecuteEnabled(replica?: ReplicaItem | null): boolean {
-    if (!replica) {
+  isExecuteEnabled(transfer?: TransferItem | null): boolean {
+    if (!transfer) {
       return false;
     }
-    const usableReplica = replica;
+    const usableTransfer = transfer;
     const originEndpoint = endpointStore.endpoints.find(
-      e => e.id === usableReplica.origin_endpoint_id
+      e => e.id === usableTransfer.origin_endpoint_id
     );
     const targetEndpoint = endpointStore.endpoints.find(
-      e => e.id === usableReplica.destination_endpoint_id
+      e => e.id === usableTransfer.destination_endpoint_id
     );
-    const status = this.getStatus(usableReplica);
+    const status = this.getStatus(usableTransfer);
     return Boolean(
       originEndpoint &&
         targetEndpoint &&
@@ -245,11 +245,11 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
     );
   }
 
-  deleteSelectedReplicas() {
-    this.state.selectedReplicas.forEach(replica => {
-      replicaStore.delete(replica.id);
+  deleteSelectedTransfers() {
+    this.state.selectedTransfers.forEach(transfer => {
+      transferStore.delete(transfer.id);
     });
-    this.setState({ showDeleteReplicasModal: false });
+    this.setState({ showDeleteTransfersModal: false });
   }
 
   handleEmptyListButtonClick() {
@@ -268,7 +268,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
 
   handleShowCreateDeploymentsModal() {
     instanceStore.loadInstancesDetailsBulk(
-      replicaStore.replicas.map(r => ({
+      transferStore.transfers.map(r => ({
         endpointId: r.origin_endpoint_id,
         instanceIds: r.instances,
         env: r.source_environment,
@@ -284,7 +284,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
     }
 
     await Promise.all([
-      replicaStore.getReplicas({ skipLog: true }),
+      transferStore.getTransfers({ skipLog: true }),
       endpointStore.getEndpoints({ skipLog: true }),
       userStore.getAllUsers({ skipLog: true, quietError: true }),
     ]);
@@ -300,18 +300,18 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
     if (
       this.state.modalIsOpen ||
       this.stopPolling ||
-      replicaStore.replicas.length === 0
+      transferStore.transfers.length === 0
     ) {
       return;
     }
     this.schedulePolling = true;
-    await scheduleStore.getSchedulesBulk(this.paginatedReplicaIds);
+    await scheduleStore.getSchedulesBulk(this.paginatedTransferIds);
     this.schedulePollTimeout = window.setTimeout(() => {
       this.pollSchedule();
     }, SCHEDULE_POLL_TIMEOUT);
   }
 
-  searchText(item: ReplicaItem, text: string) {
+  searchText(item: TransferItem, text: string) {
     let result = false;
     if (item.instances[0].toLowerCase().indexOf(text) > -1) {
       return true;
@@ -333,7 +333,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
   }
 
   itemFilterFunction(
-    item: ReplicaItem,
+    item: TransferItem,
     filterStatus?: string | null,
     filterText?: string
   ) {
@@ -350,9 +350,9 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
     return true;
   }
 
-  isReplicaScheduled(replicaId: string): boolean {
+  isTransferScheduled(transferId: string): boolean {
     const bulkScheduleItem = scheduleStore.bulkSchedules.find(
-      b => b.replicaId === replicaId
+      b => b.transferId === transferId
     );
     if (!bulkScheduleItem) {
       return false;
@@ -364,24 +364,24 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
   render() {
     let atLeastOneHasExecuteEnabled = false;
     let atLeaseOneIsRunning = false;
-    this.state.selectedReplicas.forEach(replica => {
-      const storeReplica = replicaStore.replicas.find(r => r.id === replica.id);
+    this.state.selectedTransfers.forEach(transfer => {
+      const storeTransfer = transferStore.transfers.find(r => r.id === transfer.id);
       atLeastOneHasExecuteEnabled =
-        atLeastOneHasExecuteEnabled || this.isExecuteEnabled(storeReplica);
-      const status = this.getStatus(storeReplica);
+        atLeastOneHasExecuteEnabled || this.isExecuteEnabled(storeTransfer);
+      const status = this.getStatus(storeTransfer);
       atLeaseOneIsRunning =
         atLeaseOneIsRunning ||
         status === "RUNNING" ||
         status === "AWAITING_MINION_ALLOCATIONS";
     });
 
-    const replicasWithDisabledExecutionOptions =
-      this.state.selectedReplicas.filter(replica =>
+    const transfersWithDisabledExecutionOptions =
+      this.state.selectedTransfers.filter(transfer =>
         configLoader.config.providersDisabledExecuteOptions.find(
           p =>
             p ===
             endpointStore.endpoints.find(
-              e => e.id === replica.origin_endpoint_id
+              e => e.id === transfer.origin_endpoint_id
             )?.type
         )
       );
@@ -418,7 +418,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
         label: "Delete Transfers",
         color: ThemePalette.alert,
         action: () => {
-          this.handleShowDeleteReplicas();
+          this.handleShowDeleteTransfers();
         },
       },
     ];
@@ -430,9 +430,9 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
           listComponent={
             <FilterList
               filterItems={this.getFilterItems()}
-              selectionLabel="replica"
-              loading={replicaStore.loading}
-              items={replicaStore.replicas}
+              selectionLabel="transfer"
+              loading={transferStore.loading}
+              items={transferStore.transfers}
               dropdownActions={BulkActions}
               onItemClick={item => {
                 this.handleItemClick(item);
@@ -441,19 +441,19 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
                 this.handleReloadButtonClick();
               }}
               itemFilterFunction={(...args) => this.itemFilterFunction(...args)}
-              onSelectedItemsChange={selectedReplicas => {
-                this.setState({ selectedReplicas });
+              onSelectedItemsChange={selectedTransfers => {
+                this.setState({ selectedTransfers: selectedTransfers });
               }}
-              onPaginatedItemsChange={paginatedReplicas => {
-                this.handlePaginatedItemsChange(paginatedReplicas);
+              onPaginatedItemsChange={paginatedTransfers => {
+                this.handlePaginatedItemsChange(paginatedTransfers);
               }}
               renderItemComponent={options => (
                 <TransferListItem
                   {...options}
                   getListItemImage={item => {
-                    return this.getReplicaItemImage(item);
+                    return this.getTransferItemImage(item);
                   }}
-                  showScheduleIcon={this.isReplicaScheduled(options.item.id)}
+                  showScheduleIcon={this.isTransferScheduled(options.item.id)}
                   endpointType={id => {
                     const endpoint = this.getEndpoint(id);
                     if (endpoint) {
@@ -494,19 +494,19 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
             />
           }
         />
-        {this.state.showDeleteReplicasModal ? (
-          <DeleteReplicaModal
-            isMultiReplicaSelection
-            hasDisks={replicaStore.replicasWithDisks.length > 0}
-            loading={replicaStore.replicasWithDisksLoading}
+        {this.state.showDeleteTransfersModal ? (
+          <DeleteTransferModal
+            isMultiTransferSelection
+            hasDisks={transferStore.transfersWithDisks.length > 0}
+            loading={transferStore.transfersWithDisksLoading}
             onRequestClose={() => {
-              this.setState({ showDeleteReplicasModal: false });
+              this.setState({ showDeleteTransfersModal: false });
             }}
-            onDeleteReplica={() => {
-              this.deleteSelectedReplicas();
+            onDeleteTransfer={() => {
+              this.deleteSelectedTransfers();
             }}
             onDeleteDisks={() => {
-              this.deleteReplicasDisks(replicaStore.replicasWithDisks);
+              this.deleteTransfersDisks(transferStore.transfersWithDisks);
             }}
           />
         ) : null}
@@ -532,16 +532,16 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
               this.setState({ showExecutionOptionsModal: false });
             }}
           >
-            <ReplicaExecutionOptions
+            <TransferExecutionOptions
               disableExecutionOptions={
-                replicasWithDisabledExecutionOptions.length ===
-                this.state.selectedReplicas.length
+                transfersWithDisabledExecutionOptions.length ===
+                this.state.selectedTransfers.length
               }
               onCancelClick={() => {
                 this.setState({ showExecutionOptionsModal: false });
               }}
               onExecuteClick={fields => {
-                this.executeSelectedReplicas(fields);
+                this.executeSelectedTransfers(fields);
               }}
             />
           </Modal>
@@ -557,7 +557,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
               });
             }}
           >
-            <ReplicaDeploymentOptions
+            <DeploymentOptions
               transferItem={null}
               minionPools={[]}
               instances={instanceStore.instancesDetails}
@@ -569,7 +569,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
                 });
               }}
               onDeployClick={options => {
-                this.deploySelectedReplicas(
+                this.deploySelectedTransfers(
                   options.fields,
                   options.uploadedUserScripts
                 );
@@ -584,7 +584,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
             message="Are you sure you want to delete the selected transfers' disks?"
             extraMessage="Deleting Coriolis Transfer Disks is permanent!"
             onConfirmation={() => {
-              this.deleteReplicasDisks(this.state.selectedReplicas);
+              this.deleteTransfersDisks(this.state.selectedTransfers);
             }}
             onRequestClose={() => {
               this.setState({ showDeleteDisksModal: false });
@@ -596,4 +596,4 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
   }
 }
 
-export default ReplicasPage;
+export default TransfersPage;

+ 0 - 0
src/components/smart/ReplicasPage/images/live-migration.svg → src/components/smart/TransfersPage/images/live-migration.svg


+ 0 - 0
src/components/smart/ReplicasPage/images/replica-large.svg → src/components/smart/TransfersPage/images/replica-large.svg


+ 0 - 0
src/components/smart/ReplicasPage/images/replica.svg → src/components/smart/TransfersPage/images/replica.svg


+ 6 - 0
src/components/smart/TransfersPage/package.json

@@ -0,0 +1,6 @@
+{
+  "name": "TransfersPage",
+  "version": "0.0.0",
+  "private": true,
+  "main": "./TransfersPage.tsx"
+}

+ 11 - 11
src/components/smart/WizardPage/WizardPage.tsx

@@ -17,7 +17,7 @@ import { observer } from "mobx-react";
 import React from "react";
 import styled from "styled-components";
 
-import { ReplicaItem, TransferItem } from "@src/@types/MainItem";
+import { TransferItem, ActionItem } from "@src/@types/MainItem";
 import { ProviderTypes } from "@src/@types/Providers";
 import DetailsPageHeader from "@src/components/modules/DetailsModule/DetailsPageHeader";
 import EndpointModal from "@src/components/modules/EndpointModule/EndpointModal";
@@ -34,7 +34,7 @@ import notificationStore from "@src/stores/NotificationStore";
 import providerStore, {
   getFieldChangeOptions,
 } from "@src/stores/ProviderStore";
-import replicaStore from "@src/stores/ReplicaStore";
+import transferStore from "@src/stores/TransferStore";
 import scheduleStore from "@src/stores/ScheduleStore";
 import userStore from "@src/stores/UserStore";
 import wizardStore from "@src/stores/WizardStore";
@@ -188,7 +188,7 @@ class WizardPage extends React.Component<Props, State> {
     this.handleBackClick();
   }
 
-  async handleCreationSuccess(items: TransferItem[]) {
+  async handleCreationSuccess(items: ActionItem[]) {
     const typeLabel =
       this.state.type.charAt(0).toUpperCase() + this.state.type.substr(1);
     notificationStore.alert(
@@ -197,12 +197,12 @@ class WizardPage extends React.Component<Props, State> {
     );
     let schedulePromise = Promise.resolve();
 
-    items.forEach(replica => {
-      if (replica.type !== "replica") {
+    items.forEach(transfer => {
+      if (transfer.type !== "transfer") {
         return;
       }
-      this.executeCreatedReplica(replica);
-      schedulePromise = this.scheduleReplica(replica);
+      this.executeCreatedTransfer(transfer);
+      schedulePromise = this.scheduleTransfer(transfer);
     });
 
     if (items.length === 1) {
@@ -766,15 +766,15 @@ class WizardPage extends React.Component<Props, State> {
     );
   }
 
-  scheduleReplica(replica: ReplicaItem): Promise<void> {
+  scheduleTransfer(transfer: TransferItem): Promise<void> {
     if (wizardStore.schedules.length === 0) {
       return Promise.resolve();
     }
 
-    return scheduleStore.scheduleMultiple(replica.id, wizardStore.schedules);
+    return scheduleStore.scheduleMultiple(transfer.id, wizardStore.schedules);
   }
 
-  executeCreatedReplica(replica: ReplicaItem) {
+  executeCreatedTransfer(transfer: TransferItem) {
     const options = wizardStore.data.destOptions;
     let executeNow = true;
     if (options && options.execute_now != null) {
@@ -792,7 +792,7 @@ class WizardPage extends React.Component<Props, State> {
       return field;
     });
 
-    replicaStore.execute(replica.id, executeNowOptions);
+    transferStore.execute(transfer.id, executeNowOptions);
   }
 
   handleCancelUploadedScript(

+ 0 - 12
src/components/ui/Dropdowns/NewItemDropdown/NewItemDropdown.tsx

@@ -174,18 +174,6 @@ class NewItemDropdown extends React.Component<Props, State> {
       ? configLoader.config.disabledPages
       : [];
     const items: ItemType[] = [
-      // {
-      //   title: "Migration",
-      //   href: "/wizard/migration",
-      //   description: "Migrate VMs between two clouds",
-      //   iconName: "migration",
-      // },
-      // {
-      //   title: "Deployment",
-      //   href: "/wizard/deployment",
-      //   description: "Deploy an already synced Replica or Live Migration",
-      //   iconName: "replica",
-      // },
       {
         title: "Transfer",
         href: "/wizard/replica",

+ 7 - 7
src/components/ui/Dropdowns/NotificationDropdown/NotificationDropdown.tsx

@@ -144,7 +144,7 @@ export const MainItemInfo = styled.div<any>`
     margin-right: 8px;
   }
 `;
-export const ItemReplicaBadge = styled.div<any>`
+export const ItemTransferBadge = styled.div<any>`
   background: "white";
   color: #7f8795;
   font-size: 9px;
@@ -275,15 +275,15 @@ class NotificationDropdown extends React.Component<Props, State> {
       <List>
         {this.props.items.map(item => {
           const typeUrl =
-            item.type === "migration"
+            item.type === "deployment"
               ? "deployments"
               : "transfers";
 
           const executionsPath =
             item.status === "RUNNING"
-              ? item.type === "replica"
+              ? item.type === "transfer"
                 ? "/executions"
-                : item.type === "migration"
+                : item.type === "deployment"
                 ? "/tasks"
                 : ""
               : "";
@@ -305,9 +305,9 @@ class NotificationDropdown extends React.Component<Props, State> {
               <InfoColumn>
                 <MainItemInfo>
                   <StatusIcon status={item.status} hollow />
-                  <ItemReplicaBadge type={item.type}>
-                    {item.type === "replica" ? "TR" : "DE"}
-                  </ItemReplicaBadge>
+                  <ItemTransferBadge type={item.type}>
+                    {item.type === "transfer" ? "TR" : "DE"}
+                  </ItemTransferBadge>
                   <ItemTitle>{item.name}</ItemTitle>
                 </MainItemInfo>
                 <ItemDescription>{item.description}</ItemDescription>

+ 2 - 24
src/constants.ts

@@ -24,7 +24,6 @@ export type NavigationMenuType = {
 export const navigationMenu: NavigationMenuType[] = [
   { label: "Dashboard", value: "dashboard" },
   { label: "Transfers", value: "transfers" },
-  // { label: "Migrations", value: "migrations" },
   { label: "Deployments", value: "deployments" },
   { label: "Cloud Endpoints", value: "endpoints" },
   { label: "Minion Pools", value: "minion-pools" },
@@ -41,8 +40,8 @@ export const navigationMenu: NavigationMenuType[] = [
 
 // https://github.com/cloudbase/coriolis/blob/master/coriolis/constants.py
 export const providerTypes = {
-  TARGET_REPLICA: 4,
-  SOURCE_REPLICA: 8,
+  TARGET_TRANSFER: 4,
+  SOURCE_TRANSFER: 8,
   CONNECTION: 16,
   DESTINATION_OPTIONS: 512,
   SOURCE_OPTIONS: 131072,
@@ -70,26 +69,6 @@ export const executionOptions = [
   },
 ];
 
-export const migrationFields: Field[] = [
-  {
-    name: "shutdown_instances",
-    type: "boolean",
-    default: false,
-    nullableBoolean: false,
-    description:
-      "Whether or not Coriolis should power off the source VM before performing the final incremental sync. This guarantees consistency of the exported VM's filesystems, but implies downtime for the source VM during the final sync.",
-  },
-  {
-    name: "replication_count",
-    type: "integer",
-    minimum: 1,
-    maximum: 10,
-    default: 2,
-    description:
-      'The number of times to incrementally sync the disks of the source VM. This can be paired with "Shutdown Instances" to allow for the live syncing of the source VM, and shutting it off before the final incremental sync.',
-  },
-];
-
 export const wizardPages: WizardPage[] = [
   { id: "type", title: "New", breadcrumb: "Type" },
   {
@@ -120,7 +99,6 @@ export const wizardPages: WizardPage[] = [
     id: "schedule",
     title: "Schedule",
     breadcrumb: "Schedule",
-    // excludeFrom: "migration",
   },
   { id: "summary", title: "Summary", breadcrumb: "Summary" },
 ];

+ 1 - 2
src/plugins/default/OptionsSchemaPlugin.ts

@@ -19,7 +19,7 @@ import type { OptionValues, StorageMap } from "@src/@types/Endpoint";
 import type { SchemaProperties, SchemaDefinitions } from "@src/@types/Schema";
 import type { NetworkMap } from "@src/@types/Network";
 import type { InstanceScript } from "@src/@types/Instance";
-import { executionOptions, migrationFields } from "@src/constants";
+import { executionOptions } from "@src/constants";
 import { UserScriptData } from "@src/@types/MainItem";
 import { defaultSchemaToFields } from "./ConnectionSchemaPlugin";
 
@@ -135,7 +135,6 @@ export const defaultGetDestinationEnv = (
     "title",
     "minion_pool_id",
   ]
-    .concat(migrationFields.map(f => f.name))
     .concat(executionOptions.map(o => o.name))
     .concat(migrationImageOsTypes);
 

+ 1 - 1
src/plugins/openstack/ContentPlugin.tsx

@@ -306,7 +306,7 @@ class ContentPlugin extends React.Component<Props, State> {
         label: "Use Ceph for Replication",
         type: "boolean",
         description:
-          "If performing Ceph-based Replicas from a source OpenStack, the Ceph configuration file and credentials for a user with read-only access to the Ceph pool used by Cinder backups/snapshots must be provided. Coriolis must be able to connect to the source OpenStack's Ceph RADOS cluster by being able to reach at least one Ceph- monitor host.For the easiest setup possible, simply using the same credentials used by the Cinder service(s) will work.",
+          "If performing Ceph-based replications from a source OpenStack, the Ceph configuration file and credentials for a user with read-only access to the Ceph pool used by Cinder backups/snapshots must be provided. Coriolis must be able to connect to the source OpenStack's Ceph RADOS cluster by being able to reach at least one Ceph- monitor host.For the easiest setup possible, simply using the same credentials used by the Cinder service(s) will work.",
       };
       fields.push(showCepthOptionsField);
     }

+ 11 - 11
src/sources/DeploymentSource.ts

@@ -25,7 +25,7 @@ import DefaultOptionsSchemaPlugin from "@src/plugins/default/OptionsSchemaPlugin
 import Api from "@src/utils/ApiCaller";
 import configLoader from "@src/utils/Config";
 
-import { sortTasks } from "./ReplicaSource";
+import { sortTasks } from "./TransferSource";
 
 import type { InstanceScript } from "@src/@types/Instance";
 import type { Field } from "@src/@types/Field";
@@ -128,7 +128,7 @@ class DeploymentSource {
     payload.deployment.shutdown_instances = Boolean(
       deployment.shutdown_instances
     );
-    payload.deployment.replication_count = deployment.replication_count || 2;
+    // payload.deployment.replication_count = deployment.replication_count || 2;
 
     const response = await Api.send({
       url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/deployments`,
@@ -153,7 +153,7 @@ class DeploymentSource {
     networkMappings?: any;
     updatedNetworkMappings: NetworkMap[] | null;
     defaultSkipOsMorphing: boolean | null;
-    replicationCount?: number | null;
+    // replicationCount?: number | null;
     deployment: DeploymentItemDetails;
     uploadedScripts: InstanceScript[];
     removedScripts: InstanceScript[];
@@ -176,10 +176,10 @@ class DeploymentSource {
       shutdown_instances: Boolean(
         opts.updatedDestEnv && opts.updatedDestEnv.shutdown_instances
       ),
-      replication_count:
-        (opts.updatedDestEnv && opts.updatedDestEnv.replication_count) ||
-        opts.replicationCount ||
-        2,
+      // replication_count:
+      //   (opts.updatedDestEnv && opts.updatedDestEnv.replication_count) ||
+      //   opts.replicationCount ||
+      //   2,
       instances: opts.instanceNames,
       notes: opts.updatedDestEnv?.title || opts.deployment.notes || "",
     };
@@ -307,8 +307,8 @@ class DeploymentSource {
     return deploymentId;
   }
 
-  async deployReplica(opts: {
-    replicaId: string;
+  async deployTransfer(opts: {
+    transferId: string;
     options: Field[];
     uploadedUserScripts: InstanceScript[];
     removedUserScripts: InstanceScript[];
@@ -316,7 +316,7 @@ class DeploymentSource {
     minionPoolMappings: { [instance: string]: string };
   }): Promise<DeploymentItem> {
     const {
-      replicaId,
+      transferId: transferId,
       options,
       uploadedUserScripts,
       removedUserScripts,
@@ -325,7 +325,7 @@ class DeploymentSource {
     } = opts;
     const payload: any = {
       deployment: {
-        replica_id: replicaId,
+        transfer_id: transferId,
       },
     };
     options.forEach(o => {

+ 1 - 1
src/sources/MigrationSource.ts

@@ -25,7 +25,7 @@ import DefaultOptionsSchemaPlugin from "@src/plugins/default/OptionsSchemaPlugin
 import Api from "@src/utils/ApiCaller";
 import configLoader from "@src/utils/Config";
 
-import { sortTasks } from "./ReplicaSource";
+import { sortTasks } from "./TransferSource";
 
 import type { InstanceScript } from "@src/@types/Instance";
 import type { Field } from "@src/@types/Field";

+ 7 - 7
src/sources/NotificationSource.ts

@@ -19,8 +19,8 @@ import type {
   NotificationItem,
 } from "@src/@types/NotificationItem";
 import {
+  ActionItem,
   TransferItem,
-  ReplicaItem,
   getTransferItemTitle,
   DeploymentItem,
 } from "@src/@types/MainItem";
@@ -78,8 +78,8 @@ class NotificationStorage {
 }
 
 class DataUtils {
-  static getItemDescription(item: TransferItem) {
-    let item_type = item.type === "replica"
+  static getItemDescription(item: ActionItem) {
+    let item_type = item.type === "transfer"
       ? "transfer"
       : "deployment";
     return `New ${item_type} ${item.id.substr(
@@ -93,22 +93,22 @@ class DataUtils {
 
 class NotificationSource {
   async loadData(): Promise<NotificationItemData[]> {
-    const [deploymentsResponse, replicasResponse] = await Promise.all([
+    const [deploymentsResponse, transfersResponse] = await Promise.all([
       Api.send({
         url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/deployments`,
         skipLog: true,
         quietError: true,
       }),
       Api.send({
-        url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas`,
+        url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers`,
         skipLog: true,
         quietError: true,
       }),
     ]);
 
     const deployments: DeploymentItem[] = deploymentsResponse.data.deployments;
-    const replicas: ReplicaItem[] = replicasResponse.data.replicas;
-    const apiData = [...deployments, ...replicas];
+    const transfers: TransferItem[] = transfersResponse.data.transfers;
+    const apiData = [...deployments, ...transfers];
     apiData.sort(
       (a, b) =>
         new Date(b.updated_at || b.created_at).getTime() -

+ 2 - 2
src/sources/ProviderSource.ts

@@ -54,8 +54,8 @@ class ProviderSource {
     } = opts;
     const schemaTypeInt =
       optionsType === "source"
-        ? providerTypes.SOURCE_REPLICA
-        : providerTypes.TARGET_REPLICA;
+        ? providerTypes.SOURCE_TRANSFER
+        : providerTypes.TARGET_TRANSFER;
 
     try {
       const response = await Api.send({

+ 13 - 13
src/sources/ScheduleSource.ts

@@ -19,7 +19,7 @@ import DateUtils from "@src/utils/DateUtils";
 import type { Schedule } from "@src/@types/Schedule";
 class ScheduleSource {
   async scheduleSinge(
-    replicaId: string,
+    transferId: string,
     scheduleData: Schedule
   ): Promise<Schedule> {
     const payload: any = {
@@ -51,7 +51,7 @@ class ScheduleSource {
     }
 
     const response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}/schedules`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}/schedules`,
       method: "POST",
       data: payload,
     });
@@ -59,13 +59,13 @@ class ScheduleSource {
   }
 
   async scheduleMultiple(
-    replicaId: string,
+    transferId: string,
     schedules: Schedule[]
   ): Promise<Schedule[]> {
     const scheduledSchedules: Schedule[] = await Promise.all(
       schedules.map(async schedule => {
         const scheduledSchedule: Schedule = await this.scheduleSinge(
-          replicaId,
+          transferId,
           schedule
         );
         return scheduledSchedule;
@@ -75,11 +75,11 @@ class ScheduleSource {
   }
 
   async getSchedules(
-    replicaId: string,
+    transferId: string,
     opts?: { skipLog?: boolean }
   ): Promise<Schedule[]> {
     const response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}/schedules`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}/schedules`,
       skipLog: opts && opts.skipLog,
     });
 
@@ -98,7 +98,7 @@ class ScheduleSource {
     return schedules;
   }
 
-  async addSchedule(replicaId: string, schedule: Schedule): Promise<Schedule> {
+  async addSchedule(transferId: string, schedule: Schedule): Promise<Schedule> {
     const payload: any = {
       schedule: { hour: 0, minute: 0 },
       enabled: false,
@@ -108,29 +108,29 @@ class ScheduleSource {
     }
 
     const response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}/schedules`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}/schedules`,
       method: "POST",
       data: payload,
     });
     return response.data.schedule;
   }
 
-  async removeSchedule(replicaId: string, scheduleId: string): Promise<void> {
+  async removeSchedule(transferId: string, scheduleId: string): Promise<void> {
     await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}/schedules/${scheduleId}`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}/schedules/${scheduleId}`,
       method: "DELETE",
     });
   }
 
   async updateSchedule(opts: {
-    replicaId: string;
+    transferId: string;
     scheduleId: string;
     scheduleData: Schedule;
     scheduleOldData: Schedule | null | undefined;
     unsavedData: Schedule | null | undefined;
   }): Promise<Schedule> {
     const {
-      replicaId,
+      transferId: transferId,
       scheduleId,
       scheduleData,
       scheduleOldData,
@@ -167,7 +167,7 @@ class ScheduleSource {
     }
 
     const response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}/schedules/${scheduleId}`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}/schedules/${scheduleId}`,
       method: "PUT",
       data: payload,
     });

+ 62 - 62
src/sources/ReplicaSource.ts → src/sources/TransferSource.ts

@@ -19,8 +19,8 @@ import DefaultOptionsSchemaPlugin from "@src/plugins/default/OptionsSchemaPlugin
 import configLoader from "@src/utils/Config";
 import type {
   UpdateData,
-  ReplicaItem,
-  ReplicaItemDetails,
+  TransferItem,
+  TransferItemDetails,
 } from "@src/@types/MainItem";
 import type { Execution, ExecutionTasks } from "@src/@types/Execution";
 import type { Endpoint } from "@src/@types/Endpoint";
@@ -74,7 +74,7 @@ export const sortTasks = (
   tasks.splice(0, tasks.length, ...sortedTasks);
 };
 
-export class ReplicaSourceUtils {
+export class TransferSourceUtils {
   static filterDeletedExecutions(executions?: Execution[]) {
     if (!executions || !executions.length) {
       return [];
@@ -83,8 +83,8 @@ export class ReplicaSourceUtils {
     return executions.filter(execution => execution.deleted_at == null);
   }
 
-  static sortReplicas(replicas: ReplicaItem[]) {
-    replicas.sort(
+  static sortTransfers(transfers: TransferItem[]) {
+    transfers.sort(
       (a, b) =>
         new Date(b.updated_at || b.created_at).getTime() -
         new Date(a.updated_at || a.created_at).getTime()
@@ -103,58 +103,58 @@ export class ReplicaSourceUtils {
   }
 }
 
-class ReplicaSource {
-  async getReplicas(
+class TransferSource {
+  async getTransfers(
     skipLog?: boolean,
     quietError?: boolean
-  ): Promise<ReplicaItem[]> {
+  ): Promise<TransferItem[]> {
     const response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers`,
       skipLog,
       quietError,
     });
-    const replicas: ReplicaItem[] = response.data.replicas;
-    ReplicaSourceUtils.sortReplicas(replicas);
-    return replicas;
+    const transfers: TransferItem[] = response.data.transfers;
+    TransferSourceUtils.sortTransfers(transfers);
+    return transfers;
   }
 
-  async getReplicaDetails(options: {
-    replicaId: string;
+  async getTransferDetails(options: {
+    transferId: string;
     polling?: boolean;
-  }): Promise<ReplicaItemDetails> {
-    const { replicaId, polling } = options;
+  }): Promise<TransferItemDetails> {
+    const { transferId: transferId, polling } = options;
 
     const response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}`,
       skipLog: polling,
-      cancelId: replicaId,
+      cancelId: transferId,
     });
-    const replica: ReplicaItemDetails = response.data.replica;
-    replica.executions = ReplicaSourceUtils.filterDeletedExecutions(
-      replica.executions
+    const transfer: TransferItemDetails = response.data.transfer;
+    transfer.executions = TransferSourceUtils.filterDeletedExecutions(
+      transfer.executions
     );
-    ReplicaSourceUtils.sortExecutions(replica.executions);
-    return replica;
+    TransferSourceUtils.sortExecutions(transfer.executions);
+    return transfer;
   }
 
   async getExecutionTasks(options: {
-    replicaId: string;
+    transferId: string;
     executionId?: string;
     polling?: boolean;
   }): Promise<ExecutionTasks> {
-    const { replicaId, executionId, polling } = options;
+    const { transferId: transferId, executionId, polling } = options;
 
     const response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}/executions/${executionId}`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}/executions/${executionId}`,
       skipLog: polling,
       quietError: true,
     });
     const execution: ExecutionTasks = response.data.execution;
-    sortTasks(execution.tasks, ReplicaSourceUtils.sortTaskUpdates);
+    sortTasks(execution.tasks, TransferSourceUtils.sortTaskUpdates);
     return execution;
   }
 
-  async execute(replicaId: string, fields?: Field[]): Promise<ExecutionTasks> {
+  async execute(transferId: string, fields?: Field[]): Promise<ExecutionTasks> {
     const payload: any = { execution: { shutdown_instances: false } };
     if (fields) {
       fields.forEach(f => {
@@ -162,17 +162,17 @@ class ReplicaSource {
       });
     }
     const response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}/executions`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}/executions`,
       method: "POST",
       data: payload,
     });
     const execution: ExecutionTasks = response.data.execution;
-    sortTasks(execution.tasks, ReplicaSourceUtils.sortTaskUpdates);
+    sortTasks(execution.tasks, TransferSourceUtils.sortTaskUpdates);
     return execution;
   }
 
   async cancelExecution(options: {
-    replicaId: string;
+    transferId: string;
     executionId?: string;
     force?: boolean;
   }): Promise<string> {
@@ -184,47 +184,47 @@ class ReplicaSource {
     let lastExecutionId = options.executionId;
 
     if (!lastExecutionId) {
-      const replicaDetails = await this.getReplicaDetails({
-        replicaId: options.replicaId,
+      const transferDetails = await this.getTransferDetails({
+        transferId: options.transferId,
       });
       const lastExecution =
-        replicaDetails.executions[replicaDetails.executions.length - 1];
+        transferDetails.executions[transferDetails.executions.length - 1];
       if (lastExecution.status !== "RUNNING") {
-        return options.replicaId;
+        return options.transferId;
       }
       lastExecutionId = lastExecution.id;
     }
 
     await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${options.replicaId}/executions/${lastExecutionId}/actions`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${options.transferId}/executions/${lastExecutionId}/actions`,
       method: "POST",
       data,
     });
-    return options.replicaId;
+    return options.transferId;
   }
 
   async deleteExecution(
-    replicaId: string,
+    transferId: string,
     executionId: string
   ): Promise<string> {
     await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}/executions/${executionId}`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}/executions/${executionId}`,
       method: "DELETE",
     });
-    return replicaId;
+    return transferId;
   }
 
-  async delete(replicaId: string): Promise<string> {
+  async delete(transferId: string): Promise<string> {
     await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}`,
       method: "DELETE",
     });
-    return replicaId;
+    return transferId;
   }
 
-  async deleteDisks(replicaId: string): Promise<Execution> {
+  async deleteDisks(transferId: string): Promise<Execution> {
     const response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replicaId}/actions`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transferId}/actions`,
       method: "POST",
       data: { "delete-disks": null },
     });
@@ -232,7 +232,7 @@ class ReplicaSource {
   }
 
   async update(options: {
-    replica: ReplicaItemDetails;
+    transfer: TransferItemDetails;
     sourceEndpoint: Endpoint;
     destinationEndpoint: Endpoint;
     updateData: UpdateData;
@@ -240,7 +240,7 @@ class ReplicaSource {
     storageConfigDefault: string;
   }): Promise<Execution> {
     const {
-      replica,
+      transfer: transfer,
       destinationEndpoint,
       updateData,
       defaultStorage,
@@ -250,56 +250,56 @@ class ReplicaSource {
 
     const sourceParser = OptionsSchemaPlugin.for(sourceEndpoint.type);
     const destinationParser = OptionsSchemaPlugin.for(destinationEndpoint.type);
-    const payload: any = { replica: {} };
+    const payload: any = { transfer: {} };
 
     if (updateData.destination.title) {
-      payload.replica.notes = updateData.destination.title;
+      payload.transfer.notes = updateData.destination.title;
     }
 
     if (updateData.network.length > 0) {
-      payload.replica.network_map = destinationParser.getNetworkMap(
+      payload.transfer.network_map = destinationParser.getNetworkMap(
         updateData.network
       );
     }
     if (Object.keys(updateData.source).length > 0) {
       const sourceEnv = sourceParser.getDestinationEnv(
         updateData.source,
-        replica.source_environment
+        transfer.source_environment
       );
       if (updateData.source.minion_pool_id !== undefined) {
-        payload.replica.origin_minion_pool_id =
+        payload.transfer.origin_minion_pool_id =
           updateData.source.minion_pool_id;
       }
       if (Object.keys(sourceEnv).length) {
-        payload.replica.source_environment = sourceEnv;
+        payload.transfer.source_environment = sourceEnv;
       }
     }
 
     if (Object.keys(updateData.destination).length > 0) {
       const destEnv = destinationParser.getDestinationEnv(
         updateData.destination,
-        { ...replica, ...replica.destination_environment }
+        { ...transfer, ...transfer.destination_environment }
       );
 
       const newMinionMappings =
         destEnv[INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS];
       if (newMinionMappings) {
-        payload.replica[INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS] =
+        payload.transfer[INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS] =
           newMinionMappings;
       }
       delete destEnv[INSTANCE_OSMORPHING_MINION_POOL_MAPPINGS];
 
       if (updateData.destination.minion_pool_id !== undefined) {
-        payload.replica.destination_minion_pool_id =
+        payload.transfer.destination_minion_pool_id =
           updateData.destination.minion_pool_id;
       }
       if (Object.keys(destEnv).length) {
-        payload.replica.destination_environment = destEnv;
+        payload.transfer.destination_environment = destEnv;
       }
     }
 
     if (defaultStorage || updateData.storage.length > 0) {
-      payload.replica.storage_mappings = destinationParser.getStorageMap(
+      payload.transfer.storage_mappings = destinationParser.getStorageMap(
         defaultStorage,
         updateData.storage,
         storageConfigDefault
@@ -310,16 +310,16 @@ class ReplicaSource {
       updateData.uploadedScripts?.length ||
       updateData.removedScripts?.length
     ) {
-      payload.replica.user_scripts =
+      payload.transfer.user_scripts =
         new DefaultOptionsSchemaPlugin().getUserScripts(
           updateData.uploadedScripts || [],
           updateData.removedScripts || [],
-          replica.user_scripts
+          transfer.user_scripts
         );
     }
 
     const response = await Api.send({
-      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/replicas/${replica.id}`,
+      url: `${configLoader.config.servicesUrls.coriolis}/${Api.projectId}/transfers/${transfer.id}`,
       method: "PUT",
       data: payload,
     });
@@ -327,4 +327,4 @@ class ReplicaSource {
   }
 }
 
-export default new ReplicaSource();
+export default new TransferSource();

Some files were not shown because too many files changed in this diff