From 4c976c10e9e3cf5d5f8a01e108692b8f0ac693cf Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 29 May 2025 20:17:57 +0530 Subject: [PATCH 01/28] chore: -rm .env --- .dockerignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index b675b276..6f9ea982 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,9 +3,10 @@ npm-debug.log dist .git .gitignore -.env .md .vscode coverage docker-compose.yml -Dockerfile \ No newline at end of file +Dockerfile +Dockerfile.frontend +Dockerfile.backend \ No newline at end of file From beac348b939a6ac7ee81e6c354fa7c4749b84c95 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 29 May 2025 20:38:11 +0530 Subject: [PATCH 02/28] chore: move backend dockerfile to root --- Dockerfile.backend | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Dockerfile.backend diff --git a/Dockerfile.backend b/Dockerfile.backend new file mode 100644 index 00000000..8a5fc23e --- /dev/null +++ b/Dockerfile.backend @@ -0,0 +1,54 @@ +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/playwright:v1.46.0-noble + +# Set working directory +WORKDIR /app + +COPY .sequelizerc .sequelizerc +COPY .env .env + +# Install node dependencies +COPY package*.json ./ +COPY src ./src +COPY public ./public +COPY server ./server +COPY tsconfig.json ./ +COPY server/tsconfig.json ./server/ +# COPY server/start.sh ./ + +# Install dependencies +RUN npm install --legacy-peer-deps + +# Install Playwright browsers and dependencies +RUN npx playwright install --with-deps chromium + +# Create the Chromium data directory with necessary permissions +RUN mkdir -p /tmp/chromium-data-dir && \ + chmod -R 777 /tmp/chromium-data-dir + +# Install dependencies +RUN apt-get update && apt-get install -y \ + libgbm1 \ + libnss3 \ + libatk1.0-0 \ + libatk-bridge2.0-0 \ + libdrm2 \ + libxkbcommon0 \ + libglib2.0-0 \ + libdbus-1-3 \ + libx11-xcb1 \ + libxcb1 \ + libxcomposite1 \ + libxcursor1 \ + libxdamage1 \ + libxext6 \ + libxi6 \ + libxtst6 \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir -p /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix + +# Expose backend port +EXPOSE ${BACKEND_PORT:-8080} + +# Run migrations & start backend using start script +CMD ["npm", "run", "server"] +# CMD ["sh", "-c", "npm run migrate && npm run server"] \ No newline at end of file From f11086954fc78682424719af007cb23920fe7689 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 29 May 2025 20:38:44 +0530 Subject: [PATCH 03/28] refactor: rename to Dockerfile.frontend --- Dockerfile.frontend | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Dockerfile.frontend diff --git a/Dockerfile.frontend b/Dockerfile.frontend new file mode 100644 index 00000000..9cb25d6f --- /dev/null +++ b/Dockerfile.frontend @@ -0,0 +1,22 @@ +FROM --platform=$BUILDPLATFORM node:18-alpine AS builder + +WORKDIR /app + +# Copy package files +COPY package*.json ./ + +# Install dependencies +RUN npm install --legacy-peer-deps + +# Copy frontend source code and config +COPY src ./src +COPY public ./public +COPY index.html ./ +COPY vite.config.js ./ +COPY tsconfig.json ./ + +# Expose the frontend port +EXPOSE ${FRONTEND_PORT:-5173} + +# Start the frontend using the client script +CMD ["npm", "run", "client", "--", "--host"] \ No newline at end of file From 866d6234904ccabcb694a3564728c0223fd56fe4 Mon Sep 17 00:00:00 2001 From: Rohit Date: Fri, 30 May 2025 18:28:24 +0530 Subject: [PATCH 04/28] fix: download csv and json list data --- src/components/run/RunContent.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/run/RunContent.tsx b/src/components/run/RunContent.tsx index faa425d3..5565f451 100644 --- a/src/components/run/RunContent.tsx +++ b/src/components/run/RunContent.tsx @@ -248,7 +248,7 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe const renderDataTable = ( data: any[], - columns: string[], + columns: any[], title: string, csvFilename: string, jsonFilename: string, @@ -262,6 +262,9 @@ export const RunContent = ({ row, currentLog, interpretationInProgress, logEndRe if (!currentData || currentData.length === 0) return null; + const downloadData = isPaginatedList ? currentData : data; + const downloadColumns = isPaginatedList ? currentColumns : columns; + return (