Added button for stopping dangling executions in environment
This commit is contained in:
+2
-2
@@ -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
|
||||||
@@ -64,7 +64,7 @@ services:
|
|||||||
- SHUFFLE_SWARM_NETWORK_NAME=shuffle-executions
|
- SHUFFLE_SWARM_NETWORK_NAME=shuffle-executions
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
opensearch:
|
opensearch:
|
||||||
image: opensearchproject/opensearch:1.0.0
|
image: opensearchproject/opensearch:1.1.0
|
||||||
hostname: shuffle-opensearch
|
hostname: shuffle-opensearch
|
||||||
container_name: shuffle-opensearch
|
container_name: shuffle-opensearch
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -862,7 +862,7 @@ const Admin = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const abortEnvironmentWorkflows = (environment) => {
|
const abortEnvironmentWorkflows = (environment) => {
|
||||||
console.log("Aborting all workflows started >10 minutes ago, not finished");
|
//console.log("Aborting all workflows started >10 minutes ago, not finished");
|
||||||
|
|
||||||
fetch(`${globalUrl}/api/v1/environments/${environment}/stop`, {
|
fetch(`${globalUrl}/api/v1/environments/${environment}/stop`, {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
@@ -871,7 +871,10 @@ const Admin = (props) => {
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
if (response.status !== 200) {
|
if (response.status !== 200) {
|
||||||
console.log("Status not 200 for apps :O!");
|
console.log("Status not 200 for apps :O!");
|
||||||
|
alert.error("Failed aborting dangling workflows")
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
alert.info("Aborted all dangling workflows")
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.json();
|
return response.json();
|
||||||
@@ -3736,7 +3739,7 @@ const Admin = (props) => {
|
|||||||
setShowArchived(!showArchived);
|
setShowArchived(!showArchived);
|
||||||
}}
|
}}
|
||||||
/>{" "}
|
/>{" "}
|
||||||
Show archived
|
Show disabled
|
||||||
<Divider
|
<Divider
|
||||||
style={{
|
style={{
|
||||||
marginTop: 20,
|
marginTop: 20,
|
||||||
@@ -3760,18 +3763,18 @@ const Admin = (props) => {
|
|||||||
/>
|
/>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary="Default"
|
primary="Default"
|
||||||
style={{ minWidth: 150, maxWidth: 150 }}
|
style={{ minWidth: 125, maxWidth: 125}}
|
||||||
/>
|
/>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary="Actions"
|
primary="Disabled"
|
||||||
style={{ minWidth: 150, maxWidth: 150 }}
|
style={{ minWidth: 100, maxWidth: 100 }}
|
||||||
/>
|
|
||||||
<ListItemText
|
|
||||||
primary="Archived"
|
|
||||||
style={{ minWidth: 150, maxWidth: 150 }}
|
|
||||||
/>
|
/>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary="Last Changed"
|
primary="Last Changed"
|
||||||
|
style={{ minWidth: 170, maxWidth: 170}}
|
||||||
|
/>
|
||||||
|
<ListItemText
|
||||||
|
primary="Actions"
|
||||||
style={{ minWidth: 150, maxWidth: 150 }}
|
style={{ minWidth: 150, maxWidth: 150 }}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
@@ -3824,8 +3827,8 @@ const Admin = (props) => {
|
|||||||
/>
|
/>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
style={{
|
style={{
|
||||||
minWidth: 150,
|
minWidth: 125,
|
||||||
maxWidth: 150,
|
maxWidth: 125,
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
}}
|
}}
|
||||||
primary={environment.default ? "true" : null}
|
primary={environment.default ? "true" : null}
|
||||||
@@ -3833,7 +3836,7 @@ const Admin = (props) => {
|
|||||||
{environment.default ? null : (
|
{environment.default ? null : (
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
style={{ borderRadius: "0px" }}
|
style={{ borderRadius: "0px", marginRight: 5,}}
|
||||||
onClick={() => setDefaultEnvironment(environment)}
|
onClick={() => setDefaultEnvironment(environment)}
|
||||||
color="primary"
|
color="primary"
|
||||||
>
|
>
|
||||||
@@ -3843,34 +3846,10 @@ const Admin = (props) => {
|
|||||||
</ListItemText>
|
</ListItemText>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
style={{
|
style={{
|
||||||
minWidth: 150,
|
minWidth: 100,
|
||||||
maxWidth: 150,
|
maxWidth: 100,
|
||||||
overflow: "hidden",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div style={{ display: "flex" }}>
|
|
||||||
<Button
|
|
||||||
variant={
|
|
||||||
environment.archived ? "contained" : "outlined"
|
|
||||||
}
|
|
||||||
style={{ borderRadius: "0px" }}
|
|
||||||
onClick={() => deleteEnvironment(environment)}
|
|
||||||
color="primary"
|
|
||||||
>
|
|
||||||
{environment.archived ? "Activate" : "Disable"}
|
|
||||||
</Button>
|
|
||||||
{/*<Button variant={environment.archived ? "contained" : "outlined"} style={{borderRadius: "0px"}} onClick={() => {
|
|
||||||
console.log("Should clear executions")
|
|
||||||
abortEnvironmentWorkflows(environment)
|
|
||||||
}} color="primary">Clear executions</Button>*/}
|
|
||||||
{/*<Button disabled={environment.archived} variant="outlined" style={{borderRadius: "0px"}} onClick={() => flushQueue(environment.Name)} color="primary">Flush Queue</Button>*/}
|
|
||||||
</div>
|
|
||||||
</ListItemText>
|
|
||||||
<ListItemText
|
|
||||||
style={{
|
|
||||||
minWidth: 150,
|
|
||||||
maxWidth: 150,
|
|
||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
|
marginLeft: 10,
|
||||||
}}
|
}}
|
||||||
primary={environment.archived.toString()}
|
primary={environment.archived.toString()}
|
||||||
/>
|
/>
|
||||||
@@ -3888,6 +3867,31 @@ const Admin = (props) => {
|
|||||||
: 0
|
: 0
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<ListItemText
|
||||||
|
style={{
|
||||||
|
minWidth: 300,
|
||||||
|
maxWidth: 300,
|
||||||
|
overflow: "hidden",
|
||||||
|
marginLeft: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div style={{ display: "flex" }}>
|
||||||
|
<Button
|
||||||
|
variant={
|
||||||
|
environment.archived ? "contained" : "outlined"
|
||||||
|
}
|
||||||
|
style={{ borderRadius: "0px" }}
|
||||||
|
onClick={() => deleteEnvironment(environment)}
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
{environment.archived ? "Activate" : "Disable"}
|
||||||
|
</Button>
|
||||||
|
<Button variant={environment.archived ? "contained" : "outlined"} style={{borderRadius: "0px"}} onClick={() => {
|
||||||
|
console.log("Should clear executions for: ", environment)
|
||||||
|
abortEnvironmentWorkflows(environment)
|
||||||
|
}} color="primary">Clear executions</Button>
|
||||||
|
</div>
|
||||||
|
</ListItemText>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
Reference in New Issue
Block a user