From a78121f40b52c6dd9a00f2dfe322be084c4b5a60 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Mon, 21 Oct 2024 01:04:20 +0530 Subject: [PATCH] fix: start recording --- src/components/molecules/RecordingsTable.tsx | 33 ++++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/components/molecules/RecordingsTable.tsx b/src/components/molecules/RecordingsTable.tsx index 21e0a2ab..a65c23d1 100644 --- a/src/components/molecules/RecordingsTable.tsx +++ b/src/components/molecules/RecordingsTable.tsx @@ -9,15 +9,16 @@ import TablePagination from '@mui/material/TablePagination'; import TableRow from '@mui/material/TableRow'; import { useEffect } from "react"; import { WorkflowFile } from "maxun-core"; -import { IconButton, Button, Box } from "@mui/material"; +import { IconButton, Button, Box, Typography, TextField } from "@mui/material"; import { Schedule, DeleteForever, Edit, PlayCircle } from "@mui/icons-material"; import LinkIcon from '@mui/icons-material/Link'; import { useGlobalInfoStore } from "../../context/globalInfo"; import { deleteRecordingFromStorage, getStoredRecordings } from "../../api/storage"; -import { Typography } from '@mui/material'; import { Circle, Add, Logout, Clear } from "@mui/icons-material"; import { Link, useLocation, useNavigate } from 'react-router-dom'; import { stopRecording } from "../../api/recording"; +import { GenericModal } from '../atoms/GenericModal'; + /** TODO: * 1. allow editing existing robot after persisting browser steps @@ -91,7 +92,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl const [rows, setRows] = React.useState([]); const [isModalOpen, setModalOpen] = React.useState(false); - const { notify, setRecordings, browserId, setBrowserId } = useGlobalInfoStore(); + const { notify, setRecordings, browserId, setBrowserId, recordingUrl, setRecordingUrl } = useGlobalInfoStore(); const navigate = useNavigate(); const handleChangePage = (event: unknown, newPage: number) => { @@ -131,6 +132,11 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl setModalOpen(true); }; + const startRecording = () => { + setModalOpen(false); + notify('info', 'New Recording started for ' + recordingUrl); + }; + useEffect(() => { if (rows.length === 0) { fetchRecordings(); @@ -244,6 +250,27 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl onPageChange={handleChangePage} onRowsPerPageChange={handleChangeRowsPerPage} /> + setModalOpen(false)}> +
+ Enter URL To Extract Data + setRecordingUrl(e.target.value)} + style={{ marginBottom: '20px', marginTop: '20px' }} + /> + +
+
); }