From 82b8b4d51f242ad5ac05524834227d9631b17ce8 Mon Sep 17 00:00:00 2001 From: amhsirak Date: Thu, 9 Jan 2025 20:02:58 +0530 Subject: [PATCH] feat: create run ui directory --- src/api/storage.ts | 2 +- src/components/molecules/ColapsibleRow.tsx | 4 ++-- src/components/molecules/LeftSidePanelSettings.tsx | 2 +- src/components/organisms/LeftSidePanel.tsx | 2 +- src/components/robot/Recordings.tsx | 2 +- src/components/{molecules => run}/RunContent.tsx | 0 src/components/{molecules => run}/RunSettings.tsx | 2 +- src/components/{organisms => run}/Runs.tsx | 2 +- src/components/{molecules => run}/RunsTable.tsx | 2 +- src/pages/MainPage.tsx | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) rename src/components/{molecules => run}/RunContent.tsx (100%) rename src/components/{molecules => run}/RunSettings.tsx (98%) rename src/components/{organisms => run}/Runs.tsx (92%) rename src/components/{molecules => run}/RunsTable.tsx (99%) diff --git a/src/api/storage.ts b/src/api/storage.ts index 18c793c0..12332fc0 100644 --- a/src/api/storage.ts +++ b/src/api/storage.ts @@ -1,6 +1,6 @@ import { default as axios } from "axios"; import { WorkflowFile } from "maxun-core"; -import { RunSettings } from "../components/molecules/RunSettings"; +import { RunSettings } from "../components/run/RunSettings"; import { ScheduleSettings } from "../components/molecules/ScheduleSettings"; import { CreateRunResponse, ScheduleRunResponse } from "../pages/MainPage"; import { apiUrl } from "../apiConfig"; diff --git a/src/components/molecules/ColapsibleRow.tsx b/src/components/molecules/ColapsibleRow.tsx index 1cc40567..02624cc3 100644 --- a/src/components/molecules/ColapsibleRow.tsx +++ b/src/components/molecules/ColapsibleRow.tsx @@ -5,8 +5,8 @@ import TableCell from "@mui/material/TableCell"; import { Box, Collapse, IconButton, Typography, Chip, TextField } from "@mui/material"; import { DeleteForever, KeyboardArrowDown, KeyboardArrowUp, Settings } from "@mui/icons-material"; import { deleteRunFromStorage } from "../../api/storage"; -import { columns, Data } from "./RunsTable"; -import { RunContent } from "./RunContent"; +import { columns, Data } from "../run/RunsTable"; +import { RunContent } from "../run/RunContent"; import { GenericModal } from "../ui/GenericModal"; import { modalStyle } from "./AddWhereCondModal"; import { getUserById } from "../../api/auth"; diff --git a/src/components/molecules/LeftSidePanelSettings.tsx b/src/components/molecules/LeftSidePanelSettings.tsx index ddfa6acb..87c73ce1 100644 --- a/src/components/molecules/LeftSidePanelSettings.tsx +++ b/src/components/molecules/LeftSidePanelSettings.tsx @@ -1,7 +1,7 @@ import React from "react"; import { Button, MenuItem, TextField, Typography } from "@mui/material"; import { Dropdown } from "../ui/DropdownMui"; -import { RunSettings } from "./RunSettings"; +import { RunSettings } from "../run/RunSettings"; import { useSocketStore } from "../../context/socket"; interface LeftSidePanelSettingsProps { diff --git a/src/components/organisms/LeftSidePanel.tsx b/src/components/organisms/LeftSidePanel.tsx index 29196d20..de0b728e 100644 --- a/src/components/organisms/LeftSidePanel.tsx +++ b/src/components/organisms/LeftSidePanel.tsx @@ -10,7 +10,7 @@ import { useBrowserDimensionsStore } from "../../context/browserDimensions"; import { useGlobalInfoStore } from "../../context/globalInfo"; import { TabContext, TabPanel } from "@mui/lab"; import { LeftSidePanelSettings } from "../molecules/LeftSidePanelSettings"; -import { RunSettings } from "../molecules/RunSettings"; +import { RunSettings } from "../run/RunSettings"; const fetchWorkflow = (id: string, callback: (response: WorkflowFile) => void) => { getActiveWorkflow(id).then( diff --git a/src/components/robot/Recordings.tsx b/src/components/robot/Recordings.tsx index a58ab109..a0209d5f 100644 --- a/src/components/robot/Recordings.tsx +++ b/src/components/robot/Recordings.tsx @@ -1,7 +1,7 @@ import React, { useState } from 'react'; import { RecordingsTable } from "./RecordingsTable"; import { Grid } from "@mui/material"; -import { RunSettings, RunSettingsModal } from "../molecules/RunSettings"; +import { RunSettings, RunSettingsModal } from "../run/RunSettings"; import { ScheduleSettings, ScheduleSettingsModal } from "../molecules/ScheduleSettings"; import { IntegrationSettings, IntegrationSettingsModal } from "../integration/IntegrationSettings"; import { RobotSettings, RobotSettingsModal } from "./RobotSettings"; diff --git a/src/components/molecules/RunContent.tsx b/src/components/run/RunContent.tsx similarity index 100% rename from src/components/molecules/RunContent.tsx rename to src/components/run/RunContent.tsx diff --git a/src/components/molecules/RunSettings.tsx b/src/components/run/RunSettings.tsx similarity index 98% rename from src/components/molecules/RunSettings.tsx rename to src/components/run/RunSettings.tsx index 48a8335e..1b764342 100644 --- a/src/components/molecules/RunSettings.tsx +++ b/src/components/run/RunSettings.tsx @@ -3,7 +3,7 @@ import { GenericModal } from "../ui/GenericModal"; import { MenuItem, TextField, Typography, Switch, FormControlLabel } from "@mui/material"; import { Dropdown } from "../ui/DropdownMui"; import Button from "@mui/material/Button"; -import { modalStyle } from "./AddWhereCondModal"; +import { modalStyle } from "../molecules/AddWhereCondModal"; interface RunSettingsProps { isOpen: boolean; diff --git a/src/components/organisms/Runs.tsx b/src/components/run/Runs.tsx similarity index 92% rename from src/components/organisms/Runs.tsx rename to src/components/run/Runs.tsx index 23c91d60..cedbf348 100644 --- a/src/components/organisms/Runs.tsx +++ b/src/components/run/Runs.tsx @@ -1,6 +1,6 @@ import React, { useEffect } from 'react'; import { Grid } from "@mui/material"; -import { RunsTable } from "../molecules/RunsTable"; +import { RunsTable } from "./RunsTable"; interface RunsProps { currentInterpretationLog: string; diff --git a/src/components/molecules/RunsTable.tsx b/src/components/run/RunsTable.tsx similarity index 99% rename from src/components/molecules/RunsTable.tsx rename to src/components/run/RunsTable.tsx index 855f7b15..a24137b8 100644 --- a/src/components/molecules/RunsTable.tsx +++ b/src/components/run/RunsTable.tsx @@ -16,7 +16,7 @@ import SearchIcon from '@mui/icons-material/Search'; import { useGlobalInfoStore } from "../../context/globalInfo"; import { getStoredRuns } from "../../api/storage"; import { RunSettings } from "./RunSettings"; -import { CollapsibleRow } from "./ColapsibleRow"; +import { CollapsibleRow } from "../molecules/ColapsibleRow"; // Export columns before the component export const columns: readonly Column[] = [ diff --git a/src/pages/MainPage.tsx b/src/pages/MainPage.tsx index 3bc23d6e..e9ee8af6 100644 --- a/src/pages/MainPage.tsx +++ b/src/pages/MainPage.tsx @@ -3,14 +3,14 @@ import { useTranslation } from 'react-i18next'; import { MainMenu } from "../components/organisms/MainMenu"; import { Stack } from "@mui/material"; import { Recordings } from "../components/robot/Recordings"; -import { Runs } from "../components/organisms/Runs"; +import { Runs } from "../components/run/Runs"; import ProxyForm from '../components/proxy/ProxyForm'; import ApiKey from '../components/api/ApiKey'; import { useGlobalInfoStore } from "../context/globalInfo"; import { createRunForStoredRecording, interpretStoredRecording, notifyAboutAbort, scheduleStoredRecording } from "../api/storage"; import { io, Socket } from "socket.io-client"; import { stopRecording } from "../api/recording"; -import { RunSettings } from "../components/molecules/RunSettings"; +import { RunSettings } from "../components/run/RunSettings"; import { ScheduleSettings } from "../components/molecules/ScheduleSettings"; import { IntegrationSettings } from "../components/integration/IntegrationSettings"; import { RobotSettings } from "../components/robot/RobotSettings";