Minor fixes to notifications

This commit is contained in:
frikky
2021-10-04 21:39:19 +02:00
parent dcc8b8bbd5
commit b5fbdb06b8
3 changed files with 18 additions and 64 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ module shuffle
go 1.13 go 1.13
replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared //replace github.com/frikky/shuffle-shared => ../../../../git/shuffle-shared
//replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi //replace github.com/frikky/kin-openapi => ../../../../git/kin-openapi
@@ -23,7 +23,7 @@ require (
github.com/docker/go-units v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect
github.com/elastic/go-elasticsearch/v7 v7.13.1 // indirect github.com/elastic/go-elasticsearch/v7 v7.13.1 // indirect
github.com/frikky/kin-openapi v0.39.0 github.com/frikky/kin-openapi v0.39.0
github.com/frikky/shuffle-shared v0.1.1 github.com/frikky/shuffle-shared v0.1.2
github.com/fsouza/go-dockerclient v1.7.2 github.com/fsouza/go-dockerclient v1.7.2
github.com/ghodss/yaml v1.0.0 github.com/ghodss/yaml v1.0.0
github.com/go-git/go-billy/v5 v5.0.0 github.com/go-git/go-billy/v5 v5.0.0
+1 -1
View File
@@ -1,7 +1,7 @@
version: '3' version: '3'
services: services:
frontend: frontend:
build: ./frontend #build: ./frontend
image: ghcr.io/frikky/shuffle-frontend:nightly image: ghcr.io/frikky/shuffle-frontend:nightly
container_name: shuffle-frontend container_name: shuffle-frontend
hostname: shuffle-frontend hostname: shuffle-frontend
+15 -61
View File
@@ -7453,64 +7453,6 @@ const AngularWorkflow = (props) => {
return null return null
} }
const FileMenu = () => {
const [newAnchor, setNewAnchor] = React.useState(null)
const [showShuffleMenu, setShowShuffleMenu] = React.useState(false)
{ /*const [showShuffleMenu, setShowShuffleMenu] = React.useState(true) */}
return (
<div style={{"display": "inline-block"}}>
<Menu
id="long-menu"
anchorEl={newAnchor}
open={showShuffleMenu}
onClose={() => {
setShowShuffleMenu(false)
}}
>
<div style={{margin: 15, color: "white", maxWidth: 250, minWidth: 250, }}>
<h4>This menu is used to control the workflow itself.</h4>
<Divider style={{backgroundColor: "white", marginTop: 10, marginBottom: 10,}}/>
<FormControlLabel
style={{marginBottom: 15, color: "white",}}
label={<div style={{color: "white"}}>Exit on Error</div>}
control={
<Switch checked={workflow.configuration.exit_on_error} onChange={() => {
workflow.configuration.exit_on_error = !workflow.configuration.exit_on_error
setWorkflow(workflow)
setUpdate("exit_on_error_"+workflow.configuration.exit_on_error ? "true" : "false")
setShowShuffleMenu(false)
}} />
}
/>
<FormControlLabel
style={{marginBottom: 15, color: "white",}}
label={<div style={{color: "white"}}>Start from top</div>}
control={
<Switch checked={workflow.configuration.start_from_top} onChange={() => {
workflow.configuration.start_from_top = !workflow.configuration.start_from_top
setWorkflow(workflow)
setUpdate("start_from_top_"+workflow.configuration.start_from_top ? "true" : "false")
setShowShuffleMenu(false)
}} />
}
/>
</div>
</Menu>
<Tooltip color="secondary" title="Workflow settings" placement="top-start">
<span>
<Button color="primary" style={{height: 50, marginLeft: 10, }} variant="outlined" onClick={(event) => {
setShowShuffleMenu(!showShuffleMenu)
setNewAnchor(event.currentTarget)
}}>
<SettingsIcon />
</Button>
</span>
</Tooltip>
</div>
)
}
const WorkflowMenu = () => { const WorkflowMenu = () => {
const [newAnchor, setNewAnchor] = React.useState(null) const [newAnchor, setNewAnchor] = React.useState(null)
const [showShuffleMenu, setShowShuffleMenu] = React.useState(false) const [showShuffleMenu, setShowShuffleMenu] = React.useState(false)
@@ -7529,6 +7471,19 @@ const AngularWorkflow = (props) => {
<div style={{margin: 15, color: "white", maxWidth: 250, minWidth: 250, }}> <div style={{margin: 15, color: "white", maxWidth: 250, minWidth: 250, }}>
<h4>This menu is used to control the workflow itself.</h4> <h4>This menu is used to control the workflow itself.</h4>
<Divider style={{backgroundColor: "white", marginTop: 10, marginBottom: 10,}}/> <Divider style={{backgroundColor: "white", marginTop: 10, marginBottom: 10,}}/>
<FormControlLabel
style={{marginBottom: 15, color: "white",}}
label={<div style={{color: "white"}}>Skip Notifications</div>}
control={
<Switch checked={workflow.configuration.skip_notifications} onChange={() => {
workflow.configuration.skip_notifications = !workflow.configuration.skip_notifications
setWorkflow(workflow)
setUpdate("skip_notifications"+workflow.configuration.skip_notification? "true" : "false")
//setShowShuffleMenu(false)
}} />
}
/>
<FormControlLabel <FormControlLabel
style={{marginBottom: 15, color: "white",}} style={{marginBottom: 15, color: "white",}}
label={<div style={{color: "white"}}>Exit on Error</div>} label={<div style={{color: "white"}}>Exit on Error</div>}
@@ -7537,7 +7492,7 @@ const AngularWorkflow = (props) => {
workflow.configuration.exit_on_error = !workflow.configuration.exit_on_error workflow.configuration.exit_on_error = !workflow.configuration.exit_on_error
setWorkflow(workflow) setWorkflow(workflow)
setUpdate("exit_on_error_"+workflow.configuration.exit_on_error ? "true" : "false") setUpdate("exit_on_error_"+workflow.configuration.exit_on_error ? "true" : "false")
setShowShuffleMenu(false) //setShowShuffleMenu(false)
}} /> }} />
} }
/> />
@@ -7549,7 +7504,7 @@ const AngularWorkflow = (props) => {
workflow.configuration.start_from_top = !workflow.configuration.start_from_top workflow.configuration.start_from_top = !workflow.configuration.start_from_top
setWorkflow(workflow) setWorkflow(workflow)
setUpdate("start_from_top_"+workflow.configuration.start_from_top ? "true" : "false") setUpdate("start_from_top_"+workflow.configuration.start_from_top ? "true" : "false")
setShowShuffleMenu(false) //setShowShuffleMenu(false)
}} /> }} />
} }
/> />
@@ -7714,7 +7669,6 @@ const AngularWorkflow = (props) => {
</Button> </Button>
</span> </span>
</Tooltip> </Tooltip>
{/* <FileMenu /> */}
{workflow.configuration !== null && workflow.configuration !== undefined && workflow.configuration.exit_on_error !== undefined ? <WorkflowMenu /> : null} {workflow.configuration !== null && workflow.configuration !== undefined && workflow.configuration.exit_on_error !== undefined ? <WorkflowMenu /> : null}
</div> </div>
</div> </div>