Merge pull request #895 from getmaxun/legacy-recorder
chore: archive legacy recorder
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
import { WhereWhatPair } from "maxun-core";
|
import { WhereWhatPair } from "maxun-core";
|
||||||
import { GenericModal } from "../ui/GenericModal";
|
import { GenericModal } from "../../src/components/ui/GenericModal";
|
||||||
import { modalStyle } from "./AddWhereCondModal";
|
import { modalStyle } from "./AddWhereCondModal";
|
||||||
import { Button, TextField, Typography } from "@mui/material";
|
import { Button, TextField, Typography } from "@mui/material";
|
||||||
import React, { useRef } from "react";
|
import React, { useRef } from "react";
|
||||||
import { KeyValueForm } from "./KeyValueForm";
|
import { KeyValueForm } from "../../src/components/recorder/KeyValueForm";
|
||||||
import { ClearButton } from "../ui/buttons/ClearButton";
|
import { ClearButton } from "../../src/components/ui/buttons/ClearButton";
|
||||||
import { useSocketStore } from "../../context/socket";
|
import { useSocketStore } from "../../src/context/socket";
|
||||||
|
|
||||||
interface AddWhatCondModalProps {
|
interface AddWhatCondModalProps {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
import { Dropdown as MuiDropdown } from "../ui/DropdownMui";
|
import { Dropdown as MuiDropdown } from "../../src/components/ui/DropdownMui";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
Typography
|
Typography
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import React, { useRef } from "react";
|
import React, { useRef } from "react";
|
||||||
import { GenericModal } from "../ui/GenericModal";
|
import { GenericModal } from "../../src/components/ui/GenericModal";
|
||||||
import { WhereWhatPair } from "maxun-core";
|
import { WhereWhatPair } from "maxun-core";
|
||||||
import { SelectChangeEvent } from "@mui/material/Select/Select";
|
import { SelectChangeEvent } from "@mui/material/Select/Select";
|
||||||
import { DisplayConditionSettings } from "./DisplayWhereConditionSettings";
|
import { DisplayConditionSettings } from "./DisplayWhereConditionSettings";
|
||||||
import { useSocketStore } from "../../context/socket";
|
import { useSocketStore } from "../../src/context/socket";
|
||||||
|
|
||||||
interface AddWhereCondModalProps {
|
interface AddWhereCondModalProps {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Dropdown as MuiDropdown } from "../ui/DropdownMui";
|
import { Dropdown as MuiDropdown } from "../../src/components/ui/DropdownMui";
|
||||||
import { Checkbox, FormControlLabel, FormGroup, MenuItem, Stack, TextField } from "@mui/material";
|
import { Checkbox, FormControlLabel, FormGroup, MenuItem, Stack, TextField } from "@mui/material";
|
||||||
import { AddButton } from "../ui/buttons/AddButton";
|
import { AddButton } from "../../src/components/ui/buttons/AddButton";
|
||||||
import { RemoveButton } from "../ui/buttons/RemoveButton";
|
import { RemoveButton } from "../../src/components/ui/buttons/RemoveButton";
|
||||||
import { KeyValueForm } from "./KeyValueForm";
|
import { KeyValueForm } from "../../src/components/recorder/KeyValueForm";
|
||||||
import { WarningText } from "../ui/texts";
|
import { WarningText } from "../../src/components/ui/texts";
|
||||||
|
|
||||||
interface DisplayConditionSettingsProps {
|
interface DisplayConditionSettingsProps {
|
||||||
whereProp: string;
|
whereProp: string;
|
||||||
@@ -1,14 +1,14 @@
|
|||||||
import { Box, Paper, Tab, Tabs } from "@mui/material";
|
import { Box, Paper, Tab, Tabs } from "@mui/material";
|
||||||
import React, { useCallback, useEffect, useState } from "react";
|
import React, { useCallback, useEffect, useState } from "react";
|
||||||
import { getActiveWorkflow, getParamsOfActiveWorkflow } from "../../api/workflow";
|
import { getActiveWorkflow, getParamsOfActiveWorkflow } from "../../src/api/workflow";
|
||||||
import { useSocketStore } from '../../context/socket';
|
import { useSocketStore } from '../../src/context/socket';
|
||||||
import { WhereWhatPair, WorkflowFile } from "maxun-core";
|
import { WhereWhatPair, WorkflowFile } from "maxun-core";
|
||||||
import { emptyWorkflow } from "../../shared/constants";
|
import { emptyWorkflow } from "../../src/shared/constants";
|
||||||
import { LeftSidePanelContent } from "./LeftSidePanelContent";
|
import { LeftSidePanelContent } from "./LeftSidePanelContent";
|
||||||
import { useGlobalInfoStore } from "../../context/globalInfo";
|
import { useGlobalInfoStore } from "../../src/context/globalInfo";
|
||||||
import { TabContext, TabPanel } from "@mui/lab";
|
import { TabContext, TabPanel } from "@mui/lab";
|
||||||
import { LeftSidePanelSettings } from "./LeftSidePanelSettings";
|
import { LeftSidePanelSettings } from "./LeftSidePanelSettings";
|
||||||
import { RunSettings } from "../run/RunSettings";
|
import { RunSettings } from "../../src/components/run/RunSettings";
|
||||||
|
|
||||||
const fetchWorkflow = (id: string, callback: (response: WorkflowFile) => void) => {
|
const fetchWorkflow = (id: string, callback: (response: WorkflowFile) => void) => {
|
||||||
getActiveWorkflow(id).then(
|
getActiveWorkflow(id).then(
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
import { Pair } from "./Pair";
|
import { Pair } from "./Pair";
|
||||||
import { WhereWhatPair, WorkflowFile } from "maxun-core";
|
import { WhereWhatPair, WorkflowFile } from "maxun-core";
|
||||||
import { useSocketStore } from "../../context/socket";
|
import { useSocketStore } from "../../src/context/socket";
|
||||||
import { Socket } from "socket.io-client";
|
import { Socket } from "socket.io-client";
|
||||||
import { AddButton } from "../ui/buttons/AddButton";
|
import { AddButton } from "../../src/components/ui/buttons/AddButton";
|
||||||
import { AddPair } from "../../api/workflow";
|
import { AddPair } from "../../src/api/workflow";
|
||||||
import { GenericModal } from "../ui/GenericModal";
|
import { GenericModal } from "../../src/components/ui/GenericModal";
|
||||||
import { PairEditForm } from "./PairEditForm";
|
import { PairEditForm } from "./PairEditForm";
|
||||||
import { Tooltip } from "@mui/material";
|
import { Tooltip } from "@mui/material";
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Button, MenuItem, TextField, Typography } from "@mui/material";
|
import { Button, MenuItem, TextField, Typography } from "@mui/material";
|
||||||
import { Dropdown } from "../ui/DropdownMui";
|
import { Dropdown } from "../../src/components/ui/DropdownMui";
|
||||||
import { RunSettings } from "../run/RunSettings";
|
import { RunSettings } from "../../src/components/run/RunSettings";
|
||||||
import { useSocketStore } from "../../context/socket";
|
import { useSocketStore } from "../../src/context/socket";
|
||||||
|
|
||||||
interface LeftSidePanelSettingsProps {
|
interface LeftSidePanelSettingsProps {
|
||||||
params: any[]
|
params: any[]
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
import React, { FC, useState } from 'react';
|
import React, { FC, useState } from 'react';
|
||||||
import { Stack, Button, IconButton, Tooltip, Badge } from "@mui/material";
|
import { Stack, Button, IconButton, Tooltip, Badge } from "@mui/material";
|
||||||
import { AddPair, deletePair, UpdatePair } from "../../api/workflow";
|
import { AddPair, deletePair, UpdatePair } from "../../src/api/workflow";
|
||||||
import { WorkflowFile } from "maxun-core";
|
import { WorkflowFile } from "maxun-core";
|
||||||
import { ClearButton } from "../ui/buttons/ClearButton";
|
import { ClearButton } from "../../src/components/ui/buttons/ClearButton";
|
||||||
import { GenericModal } from "../ui/GenericModal";
|
import { GenericModal } from "../../src/components/ui/GenericModal";
|
||||||
import { PairEditForm } from "./PairEditForm";
|
import { PairEditForm } from "./PairEditForm";
|
||||||
import { PairDisplayDiv } from "./PairDisplayDiv";
|
import { PairDisplayDiv } from "./PairDisplayDiv";
|
||||||
import { EditButton } from "../ui/buttons/EditButton";
|
import { EditButton } from "../../src/components/ui/buttons/EditButton";
|
||||||
import { BreakpointButton } from "../ui/buttons/BreakpointButton";
|
import { BreakpointButton } from "../../src/components/ui/buttons/BreakpointButton";
|
||||||
import VisibilityIcon from '@mui/icons-material/Visibility';
|
import VisibilityIcon from '@mui/icons-material/Visibility';
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { LoadingButton } from "@mui/lab";
|
import { LoadingButton } from "@mui/lab";
|
||||||
@@ -6,12 +6,12 @@ import TreeView from '@mui/lab/TreeView';
|
|||||||
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
|
||||||
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
||||||
import TreeItem from '@mui/lab/TreeItem';
|
import TreeItem from '@mui/lab/TreeItem';
|
||||||
import { AddButton } from "../ui/buttons/AddButton";
|
import { AddButton } from "../../src/components/ui/buttons/AddButton";
|
||||||
import { WarningText } from "../ui/texts";
|
import { WarningText } from "../../src/components/ui/texts";
|
||||||
import NotificationImportantIcon from '@mui/icons-material/NotificationImportant';
|
import NotificationImportantIcon from '@mui/icons-material/NotificationImportant';
|
||||||
import { RemoveButton } from "../ui/buttons/RemoveButton";
|
import { RemoveButton } from "../../src/components/ui/buttons/RemoveButton";
|
||||||
import { AddWhereCondModal } from "./AddWhereCondModal";
|
import { AddWhereCondModal } from "./AddWhereCondModal";
|
||||||
import { useSocketStore } from "../../context/socket";
|
import { useSocketStore } from "../../src/context/socket";
|
||||||
import { AddWhatCondModal } from "./AddWhatCondModal";
|
import { AddWhatCondModal } from "./AddWhatCondModal";
|
||||||
|
|
||||||
interface PairDetailProps {
|
interface PairDetailProps {
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
import { Router } from 'express';
|
|
||||||
import logger from "../logger";
|
|
||||||
// import { loadIntegrations, saveIntegrations } from '../workflow-management/integrations/gsheet';
|
|
||||||
import { requireSignIn } from '../middlewares/auth';
|
|
||||||
|
|
||||||
export const router = Router();
|
|
||||||
|
|
||||||
router.post('/upload-credentials', requireSignIn, async (req, res) => {
|
|
||||||
try {
|
|
||||||
const { fileName, credentials, spreadsheetId, range } = req.body;
|
|
||||||
if (!fileName || !credentials || !spreadsheetId || !range) {
|
|
||||||
return res.status(400).json({ message: 'Credentials, Spreadsheet ID, and Range are required.' });
|
|
||||||
}
|
|
||||||
// *** TEMPORARILY WE STORE CREDENTIALS HERE ***
|
|
||||||
} catch (error: any) {
|
|
||||||
logger.log('error', `Error saving credentials: ${error.message}`);
|
|
||||||
return res.status(500).json({ message: 'Failed to save credentials.', error: error.message });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@@ -9,7 +9,6 @@ import { deleteRunFromStorage } from "../../api/storage";
|
|||||||
import { columns, Data } from "./RunsTable";
|
import { columns, Data } from "./RunsTable";
|
||||||
import { RunContent } from "./RunContent";
|
import { RunContent } from "./RunContent";
|
||||||
import { GenericModal } from "../ui/GenericModal";
|
import { GenericModal } from "../ui/GenericModal";
|
||||||
import { modalStyle } from "../recorder/AddWhereCondModal";
|
|
||||||
import { getUserById } from "../../api/auth";
|
import { getUserById } from "../../api/auth";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
@@ -230,3 +229,15 @@ export const CollapsibleRow = ({ row, handleDelete, isOpen, onToggleExpanded, cu
|
|||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const modalStyle = {
|
||||||
|
top: '45%',
|
||||||
|
left: '50%',
|
||||||
|
transform: 'translate(-50%, -50%)',
|
||||||
|
width: '30%',
|
||||||
|
backgroundColor: 'background.paper',
|
||||||
|
p: 4,
|
||||||
|
height: 'fit-content',
|
||||||
|
display: 'block',
|
||||||
|
padding: '20px',
|
||||||
|
};
|
||||||
@@ -3,7 +3,7 @@ import { GenericModal } from "../ui/GenericModal";
|
|||||||
import { MenuItem, TextField, Typography, Switch, FormControlLabel } from "@mui/material";
|
import { MenuItem, TextField, Typography, Switch, FormControlLabel } from "@mui/material";
|
||||||
import { Dropdown } from "../ui/DropdownMui";
|
import { Dropdown } from "../ui/DropdownMui";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import { modalStyle } from "../recorder/AddWhereCondModal";
|
import { modalStyle } from "../run/ColapsibleRow";
|
||||||
|
|
||||||
interface RunSettingsProps {
|
interface RunSettingsProps {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|||||||
Reference in New Issue
Block a user