+
{data}
diff --git a/frontend/src/views/Workflows2.jsx b/frontend/src/views/Workflows2.jsx
index 45866f9d..aa5bd735 100644
--- a/frontend/src/views/Workflows2.jsx
+++ b/frontend/src/views/Workflows2.jsx
@@ -58,6 +58,7 @@ import {
AvatarGroup,
Zoom,
Collapse,
+ Skeleton,
} from "@mui/material";
// Material UI Icons
@@ -430,14 +431,17 @@ export const GetIconInfo = (action) => {
};
const chipStyle = {
- backgroundColor: "#3d3f43",
+ backgroundColor: "#2F2F2F",
marginRight: 5,
paddingLeft: 5,
paddingRight: 5,
- height: 28,
+ height: 35,
cursor: "pointer",
- borderColor: "#3d3f43",
- color: "white",
+ borderColor: "#2F2F2F",
+ color: "#C8C8C8",
+ fontSize: "14px",
+ fontFamily: theme?.typography?.fontFamily,
+ borderRadius: "17.5px"
};
export const collapseField = (field) => {
@@ -618,9 +622,11 @@ const useDropzoneStyles = () => {
const { leftSideBarOpenByClick } = useContext(Context);
return {
- maxWidth: window.innerWidth > 1366 ? 1366 : isMobile ? "100%" : 1200,
- margin: "auto",
- padding: 20,
+ paddingTop: 70,
+ // minHeight: 1000,
+ backgroundColor: "#1A1A1A",
+ fontFamily: theme?.typography?.fontFamily,
+ // maxWidth: window.innerWidth > 1366 ? 1366 : isMobile ? "100%" : 1200,
paddingLeft: leftSideBarOpenByClick ? 200 : 0,
transition: "padding-left 0.3s ease",
};
@@ -640,6 +646,7 @@ const DropzoneWrapper = memo(({ onDrop, WorkflowView }) => {
const Workflows2 = (props) => {
const { globalUrl, isLoggedIn, isLoaded, userdata, checkLogin } = props;
+ const { leftSideBarOpenByClick } = useContext(Context);
const location = useLocation();
const navigate = useNavigate();
const [currTab, setCurrTab] = useState(0);
@@ -708,7 +715,6 @@ const Workflows2 = (props) => {
const [apps, setApps] = React.useState([]);
-
document.title = "Shuffle - Workflows";
const handleTabChange = (event, newValue) => {
// Set loading when switching to public workflows tab
@@ -1516,24 +1522,25 @@ const Workflows2 = (props) => {
};
const paperAppStyle = {
- minHeight: 130,
- maxHeight: 130,
+ minHeight: 146,
+ maxHeight: 146,
overflow: "hidden",
width: "100%",
color: "white",
padding: "12px 12px 0px 15px",
display: "flex",
+ fontFamily: theme?.typography?.fontFamily,
boxSizing: "border-box",
position: "relative",
- borderRadius: theme.palette?.borderRadius,
- backgroundColor: theme.palette.surfaceColor,
+ borderRadius: "8px",
+ // backgroundColor: "#212121",
};
const gridContainer = {
height: "auto",
color: "white",
margin: "10px",
- backgroundColor: theme.palette.surfaceColor,
+ backgroundColor: "#212121",
position: "relative",
};
@@ -1542,6 +1549,7 @@ const Workflows2 = (props) => {
width: 160,
height: 44,
justifyContent: "space-between",
+ fontFamily: theme?.typography?.fontFamily,
};
const exportAllWorkflows = (allWorkflows) => {
@@ -2107,6 +2115,80 @@ const Workflows2 = (props) => {
return appsFound
}
+ const WorkflowSkeleton = () => {
+ return (
+
+
+
+ );
+ };
+
+ // Replace the loading sections in the main component with this
+ const LoadingWorkflowGrid = () => {
+ return (
+
+ {[...Array(7)].map((_, index) => (
+
+ ))}
+
+ );
+ };
+
const WorkflowPaper = (props) => {
const { data, type = "org" } = props;
const [open, setOpen] = React.useState(false);
@@ -2283,8 +2365,9 @@ const Workflows2 = (props) => {
marginRight: 10,
};
+
image =
- foundOrg.image === "" ? (
+ foundOrg.image === "" || foundOrg.image === null || foundOrg.image === undefined ? (
{
}
}
+ if (type === "public" && currTab === 2) {
+
+ const imageStyle = {
+ width: 24,
+ height: 24,
+ marginRight: 10,
+ border: "1px solid rgba(255,255,255,0.3)",
+ }
+
+ image = data.creator_info !== undefined && data.creator_info !== null && data.creator_info.image !== undefined && data.creator_info.image !== null && data.creator_info.image.length > 0 ?
:
+ const creatorname = data.creator_info !== undefined && data.creator_info !== null && data.creator_info.username !== undefined && data.creator_info.username !== null && data.creator_info.username.length > 0 ? data.creator_info.username : "Shuffle"
+ if ((data.objectID === undefined || data.objectID === null) && data.id !== undefined && data.id !== null) {
+ data.objectID = data.id
+ }
+
+ //console.log("IMG: ", data)
+ var parsedUrl = `/workflows/${data.objectID}`
+ if (data.__queryID !== undefined && data.__queryID !== null) {
+ parsedUrl += `?queryID=${data.__queryID}`
+ }
+ }
+
return (
-
+
{selectedCategory !== "" ?
@@ -2351,6 +2456,7 @@ const Workflows2 = (props) => {
width: 3,
backgroundColor: boxColor,
borderRadius: "0 100px 0 0",
+ fontFamily: theme?.typography?.fontFamily,
}}
onClick={() => {
addFilter(selectedCategory)
@@ -2360,7 +2466,7 @@ const Workflows2 = (props) => {
: null}
@@ -2389,7 +2495,7 @@ const Workflows2 = (props) => {
maxWidth: 310,
padding: "12px 0",
}}>
- {data.image !== undefined && data.image !== null && data.image.length > 0 ? (
+ {(data?.image !== undefined || data?.image_url !== undefined) ? (
{
border: `1px solid ${theme.palette.inputColor}`,
}}>
{
Edit: {data.name}
@@ -2443,10 +2551,14 @@ const Workflows2 = (props) => {
paddingBottom: 0,
maxHeight: 30,
flex: 10,
+ fontFamily: theme?.typography?.fontFamily,
+ fontWeight: 500,
}}
>
{parsedName}
@@ -2620,8 +2732,9 @@ const Workflows2 = (props) => {
style={{
justifyContent: "left",
overflow: "hidden",
- marginTop: 5,
- maxHeight: 28,
+ marginTop: 8,
+ maxHeight: 35,
+ fontFamily: theme?.typography?.fontFamily,
}}
>
{data.tags !== undefined && data.tags !== null
@@ -3079,11 +3192,7 @@ const Workflows2 = (props) => {
-
+
{
);
}
return (
-
+
{
// }
useEffect(() => {
- if (userdata !== undefined && userdata !== null) {
- var filteredWorkflows = []
+ if (userdata !== undefined && userdata !== null && currTab !== 2) {
setIsLoadingWorkflow(true);
+ var filteredWorkflows = []
if (currTab === 0) {
filteredWorkflows = workflows.filter(workflow => workflow?.org_id === userdata?.active_org?.id)
}
@@ -3807,7 +3916,10 @@ const Workflows2 = (props) => {
filteredWorkflows = workflows.filter(workflow => workflow?.org_id === userdata?.active_org?.id && workflow?.owner === userdata?.id)
}
setFilteredWorkflows(filteredWorkflows)
- setIsLoadingWorkflow(false);
+ setTimeout(() => {
+ setIsLoadingWorkflow(false);
+ }, 500);
+
}
}, [currTab, workflows, userdata])
@@ -3819,25 +3931,29 @@ const Workflows2 = (props) => {
var counted = 0
console.log("Public workflows", hits)
- if (isLoadingPublicWorkflow) {
- return (
-
-
-
- );
- }
-
return (
-
- {hits.map((data, index) => {
- return
- })}
-
+
+ isLoadingPublicWorkflow ?
+ (
+
+ ) : (
+
+
+ {hits.map((data, index) => {
+ return
+ })}
+
+ )
)
}
@@ -3849,6 +3965,21 @@ const Workflows2 = (props) => {
setSelectedCategory(e.target.value)
}
+
+ const iconButtonStyle = {
+ color: 'white',
+ backgroundColor: '#212121',
+ borderRadius: '4px',
+ padding: "12px 16px",
+ cursor: 'pointer',
+ minWidth: '40px',
+ height: 'auto',
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'center',
+
+ }
+
const WorkflowView = memo(() => {
if (workflows.length === 0) {
}
@@ -3858,378 +3989,258 @@ const Workflows2 = (props) => {
const foundPriority = userdata === undefined || userdata === null || userdata.priorities === undefined || userdata.priorities === null ? null : userdata.priorities.find(prio => prio.type === "usecase" && prio.active === true)
return (
-
-
-
- {/*
-
- Workflows
-
-
*/}
- {/*
-
- */}
- {/* {isMobile ? null :
-
-
- {
- console.log("CHANGE: ", chips);
- setFilters(chips);
- findWorkflow(chips);
- }}
- //onAdd={(chip) => {
- // console.log("ADd: ", chip);
- // addFilter(chip);
- //}}
- //onDelete={(_, index) => {
- // console.log("Remove: ", index);
- // removeFilter(index);
- //}}
- />
-
-
- } */}
- {/*
- {workflowButtons}
-
*/}
+ <>
+
+
+ Workflows
+
+
+
+
+
+
+
+
- {/*
- {!isMobile && !hasWorkflows && usecases !== null && usecases !== undefined && usecases.length > 0 ?
-
- {usecases.map((usecase, index) => {
- if (usecase.name === "5. Verify") {
- return null
- }
- const percentDone = usecase.matches.length > 0 ? parseInt(usecase.matches.length/usecase.list.length*100) : 0
- if (percentDone === 0) {
- usecase = findMatches(usecase, workflows)
- }
-
- return (
-
{
- console.log("Filters: ", filters, usecase.name.toLowerCase())
- if (!filters.includes(usecase.name.toLowerCase())) {
- addFilter(usecase.name)
- } else {
- removeFilter(filters.indexOf(usecase.name.toLowerCase()))
- }
-
- }}
- >
-
-
- {usecase.name}
-
-
- {usecase.matches.length}/{usecase.list.length}
-
-
-
- )
- })}
-
- : null}
-
*/}
+
+
+ //
+ //
+ // ),
+ onKeyDown: (e) => {
+ // Prevent default behavior for Enter and Backspace
+ if (e.key === 'Enter' || e.key === 'Backspace') {
+ e.preventDefault();
+ e.stopPropagation();
+ e.target.focus();
+ }
+ },
+ }}
+ clearInputOnBlur={false}
+ sx={{
+ // Container styling
+ '& .MuiOutlinedInput-root': {
+ height: "fit-content",
+ borderRadius: '4px',
+ backgroundColor: '#212121',
+ '& fieldset': {
+ borderColor: 'rgba(255, 255, 255, 0.23)',
+ },
+ '&:hover fieldset': {
+ borderColor: 'rgba(255, 255, 255, 0.4)',
+ },
+ },
- {userdata.priorities !== undefined && userdata.priorities !== null && userdata.priorities.length > 0 && userdata.priorities[0].name.includes("CPU") && userdata.priorities[0].active === true ?
- {
+ setFilters(chips);
+ findWorkflow(chips);
+ }}
+ //onAdd={(chip) => {
+ // console.log("ADd: ", chip);
+ // addFilter(chip);
+ //}}
+ //onDelete={(_, index) => {
+ // console.log("Remove: ", index);
+ // removeFilter(index);
+ //}}
+ />
+
+
selected.length ? selected.join(', ') : 'All Categories'}
>
-
-
- {userdata.priorities[0].name}
-
-
-
-
- {userdata.priorities[0].description}
-
-
-
-
-
- { navigate(userdata.priorities[0].url) }}>
- explore
-
- {/*
-
- Ignore
-
- */}
-
-
- : null}
+ All Categories
+ {usecases.map((usecase, index) => {
+ if (usecase?.name === "5. Verify") {
+ return null;
+ }
- {/* {foundPriority != null && workflows.length < 6 ?
-
- : null} */}
+ const percentDone = usecase.matches.length > 0 ? parseInt(usecase.matches.length / usecase.list.length * 100) : 0
+ if (percentDone === 0) {
+ usecase = findMatches(usecase, workflows)
+ }
-
-
- Workflows
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{
- console.log("CHANGE: ", chips);
- setFilters(chips);
- findWorkflow(chips);
- }}
- style={{ flex: 0.9 }}
- InputProps={{
- style: {
- color: "white",
- borderRadius: 8,
- },
- }}
- sx={{
- '& .MuiOutlinedInput-root': {
- '& fieldset': {
- borderColor: 'rgba(255, 255, 255, 0.2)',
- },
- '&:hover fieldset': {
- borderColor: 'rgba(255, 255, 255, 0.3)',
- },
- '&.Mui-focused fieldset': {
- borderColor: '#f85a3e',
- },
- },
- '& .MuiChip-root': {
- backgroundColor: 'rgba(255, 255, 255, 0.1)',
- color: 'white',
- '& .MuiChip-deleteIcon': {
- color: 'rgba(255, 255, 255, 0.7)',
- '&:hover': {
- color: 'white',
- },
- },
- },
- }}
- />
-
- selected.length ? selected.join(', ') : 'All Categories'}
- >
- All Categories
- {usecases.map((usecase, index) => {
- if (usecase?.name === "5. Verify") {
- return null;
- }
-
- const percentDone = usecase.matches.length > 0 ? parseInt(usecase.matches.length / usecase.list.length * 100) : 0
- if (percentDone === 0) {
- usecase = findMatches(usecase, workflows)
- }
-
- const category = usecase?.name.split(" ")[1]
- return (
- {
- if (!filters.includes(usecase?.name.toLowerCase())) {
- addFilter(usecase.name)
- } else {
- removeFilter(filters.indexOf(usecase?.name.toLowerCase()))
- }
- }}
- style={{
- padding: "12px 16px",
- borderBottom: index === usecases.length - 2 ? "none" : "1px solid rgba(255,255,255,0.05)",
- "&:hover": {
- backgroundColor: "rgba(255,255,255,0.1)"
- }
- }}
- >
-
-
-
-
- {category}
-
-
- {usecase?.matches.length}/{usecase?.list.length}
-
-
-
-
- )
- })}
-
-
-
-
- navigate("/workflows/debug")}
- >
-
-
-
-
- {
- if (view === "grid") {
- localStorage.setItem("workflowView", "list");
- setView("list");
+ if (!filters.includes(usecase?.name.toLowerCase())) {
+ addFilter(usecase.name)
} else {
- localStorage.setItem("workflowView", "grid");
- setView("grid");
+ removeFilter(filters.indexOf(usecase?.name.toLowerCase()))
+ }
+ }}
+ style={{
+ padding: "12px 16px",
+ borderBottom: index === usecases.length - 2 ? "none" : "1px solid rgba(255,255,255,0.05)",
+ "&:hover": {
+ backgroundColor: "rgba(255,255,255,0.1)"
}
}}
>
- {
- view === "list" ? :
- }
+
+
+
+
+ {category}
+
+
+ {usecase?.matches.length}/{usecase?.list.length}
+
+
+
+
+ )
+ })}
+
+
+
+
+
+
+ navigate("/workflows/debug")}
+ disabled={currTab === 2}
+ >
+
+
+
+ {
+ const newView = view === "grid" ? "list" : "grid";
+ localStorage.setItem("workflowView", newView);
+ setView(newView);
+ }}
+ disabled={currTab === 2}
+ >
+ {view === "grid" ? : }
+
+
+
upload.click()}
+ disabled={currTab === 2}
>
{submitLoading ? : }
+
{
ref={(ref) => (upload = ref)}
onChange={importFiles}
/>
-
+
+
{
- exportAllWorkflows(workflows);
- }}
+ style={{ ...iconButtonStyle, cursor: "pointer" }}
+ disabled={isCloud || currTab === 2}
+ onClick={() => exportAllWorkflows(workflows)}
>
-
}
>
-
Create Workflow
-
-
-
- {
- isLoadingWorkflow ? (
-
-
-
- ) : (
- view === "grid" && currTab !== 2 ? (
- <>
-
-
- {filteredWorkflows.map((data, index) => {
- // Shouldn't be a part of this list
- if (data.public === true) {
- return null
- }
-
- if (firstLoad) {
- workflowDelay += 75
- } else {
- return
- }
-
- return (
-
- {/**/}
-
- {/* */}
-
- )
- })}
-
- >
- ) : (
- currTab !== 2 &&
- )
- )
- }
-
- {
- currTab === 2 &&
- (
-
-
-
-
- )
- }
-
-
+
+ {
+ isLoadingWorkflow ? (
+
+ ) : (
+ view === "grid" && currTab !== 2 ? (
+ <>
+
- {/* {foundPriority != null && filteredWorkflows.length > 6 ?
-
- : null} */}
+ {filteredWorkflows.map((data, index) => {
+ // Shouldn't be a part of this list
+ if (data.public === true) {
+ return null
+ }
+
+ if (firstLoad) {
+ workflowDelay += 75
+ } else {
+ return
+ }
+
+ return (
+
+ {/**/}
+
+ {/* */}
+
+ )
+ })}
+
+ >
+ ) : (
+ currTab !== 2 &&
+ )
+ )
+ }
+
+ {
+ currTab === 2 &&
+ (
+
+
+
+
+ )
+ }
+
+
-
+
+ >
+
);
});
@@ -4758,7 +4756,7 @@ const Workflows2 = (props) => {
);
// Maybe use gridview or something, idk
- return {loadedCheck}
;
+ return {loadedCheck}
;
};
diff --git a/functions/onprem/orborus/orborus.go b/functions/onprem/orborus/orborus.go
index e4a0e7fa..3054066a 100755
--- a/functions/onprem/orborus/orborus.go
+++ b/functions/onprem/orborus/orborus.go
@@ -2932,9 +2932,7 @@ func checkTenzirNode() error {
return nil
}
- log.Printf("[DEBUG] Failed to verify Tenzir node on %s: %s", url, err)
-
- return fmt.Errorf("Tenzir node is not available")
+ return fmt.Errorf("Tenzir node is not available due to: %s", err)
}
func createPipeline(command, identifier string) (string, error) {