#223: Added basic resultgrabbing from subworkflow if NOT loop
This commit is contained in:
@@ -563,7 +563,7 @@ const AngularWorkflow = (props) => {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log("JSON is same")
|
||||
//console.log("JSON is same")
|
||||
}
|
||||
|
||||
//console.log("PRE LOOPING RESULTS: !", responseJson.execution_id, executionRequest.execution_id)
|
||||
@@ -732,7 +732,7 @@ const AngularWorkflow = (props) => {
|
||||
getWorkflowExecution(props.match.params.key, "")
|
||||
setUpdate(Math.random())
|
||||
} else {
|
||||
console.log("Nothing to update")
|
||||
//console.log("Nothing to update")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1596,10 +1596,13 @@ const AngularWorkflow = (props) => {
|
||||
//parentNode.data()
|
||||
var newNodeData = JSON.parse(JSON.stringify(parentNode.data()))
|
||||
newNodeData.id = uuid.v4()
|
||||
newNodeData.position = {
|
||||
"x": newNodeData.position.x+100,
|
||||
"y": newNodeData.position.y+100,
|
||||
if (newNodeData.position !== undefined) {
|
||||
newNodeData.position = {
|
||||
"x": newNodeData.position.x+100,
|
||||
"y": newNodeData.position.y+100,
|
||||
}
|
||||
}
|
||||
|
||||
newNodeData.isStartNode = false
|
||||
newNodeData.errors = []
|
||||
newNodeData.is_valid = true
|
||||
@@ -1713,6 +1716,7 @@ const AngularWorkflow = (props) => {
|
||||
}
|
||||
|
||||
const curapp = apps.find(a => a.name === curaction.app_name && ((a.app_version === curaction.app_version || (a.loop_versions !== null && a.loop_versions.includes(curaction.app_version)))))
|
||||
console.log("APP: ", curapp)
|
||||
if (!curapp || curapp === undefined) {
|
||||
alert.error(`App ${curaction.app_name}:${curaction.app_version} not found. Is it activated?`)
|
||||
|
||||
@@ -1734,6 +1738,7 @@ const AngularWorkflow = (props) => {
|
||||
//console.log("AUTHENTICATION: ", curapp.authentication)
|
||||
setRequiresAuthentication(curapp.authentication.required && curapp.authentication.parameters !== undefined && curapp.authentication.parameters !== null)
|
||||
if (curapp.authentication.required) {
|
||||
console.log("App requires auth.")
|
||||
// Setup auth here :)
|
||||
const authenticationOptions = []
|
||||
var findAuthId = ""
|
||||
@@ -2793,7 +2798,9 @@ const AngularWorkflow = (props) => {
|
||||
.then((responseJson) => {
|
||||
// No matter what, it's being stopped.
|
||||
if (!responseJson.success) {
|
||||
alert.WARNING("Failed to stop schedule: " + responseJson.reason)
|
||||
if (responseJson.reason !== undefined) {
|
||||
alert.error("Failed to stop schedule: " + responseJson.reason)
|
||||
}
|
||||
} else {
|
||||
alert.success("Successfully stopped schedule")
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import React, { useEffect } from 'react';
|
||||
import { useInterval } from 'react-powerhooks';
|
||||
|
||||
import {IconButton, Typography, Grid, Select, Paper, Divider, ButtonBase, Button, TextField, FormControl, MenuItem, Tooltip, FormControlLabel, Switch, Input, Breadcrumbs, Chip, Dialog, DialogTitle, DialogActions, DialogContent, CircularProgress} from '@material-ui/core';
|
||||
import {OpenInNew as OpenInNewIcon,Apps as AppsIcon, Cached as CachedIcon, Publish as PublishIcon, CloudDownload as CloudDownloadIcon, Edit as EditIcon, Delete as DeleteIcon} from '@material-ui/icons';
|
||||
import {LockOpen as LockOpenIcon, OpenInNew as OpenInNewIcon,Apps as AppsIcon, Cached as CachedIcon, Publish as PublishIcon, CloudDownload as CloudDownloadIcon, Edit as EditIcon, Delete as DeleteIcon} from '@material-ui/icons';
|
||||
|
||||
import { useTheme } from '@material-ui/core/styles';
|
||||
|
||||
@@ -333,6 +333,10 @@ const Apps = (props) => {
|
||||
|
||||
// dropdown with copy etc I guess
|
||||
const appPaper = (data) => {
|
||||
if (data.name === "" && data.id === "") {
|
||||
return null
|
||||
}
|
||||
|
||||
var boxWidth = "2px"
|
||||
if (selectedApp.id === data.id) {
|
||||
boxWidth = "4px"
|
||||
@@ -801,9 +805,14 @@ const Apps = (props) => {
|
||||
const circleSize = 10
|
||||
return (
|
||||
<MenuItem key={data.name} style={{backgroundColor: inputColor, color: "white"}} value={data}>
|
||||
<div style={{width: circleSize, height: circleSize, borderRadius: circleSize / 2, backgroundColor: itemColor, marginRight: "10px"}}/>
|
||||
{data.configuration === true ?
|
||||
<Tooltip color="primary" title={`Authenticate ${selectedApp.name}`} placement="top">
|
||||
<LockOpenIcon style={{cursor: "pointer", width: 24, height: 24, marginRight: 10, }} />
|
||||
</Tooltip>
|
||||
:
|
||||
<div style={{width: 17, height: 17, borderRadius: 17 / 2, backgroundColor: itemColor, marginRight: 10, marginTop: 2, marginTop: "auto", marginBottom: "auto",}}/>
|
||||
}
|
||||
{data.name}
|
||||
|
||||
</MenuItem>
|
||||
)
|
||||
})}
|
||||
|
||||
@@ -311,8 +311,29 @@ const Workflows = (props) => {
|
||||
if (curWorkflow.tags === undefined || curWorkflow.tags === null) {
|
||||
found = filters.map(filter => curWorkflow.name.toLowerCase().includes(filter))
|
||||
} else {
|
||||
found = filters.map(filter => curWorkflow.name.toLowerCase().includes(filter.toLowerCase()) || curWorkflow.tags.includes(filter))
|
||||
found = filters.map(filter => {
|
||||
if (filter === undefined) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (curWorkflow.name.toLowerCase().includes(filter.toLowerCase())) {
|
||||
return true
|
||||
} else if (curWorkflow.tags.includes(filter)) {
|
||||
return true
|
||||
} else if (curWorkflow.actions !== null && curWorkflow.actions !== undefined) {
|
||||
const newfilter = filter.toLowerCase()
|
||||
for (var key in curWorkflow.actions) {
|
||||
const action = curWorkflow.actions[key]
|
||||
if (action.app_name.toLowerCase().includes(newfilter)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
//console.log("FOUND: ", found)
|
||||
//if (found) {
|
||||
if (found.every(v => v === true)) {
|
||||
@@ -604,6 +625,8 @@ const Workflows = (props) => {
|
||||
|
||||
const paperAppStyle = {
|
||||
minHeight: 130,
|
||||
maxHeight: 130,
|
||||
overflow: "hidden",
|
||||
width: "100%",
|
||||
color: "white",
|
||||
backgroundColor: surfaceColor,
|
||||
@@ -1503,7 +1526,7 @@ const Workflows = (props) => {
|
||||
const data = params.row.record;
|
||||
let [triggers, schedules, webhooks, subflows] = getWorkflowMeta(data);
|
||||
|
||||
return
|
||||
return (
|
||||
<Grid item>
|
||||
<Link to={"/workflows/"+data.id}>
|
||||
<EditIcon style={{background: "#F85A3E",
|
||||
@@ -1530,13 +1553,14 @@ const Workflows = (props) => {
|
||||
</Tooltip>
|
||||
: null}
|
||||
</Grid>
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
{ field: 'tags', headerName: 'Tags', width: 390, sortable: false,
|
||||
disableClickEventBubbling: true,
|
||||
renderCell: (params) => {
|
||||
const data = params.row.record;
|
||||
return
|
||||
return (
|
||||
<Grid item>
|
||||
{data.tags !== undefined ?
|
||||
data.tags.map((tag, index) => {
|
||||
@@ -1556,6 +1580,7 @@ const Workflows = (props) => {
|
||||
})
|
||||
: null}
|
||||
</Grid>
|
||||
)
|
||||
}
|
||||
},
|
||||
];
|
||||
@@ -1707,11 +1732,11 @@ const Workflows = (props) => {
|
||||
|
||||
const workflowButtons =
|
||||
<span>
|
||||
{workflows.length > 0 ?
|
||||
{/*workflows.length > 0 ?
|
||||
<Tooltip color="primary" title={"Create new workflow"} placement="top">
|
||||
<Button color="primary" style={{}} variant="text" onClick={() => setModalOpen(true)}><AddIcon /></Button>
|
||||
</Tooltip>
|
||||
: null}
|
||||
: null*/}
|
||||
<Tooltip color="primary" title={"Import workflows"} placement="top">
|
||||
{importLoading ?
|
||||
<Button color="primary" style={{}} variant="text" onClick={() => {}}>
|
||||
|
||||
Reference in New Issue
Block a user