Skip to content
Merged

Dev #168

Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
a6ec05a
refactor:updated file format to show file format of cms
AishDani Jun 27, 2024
97ac8c7
refactor:legacy cms bugs
AishDani Jun 27, 2024
c43ad23
Merge branch 'dev' of github.com:contentstack/migration-v2-node-serve…
AishDani Jun 27, 2024
44e5b20
added profile card
RohitKini Jul 2, 2024
4d7423d
added profile card
RohitKini Jul 2, 2024
cc89f4a
Merge pull request #163 from contentstack/feature/profile-design
sreeneshkini Jul 2, 2024
f861ca5
Done functionality fixes for existing content type mapping
sayalijoshi27 Jul 2, 2024
2203b2f
Merge pull request #164 from contentstack/feature/CMG-57
v1shalpatel Jul 3, 2024
417515d
Content Type status modified functionality
sayalijoshi27 Jul 3, 2024
ce6b331
Removed code for search fieldsmapping as per content type
sayalijoshi27 Jul 4, 2024
00058d3
refactor:legacy cms bugs
AishDani Jul 4, 2024
9dab0fc
Merge pull request #165 from contentstack/feature/CMG-57
v1shalpatel Jul 4, 2024
a45ee93
Merge branch 'dev' of github.com:contentstack/migration-v2-node-serve…
AishDani Jul 4, 2024
9b64a54
Merge branch 'dev' of github.com:contentstack/migration-v2-node-serve…
AishDani Jul 4, 2024
1867387
refactor:resolved legacy cms bugs
AishDani Jul 4, 2024
9e4653c
refactor:removed search from getAllProject api
AishDani Jul 4, 2024
0765dfc
Merge pull request #166 from contentstack/feature/legacy-cms
v1shalpatel Jul 4, 2024
3bec73b
added destination bugs
snehalsankhe Jul 4, 2024
ec50c84
merged from dev
snehalsankhe Jul 4, 2024
690c223
Merge pull request #167 from contentstack/layout-changes
v1shalpatel Jul 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
refactor:legacy cms bugs
  • Loading branch information
AishDani committed Jun 27, 2024
commit 97ac8c730d42e3034495d102cc1f104591bc759f
53 changes: 48 additions & 5 deletions ui/src/components/LegacyCms/Actions/LoadUploadFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,48 @@ const LoadUploadFile = (props: LoadUploadFileProps) => {
props.handleStepChange(props?.currentStep, true);
}

}
else if(res?.status === 500){
setIsValidated(false);
setValidationMessage('File not found');
setIsValidationAttempted(true);
setProgressPercentage(100);
await updateFileFormatData(selectedOrganisation?.value, projectId, {
file_format: newMigrationData?.legacy_cms?.selectedFileFormat?.fileformat_id?.toString(),
file_path: res?.data?.file_details?.localPath,
is_fileValid: res?.status == 200 ? true : false,
awsDetails:{
awsRegion: res?.data?.file_details?.awsData?.awsRegion,
bucketName: res?.data?.file_details?.awsData?.bucketName,
buketKey: res?.data?.file_details?.awsData?.buketKey
}
});
const newMigrationDataObj: INewMigration = {
...newMigrationData,
legacy_cms: {
...newMigrationData?.legacy_cms,
uploadedFile: {
name: res?.data?.localPath,
url: res?.data?.localPath,
validation: res?.data?.message,
isValidated: res?.status == 200 ? true : false,
file_details: {
isLocalPath: res?.data?.file_details?.isLocalPath,
cmsType: res?.data?.file_details?.cmsType,
localPath: res?.data?.file_details?.localPath,
awsData: {
awsRegion: res?.data?.file_details?.awsData?.awsRegion,
bucketName: res?.data?.file_details?.awsData?.bucketName,
buketKey: res?.data?.file_details?.awsData?.buketKey
}
}

}
}
};

dispatch(updateNewMigrationData(newMigrationDataObj));

}
else{
setIsValidated(false);
Expand Down Expand Up @@ -236,15 +278,16 @@ const LoadUploadFile = (props: LoadUploadFileProps) => {
setShowMessage(true);
setValidationMessage('');
}

console.log(fileExtension !== newMigrationData?.legacy_cms?.selectedFileFormat?.fileformat_id);

}
else if(! isEmptyString(newMigrationData?.legacy_cms?.selectedCms?.parent?.toLowerCase()) &&
newMigrationData?.legacy_cms?.selectedCms?.parent.toLowerCase() !== res?.data?.cmsType.toLowerCase()
if((! isEmptyString(newMigrationData?.legacy_cms?.selectedCms?.parent?.toLowerCase()) &&
newMigrationData?.legacy_cms?.selectedCms?.parent.toLowerCase() !== res?.data?.cmsType.toLowerCase())
|| fileExtension !== newMigrationData?.legacy_cms?.selectedFileFormat?.fileformat_id
)
{
{
setIsValidated(false);
setValidationMessage('Validation Falied');
setValidationMessage('file format is not appropriate');
setIsValidationAttempted(true);
setShowMessage(true);
setIsLoading(false);
Expand Down