mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 07:01:07 +03:00
Chore/minor execution view ui fix (#5069)
* minor execution view ui fix * add password validation
This commit is contained in:
@@ -18,6 +18,16 @@ export function isInvalidDateTime(dateTime: unknown): boolean {
|
||||
}
|
||||
|
||||
export function isInvalidPassword(password: unknown): boolean {
|
||||
// Minimum Length: At least 8 characters
|
||||
// Maximum Length: No more than 128 characters
|
||||
// Lowercase Letter: Must contain at least one lowercase letter (a-z)
|
||||
// Uppercase Letter: Must contain at least one uppercase letter (A-Z)
|
||||
// Digit: Must contain at least one number (0-9)
|
||||
// Special Character: Must contain at least one special character (anything that's not a letter or number)
|
||||
if (!password || typeof password !== 'string' || password.length > 128) {
|
||||
return true
|
||||
}
|
||||
|
||||
const regexPassword = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^a-zA-Z0-9]).{8,}$/
|
||||
return !password || typeof password !== 'string' || !regexPassword.test(password)
|
||||
return !regexPassword.test(password)
|
||||
}
|
||||
|
||||
@@ -725,7 +725,8 @@ export const ExecutionDetails = ({ open, isPublic, execution, metadata, onClose,
|
||||
flex: '1 1 35%',
|
||||
padding: 2,
|
||||
borderRight: 1,
|
||||
borderColor: 'divider'
|
||||
borderColor: 'divider',
|
||||
overflow: 'auto'
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
|
||||
@@ -10,7 +10,7 @@ import executionsApi from '@/api/executions'
|
||||
import useApi from '@/hooks/useApi'
|
||||
|
||||
// MUI
|
||||
import { Box, Card, Stack, Typography, useTheme } from '@mui/material'
|
||||
import { Box, Card, Stack, Typography, useTheme, CircularProgress } from '@mui/material'
|
||||
import { IconCircleXFilled } from '@tabler/icons-react'
|
||||
import { alpha } from '@mui/material/styles'
|
||||
|
||||
@@ -56,9 +56,13 @@ const PublicExecutionDetails = () => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{!isLoading ? (
|
||||
{isLoading ? (
|
||||
<Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '80vh' }}>
|
||||
<CircularProgress size={60} />
|
||||
</Box>
|
||||
) : (
|
||||
<>
|
||||
{!execution || getExecutionByIdPublicApi.error ? (
|
||||
{getExecutionByIdPublicApi.error ? (
|
||||
<Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '80vh' }}>
|
||||
<Box sx={{ maxWidth: '500px', width: '100%' }}>
|
||||
<Card
|
||||
@@ -96,7 +100,7 @@ const PublicExecutionDetails = () => {
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
) : null}
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user