diff --git a/.env b/.env index f8be5532..f2e20b1f 100755 --- a/.env +++ b/.env @@ -70,7 +70,7 @@ SHUFFLE_SWARM_BRIDGE_DEFAULT_MTU=1500 # 1500 by default # Used for auto-cleanup of containers. REALLY important at scale. Set to false to see all container info. SHUFFLE_MEMCACHED= SHUFFLE_CONTAINER_AUTO_CLEANUP=true -SHUFFLE_ORBORUS_EXECUTION_CONCURRENCY=3 # The amount of concurrent executions Orborus can handle. This is a soft limit, but it's recommended to keep it low. +SHUFFLE_ORBORUS_EXECUTION_CONCURRENCY=7 # The amount of concurrent executions Orborus can handle. This is a soft limit, but it's recommended to keep it low. SHUFFLE_HEALTHCHECK_DISABLED=false SHUFFLE_ELASTIC=true SHUFFLE_LOGS_DISABLED=false @@ -93,4 +93,4 @@ SHUFFLE_OPENSEARCH_PROXY= SHUFFLE_OPENSEARCH_INDEX_PREFIX= SHUFFLE_OPENSEARCH_SKIPSSL_VERIFY=true -DEBUG_MODE=false \ No newline at end of file +DEBUG_MODE=false diff --git a/backend/app_sdk/app_base.py b/backend/app_sdk/app_base.py index 536fff21..156b2239 100755 --- a/backend/app_sdk/app_base.py +++ b/backend/app_sdk/app_base.py @@ -3619,6 +3619,7 @@ class AppBase: timeout_env = os.getenv("SHUFFLE_APP_SDK_TIMEOUT", timeout) try: timeout = int(timeout_env) + self.logger.info(f"[DEBUG] Timeout set to {timeout} seconds") except Exception as e: self.logger.info(f"[WARNING] Failed parsing timeout to int: {e}") diff --git a/frontend/src/components/Header.jsx b/frontend/src/components/Header.jsx index 2acc229f..dbf68fe2 100644 --- a/frontend/src/components/Header.jsx +++ b/frontend/src/components/Header.jsx @@ -216,44 +216,44 @@ const { globalUrl, setNotifications, notifications, isLoggedIn, removeCookie, ho const NotificationItem = (props) => { const {data} = props - var image = ""; - var orgName = ""; - var orgId = ""; - if (userdata.orgs !== undefined) { - const foundOrg = userdata.orgs.find((org) => org.id === data["org_id"]); - if (foundOrg !== undefined && foundOrg !== null) { - //position: "absolute", bottom: 5, right: -5, - const imageStyle = { - width: imagesize, - height: imagesize, - pointerEvents: "none", - marginLeft: data.creator_org !== undefined && data.creator_org.length > 0 ? 20 : 0, - borderRadius: 10, - border: foundOrg.id === userdata.active_org.id ? `3px solid ${boxColor}` : null, - cursor: "pointer", - marginRight: 10, - }; + var image = ""; + var orgName = ""; + var orgId = ""; + if (userdata.orgs !== undefined) { + const foundOrg = userdata.orgs.find((org) => org.id === data["org_id"]); + if (foundOrg !== undefined && foundOrg !== null) { + //position: "absolute", bottom: 5, right: -5, + const imageStyle = { + width: imagesize, + height: imagesize, + pointerEvents: "none", + marginLeft: data.creator_org !== undefined && data.creator_org.length > 0 ? 20 : 0, + borderRadius: 10, + border: foundOrg.id === userdata.active_org.id ? `3px solid ${boxColor}` : null, + cursor: "pointer", + marginRight: 10, + }; - image = - foundOrg.image === "" ? ( - {foundOrg.name} - ) : ( - {foundOrg.name} {}} - /> - ); + image = + foundOrg.image === "" ? ( + {foundOrg.name} + ) : ( + {foundOrg.name} {}} + /> + ); - orgName = foundOrg.name; - orgId = foundOrg.id; - } - } + orgName = foundOrg.name; + orgId = foundOrg.id; + } + } return ( diff --git a/frontend/src/components/NewHeader.jsx b/frontend/src/components/NewHeader.jsx index f6f663b3..42d79ebd 100644 --- a/frontend/src/components/NewHeader.jsx +++ b/frontend/src/components/NewHeader.jsx @@ -106,6 +106,8 @@ const Header = (props) => { const clearNotifications = () => { // Don't really care about the logout + + toast("Clearing notifications") fetch(`${globalUrl}/api/v1/notifications/clear`, { credentials: "include", method: "GET", @@ -351,7 +353,7 @@ const Header = (props) => { setAnchorEl(event.currentTarget); }} > - + n.read === false).length} color="primary"> { >
- Your Notifications ({notifications.length}) + Your Notifications ({notifications.filter((data) => !data.read).length}) {notifications.length > 1 ? ( + {data.read === false ? ( + + ) : null} + + + + First seen: {new Date(data.created_at * 1000).toISOString().slice(0, 19)} + + + Last seen: {new Date(data.updated_at * 1000).toISOString().slice(0, 19)} + + + Times seen: {data.amount} + +
+
+ ); + } + return (

Suggestions

@@ -125,6 +307,20 @@ const Priorities = (props) => { setShowRead(!showRead); }} />  Show read + {notifications === null || notifications === undefined || notifications.length === 0 ? null : +
+ {notifications.map((notification, index) => { + if (showRead === false && notification.read === true) { + return null + } + + return ( + + ) + })} +
+ } +
) } diff --git a/frontend/src/components/RuntimeDebugger.jsx b/frontend/src/components/RuntimeDebugger.jsx index ff2706f6..1b007021 100644 --- a/frontend/src/components/RuntimeDebugger.jsx +++ b/frontend/src/components/RuntimeDebugger.jsx @@ -181,6 +181,7 @@ const RuntimeDebugger = (props) => { }, []) const imageSize = 30 + const timenowUnix = Math.floor(Date.now() / 1000) const columns: GridColDef[] = [ { field: 'execution_source', @@ -319,7 +320,8 @@ const RuntimeDebugger = (props) => { }, { field: 'startTimestamp', headerName: 'Start time (UTC)', width: 160, renderCell: (params) => { - const hasError = params.row.completed_at-params.row.started_at > 300 + const comparisonTimestamp = params.row.completed_at === 0 ? timenowUnix : params.row.completed_at + const hasError = comparisonTimestamp-params.row.started_at > 300 return ( diff --git a/frontend/src/views/Admin.jsx b/frontend/src/views/Admin.jsx index ab9560fd..9a7884b0 100755 --- a/frontend/src/views/Admin.jsx +++ b/frontend/src/views/Admin.jsx @@ -134,7 +134,7 @@ const FileCategoryInput = (props) => { const Admin = (props) => { - const { globalUrl, userdata, serverside, checkLogin } = props; + const { globalUrl, userdata, serverside, checkLogin, notifications, setNotifications, } = props; var to_be_copied = ""; const classes = useStyles(); @@ -2836,6 +2836,8 @@ If you're interested, please let me know a time that works for you, or set up a checkLogin={checkLogin} setAdminTab={setAdminTab} setCurTab={setCurTab} + notifications={notifications} + setNotifications={setNotifications} /> : adminTab === 3 ? { marginBottom: "auto", }} > - {data.action.label} + {data.action.label.replaceAll("_", " ")}
diff --git a/frontend/src/views/AppCreator.jsx b/frontend/src/views/AppCreator.jsx index bf82d4f6..15c2c094 100755 --- a/frontend/src/views/AppCreator.jsx +++ b/frontend/src/views/AppCreator.jsx @@ -2511,10 +2511,16 @@ const AppCreator = (defaultprops) => { scheme: "basic", }; } else if (authenticationOption === "Oauth2") { - console.log("oauth2: ", parameterName) + console.log("oauth2: ", parameterName) var newparamName = parameterName.replaceAll('"', ""); newparamName = newparamName.replaceAll("'", ""); + // FIXME - this is a hack to get around the fact that the oauth2 + // flow is not properly defined + if (oauth2Type === "application") { + newparamName = "" + } + //parameterName, parameterValue, revocationUrl data.components.securitySchemes["Oauth2"] = { type: "oauth2", @@ -2945,7 +2951,7 @@ const AppCreator = (defaultprops) => { color="textSecondary" style={{ marginTop: 10 }} > - Base Authorization URL for Oauth2 + Authorization URL for Oauth2 { return response.json(); }) .then((responseJson) => { - //console.log("Apps: ", responseJson) + console.log("Apps: ", responseJson) //responseJson = sortByKey(responseJson, "large_image") //responseJson = sortByKey(responseJson, "is_valid") //setFilteredApps(responseJson.filter(app => !internalIds.includes(app.name) && !(!app.activated && app.generated))) diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go index 92ddc27f..36523b4f 100755 --- a/functions/onprem/orborus/orborus.go +++ b/functions/onprem/orborus/orborus.go @@ -805,7 +805,7 @@ func deployWorker(image string, identifier string, env []string, executionReques log.Printf("[ERROR] Failed to start worker container in environment %s: %s", environment, err) return err } else { - log.Printf("[INFO] Worker Container %s was created under environment %s for execution %s: docker logs %s", cont.ID, environment, executionRequest.ExecutionId, cont.ID) + log.Printf("[INFO][%s] Worker Container created. Environment %s: docker logs %s", executionRequest.ExecutionId, environment, cont.ID) } //stats, err := cli.ContainerInspect(context.Background(), containerName) @@ -830,7 +830,7 @@ func deployWorker(image string, identifier string, env []string, executionReques // } //} } else { - log.Printf("[INFO] Worker Container %s was created under environment %s: docker logs %s", cont.ID, environment, cont.ID) + log.Printf("[INFO][%s] New Worker created. Environment %s: docker logs %s", executionRequest.ExecutionId, environment, cont.ID) } return nil