Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrations as replicas refactor #814

Merged
merged 41 commits into from
Dec 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
c5f368c
Add naive copy of Migration components as Deployments.
aznashwan Apr 11, 2024
2e64d2c
Hook 'Deployments' tab into sidebar.
aznashwan Apr 11, 2024
026b635
Update Replicas list page for Deployments.
aznashwan Apr 12, 2024
e898735
Update Replicas details page for Deployments.
aznashwan Apr 12, 2024
1ba8b1c
Update Replicas details page for Replica scenarios.
aznashwan Apr 12, 2024
350b8c2
Add appropriate scenario icon to Replicas/Deployments List pages.
aznashwan Apr 12, 2024
48d1fc8
Make Replica/Deployment Details content header pill scenario-appropri…
aznashwan Apr 12, 2024
bab869d
Make DeploymentDetails content header pill text scenario-appropriate.
aznashwan Apr 12, 2024
d5a6d43
Make DeploymentDetails header icon replica-scenario-appropriate.
aznashwan Apr 12, 2024
24710e5
testing
aznashwan Apr 12, 2024
0354753
Fix DeploymentDetails page.
aznashwan Apr 18, 2024
0bb010e
Debug RHEV Migration Recreation options issues.
aznashwan Apr 19, 2024
41dddf3
MainMultiFilterList skeleton.
aznashwan May 29, 2024
b59d3f5
Update licensing panel nomenclature.
aznashwan May 30, 2024
593f690
Completely disable migrations view/routes.
aznashwan May 30, 2024
ed58c04
Patch API source for scenario field passed form Wizard.
aznashwan May 30, 2024
2c3daf2
Make wizard display Execute Now options for Live Migrations too.
aznashwan May 30, 2024
518367a
Update Dashboard widgets with Deployments.
aznashwan Jun 3, 2024
95d70e5
Update Enpoint Details transfer list.
aznashwan Jun 4, 2024
2c3481d
Update Minion Pool Details page transfer list.
aznashwan Jun 4, 2024
e29f0bb
Fix dashboard transfer creation button text.
aznashwan Jun 4, 2024
1bbeda1
Update Dashboard widgets with Deployments.
aznashwan Jun 3, 2024
77668fb
Update Transfer Wizard operation descriptions.
aznashwan Jun 4, 2024
591caa0
Update all '/replicas' paths to '/transfers'.
aznashwan Jun 4, 2024
b199e61
Update nomeclature in Schedules page from Replicas to Transfers.
aznashwan Jun 4, 2024
85b2115
Update notifications dropdown for new nomenclature.
aznashwan Jun 4, 2024
b1b591e
Update EndpointsPage with Live Migration scenario actions
Dany9966 Aug 19, 2024
9243104
Fix Dashboard Recent Activity entries
Dany9966 Aug 20, 2024
899e54e
Fix some Transfer labels
Dany9966 Aug 21, 2024
4b08468
Fix empty Deployments list page
Dany9966 Aug 21, 2024
f9e9928
Update Replica Delete modal
Dany9966 Aug 21, 2024
fdd3356
Fix Transfers sidebar mini icon not being displayed
Dany9966 Oct 9, 2024
ea40652
Fix deployment's transfer link
Dany9966 Oct 16, 2024
91e11fb
Fix diagnostics deployments download URL
Dany9966 Oct 16, 2024
1ed8bcd
Fix minion pool usage href
Dany9966 Oct 16, 2024
cbd19b0
Revert to referring to reserved licences as "Used"
Dany9966 Oct 22, 2024
b9bbf88
Remove `Replica` nomenclature from Transfer Edit window
Dany9966 Oct 22, 2024
f4415c0
Fix execution erorr handling
Dany9966 Oct 24, 2024
3d94d5c
Fully Refactor transfer/deployment nomenclature
Dany9966 Nov 22, 2024
9d680df
Adds descritpion for `shutdown_instances` option and updates some oth…
Dany9966 Dec 4, 2024
310da86
Remove unused modules
Dany9966 Dec 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Replicas details page for Deployments.
Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
  • Loading branch information
