From c9405c6930cced80dff13a80216f374df0ed6039 Mon Sep 17 00:00:00 2001 From: RohitR311 Date: Sun, 3 Nov 2024 21:18:17 +0530 Subject: [PATCH 01/11] fix: maxunlogo path fixed --- index.html | 2 +- {public/img => src/assets}/maxunlogo.png | Bin src/components/molecules/ActionDescriptionBox.tsx | 3 ++- src/components/molecules/NavBar.tsx | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) rename {public/img => src/assets}/maxunlogo.png (100%) diff --git a/index.html b/index.html index 81e42f02..c1ebd718 100644 --- a/index.html +++ b/index.html @@ -8,7 +8,7 @@ name="description" content="Web site created using Vite" /> - + Maxun | Open Source No Code Web Data Extraction Platform diff --git a/public/img/maxunlogo.png b/src/assets/maxunlogo.png similarity index 100% rename from public/img/maxunlogo.png rename to src/assets/maxunlogo.png diff --git a/src/components/molecules/ActionDescriptionBox.tsx b/src/components/molecules/ActionDescriptionBox.tsx index 4efdb32e..cad962c7 100644 --- a/src/components/molecules/ActionDescriptionBox.tsx +++ b/src/components/molecules/ActionDescriptionBox.tsx @@ -2,6 +2,7 @@ import React from 'react'; import styled from 'styled-components'; import { Typography, FormControlLabel, Checkbox, Box } from '@mui/material'; import { useActionContext } from '../../context/browserActions'; +import MaxunLogo from "../../assets/maxunlogo.png"; const CustomBoxContainer = styled.div` position: relative; @@ -110,7 +111,7 @@ const ActionDescriptionBox = () => { return ( - + {renderActionDescription()} diff --git a/src/components/molecules/NavBar.tsx b/src/components/molecules/NavBar.tsx index 8dd678c5..69fba352 100644 --- a/src/components/molecules/NavBar.tsx +++ b/src/components/molecules/NavBar.tsx @@ -10,6 +10,7 @@ import { AuthContext } from '../../context/auth'; import { SaveRecording } from '../molecules/SaveRecording'; import DiscordIcon from '../atoms/DiscordIcon'; import { apiUrl } from '../../apiConfig'; +import MaxunLogo from "../../assets/maxunlogo.png"; interface NavBarProps { recordingName: string; @@ -55,7 +56,7 @@ export const NavBar: React.FC = ({ recordingName, isRecording }) => display: 'flex', justifyContent: 'flex-start', }}> - +
Maxun
{ From 001bacb5969f721b6d71564f47c5f677ed0ea1ac Mon Sep 17 00:00:00 2001 From: Priyanka Shukla Date: Mon, 4 Nov 2024 19:56:35 +0530 Subject: [PATCH 02/11] feat: volume mounts for backend and frontend services --- docker-compose.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 50983684..1aeefd26 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,9 +52,6 @@ services: # DEBUG: pw:api # PWDEBUG: 1 # Enables debugging CHROMIUM_FLAGS: '--disable-gpu --no-sandbox --headless=new' - volumes: - # - /tmp/.X11-unix:/tmp/.X11-unix - - /var/run/dbus:/var/run/dbus # Add this for D-Bus support security_opt: - seccomp=unconfined # This might help with browser sandbox issues # Increase shared memory size for Chromium @@ -63,6 +60,10 @@ services: - postgres - redis - minio + volumes: + - ./server:/app/server # Mount server source code for hot reloading + - ./maxun-core:/app/maxun-core # Mount maxun-core for any shared code updates + - /var/run/dbus:/var/run/dbus frontend: build: @@ -71,6 +72,9 @@ services: ports: - "5173:5173" env_file: .env + volumes: + - ./:/app # Mount entire frontend app directory for hot reloading + - /app/node_modules # Anonymous volume to prevent overwriting node_modules depends_on: - backend From ccdeda094389062c98c39b40e693103ec62d2e62 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 4 Nov 2024 20:33:33 +0530 Subject: [PATCH 03/11] feat: set default vite url --- src/apiConfig.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apiConfig.js b/src/apiConfig.js index 8661491e..9cf20e94 100644 --- a/src/apiConfig.js +++ b/src/apiConfig.js @@ -1 +1 @@ -export const apiUrl = import.meta.env.VITE_BACKEND_URL; \ No newline at end of file +export const apiUrl = import.meta.env.VITE_BACKEND_URL ? import.meta.env.VITE_BACKEND_URL : 'http://localhost:8080' \ No newline at end of file From ad43fc09ed0d71c46fd164fde524693a0c63feaa Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 4 Nov 2024 20:35:24 +0530 Subject: [PATCH 04/11] feat: set default backend url --- server/src/workflow-management/scheduler/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/workflow-management/scheduler/index.ts b/server/src/workflow-management/scheduler/index.ts index cde08a29..a94c6d16 100644 --- a/server/src/workflow-management/scheduler/index.ts +++ b/server/src/workflow-management/scheduler/index.ts @@ -223,7 +223,7 @@ export async function handleRunRecording(id: string, userId: string) { throw new Error('browserId or runId or userId is undefined'); } - const socket = io(`${process.env.BACKEND_URL}/${browserId}`, { + const socket = io(`${process.env.BACKEND_URL ? process.env.BACKEND_URL : 'http://localhost:8080'}/${browserId}`, { transports: ['websocket'], rejectUnauthorized: false }); From 56d23718392a40fa09bb731b72b59160307c1446 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 4 Nov 2024 20:35:42 +0530 Subject: [PATCH 05/11] feat: set default backend url --- server/src/api/record.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/api/record.ts b/server/src/api/record.ts index 610f1825..b55f06bc 100644 --- a/server/src/api/record.ts +++ b/server/src/api/record.ts @@ -650,7 +650,7 @@ export async function handleRunRecording(id: string, userId: string) { throw new Error('browserId or runId or userId is undefined'); } - const socket = io(`${process.env.BACKEND_URL}/${browserId}`, { + const socket = io(`${process.env.BACKEND_URL ? process.env.BACKEND_URL : 'http://localhost:8080'}/${browserId}`, { transports: ['websocket'], rejectUnauthorized: false }); From 6f064813eaa0b87f282a7fceb317f9c374db7a82 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Mon, 4 Nov 2024 21:10:02 +0530 Subject: [PATCH 06/11] feat: disable capture list initial stage confirmation if !listSelector and browser steps --- src/components/organisms/RightSidePanel.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/organisms/RightSidePanel.tsx b/src/components/organisms/RightSidePanel.tsx index f2871aea..f578b485 100644 --- a/src/components/organisms/RightSidePanel.tsx +++ b/src/components/organisms/RightSidePanel.tsx @@ -1,4 +1,4 @@ -import React, { useState, useCallback, useEffect } from 'react'; +import React, { useState, useCallback, useEffect, useMemo } from 'react'; import { Button, Paper, Box, TextField, IconButton } from "@mui/material"; import EditIcon from '@mui/icons-material/Edit'; import TextFieldsIcon from '@mui/icons-material/TextFields'; @@ -373,6 +373,19 @@ export const RightSidePanel: React.FC = ({ onFinishCapture stopGetScreenshot(); }; + const isConfirmCaptureDisabled = useMemo(() => { + // Check if we are in the initial stage and if there are no browser steps or no valid list selectors with fields + if (captureStage !== 'initial') return false; + + const hasValidListSelector = browserSteps.some(step => + step.type === 'list' && + step.listSelector && + Object.keys(step.fields).length > 0 + ); + + return !hasValidListSelector; + }, [captureStage, browserSteps]); + return ( {/* @@ -387,7 +400,7 @@ export const RightSidePanel: React.FC = ({ onFinishCapture