@@ -1127,35 +1179,12 @@ const Apps = (props) => {
{editNewButton}
}
- {selectedApp.tags !== undefined && selectedApp.tags !== null ? (
-
- {selectedApp.tags.map((tag, index) => {
- if (index >= 3) {
- return null;
- }
- return (
-
- );
- })}
-
- ) : null}
- {canEditApp
- ? (
-
+ {canEditApp
+ ? (
+
{/*
ID: {selectedApp.id}
*/}
+
Sharing
+
+ {isCloud && (selectedApp.sharing === true || selectedApp.public === true || creatorProfile.github_avatar !== undefined) && !internalIds.includes(selectedApp.name.toLowerCase()) ?
+
+ : null}
) : null}
+
+
+ {isCloud && Object.getOwnPropertyNames(creatorProfile).length !== 0 && creatorProfile.github_avatar !== undefined && creatorProfile.github_avatar !== null ?
+
+
{
+ //setAnchorElAvatar(event.currentTarget);
+ }}
+ >
+
+
+
+
+
+ Shared by{" "}
+
+ {creatorProfile.github_username}
+
+
+
+ : null}
+ {selectedApp.tags !== undefined && selectedApp.tags !== null ? (
+
+ {selectedApp.tags.map((tag, index) => {
+ if (index >= 3) {
+ return null;
+ }
+
+ return (
+
+ );
+ })}
+
+ ) : null}
+
{/*
Owner: {selectedApp.owner}
*/}
{selectedApp.privateId !== undefined &&
selectedApp.privateId.length > 0 ? (
@@ -1666,37 +1804,45 @@ const Apps = (props) => {
)
}
- const activateApp = (appid, refresh) => {
- fetch(globalUrl + "/api/v1/apps/" + appid + "/activate", {
- method: 'GET',
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json',
- },
- credentials: "include",
+ const activateApp = (appid, refresh) => {
+ const appExists = userdata.active_apps !== undefined && userdata.active_apps !== null && userdata.active_apps.includes(appid)
+ const url = appExists ? `${globalUrl}/api/v1/apps/${appid}/deactivate` : `${globalUrl}/api/v1/apps/${appid}/activate`
+
+ fetch(url, {
+ method: 'GET',
+ headers: {
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/json',
+ },
+ credentials: "include",
+ })
+ .then((response) => {
+ if (response.status !== 200) {
+ console.log("Failed to deactivate")
+ }
+
+ return response.json()
})
- .then((response) => {
- if (response.status !== 200) {
- console.log("Failed to activate")
- }
+ .then((responseJson) => {
+ if (responseJson.success === false) {
+ toast("Failed to activate the app")
+ } else {
+ //toast("App activated for your organization! Refresh the page to use the app.")
+ if (appExists) {
+ toast("App deactivated for your organization! Existing workflows with the app will continue to work.")
+ } else {
+ toast("App activated for your organization!")
+ }
- return response.json()
- })
- .then((responseJson) => {
- if (responseJson.success === false) {
- toast("Failed to activate the app")
- } else {
- toast("App activated for your organization! Refresh the page to use the app.")
-
- if (refresh === true) {
- getApps()
- }
+ if (refresh === true) {
+ getApps()
}
- })
- .catch(error => {
- //toast(error.toString())
- console.log("Activate app error: ", error.toString())
- });
+ }
+ })
+ .catch(error => {
+ //toast(error.toString())
+ console.log("Deactivate app error: ", error.toString())
+ });
}
diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go
index b81b4597..ed141a1d 100755
--- a/functions/onprem/orborus/orborus.go
+++ b/functions/onprem/orborus/orborus.go
@@ -675,11 +675,13 @@ func deployWorker(image string, identifier string, env []string, executionReques
createdPod, err := clientset.CoreV1().Pods("shuffle").Create(context.Background(), pod, metav1.CreateOptions{})
if err != nil {
- fmt.Fprintf(os.Stderr, "Error creating pod: %v\n", err)
+ log.Printf("[ERROR] Failed creating pod: %v", err)
+ return err
}
log.Printf("[INFO] Created pod %q in namespace %q\n", createdPod.Name, createdPod.Namespace)
- } else {
+ return nil
+ }
// Binds is the actual "-v" volume.
// Max 20% CPU every second
@@ -839,9 +841,6 @@ func deployWorker(image string, identifier string, env []string, executionReques
log.Printf("[INFO][%s] New Worker created. Environment %s: docker logs %s", executionRequest.ExecutionId, environment, cont.ID)
}
- return nil
- }
-
return nil
}
@@ -1039,11 +1038,16 @@ func getOrborusStats(ctx context.Context) shuffle.OrborusStats {
Timestamp: time.Now().Unix(),
}
+ // FIXME: Returning for now due to this causing network congestion
+ // and database fillup. The backend api also has it disabled.
+ return newStats
+
// Disable orborus stats
if os.Getenv("SHUFFLE_STATS_DISABLED") == "true" {
return newStats
}
+
if swarmConfig == "run" || swarmConfig == "swarm" {
newStats.Swarm = true
}