Skip to content

Commit bb5a8f5

Browse files
committed
Removed validation code for already migrated destination stack
1 parent 7f0727e commit bb5a8f5

File tree

3 files changed

+4
-30
lines changed

3 files changed

+4
-30
lines changed

ui/src/components/DestinationStack/Actions/LoadStacks.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,7 @@ const LoadStacks = (props: LoadFileFormatProps) => {
212212
master_locale: stack?.master_locale,
213213
locales: stack?.locales,
214214
created_at: stack?.created_at,
215-
isNewStack: newStackCreated,
216-
isDisabled: newMigrationDataRef?.current?.destination_stack?.migratedStacks?.includes(
217-
stack?.api_key
218-
)
215+
isNewStack: newStackCreated
219216
}))
220217
: [];
221218

ui/src/components/LogScreen/MigrationLogViewer.tsx

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ const MigrationLogViewer = ({ serverPath }: LogsType) => {
5454
const [zoomLevel, setZoomLevel] = useState(1);
5555

5656
const newMigrationData = useSelector((state: RootState) => state?.migration?.newMigrationData);
57-
const selectedOrganisation = useSelector(
58-
(state: RootState) => state?.authentication?.selectedOrganisation
59-
);
57+
6058
const user = useSelector((state: RootState) => state?.authentication?.user);
6159

6260
const dispatch = useDispatch();
@@ -157,11 +155,6 @@ const MigrationLogViewer = ({ serverPath }: LogsType) => {
157155
* Zooms out the logs container.
158156
*/
159157
const handleZoomOut = () => {
160-
// const logsContainer = document.querySelector('.logs-magnify') as HTMLElement;
161-
// if (logsContainer) {
162-
// setZoomLevel(prevZoomLevel => prevZoomLevel - 0.1);
163-
// logsContainer.style.transform = `scale(${zoomLevel})`;
164-
// }
165158
setZoomLevel((prevZoomLevel) => {
166159
const newZoomLevel = Math.max(prevZoomLevel - 0.1, 0.6); // added minimum level for zoom out
167160
return newZoomLevel;
@@ -261,26 +254,11 @@ const MigrationLogViewer = ({ serverPath }: LogsType) => {
261254
>
262255
{logs.map((log, index) => {
263256
try {
264-
//const logObject = JSON.parse(log);
265257
const { level, timestamp, message } = log;
266258

267-
return newMigrationData?.destination_stack?.migratedStacks?.includes(
268-
newMigrationData?.destination_stack?.selectedStack?.value
269-
) ? (
270-
<div
271-
key={`${index?.toString}`}
272-
style={logStyles[level || ''] || logStyles.info}
273-
className="log-entry text-center"
274-
>
275-
<div className="log-message generic-log-message">
276-
Migration has already done in selected stack. Please create a new project.
277-
</div>
278-
</div>
279-
) : (
259+
return (
280260
<div
281261
key={index}
282-
// style={logStyles[level || ''] || logStyles.info}
283-
// className="log-entry logs-bg"
284262
>
285263
{message === 'Migration logs will appear here once the process begins.' ? (
286264
<div

ui/src/components/MigrationFlowHeader/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ const MigrationFlowHeader = ({
130130
isFileValidated :
131131
isStep4AndNotMigrated ||
132132
isStepInvalid ||
133-
isExecutionStarted ||
134-
destinationStackMigrated
133+
isExecutionStarted
135134
}
136135
>
137136
{stepValue}

0 commit comments

Comments
 (0)