Skip to content

Commit 8d83d21

Browse files
committed
refactor:[CMG-420]
1 parent 4087fd7 commit 8d83d21

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

ui/src/components/LogScreen/MigrationLogViewer.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ const MigrationLogViewer = ({ serverPath }: LogsType) => {
135135

136136
const newMigrationDataObj: INewMigration = {
137137
...newMigrationData,
138-
migration_execution: { ...newMigrationData?.migration_execution, migrationStarted: true }
138+
migration_execution: {
139+
...newMigrationData?.migration_execution,
140+
migrationStarted: false,
141+
migrationCompleted:true
142+
}
139143
};
140144

141145
dispatch(updateNewMigrationData((newMigrationDataObj)));
@@ -163,7 +167,7 @@ const MigrationLogViewer = ({ serverPath }: LogsType) => {
163167
return (
164168
<div className='logs-wrapper'>
165169
<div className="logs-container" style={{ height: '400px', overflowY: 'auto' }} ref={logsContainerRef}>
166-
{newMigrationData?.migration_execution?.migrationStarted
170+
{newMigrationData?.migration_execution?.migrationCompleted
167171
? <div className="log-entry text-center">
168172
<div className="log-message">
169173
Migration Execution process is completed. You can view in the selected stack

ui/src/context/app/app.interface.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ export interface ITestMigration {
231231

232232
export interface IMigrationExecutionStep {
233233
migrationStarted: boolean;
234+
migrationCompleted: boolean;
234235
}
235236
export interface IAppContext {
236237
authToken: string;
@@ -349,7 +350,8 @@ export const DEFAULT_TEST_MIGRATION: ITestMigration = {
349350
};
350351

351352
export const DEFAULT_MIGRATION_EXECUTION_STEP: IMigrationExecutionStep = {
352-
migrationStarted: false
353+
migrationStarted: false,
354+
migrationCompleted:false
353355
}
354356

355357
export const DEFAULT_NEW_MIGRATION: INewMigration = {

ui/src/pages/Migration/index.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,16 @@ const Migration = () => {
517517
if (migrationRes?.status === 200) {
518518
setIsLoading(false);
519519
setDisableMigration(true);
520+
const newMigrationDataObj : INewMigration = {
521+
...newMigrationData,
522+
migration_execution:{
523+
...newMigrationData?.migration_execution,
524+
migrationStarted: true,
525+
}
526+
527+
}
528+
dispatch(updateNewMigrationData(newMigrationDataObj));
529+
520530
Notification({
521531
notificationContent: { text: 'Migration Execution process started' },
522532
notificationProps: {

0 commit comments

Comments
 (0)