diff --git a/.env b/.env index eafa2765..f70e5606 100644 --- a/.env +++ b/.env @@ -66,7 +66,7 @@ SHUFFLE_BASE_IMAGE_TAG_SUFFIX="-1.1.0" SHUFFLE_CONTAINER_AUTO_CLEANUP=false SHUFFLE_ELASTIC=true SHUFFLE_LOGS_DISABLED=false -SHUFFLE_CHAT_DISABLED=false # Controls support chat +SHUFFLE_CHAT_DISABLED=false # Controls support chat SHUFFLE_RERUN_SCHEDULE=300 SHUFFLE_DISABLE_RERUN_AND_ABORT=false SHUFFLE_WORKER_SERVER_URL= # Definition in case Worker & Orborus is talking to the wrong server diff --git a/backend/build.sh b/backend/build.sh index 415c64a0..17c372c7 100644 --- a/backend/build.sh +++ b/backend/build.sh @@ -1,10 +1,10 @@ #!/bin/sh docker stop shuffle-backend docker rm shuffle-backend -docker rmi ghcr.io/shuffle/shuffle-backend:latest +docker rmi ghcr.io/shuffle/shuffle-backend:nightly -docker build . -t ghcr.io/shuffle/shuffle-backend:latest -#docker push ghcr.io/shuffle/shuffle-backend:latest +docker build . -t ghcr.io/shuffle/shuffle-backend:nightly +docker push ghcr.io/shuffle/shuffle-backend:nightly echo "Starting server" #docker run -it \ diff --git a/backend/go-app/go.mod b/backend/go-app/go.mod index adc80a1f..04b450e1 100644 --- a/backend/go-app/go.mod +++ b/backend/go-app/go.mod @@ -19,7 +19,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/h2non/filetype v1.1.3 github.com/satori/go.uuid v1.2.0 - github.com/shuffle/shuffle-shared v0.4.14 + github.com/shuffle/shuffle-shared v0.4.17 golang.org/x/crypto v0.3.0 google.golang.org/api v0.103.0 google.golang.org/appengine v1.6.7 diff --git a/backend/go-app/walkoff.go b/backend/go-app/walkoff.go index 53304120..02f3bd9e 100644 --- a/backend/go-app/walkoff.go +++ b/backend/go-app/walkoff.go @@ -400,7 +400,7 @@ func handleGetWorkflowqueue(resp http.ResponseWriter, request *http.Request) { // Add to start of org.Priorities org.Priorities = append(org.Priorities, shuffle.Priority{ Name: fmt.Sprintf("High CPU in environment %s", orgId), - Description: fmt.Sprintf("The environment %s has been using more than %d percent CPU.", orgId, percentageCheck), + Description: fmt.Sprintf("The environment %s has been using more than %d percent CPU. This indicates you may need to look at scaling.", orgId, percentageCheck), Type: "scale", Active: true, URL: fmt.Sprintf("/admin?tab=environments"), diff --git a/frontend/src/components/AppFramework.jsx b/frontend/src/components/AppFramework.jsx index 0fd818d8..e6be25f1 100644 --- a/frontend/src/components/AppFramework.jsx +++ b/frontend/src/components/AppFramework.jsx @@ -3,7 +3,7 @@ import React, { useState, useEffect } from 'react'; import CytoscapeComponent from 'react-cytoscapejs'; import frameworkStyle from '../frameworkStyle.jsx'; import { v4 as uuidv4 } from "uuid"; -import theme from '../theme'; +import theme from '../theme.jsx'; import { useAlert } from "react-alert"; import AppSearch from '../components/Appsearch.jsx'; diff --git a/frontend/src/components/AppsearchPopout.jsx b/frontend/src/components/AppsearchPopout.jsx index 7e15dc67..8a9b66bf 100644 --- a/frontend/src/components/AppsearchPopout.jsx +++ b/frontend/src/components/AppsearchPopout.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; -import theme from '../theme'; +import theme from '../theme.jsx'; import AppSearch from './Appsearch.jsx'; import { diff --git a/frontend/src/components/AuthenticationItem.jsx b/frontend/src/components/AuthenticationItem.jsx index 45879519..eef9806c 100644 --- a/frontend/src/components/AuthenticationItem.jsx +++ b/frontend/src/components/AuthenticationItem.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; -import theme from '../theme'; +import theme from '../theme.jsx'; import { useAlert } from "react-alert"; import { Tooltip, diff --git a/frontend/src/components/AuthenticationNormal.jsx b/frontend/src/components/AuthenticationNormal.jsx index aae3a128..5d3a4fd3 100644 --- a/frontend/src/components/AuthenticationNormal.jsx +++ b/frontend/src/components/AuthenticationNormal.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from "react"; -import theme from '../theme'; +import theme from '../theme.jsx'; import { v4 as uuidv4 } from "uuid"; diff --git a/frontend/src/components/Branding.jsx b/frontend/src/components/Branding.jsx index 68f7c42a..40254bbb 100644 --- a/frontend/src/components/Branding.jsx +++ b/frontend/src/components/Branding.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; import ReactGA from 'react-ga4'; -import theme from "../theme"; +import theme from "../theme.jsx"; import { useTheme } from "@material-ui/core/styles"; import { diff --git a/frontend/src/components/CacheView.jsx b/frontend/src/components/CacheView.jsx index b98b65b7..873f9f7e 100644 --- a/frontend/src/components/CacheView.jsx +++ b/frontend/src/components/CacheView.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from "react"; -import theme from "../theme"; +import theme from "../theme.jsx"; import { Tooltip, Divider, @@ -48,9 +48,10 @@ const CacheView = (props) => { const [listCache, setListCache] = React.useState([]); const [addCache, setAddCache] = React.useState(""); const [modalOpen, setModalOpen] = React.useState(false); - const [key,setKey]= React.useState(""); + const [key, setKey]= React.useState(""); const [value, setValue]= React.useState(""); - const [cacheInput, setCacheInput]= React.useState(''); + const [cacheInput, setCacheInput]= React.useState(""); + const [cacheCursor, setCacheCursor]= React.useState(""); const alert = useAlert(); useEffect(() => { @@ -67,20 +68,26 @@ const CacheView = (props) => { }, credentials: "include", }) - .then((response) => { - if (response.status !== 200) { - console.log("Status not 200 for apps :O!"); - return; - } + .then((response) => { + if (response.status !== 200) { + console.log("Status not 200 for apps :O!"); + return; + } - return response.json(); - }) - .then((responseJson) => { - setListCache(responseJson); - }) - .catch((error) => { - alert.error(error.toString()); - }); + return response.json(); + }) + .then((responseJson) => { + if (responseJson.success === true) { + setListCache(responseJson.keys); + } + + if (responseJson.cursor !== undefined && responseJson.cursor !== null && responseJson.cursor !== "") { + setCacheCursor(responseJson.cursor); + } + }) + .catch((error) => { + alert.error(error.toString()); + }); }; // const getCacheList = (orgId) => { diff --git a/frontend/src/components/EditWorkflow.jsx b/frontend/src/components/EditWorkflow.jsx index b0e4042a..22a9d9ea 100644 --- a/frontend/src/components/EditWorkflow.jsx +++ b/frontend/src/components/EditWorkflow.jsx @@ -1,5 +1,5 @@ import React, { useEffect, useContext } from "react"; -import theme from '../theme'; +import theme from '../theme.jsx'; import { isMobile } from "react-device-detect" import ChipInput from "material-ui-chip-input"; import UsecaseSearch from "../components/UsecaseSearch.jsx" diff --git a/frontend/src/components/Files.jsx b/frontend/src/components/Files.jsx index 5a7e92ac..a3f4e520 100644 --- a/frontend/src/components/Files.jsx +++ b/frontend/src/components/Files.jsx @@ -32,7 +32,7 @@ import { import { useAlert } from "react-alert"; import Dropzone from "../components/Dropzone.jsx"; import CodeEditor from "../components/ShuffleCodeEditor.jsx"; -import theme from "../theme"; +import theme from "../theme.jsx"; const Files = (props) => { const { globalUrl, userdata, serverside, selectedOrganization, isCloud, } = props; diff --git a/frontend/src/components/Header.jsx b/frontend/src/components/Header.jsx index 1dde3f2e..975df6b7 100644 --- a/frontend/src/components/Header.jsx +++ b/frontend/src/components/Header.jsx @@ -77,7 +77,7 @@ const { globalUrl, setNotifications, notifications, isLoggedIn, removeCookie, ho textDecoration: "none", } - const isCloud = serverside === true ? true : window.location.host === "localhost:3002" || window.location.host === "shuffler.io"; + const isCloud = serverside === true || typeof window === 'undefined' ? true : window.location.host === "localhost:3002" || window.location.host === "shuffler.io"; const clearNotifications = () => { // Don't really care about the logout diff --git a/frontend/src/components/Oauth2Auth.jsx b/frontend/src/components/Oauth2Auth.jsx index 1d5381d9..c28f24c7 100644 --- a/frontend/src/components/Oauth2Auth.jsx +++ b/frontend/src/components/Oauth2Auth.jsx @@ -1,7 +1,7 @@ import React, { useRef, useState, useEffect, useLayoutEffect } from "react"; import { useParams, useNavigate, Link } from "react-router-dom"; import { useTheme } from "@material-ui/core/styles"; -import theme from '../theme'; +import theme from '../theme.jsx'; import { v4 as uuidv4 } from "uuid"; import { @@ -90,7 +90,6 @@ const AuthenticationOauth2 = (props) => { appAuthentication, setSelectedAction, setNewAppAuth, - setAuthenticationModalOpen, isCloud, autoAuth, authButtonOnly, @@ -118,7 +117,7 @@ const AuthenticationOauth2 = (props) => { const [oauthUrl, setOauthUrl] = React.useState(""); const [buttonClicked, setButtonClicked] = React.useState(false); - const [offlineAccess, setOfflineAccess] = React.useState(false); + const [offlineAccess, setOfflineAccess] = React.useState(true); const allscopes = authenticationType.scope !== undefined ? authenticationType.scope : []; @@ -365,9 +364,6 @@ const AuthenticationOauth2 = (props) => { if (newwin.closed) { console.log("Closing?") - if (setAuthenticationModalOpen !== undefined) { - setAuthenticationModalOpen(false) - } setButtonClicked(false); clearInterval(timer); @@ -375,7 +371,7 @@ const AuthenticationOauth2 = (props) => { // if (getAppAuthentication !== undefined) { - getAppAuthentication(true, true); + getAppAuthentication(true, true, true); } } else { console.log("Not closed") @@ -574,7 +570,6 @@ const AuthenticationOauth2 = (props) => { return autoAuthButton } - console.log("Window: ", window.location) return (
diff --git a/frontend/src/components/ParsedAction.jsx b/frontend/src/components/ParsedAction.jsx index 5d4baf2e..ed342cde 100644 --- a/frontend/src/components/ParsedAction.jsx +++ b/frontend/src/components/ParsedAction.jsx @@ -7,7 +7,7 @@ import { sortByKey } from "../views/AngularWorkflow.jsx"; import { useTheme } from "@material-ui/core/styles"; import NestedMenuItem from "material-ui-nested-menu-item"; import { useAlert } from "react-alert"; -import theme from '../theme'; +import theme from '../theme.jsx'; import { ButtonGroup, diff --git a/frontend/src/components/RenderCytoscape.jsx b/frontend/src/components/RenderCytoscape.jsx index 18c9815c..c112b448 100644 --- a/frontend/src/components/RenderCytoscape.jsx +++ b/frontend/src/components/RenderCytoscape.jsx @@ -1,7 +1,7 @@ import React, { useState, useEffect, useLayoutEffect } from "react"; import * as cytoscape from "cytoscape"; import CytoscapeComponent from "react-cytoscapejs"; -import cystyle from "../defaultCytoscapeStyle"; +import cystyle from "../defaultCytoscapeStyle.jsx"; const surfaceColor = "#27292D"; const CytoscapeWrapper = (props) => { diff --git a/frontend/src/components/ShuffleCodeEditor.jsx b/frontend/src/components/ShuffleCodeEditor.jsx index a5bfa4d2..1e0aeeb0 100644 --- a/frontend/src/components/ShuffleCodeEditor.jsx +++ b/frontend/src/components/ShuffleCodeEditor.jsx @@ -14,7 +14,7 @@ import { Button, } from '@material-ui/core'; -import theme from '../theme'; +import theme from '../theme.jsx'; import Checkbox from '@mui/material/Checkbox'; import { orange } from '@mui/material/colors'; import { isMobile } from "react-device-detect" diff --git a/frontend/src/components/SuggestedWorkflows.jsx b/frontend/src/components/SuggestedWorkflows.jsx index 6bbc15e7..1b9148f1 100644 --- a/frontend/src/components/SuggestedWorkflows.jsx +++ b/frontend/src/components/SuggestedWorkflows.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from 'react'; import ReactGA from 'react-ga4'; -import theme from '../theme'; +import theme from '../theme.jsx'; import PaperComponent from "../components/PaperComponent.jsx" import UsecaseSearch, { usecaseTypes } from "../components/UsecaseSearch.jsx" diff --git a/frontend/src/components/UsecaseSearch.jsx b/frontend/src/components/UsecaseSearch.jsx index affc3960..03fd619f 100644 --- a/frontend/src/components/UsecaseSearch.jsx +++ b/frontend/src/components/UsecaseSearch.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from "react"; -import theme from '../theme'; +import theme from '../theme.jsx'; import { useNavigate, Link } from "react-router-dom"; import { useAlert } from "react-alert"; import ConfigureWorkflow from "../components/ConfigureWorkflow.jsx"; diff --git a/frontend/src/components/WelcomeForm2.jsx b/frontend/src/components/WelcomeForm2.jsx index f78f65aa..d198ac5f 100644 --- a/frontend/src/components/WelcomeForm2.jsx +++ b/frontend/src/components/WelcomeForm2.jsx @@ -14,7 +14,7 @@ import LightbulbIcon from '@mui/icons-material/Lightbulb'; import ArrowBackIosNewIcon from '@mui/icons-material/ArrowBackIosNew'; import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos'; -import theme from '../theme'; +import theme from '../theme.jsx'; import { Fade, IconButton, diff --git a/frontend/src/components/WorkflowPaper.jsx b/frontend/src/components/WorkflowPaper.jsx index 558de437..516756d2 100644 --- a/frontend/src/components/WorkflowPaper.jsx +++ b/frontend/src/components/WorkflowPaper.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useLayoutEffect } from "react"; -import theme from '../theme'; +import theme from '../theme.jsx'; import { Chip, @@ -30,19 +30,6 @@ const workflowActionStyle = { justifyContent: "space-between", } -const paperAppStyle = { - minHeight: 130, - maxHeight: 130, - overflow: "hidden", - width: "100%", - color: "white", - backgroundColor: theme.palette.surfaceColor, - padding: "12px 12px 0px 15px", - borderRadius: 5, - display: "flex", - boxSizing: "border-box", - position: "relative", -} const chipStyle = { backgroundColor: "#3d3f43", @@ -70,6 +57,20 @@ const WorkflowPaper = (props) => { //console.log("Workflow: ", data) var boxColor = "#86c142"; + const paperAppStyle = { + minHeight: 130, + maxHeight: 130, + overflow: "hidden", + width: "100%", + color: "white", + backgroundColor: theme.palette.surfaceColor, + padding: "12px 12px 0px 15px", + borderRadius: 5, + display: "flex", + boxSizing: "border-box", + position: "relative", + } + var parsedName = data.name; if ( parsedName !== undefined && diff --git a/frontend/src/components/WorkflowPaperNew.jsx b/frontend/src/components/WorkflowPaperNew.jsx index 17fb67e5..3234bdee 100644 --- a/frontend/src/components/WorkflowPaperNew.jsx +++ b/frontend/src/components/WorkflowPaperNew.jsx @@ -1,5 +1,5 @@ import React, { useState, useEffect, useLayoutEffect } from "react"; -import theme from '../theme'; +import theme from '../theme.jsx'; import { Chip, diff --git a/frontend/src/views/Admin.jsx b/frontend/src/views/Admin.jsx index 01f36b7a..abe0b0e4 100644 --- a/frontend/src/views/Admin.jsx +++ b/frontend/src/views/Admin.jsx @@ -6,7 +6,7 @@ import countries from "../components/Countries.jsx"; import CodeEditor from "../components/ShuffleCodeEditor.jsx"; import getLocalCodeData from "../components/ShuffleCodeEditor.jsx"; import CacheView from "../components/CacheView.jsx"; -import theme from "../theme"; +import theme from "../theme.jsx"; import AddIcon from "@mui/icons-material/Add"; import ClearIcon from '@mui/icons-material/Clear'; import StorageIcon from '@mui/icons-material/Storage'; diff --git a/frontend/src/views/AngularWorkflow.jsx b/frontend/src/views/AngularWorkflow.jsx index dda0886f..e0231ff1 100644 --- a/frontend/src/views/AngularWorkflow.jsx +++ b/frontend/src/views/AngularWorkflow.jsx @@ -13,7 +13,7 @@ import ReactJson from "react-json-view"; import NestedMenuItem from "material-ui-nested-menu-item"; import ReactMarkdown from "react-markdown"; import { useAlert } from "react-alert"; -import theme from '../theme'; +import theme from '../theme.jsx'; import { isMobile } from "react-device-detect" import aa from 'search-insights' import Drift from "react-driftjs"; @@ -128,7 +128,7 @@ import undoRedo from "cytoscape-undo-redo"; import Draggable from "react-draggable"; -import cytoscapestyle from "../defaultCytoscapeStyle"; +import cytoscapestyle from "../defaultCytoscapeStyle.jsx"; import cxtmenu from "cytoscape-cxtmenu"; import { validateJson, GetIconInfo } from "./Workflows.jsx"; @@ -1710,7 +1710,7 @@ const AngularWorkflow = (defaultprops) => { //"Testing", const internalIds = ["Shuffle Tools", "http", "email"]; - const getAppAuthentication = (reset, updateAction) => { + const getAppAuthentication = (reset, updateAction, closeMenu) => { fetch(globalUrl + "/api/v1/apps/authentication", { method: "GET", headers: { @@ -1727,6 +1727,7 @@ const AngularWorkflow = (defaultprops) => { return response.json(); }) .then((responseJson) => { + var shouldClose = false if (responseJson.success) { var newauth = []; for (let authkey in responseJson.data) { @@ -1757,13 +1758,18 @@ const AngularWorkflow = (defaultprops) => { for (let authkey in tmpAuth) { var item = tmpAuth[authkey]; + //console.log("Got auth: ", item); + const newfields = {}; for (let filterkey in item.fields) { newfields[item.fields[filterkey].key] = item.fields[filterkey].value; } item.fields = newfields; - if (item.app.name === selectedApp.name) { + + const appname = selectedApp.name.toLowerCase().replace(" ", "_", -1) + const itemname = item.app.name.toLowerCase().replace(" ", "_", -1) + if (itemname === appname) { authenticationOptions.push(item); // Always becoming the last one @@ -1772,14 +1778,19 @@ const AngularWorkflow = (defaultprops) => { selectedAction.selectedAuthentication = item; for (let actionkey in workflow.actions) { - if (workflow.actions[actionkey].app_name === selectedApp.name) { + const actionAppname = workflow.actions[actionkey].app_name.toLowerCase().replace(" ", "_", -1) + if (actionAppname === appname) { workflow.actions[actionkey].selectedAuthentication = item; workflow.actions[actionkey].authentication_id = item.id; appUpdates = true; } } - } - } + } else { + //console.log("Not newer: ", item.edited, " vs ", latest) + } + } else { + //console.log("Appname is wrong: ", appname, " vs ", itemname) + } } selectedAction.authentication = authenticationOptions; @@ -1799,18 +1810,28 @@ const AngularWorkflow = (defaultprops) => { setWorkflow(workflow); saveWorkflow(workflow); alert.info("Added and updated authentication!"); + shouldClose = true } else { console.log("Closing auth modal? FAIL") alert.error("Failed to find new authentication. See details in Oauth2 popup window where auth was attempted."); + shouldClose = false } } else { alert.info("No authentication to update"); } - } + } else { + shouldClose = true + } } else { setAppAuthentication([]); + shouldClose = true } + + // Auto-closing if changes were made + if (closeMenu === true && shouldClose === true) { + setAuthenticationModalOpen(false); + } }) .catch((error) => { setAppAuthentication([]); @@ -3364,7 +3385,7 @@ const AngularWorkflow = (defaultprops) => { alert.error("Failed to auto-activate the app. Go to /apps and activate it.") } else { if (refresh === true) { - alert.success("App activated for your organization! Refresh the page to use the app.") + //alert.success("App activated for your organization! Refresh the page to use the app.") getApps() } } @@ -14760,7 +14781,7 @@ const AngularWorkflow = (defaultprops) => { {curapp === null ? null : ( {selectedResult.action.app_name} { const { globalUrl, isLoaded, isLoggedIn, setIsLoggedIn, setCookie, register, serverside } = defaultprops; @@ -65,11 +56,25 @@ const RunWorkflow = (defaultprops) => { const [apps, setApps] = React.useState([]); const [buttonClicked, setButtonClicked] = React.useState(""); + const boxStyle = { + color: "white", + paddingLeft: "30px", + paddingRight: "30px", + paddingBottom: "30px", + paddingTop: "30px", + backgroundColor: theme.palette.surfaceColor, + marginBottom: 150, + } + const params = useParams(); var props = JSON.parse(JSON.stringify(defaultprops)) props.match = {} props.match.params = params + const defaultTitle = "Run Workflow" + if (document != undefined && document.title != defaultTitle) { + document.title = defaultTitle + } const parsedsearch = serverside === true ? "" : window.location.search if (serverside !== true) { @@ -513,6 +518,9 @@ const RunWorkflow = (defaultprops) => { if (responseJson.sync_features === undefined || responseJson.sync_features === null) { } + if (document != undefined && document.title != defaultTitle) { + document.title = responseJson.name + " - " + defaultTitle + } setSelectedOrganization(responseJson) } }) diff --git a/frontend/src/views/Search.jsx b/frontend/src/views/Search.jsx index 264615f0..60880566 100644 --- a/frontend/src/views/Search.jsx +++ b/frontend/src/views/Search.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect } from "react"; -import theme from '../theme'; +import theme from '../theme.jsx'; import {isMobile} from "react-device-detect"; import AppGrid from "../components/AppGrid.jsx" import WorkflowGrid from "../components/WorkflowGrid.jsx" diff --git a/frontend/src/views/SetAuthentication.jsx b/frontend/src/views/SetAuthentication.jsx index 58f652ed..b91cbfe7 100644 --- a/frontend/src/views/SetAuthentication.jsx +++ b/frontend/src/views/SetAuthentication.jsx @@ -1,7 +1,7 @@ import React, { useState } from "react"; import { Typography, CircularProgress } from "@material-ui/core"; -import theme from '../theme'; +import theme from '../theme.jsx'; const SetAuthentication = (props) => { const { globalUrl } = props; diff --git a/frontend/src/views/Welcome.jsx b/frontend/src/views/Welcome.jsx index c7b9803c..02e01c8a 100644 --- a/frontend/src/views/Welcome.jsx +++ b/frontend/src/views/Welcome.jsx @@ -17,7 +17,7 @@ import { CardContent, CardActionArea, } from '@mui/material'; -import theme from '../theme'; +import theme from '../theme.jsx'; import { useNavigate, Link } from "react-router-dom"; import Drift from "react-driftjs"; diff --git a/frontend/src/views/Workflows.jsx b/frontend/src/views/Workflows.jsx index f5f052f4..2d18f55d 100644 --- a/frontend/src/views/Workflows.jsx +++ b/frontend/src/views/Workflows.jsx @@ -94,7 +94,7 @@ import { useNavigate, Link } from "react-router-dom"; import { useAlert } from "react-alert"; import ChipInput from "material-ui-chip-input"; import { v4 as uuidv4 } from "uuid"; -import theme from "../theme"; +import theme from "../theme.jsx"; const inputColor = "#383B40"; const surfaceColor = "#27292D"; @@ -3447,8 +3447,8 @@ const Workflows = (props) => {
) : null} - {/*userdata.priorities !== undefined && userdata.priorities !== null && userdata.priorities.length > 0 ? -
+ {userdata.priorities !== undefined && userdata.priorities !== null && userdata.priorities.length > 0 && userdata.priorities[0].name.includes("CPU") ? +
{userdata.priorities[0].name} @@ -3459,14 +3459,16 @@ const Workflows = (props) => {
+ {/* + */}
- : null*/} + : null}
{view === "grid" ? ( diff --git a/functions/onprem/orborus/go.mod b/functions/onprem/orborus/go.mod index 87f15d01..00e77370 100644 --- a/functions/onprem/orborus/go.mod +++ b/functions/onprem/orborus/go.mod @@ -9,7 +9,7 @@ require ( github.com/mackerelio/go-osstat v0.2.3 github.com/satori/go.uuid v1.2.0 github.com/shirou/gopsutil v3.21.11+incompatible - github.com/shuffle/shuffle-shared v0.4.14 + github.com/shuffle/shuffle-shared v0.4.17 ) require ( diff --git a/functions/onprem/orborus/go.sum b/functions/onprem/orborus/go.sum index cc21bb49..6f297503 100644 --- a/functions/onprem/orborus/go.sum +++ b/functions/onprem/orborus/go.sum @@ -202,6 +202,8 @@ github.com/shuffle/shuffle-shared v0.4.11 h1:qTYQ/kGzKbbMGMrKL2OLoabIpQABdtMurmk github.com/shuffle/shuffle-shared v0.4.11/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/shuffle/shuffle-shared v0.4.14 h1:jDhvGRdnwDDfsJaNdaww8LlXmjDAlVTHarcO4F+9vKs= github.com/shuffle/shuffle-shared v0.4.14/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= +github.com/shuffle/shuffle-shared v0.4.17 h1:56ll366bdmIJu/7GFqNC2XTjjl0SGBf430PSq+EB6Ro= +github.com/shuffle/shuffle-shared v0.4.17/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index 71e128ae..bdcf12c6 100644 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -935,6 +935,13 @@ func main() { } } + // Handle Cleanup + // var cleanupEnv = strings.ToLower(os.Getenv("CLEANUP")) + // SHUFFLE_CONTAINER_AUTO_CLEANUP=false + if strings.ToLower(os.Getenv("SHUFFLE_CONTAINER_AUTO_CLEANUP")) == "true" { + cleanupEnv = "true" + } + workerTimeout := 600 if workerTimeoutEnv != "" { tmpInt, err := strconv.Atoi(workerTimeoutEnv) @@ -1173,6 +1180,7 @@ func main() { if shuffle.ArrayContains(executionIds, execution.ExecutionId) { log.Printf("[INFO] Execution already handled: %s", execution.ExecutionId) + toBeRemoved.Data = append(toBeRemoved.Data, execution) continue } diff --git a/functions/onprem/worker/go.mod b/functions/onprem/worker/go.mod index 7605c88d..f6b1406e 100644 --- a/functions/onprem/worker/go.mod +++ b/functions/onprem/worker/go.mod @@ -11,7 +11,7 @@ require ( github.com/gorilla/mux v1.8.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/satori/go.uuid v1.2.0 - github.com/shuffle/shuffle-shared v0.4.14 + github.com/shuffle/shuffle-shared v0.4.17 ) require ( diff --git a/functions/onprem/worker/go.sum b/functions/onprem/worker/go.sum index e33d3bc9..6cfb1be4 100644 --- a/functions/onprem/worker/go.sum +++ b/functions/onprem/worker/go.sum @@ -220,6 +220,8 @@ github.com/shuffle/shuffle-shared v0.4.2 h1:GzDAOHN4YMMLzRmmToyO/KSYDziRuEuxLhea github.com/shuffle/shuffle-shared v0.4.2/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/shuffle/shuffle-shared v0.4.9 h1:mGCaLcSbrsQCy26pJXPlZAtitEzEEwqotGNjnsvOM/U= github.com/shuffle/shuffle-shared v0.4.9/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= +github.com/shuffle/shuffle-shared v0.4.17 h1:56ll366bdmIJu/7GFqNC2XTjjl0SGBf430PSq+EB6Ro= +github.com/shuffle/shuffle-shared v0.4.17/go.mod h1:jQrYySmvp/0De5ftrAaY6xwwr7TMfqBmBxQ2AX9yrjQ= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e h1:MRM5ITcdelLK2j1vwZ3Je0FKVCfqOLp5zO6trqMLYs0= github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e/go.mod h1:XV66xRDqSt+GTGFMVlhk3ULuV0y9ZmzeVGR4mloJI3M= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=