Merge branch 'develop' of https://github.com/getmaxun/maxun into develop
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
"new":"Create Robot",
|
"new":"Create Robot",
|
||||||
"modal":{
|
"modal":{
|
||||||
"title":"Enter the URL",
|
"title":"Enter the URL",
|
||||||
"login_title": "Does this site require login?",
|
"login_title": "Does this website require login?",
|
||||||
"label":"URL",
|
"label":"URL",
|
||||||
"button":"Start Recording"
|
"button":"Start Recording"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -29,7 +29,13 @@ export const connectDB = async () => {
|
|||||||
export const syncDB = async () => {
|
export const syncDB = async () => {
|
||||||
try {
|
try {
|
||||||
//setupAssociations();
|
//setupAssociations();
|
||||||
await sequelize.sync({ force: false }); // force: true will drop and recreate tables on every run
|
const isDevelopment = process.env.NODE_ENV === 'development';
|
||||||
|
// force: true will drop and recreate tables on every run
|
||||||
|
// Use `alter: true` only in development mode
|
||||||
|
await sequelize.sync({
|
||||||
|
force: false,
|
||||||
|
alter: isDevelopment
|
||||||
|
});
|
||||||
console.log('Database synced successfully!');
|
console.log('Database synced successfully!');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to sync database:', error);
|
console.error('Failed to sync database:', error);
|
||||||
|
|||||||
@@ -11,8 +11,32 @@ import TableRow from '@mui/material/TableRow';
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { WorkflowFile } from "maxun-core";
|
import { WorkflowFile } from "maxun-core";
|
||||||
import SearchIcon from '@mui/icons-material/Search';
|
import SearchIcon from '@mui/icons-material/Search';
|
||||||
import { IconButton, Button, Box, Typography, TextField, MenuItem, Menu, ListItemIcon, ListItemText, CircularProgress, RadioGroup, FormControlLabel, Radio } from "@mui/material";
|
import {
|
||||||
import { Schedule, DeleteForever, Edit, PlayCircle, Settings, Power, ContentCopy, MoreHoriz } from "@mui/icons-material";
|
IconButton,
|
||||||
|
Button,
|
||||||
|
Box,
|
||||||
|
Typography,
|
||||||
|
TextField,
|
||||||
|
MenuItem,
|
||||||
|
Menu,
|
||||||
|
ListItemIcon,
|
||||||
|
ListItemText,
|
||||||
|
CircularProgress,
|
||||||
|
RadioGroup,
|
||||||
|
FormControlLabel,
|
||||||
|
Radio,
|
||||||
|
Checkbox,
|
||||||
|
} from "@mui/material";
|
||||||
|
import {
|
||||||
|
Schedule,
|
||||||
|
DeleteForever,
|
||||||
|
Edit,
|
||||||
|
PlayCircle,
|
||||||
|
Settings,
|
||||||
|
Power,
|
||||||
|
ContentCopy,
|
||||||
|
MoreHoriz
|
||||||
|
} from "@mui/icons-material";
|
||||||
import { useGlobalInfoStore } from "../../context/globalInfo";
|
import { useGlobalInfoStore } from "../../context/globalInfo";
|
||||||
import { checkRunsForRecording, deleteRecordingFromStorage, getStoredRecordings } from "../../api/storage";
|
import { checkRunsForRecording, deleteRecordingFromStorage, getStoredRecordings } from "../../api/storage";
|
||||||
import { Add } from "@mui/icons-material";
|
import { Add } from "@mui/icons-material";
|
||||||
@@ -311,7 +335,7 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl
|
|||||||
onRowsPerPageChange={handleChangeRowsPerPage}
|
onRowsPerPageChange={handleChangeRowsPerPage}
|
||||||
/>
|
/>
|
||||||
<GenericModal isOpen={isModalOpen} onClose={() => setModalOpen(false)} modalStyle={modalStyle}>
|
<GenericModal isOpen={isModalOpen} onClose={() => setModalOpen(false)} modalStyle={modalStyle}>
|
||||||
<div style={{ padding: '20px' }}>
|
<div style={{ padding: '10px' }}>
|
||||||
<Typography variant="h6" gutterBottom>{t('recordingtable.modal.title')}</Typography>
|
<Typography variant="h6" gutterBottom>{t('recordingtable.modal.title')}</Typography>
|
||||||
<TextField
|
<TextField
|
||||||
label={t('recordingtable.modal.label')}
|
label={t('recordingtable.modal.label')}
|
||||||
@@ -319,21 +343,22 @@ export const RecordingsTable = ({ handleEditRecording, handleRunRecording, handl
|
|||||||
fullWidth
|
fullWidth
|
||||||
value={recordingUrl}
|
value={recordingUrl}
|
||||||
onChange={setBrowserRecordingUrl}
|
onChange={setBrowserRecordingUrl}
|
||||||
style={{ marginBottom: '20px', marginTop: '20px' }}
|
style={{ marginBottom: '10px', marginTop: '20px' }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Typography variant="h6" gutterBottom>{t('recordingtable.modal.login_title')}</Typography>
|
<FormControlLabel
|
||||||
<RadioGroup
|
control={
|
||||||
aria-labelledby="login-requirement-radio-group"
|
<Checkbox
|
||||||
name="login-requirement"
|
checked={isLogin}
|
||||||
value={isLogin ? 'yes' : 'no'}
|
onChange={(e) => setIsLogin(e.target.checked)}
|
||||||
onChange={(e) => setIsLogin(e.target.value === 'yes')}
|
color="primary"
|
||||||
style={{ marginBottom: '20px' }}
|
/>
|
||||||
>
|
}
|
||||||
<FormControlLabel value="yes" control={<Radio />} label="Yes" />
|
label={t('recordingtable.modal.login_title')}
|
||||||
<FormControlLabel value="no" control={<Radio />} label="No" />
|
style={{ marginBottom: '10px' }}
|
||||||
</RadioGroup>
|
/>
|
||||||
|
|
||||||
|
<br />
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
Reference in New Issue
Block a user