-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from NicolasMarqui/DA_103_Workflow
DA-103 and DA-104: Added workflow page and added permissions page
- Loading branch information
Showing
21 changed files
with
659 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
frontend/src/components/CustomNodesContent/ApiNode/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { faGlobe } from '@fortawesome/free-solid-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { Grid, Typography } from '@mui/material'; | ||
import { Box } from '@mui/system'; | ||
import { Handle } from 'react-flow-renderer'; | ||
import customNodeStyle from '../../../utils/customNodeStyle'; | ||
|
||
const ApiNode = () => { | ||
return ( | ||
<Box sx={{ ...customNodeStyle }}> | ||
<Handle type="source" position="right" id="schedule" style={{ backgroundColor: 'red', right: -0.7 }} /> | ||
|
||
<Grid container alignItems="flex-start" wrap="nowrap"> | ||
<Box component={FontAwesomeIcon} fontSize={19} color="secondary.main" icon={faGlobe} /> | ||
<Grid item ml={1.5} textAlign="left"> | ||
<Typography fontSize={11} fontWeight={900}> | ||
API trigger | ||
</Typography> | ||
|
||
<Typography fontSize={10} mt={1}> | ||
Receive webhooks and API calls. | ||
</Typography> | ||
</Grid> | ||
</Grid> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ApiNode; |
41 changes: 41 additions & 0 deletions
41
frontend/src/components/CustomNodesContent/ClearLogsNode/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { faRunning } from '@fortawesome/free-solid-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { Grid, Typography } from '@mui/material'; | ||
import { Box } from '@mui/system'; | ||
import { Handle } from 'react-flow-renderer'; | ||
import ClearLogsNodeItem from '../../MoreInfoContent/ClearLogsNodeItem'; | ||
import MoreInfoMenu from '../../MoreInfoMenu'; | ||
|
||
const ClearLogsNode = () => { | ||
return ( | ||
<Box sx={{ padding: '10px 15px', width: 160, borderRadius: '10px', border: `3px solid #0073C6` }}> | ||
<Handle type="source" position="left" id="clear" style={{ backgroundColor: 'red', left: -0.7 }} /> | ||
<Grid container alignItems="flex-start" wrap="nowrap" pb={2}> | ||
<Box component={FontAwesomeIcon} fontSize={19} color="secondary.main" icon={faRunning} /> | ||
<Grid item ml={1.5} textAlign="left"> | ||
<Typography fontSize={11} fontWeight={900}> | ||
Clear the logs | ||
</Typography> | ||
|
||
<Typography fontSize={9} mt={0.4}> | ||
This process cleans down the logs | ||
</Typography> | ||
</Grid> | ||
</Grid> | ||
|
||
<Grid position="absolute" bottom={2} left={9} right={9} container wrap="nowrap" width="auto" alignItems="center" justifyContent="space-between"> | ||
<Grid item> | ||
<Typography fontSize={8}>Python</Typography> | ||
</Grid> | ||
|
||
<Box mt={0}> | ||
<MoreInfoMenu iconHorizontal iconColor="#0073C6" iconColorDark="#0073C6" iconSize={19} noPadding> | ||
<ClearLogsNodeItem /> | ||
</MoreInfoMenu> | ||
</Box> | ||
</Grid> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ClearLogsNode; |
28 changes: 28 additions & 0 deletions
28
frontend/src/components/CustomNodesContent/PlayNode/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { faPlayCircle } from '@fortawesome/free-regular-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { Grid, Typography } from '@mui/material'; | ||
import { Box } from '@mui/system'; | ||
import { Handle } from 'react-flow-renderer'; | ||
import customNodeStyle from '../../../utils/customNodeStyle'; | ||
|
||
const PlayNode = () => { | ||
return ( | ||
<Box sx={{ ...customNodeStyle }}> | ||
<Handle type="source" position="right" id="play" style={{ backgroundColor: 'red', right: -0.7 }} /> | ||
<Grid container alignItems="flex-start" wrap="nowrap"> | ||
<Box component={FontAwesomeIcon} fontSize={19} color="secondary.main" icon={faPlayCircle} /> | ||
<Grid item ml={1.5} textAlign="left"> | ||
<Typography fontSize={11} fontWeight={900}> | ||
Play trigger | ||
</Typography> | ||
|
||
<Typography fontSize={10} mt={1}> | ||
Press play to run | ||
</Typography> | ||
</Grid> | ||
</Grid> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default PlayNode; |
28 changes: 28 additions & 0 deletions
28
frontend/src/components/CustomNodesContent/ScheduleNode/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { faClock } from '@fortawesome/free-regular-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { Grid, Typography } from '@mui/material'; | ||
import { Box } from '@mui/system'; | ||
import { Handle } from 'react-flow-renderer'; | ||
import customNodeStyle from '../../../utils/customNodeStyle'; | ||
|
||
const ScheduleNode = () => { | ||
return ( | ||
<Box sx={{ ...customNodeStyle, border: '3px solid #76A853' }}> | ||
<Handle type="source" position="right" id="schedule" style={{ backgroundColor: 'red', right: -0.7 }} /> | ||
<Grid container alignItems="flex-start" wrap="nowrap"> | ||
<Box component={FontAwesomeIcon} fontSize={19} color="secondary.main" icon={faClock} /> | ||
<Grid item ml={1.5} textAlign="left"> | ||
<Typography fontSize={11} fontWeight={900}> | ||
Schedule trigger | ||
</Typography> | ||
|
||
<Typography fontSize={10} mt={1}> | ||
Every 5 minutes | ||
</Typography> | ||
</Grid> | ||
</Grid> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default ScheduleNode; |
50 changes: 50 additions & 0 deletions
50
frontend/src/components/DrawerContent/AddPipelinesPermissionDrawer/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { faTimes } from '@fortawesome/free-solid-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { Box, Button, Checkbox, FormControl, FormControlLabel, FormGroup, MenuItem, Select, Typography } from '@mui/material'; | ||
import { useState } from 'react'; | ||
|
||
const AddPipelinesPermissionDrawer = ({ handleClose, typeToAdd }) => { | ||
const [selectedTypeToAdd, setSelectedTypeToAdd] = useState(typeToAdd); | ||
|
||
// Options state | ||
const [isView, setIsView] = useState(false); | ||
const [isEdit, setIsEdit] = useState(false); | ||
const [isRun, setIsRun] = useState(false); | ||
|
||
return ( | ||
<Box position="relative"> | ||
<Box sx={{ p: '4.125rem' }}> | ||
<Box position="absolute" top="26px" right="39px" display="flex" alignItems="center"> | ||
<Button variant="text" onClick={handleClose} style={{ paddingLeft: '16px', paddingRight: '16px' }} startIcon={<FontAwesomeIcon icon={faTimes} />}> | ||
Close | ||
</Button> | ||
</Box> | ||
|
||
<Box width="212px"> | ||
<Typography component="h2" variant="h2"> | ||
Add permissions | ||
</Typography> | ||
|
||
<FormControl fullWidth sx={{ mt: 4 }}> | ||
<Select labelId="demo-simple-select-label" id="demo-simple-select" small value={selectedTypeToAdd} onChange={(e) => setSelectedTypeToAdd(e.target.value)}> | ||
<MenuItem value="User">User</MenuItem> | ||
<MenuItem value="Access group">Access group</MenuItem> | ||
</Select> | ||
</FormControl> | ||
|
||
<FormGroup sx={{ mt: 2 }}> | ||
<FormControlLabel control={<Checkbox sx={{ color: 'cyan.main' }} checked={isView} onChange={(e) => setIsView(e.target.checked)} />} label="View" /> | ||
<FormControlLabel control={<Checkbox sx={{ color: 'cyan.main' }} checked={isEdit} onChange={(e) => setIsEdit(e.target.checked)} />} label="Edit" /> | ||
<FormControlLabel control={<Checkbox sx={{ color: 'cyan.main' }} checked={isRun} onChange={(e) => setIsRun(e.target.checked)} />} label="Run" /> | ||
</FormGroup> | ||
|
||
<Button variant="contained" color="primary" style={{ width: '100%' }} sx={{ mt: 2 }}> | ||
Add {selectedTypeToAdd.toLowerCase()} | ||
</Button> | ||
</Box> | ||
</Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default AddPipelinesPermissionDrawer; |
25 changes: 25 additions & 0 deletions
25
frontend/src/components/MoreInfoContent/ClearLogsNodeItem/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { MenuItem } from '@mui/material'; | ||
|
||
const ClearLogsNodeItem = (props) => { | ||
return ( | ||
<> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Code | ||
</MenuItem> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Refresh | ||
</MenuItem> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Run | ||
</MenuItem> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Workers | ||
</MenuItem> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Logs | ||
</MenuItem> | ||
</> | ||
); | ||
}; | ||
|
||
export default ClearLogsNodeItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
frontend/src/components/MoreInfoContent/RemoveLogsPageItem/index.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { MenuItem } from '@mui/material'; | ||
|
||
const RemoveLogsPageItem = (props) => { | ||
const yamlClick = () => { | ||
props.handleCloseMenu(); | ||
props.handleOpenYaml(); | ||
}; | ||
|
||
return ( | ||
<> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Pipeline | ||
</MenuItem> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Analytics | ||
</MenuItem> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={yamlClick}> | ||
YAML | ||
</MenuItem> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Reload | ||
</MenuItem> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Deploy | ||
</MenuItem> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Run | ||
</MenuItem> | ||
<MenuItem sx={{ color: 'cyan.main' }} onClick={() => props.handleCloseMenu()}> | ||
Turn off | ||
</MenuItem> | ||
</> | ||
); | ||
}; | ||
|
||
export default RemoveLogsPageItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.