-
Notifications
You must be signed in to change notification settings - Fork 8
Feature/audit logs #708
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
Merged
Merged
Feature/audit logs #708
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a037973
Add audit logs feature with filtering capabilities
samarp-jain 0d89bbb
Refactor: Add optional chaining to improve null safety in migration a…
samarp-jain fa0b8e3
feat: initialize Docker setup with API, UI, and upload services; add …
umeshmore45 5727ab9
fix: update set_env_var function to ensure cross-platform compatibili…
umeshmore45 fa685ed
fix: adjust bottom positioning in TablePagination and update project …
samarp-jain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| node_modules | ||
| npm-debug.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| node_modules | ||
| npm-debug.log | ||
| migration-data | ||
| logs | ||
| database | ||
| cmsMigrationData | ||
| combine.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| FROM --platform=linux/amd64 node:24.1.0-alpine3.22 | ||
|
|
||
| WORKDIR /usr/src/app | ||
|
|
||
| COPY package*.json ./ | ||
|
|
||
| RUN npm install | ||
|
|
||
| COPY . . | ||
|
|
||
| EXPOSE 5001 | ||
|
|
||
| CMD [ "npm","run", "dev"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| version: "3.8" | ||
| services: | ||
| api: | ||
| container_name: migration-api | ||
| build: | ||
| context: ./api | ||
| ports: | ||
| - "5001:5001" | ||
| restart: always | ||
|
|
||
| upload-api: | ||
| container_name: migration-upload-api | ||
| build: | ||
| context: ./upload-api | ||
| ports: | ||
| - "4002:4002" | ||
| restart: always | ||
| volumes: | ||
| - ${CMS_DATA_PATH}:${CONTAINER_PATH} | ||
|
|
||
| ui: | ||
| container_name: migration-ui | ||
| build: | ||
| context: ./ui | ||
| ports: | ||
| - "3000:3000" | ||
| restart: always |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "Choose the CMS (numbers):" | ||
| select CMS_TYPE in "sitecore" "contentful" "wordpress"; do | ||
| case $CMS_TYPE in | ||
| sitecore) | ||
| EXAMPLE_FILE="sitecore.zip" | ||
| break | ||
| ;; | ||
| contentful) | ||
| EXAMPLE_FILE="contentful.json" | ||
| break | ||
| ;; | ||
| wordpress) | ||
| EXAMPLE_FILE="wordpress.xml" | ||
| break | ||
| ;; | ||
| *) | ||
| echo "Invalid option. Please select 1, 2, or 3." | ||
| ;; | ||
| esac | ||
| done | ||
|
|
||
| read -p "Enter the full path to your $CMS_TYPE data file (e.g., $EXAMPLE_FILE): " CMS_DATA_PATH | ||
|
|
||
| if [ ! -f "$CMS_DATA_PATH" ]; then | ||
| echo "❌ File does not exist: $CMS_DATA_PATH" | ||
| exit 1 | ||
| fi | ||
|
|
||
| FILENAME=$(basename "$CMS_DATA_PATH") | ||
| CONTAINER_PATH="/data/$FILENAME" | ||
|
|
||
| export CMS_TYPE | ||
| export CMS_DATA_PATH | ||
| export CONTAINER_PATH | ||
|
|
||
| ENV_PATH="./upload-api/.env" | ||
|
|
||
| set_env_var() { | ||
| VAR_NAME="$1" | ||
| VAR_VALUE="$2" | ||
| if grep -q "^${VAR_NAME}=" "$ENV_PATH" 2>/dev/null; then | ||
| # Update existing variable (cross-platform) | ||
| sed -i.bak "s|^${VAR_NAME}=.*|${VAR_NAME}=${VAR_VALUE}|" "$ENV_PATH" | ||
| rm -f "$ENV_PATH.bak" | ||
| else | ||
| # Append new variable | ||
| echo "${VAR_NAME}=${VAR_VALUE}" >> "$ENV_PATH" | ||
| fi | ||
| } | ||
|
|
||
| set_env_var "CMS_TYPE" "$CMS_TYPE" | ||
| set_env_var "CMS_DATA_PATH" "$CMS_DATA_PATH" | ||
| set_env_var "CONTAINER_PATH" "$CONTAINER_PATH" | ||
| set_env_var "NODE_BACKEND_API" "http://migration-api:5001" | ||
|
|
||
|
|
||
| docker compose up --build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| node_modules | ||
| npm-debug.log | ||
| build |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| FROM --platform=linux/amd64 node:22-alpine | ||
|
|
||
| WORKDIR /usr/src/app | ||
|
|
||
| COPY package*.json ./ | ||
|
|
||
| RUN apk update && apk upgrade && npm install | ||
|
|
||
| COPY . . | ||
|
|
||
| EXPOSE 3000 | ||
|
|
||
| CMD [ "npm","run", "start"] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.