aznashwan authored and Dany9966 committed Oct 22, 2024
commit e8987355ead259d737e7733c1f722df567291763
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ describe("ReplicaDetailsContent", () => {
onCancelExecutionClick: jest.fn(),
onDeleteExecutionClick: jest.fn(),
onExecuteClick: jest.fn(),
onCreateMigrationClick: jest.fn(),
onCreateDeploymentClick: jest.fn(),
onDeleteReplicaClick: jest.fn(),
onAddScheduleClick: jest.fn(),
onScheduleChange: jest.fn(),
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ type Props = {
) => void;
onDeleteExecutionClick: (execution: Execution | null) => void;
onExecuteClick: () => void;
onCreateMigrationClick: () => void;
onCreateDeploymentClick: () => void;
onDeleteReplicaClick: () => void;
onAddScheduleClick: (schedule: ScheduleType) => void;
onScheduleChange: (
@@ -158,7 +158,7 @@ class ReplicaDetailsContent extends React.Component<Props, State> {
<Button
primary
disabled={this.isEndpointMissing()}
onClick={this.props.onCreateMigrationClick}
onClick={this.props.onCreateDeploymentClick}
>
Create Migration
</Button>
54 changes: 27 additions & 27 deletions src/components/smart/ReplicaDetailsPage/ReplicaDetailsPage.tsx
Original file line number Diff line number Diff line change
@@ -23,15 +23,15 @@ import DetailsTemplate from "@src/components/modules/TemplateModule/DetailsTempl
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 ReplicaMigrationOptions from "@src/components/modules/TransferModule/ReplicaMigrationOptions";
import ReplicaDeploymentOptions from "@src/components/modules/TransferModule/ReplicaDeploymentOptions";
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 deploymentStore from "@src/stores/DeploymentStore";
import minionPoolStore from "@src/stores/MinionPoolStore";
import networkStore from "@src/stores/NetworkStore";
import providerStore from "@src/stores/ProviderStore";
@@ -57,7 +57,7 @@ type Props = {
};
type State = {
showOptionsModal: boolean;
showMigrationModal: boolean;
showDeploymentModal: boolean;
showEditModal: boolean;
showDeleteExecutionConfirmation: boolean;
showForceCancelConfirmation: boolean;
@@ -69,13 +69,13 @@ type State = {
isEditableLoading: boolean;
pausePolling: boolean;
initialLoading: boolean;
migrating: boolean;
deploying: boolean;
};
@observer
class ReplicaDetailsPage extends React.Component<Props, State> {
state: State = {
showOptionsModal: false,
showMigrationModal: false,
showDeploymentModal: false,
showEditModal: false,
showDeleteExecutionConfirmation: false,
showDeleteReplicaConfirmation: false,
@@ -87,7 +87,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
isEditableLoading: true,
pausePolling: false,
initialLoading: true,
migrating: false,
deploying: false,
};

stopPolling: boolean | null = null;
@@ -395,12 +395,12 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
this.setState({ showDeleteReplicaDisksConfirmation: false });
}

handleCloseMigrationModal() {
this.setState({ showMigrationModal: false, pausePolling: false });
handleCloseDeploymentModal() {
this.setState({ showDeploymentModal: false, pausePolling: false });
}

handleCreateMigrationClick() {
this.setState({ showMigrationModal: true, pausePolling: true });
handleCreateDeploymentClick() {
this.setState({ showDeploymentModal: true, pausePolling: true });
}

handleReplicaEditClick() {
@@ -489,7 +489,7 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
showCancelConfirmation: false,
});
}
async migrate(opts: {
async deploy(opts: {
fields: Field[];
uploadedUserScripts: InstanceScript[];
removedUserScripts: InstanceScript[];
@@ -499,25 +499,25 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
if (!replica) {
return;
}
this.setState({ migrating: true });
this.setState({ deploying: true });
const {
fields,
uploadedUserScripts,
removedUserScripts,
minionPoolMappings,
} = opts;
try {
const migration = await migrationStore.migrateReplica({
const deployment = await deploymentStore.deployReplica({
replicaId: replica.id,
fields,
uploadedUserScripts,
removedUserScripts,
userScriptData: replica.user_scripts,
minionPoolMappings,
});
this.props.history.push(`/migrations/${migration.id}/tasks/`);
this.props.history.push(`/deployments/${deployment.id}/tasks/`);
} finally {
this.setState({ migrating: false });
this.setState({ deploying: false });
}
}

@@ -658,10 +658,10 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
},
},
{
label: "Create Migration",
label: "Create Deployment",
color: ThemePalette.primary,
action: () => {
this.handleCreateMigrationClick();
this.handleCreateDeploymentClick();
},
},
{
@@ -769,8 +769,8 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
onExecuteClick={() => {
this.handleExecuteClick();
}}
onCreateMigrationClick={() => {
this.handleCreateMigrationClick();
onCreateDeploymentClick={() => {
this.handleCreateDeploymentClick();
}}
onDeleteReplicaClick={() => {
this.handleDeleteReplicaClick();
@@ -813,15 +813,15 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
}}
/>
</Modal>
{this.state.showMigrationModal ? (
{this.state.showDeploymentModal ? (
<Modal
isOpen
title="Create Migration from Replica"
title="Deploy Replica"
onRequestClose={() => {
this.handleCloseMigrationModal();
this.handleCloseDeploymentModal();
}}
>
<ReplicaMigrationOptions
<ReplicaDeploymentOptions
transferItem={this.replica}
minionPools={minionPoolStore.minionPools.filter(
m =>
@@ -831,11 +831,11 @@ class ReplicaDetailsPage extends React.Component<Props, State> {
loadingInstances={instanceStore.loadingInstancesDetails}
instances={instanceStore.instancesDetails}
onCancelClick={() => {
this.handleCloseMigrationModal();
this.handleCloseDeploymentModal();
}}
migrating={this.state.migrating}
onMigrateClick={opts => {
this.migrate(opts);
deploying={this.state.deploying}
onDeployClick={opts => {
this.deploy(opts);
}}
/>
</Modal>