Przeglądaj źródła

Update all '/replicas' paths to '/transfers'.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
Nashwan Azhari 1 rok temu
rodzic
commit
167bb3289d

+ 3 - 3
src/components/App.tsx

@@ -211,9 +211,9 @@ class App extends React.Component<Record<string, unknown>, State> {
               <Route path="/login" component={LoginPage} />
             }
             {renderRoute("/dashboard", DashboardPage)}
-            {renderRoute("/replicas", ReplicasPage, true)}
-            {renderRoute("/replicas/:id", ReplicaDetailsPage, true)}
-            {renderRoute("/replicas/:id/:page", ReplicaDetailsPage)}
+            {renderRoute("/transfers", ReplicasPage, true)}
+            {renderRoute("/transfers/:id", ReplicaDetailsPage, true)}
+            {renderRoute("/transfers/:id/:page", ReplicaDetailsPage)}
             {renderRoute("/deployments", DeploymentsPage, true)}
             {renderRoute("/deployments/:id", DeploymentDetailsPage, true)}
             {renderRoute("/deployments/:id/:page", DeploymentDetailsPage)}

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

@@ -116,7 +116,7 @@ class DashboardActivity extends React.Component<Props> {
             return (
               <ListItem
                 key={item.id}
-                to={`/${item.type}s/${item.id}${executionsHref}`}
+                to={`/transfers/${item.id}${executionsHref}`}
                 style={{
                   width: `calc(${this.props.large ? 50 : 100}% - 32px)`,
                   paddingTop: i === 0 || i === 5 ? "16px" : "8px",

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

@@ -190,13 +190,13 @@ class DashboardContent extends React.Component<Props, State> {
         label: "Replicas",
         value: this.getReplicas().length,
         color: ThemePalette.alert,
-        link: "/replicas",
+        link: "/transfers",
         loading: this.props.replicasLoading,
       },
       {
         label: "Migrations",
         value: this.getLiveMigrations().length,
-        link: "/replicas",
+        link: "/transfers",
         loading: this.props.replicasLoading,
       },
       {

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

@@ -230,7 +230,7 @@ class EndpointDetailsContent extends React.Component<Props> {
       <TransferItems>
         {items.map(item => (
           <TransferItemWrapper key={item.id}>
-            <LinkStyled to={`/replicas/${item.id}`}>
+            <LinkStyled to={`/transfers/${item.id}`}>
               {getTransferItemTitle(item)}
             </LinkStyled>
           </TransferItemWrapper>

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

@@ -159,8 +159,8 @@ class DeleteReplicaModal extends React.Component<Props> {
 
   render() {
     const title = this.props.isMultiReplicaSelection
-      ? "Delete Selected Replicas?"
-      : "Delete Replica?";
+      ? "Delete Selected Transfers?"
+      : "Delete Transfer?";
     return (
       <Modal isOpen title={title} onRequestClose={this.props.onRequestClose}>
         {this.props.loading ? this.renderLoading() : this.renderContent()}

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

@@ -428,7 +428,7 @@ class MainDetails extends React.Component<Props, State> {
             <Row>
               <Field>
                 <Label>Created from Replica</Label>
-                <ValueLink to={`/replicas/${this.props.item.replica_id}`}>
+                <ValueLink to={`/transfers/${this.props.item.replica_id}`}>
                   {this.props.item.replica_id}
                 </ValueLink>
               </Field>

+ 1 - 1
src/components/modules/TransferModule/ReplicaDetailsContent/ReplicaDetailsContent.tsx

@@ -256,7 +256,7 @@ class ReplicaDetailsContent extends React.Component<Props, State> {
           items={NavigationItems}
           selectedValue={this.props.page}
           itemId={this.props.itemId}
-          itemType="replica"
+          itemType="transfer"
         />
         <DetailsBody>
           {this.renderMainDetails()}

+ 1 - 1
src/components/modules/TransferModule/TransferItemModal/TransferItemModal.tsx

@@ -718,7 +718,7 @@ class TransferItemModal extends React.Component<Props, State> {
         });
         this.props.onRequestClose();
         this.props.onUpdateComplete(
-          `/replicas/${this.props.replica.id}/executions`
+          `/transfers/${this.props.replica.id}/executions`
         );
       } catch (err) {
         this.setState({ updating: false });

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

@@ -94,7 +94,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
   stopPolling: boolean | null = null;
 
   componentDidMount() {
-    document.title = "Replica Details";
+    document.title = "Transfer Details";
 
     const loadReplica = async () => {
       await endpointStore.getEndpoints({ showLoading: true });
@@ -186,7 +186,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
 
   get replicaId() {
     if (!this.props.match?.params?.id) {
-      throw new Error("Invalid replica id");
+      throw new Error("Invalid transfer id");
     }
     return this.props.match.params.id;
   }
@@ -398,7 +398,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     if (!replica) {
       return;
     }
-    this.props.history.push("/replicas");
+    this.props.history.push("/transfers");
     replicaStore.delete(replica.id);
   }
 
@@ -416,7 +416,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
       return;
     }
     replicaStore.deleteDisks(replica.id);
-    this.props.history.push(`/replicas/${replica.id}/executions`);
+    this.props.history.push(`/transfers/${replica.id}/executions`);
   }
 
   handleCloseDeleteReplicaDisksConfirmation() {
@@ -556,7 +556,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     }
     replicaStore.execute(replica.id, fields);
     this.handleCloseOptionsModal();
-    this.props.history.push(`/replicas/${replica.id}/executions`);
+    this.props.history.push(`/transfers/${replica.id}/executions`);
   }
 
   async pollData() {
@@ -659,7 +659,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
     const editTitle = providerStore.providersLoading
       ? "Loading providers data"
       : !this.state.isEditable
-      ? "One of the platform plugins doesn't support editing replica option."
+      ? "One of the platform plugins doesn't support editing transfer option."
       : null;
     const dropdownActions: DropdownAction[] = [
       {
@@ -735,7 +735,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
               itemType={this.getReplicaItemType()}
               itemDescription={replica?.description}
               dropdownActions={dropdownActions}
-              backLink="/replicas"
+              backLink="/transfers"
               typeImage={this.getReplicaScenarioTypeImage()}
               alertInfoPill={this.getReplicaTypePillShouldRed()}
               primaryInfoPill={!this.getReplicaTypePillShouldRed()}
@@ -845,7 +845,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
         {this.state.showDeploymentModal ? (
           <Modal
             isOpen
-            title="Deploy Replica"
+            title="Deploy Transfer"
             onRequestClose={() => {
               this.handleCloseDeploymentModal();
             }}
@@ -895,9 +895,9 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
         ) : null}
         <AlertModal
           isOpen={this.state.showDeleteReplicaDisksConfirmation}
-          title="Delete Replica Disks?"
-          message="Are you sure you want to delete this replica's disks?"
-          extraMessage="Deleting Coriolis Replica Disks is permanent!"
+          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();
           }}

+ 20 - 20
src/components/smart/ReplicasPage/ReplicasPage.tsx

@@ -83,7 +83,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
   paginatedReplicaIds: string[] = [];
 
   componentDidMount() {
-    document.title = "Coriolis Replicas";
+    document.title = "Coriolis Transfers";
 
     projectStore.getProjects();
     endpointStore.getEndpoints({ showLoading: true });
@@ -141,9 +141,9 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
 
   handleItemClick(item: ReplicaItem) {
     if (item.last_execution_status === "RUNNING") {
-      this.props.history.push(`/replicas/${item.id}/executions`);
+      this.props.history.push(`/transfers/${item.id}/executions`);
     } else {
-      this.props.history.push(`/replicas/${item.id}`);
+      this.props.history.push(`/transfers/${item.id}`);
     }
   }
 
@@ -160,12 +160,12 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
         replicaStore.execute(replica.id, fields);
       }
     });
-    notificationStore.alert("Executing selected replicas");
+    notificationStore.alert("Executing selected transfers");
     this.setState({ showExecutionOptionsModal: false });
   }
 
   deploySelectedReplicas(fields: Field[], uploadedScripts: InstanceScript[]) {
-    notificationStore.alert("Creating deployments from selected replicas");
+    notificationStore.alert("Creating deployments from selected transfers");
     this.deploy(fields, uploadedScripts);
     this.setState({ showCreateDeploymentsModal: false, modalIsOpen: false });
   }
@@ -188,7 +188,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
       )
     );
     notificationStore.alert(
-      "Deployments successfully created from replicas.",
+      "Deployments successfully created from transfers.",
       "success"
     );
     this.props.history.push("/deployments");
@@ -207,7 +207,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
       showDeleteDisksModal: false,
       showDeleteReplicasModal: false,
     });
-    notificationStore.alert("Deleting selected replicas' disks");
+    notificationStore.alert("Deleting selected transfers' disks");
   }
 
   cancelExecutions() {
@@ -402,7 +402,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
         },
       },
       {
-        label: "Deploy Replicas",
+        label: "Deploy Transfers",
         color: ThemePalette.primary,
         action: () => {
           this.handleShowCreateDeploymentsModal();
@@ -415,7 +415,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
         },
       },
       {
-        label: "Delete Replicas",
+        label: "Delete Transfers",
         color: ThemePalette.alert,
         action: () => {
           this.handleShowDeleteReplicas();
@@ -426,7 +426,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
     return (
       <Wrapper>
         <MainTemplate
-          navigationComponent={<Navigation currentPage="replicas" />}
+          navigationComponent={<Navigation currentPage="transfers" />}
           listComponent={
             <FilterList
               filterItems={this.getFilterItems()}
@@ -471,9 +471,9 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
                 />
               )}
               emptyListImage={replicaLargeImage}
-              emptyListMessage="It seems like you don't have any Replicas in this project."
-              emptyListExtraMessage="A Coriolis Replica is obtained by replicating incrementally the virtual machines data from the source cloud endpoint to the target."
-              emptyListButtonLabel="Create a Replica"
+              emptyListMessage="It seems like you don't have any Transfers in this project."
+              emptyListExtraMessage="A Coriolis Transfer is performed by replicating incrementally the virtual machines data from the source cloud endpoint to the target."
+              emptyListButtonLabel="Create a Transfer"
               onEmptyListButtonClick={() => {
                 this.handleEmptyListButtonClick();
               }}
@@ -481,7 +481,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
           }
           headerComponent={
             <PageHeader
-              title="Coriolis Replicas"
+              title="Coriolis Transfers"
               onProjectChange={() => {
                 this.handleProjectChange();
               }}
@@ -514,7 +514,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
           <AlertModal
             isOpen
             title="Cancel Executions?"
-            message="Are you sure you want to cancel the selected replicas executions?"
+            message="Are you sure you want to cancel the selected transfers' executions?"
             extraMessage=" "
             onConfirmation={() => {
               this.cancelExecutions();
@@ -527,7 +527,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
         {this.state.showExecutionOptionsModal ? (
           <Modal
             isOpen
-            title="New Executions for Selected Replicas"
+            title="New Executions for Selected Transfers"
             onRequestClose={() => {
               this.setState({ showExecutionOptionsModal: false });
             }}
@@ -549,7 +549,7 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
         {this.state.showCreateDeploymentsModal ? (
           <Modal
             isOpen
-            title="Deploy Selected Replicas"
+            title="Deploy Selected Transfers"
             onRequestClose={() => {
               this.setState({
                 showCreateDeploymentsModal: false,
@@ -580,9 +580,9 @@ class ReplicasPage extends React.Component<{ history: any }, State> {
         {this.state.showDeleteDisksModal ? (
           <AlertModal
             isOpen
-            title="Delete Selected Replicas Disks?"
-            message="Are you sure you want to delete the selected replicas' disks?"
-            extraMessage="Deleting Coriolis Replica Disks is permanent!"
+            title="Delete Selected Transfers' Disks?"
+            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);
             }}

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

@@ -206,11 +206,11 @@ class WizardPage extends React.Component<Props, State> {
     });
 
     if (items.length === 1) {
-      let location = `/replicas/${items[0].id}/executions`;
+      let location = `/transfers/${items[0].id}/executions`;
       await schedulePromise;
       this.props.history.push(location);
     } else {
-      this.props.history.push(`/replicas`);
+      this.props.history.push(`/transfers`);
     }
   }
 

+ 1 - 1
src/constants.ts

@@ -23,7 +23,7 @@ export type NavigationMenuType = {
 };
 export const navigationMenu: NavigationMenuType[] = [
   { label: "Dashboard", value: "dashboard" },
-  { label: "Replicas", value: "replicas" },
+  { label: "Transfers", value: "transfers" },
   // { label: "Migrations", value: "migrations" },
   { label: "Deployments", value: "deployments" },
   { label: "Cloud Endpoints", value: "endpoints" },