Fixed a few UI inconsistencies
This commit is contained in:
@@ -3409,6 +3409,12 @@ const ParsedAction = (props) => {
|
||||
setSelectedActionEnvironment(env);
|
||||
selectedAction.environment = env.Name;
|
||||
setSelectedAction(selectedAction);
|
||||
|
||||
for (let actionkey in workflow.actions) {
|
||||
workflow.actions[actionkey].environment = env.Name
|
||||
}
|
||||
setWorkflow(workflow)
|
||||
toast("Set environment for ALL actions to " + env.Name)
|
||||
}}
|
||||
style={{
|
||||
backgroundColor: theme.palette.inputColor,
|
||||
|
||||
@@ -21,6 +21,7 @@ import theme from '../theme.jsx';
|
||||
import dayjs from 'dayjs';
|
||||
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'
|
||||
import Pagination from '@mui/material/Pagination';
|
||||
import { triggers as alltriggers } from "../views/AngularWorkflow.jsx"
|
||||
import {
|
||||
DatePicker,
|
||||
DateTimePicker,
|
||||
@@ -29,6 +30,7 @@ import {
|
||||
|
||||
import {
|
||||
OpenInNew as OpenInNewIcon,
|
||||
PlayArrow as PlayArrowIcon,
|
||||
} from '@mui/icons-material';
|
||||
|
||||
import { DataGrid, GridColDef, GridValueGetterParams } from '@mui/x-data-grid'
|
||||
@@ -176,11 +178,42 @@ const RuntimeDebugger = (props) => {
|
||||
}
|
||||
}, [])
|
||||
|
||||
const imageSize = 30
|
||||
const columns: GridColDef[] = [
|
||||
{
|
||||
field: 'execution_source',
|
||||
headerName: 'Source',
|
||||
width: 75,
|
||||
renderCell: (params) => {
|
||||
var foundSource = <PlayArrowIcon style={{color: theme.palette.primary.main, height: imageSize, width: imageSize, }} />
|
||||
|
||||
var source = params.row.execution_source
|
||||
if (source === "schedule") {
|
||||
foundSource = <img src={alltriggers[1].large_image} alt="schedule" style={{borderRadius: theme.palette.borderRadius, height: imageSize, width: imageSize, }} />
|
||||
} else if (source === "webhook") {
|
||||
foundSource = <img src={alltriggers[0].large_image} alt="webhook" style={{borderRadius: theme.palette.borderRadius, height: imageSize, width: imageSize, }} />
|
||||
} else if (source === "subflow" || source.length === 36) {
|
||||
foundSource = <img src={alltriggers[4].large_image} alt="subflow" style={{borderRadius: theme.palette.borderRadius, height: imageSize, width: imageSize, }} />
|
||||
source = "subflow"
|
||||
} else {
|
||||
source = "manual"
|
||||
}
|
||||
|
||||
return (
|
||||
<span style={{}} onClick={() => {
|
||||
//setStatus(params.row.status)
|
||||
}}>
|
||||
<Tooltip title={source} placement="top">
|
||||
{foundSource}
|
||||
</Tooltip>
|
||||
</span>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
headerName: 'Status',
|
||||
width: 150,
|
||||
width: 100,
|
||||
renderCell: (params) => (
|
||||
<span style={{cursor: "pointer", }} onClick={() => {
|
||||
setStatus(params.row.status)
|
||||
@@ -208,6 +241,7 @@ const RuntimeDebugger = (props) => {
|
||||
</span>
|
||||
),
|
||||
},
|
||||
|
||||
{
|
||||
field: 'workflow results',
|
||||
headerName: 'Results',
|
||||
@@ -235,6 +269,52 @@ const RuntimeDebugger = (props) => {
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'finished',
|
||||
headerName: 'Finished',
|
||||
width: 75,
|
||||
renderCell: (params) => {
|
||||
var foundItems = 0
|
||||
var extraItems = 0
|
||||
if (params.row.results !== null && params.row.results !== undefined) {
|
||||
for (let key in params.row.results) {
|
||||
if (params.row.results[key].status === "SUCCESS") {
|
||||
foundItems += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<span style={{}} onClick={() => {
|
||||
}}>
|
||||
{foundItems}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'skipped',
|
||||
headerName: 'Skipped',
|
||||
width: 75,
|
||||
renderCell: (params) => {
|
||||
var foundItems = 0
|
||||
var extraItems = 0
|
||||
if (params.row.results !== null && params.row.results !== undefined) {
|
||||
for (let key in params.row.results) {
|
||||
if (params.row.results[key].status === "SKIPPED") {
|
||||
foundItems += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<span style={{}} onClick={() => {
|
||||
}}>
|
||||
{foundItems}
|
||||
</span>
|
||||
)
|
||||
},
|
||||
},
|
||||
{ field: 'startTimestamp', headerName: 'Start time', width: 160, },
|
||||
{ field: 'endTimestamp', headerName: 'End time', width: 160, },
|
||||
{
|
||||
@@ -288,7 +368,7 @@ const RuntimeDebugger = (props) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{minWidth: 1000, maxWidth: 1000, margin: "auto", }}>
|
||||
<div style={{minWidth: 1150, maxWidth: 1150, margin: "auto", }}>
|
||||
<h1>Workflow Run Debugger</h1>
|
||||
<form onSubmit={(e) => {
|
||||
submitSearch(workflowId, status, startTime, endTime, rowCursor, rowsPerPage)
|
||||
|
||||
@@ -3937,21 +3937,21 @@ If you're interested, please let me know a time that works for you, or set up a
|
||||
style={{ minWidth: 125, maxWidth: 125 }}
|
||||
/>
|
||||
<ListItemText
|
||||
primary="Default"
|
||||
style={{ minWidth: 125, maxWidth: 125 }}
|
||||
primary={"In Queue"}
|
||||
style={{ minWidth: 100, maxWidth: 100 }}
|
||||
/>
|
||||
<ListItemText
|
||||
primary={isCloud ? "Disabled" : "In Queue"}
|
||||
style={{ minWidth: 100, maxWidth: 100 }}
|
||||
primary="Default"
|
||||
style={{ minWidth: 150, maxWidth: 150 }}
|
||||
/>
|
||||
<ListItemText
|
||||
primary="Actions"
|
||||
style={{ minWidth: 200, maxWidth: 200}}
|
||||
/>
|
||||
<ListItemText
|
||||
primary="Last Edited"
|
||||
style={{ minWidth: 170, maxWidth: 170 }}
|
||||
/>
|
||||
<ListItemText
|
||||
primary="Actions"
|
||||
style={{ minWidth: 150, maxWidth: 150 }}
|
||||
/>
|
||||
</ListItem>
|
||||
{environments === undefined || environments === null
|
||||
? null
|
||||
@@ -3969,20 +3969,20 @@ If you're interested, please let me know a time that works for you, or set up a
|
||||
bgColor = "#1f2023";
|
||||
}
|
||||
|
||||
// Check if there's a notification for it in userdata.priorities
|
||||
var showCPUAlert = false
|
||||
var foundIndex = -1
|
||||
if (userdata !== undefined && userdata !== null && userdata.priorities !== undefined && userdata.priorities !== null && userdata.priorities.length > 0) {
|
||||
foundIndex = userdata.priorities.findIndex(prio => prio.name.includes("CPU") && prio.active === true)
|
||||
// Check if there's a notification for it in userdata.priorities
|
||||
var showCPUAlert = false
|
||||
var foundIndex = -1
|
||||
if (userdata !== undefined && userdata !== null && userdata.priorities !== undefined && userdata.priorities !== null && userdata.priorities.length > 0) {
|
||||
foundIndex = userdata.priorities.findIndex(prio => prio.name.includes("CPU") && prio.active === true)
|
||||
|
||||
if (foundIndex >= 0 && userdata.priorities[foundIndex].name.endsWith(environment.Name)) {
|
||||
showCPUAlert = true
|
||||
}
|
||||
}
|
||||
if (foundIndex >= 0 && userdata.priorities[foundIndex].name.endsWith(environment.Name)) {
|
||||
showCPUAlert = true
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Show CPU alert: ", showCPUAlert)
|
||||
//console.log("Show CPU alert: ", showCPUAlert)
|
||||
|
||||
const queueSize = isCloud ? -1 : environment.queue !== undefined && environment.queue !== null ? environment.queue < 0 ? 0 : environment.queue > 100 ? ">100" : environment.queue : 0
|
||||
const queueSize = environment.queue !== undefined && environment.queue !== null ? environment.queue < 0 ? 0 : environment.queue > 99 ? ">99" : environment.queue : 0
|
||||
|
||||
return (
|
||||
<span key={index}>
|
||||
@@ -4069,8 +4069,18 @@ If you're interested, please let me know a time that works for you, or set up a
|
||||
/>
|
||||
<ListItemText
|
||||
style={{
|
||||
minWidth: 125,
|
||||
maxWidth: 125,
|
||||
minWidth: 100,
|
||||
maxWidth: 100,
|
||||
overflow: "hidden",
|
||||
marginLeft: 10,
|
||||
}}
|
||||
|
||||
primary={queueSize}
|
||||
/>
|
||||
<ListItemText
|
||||
style={{
|
||||
minWidth: 140,
|
||||
maxWidth: 140,
|
||||
overflow: "hidden",
|
||||
}}
|
||||
primary={environment.default ? "true" : null}
|
||||
@@ -4082,38 +4092,14 @@ If you're interested, please let me know a time that works for you, or set up a
|
||||
onClick={() => setDefaultEnvironment(environment)}
|
||||
color="primary"
|
||||
>
|
||||
Make default
|
||||
Set Default
|
||||
</Button>
|
||||
)}
|
||||
</ListItemText>
|
||||
<ListItemText
|
||||
style={{
|
||||
minWidth: 100,
|
||||
maxWidth: 100,
|
||||
overflow: "hidden",
|
||||
marginLeft: 10,
|
||||
}}
|
||||
|
||||
primary={isCloud ? environment.archived.toString() : queueSize}
|
||||
/>
|
||||
<ListItemText
|
||||
style={{
|
||||
minWidth: 150,
|
||||
maxWidth: 150,
|
||||
overflow: "hidden",
|
||||
}}
|
||||
primary={
|
||||
environment.edited !== undefined &&
|
||||
environment.edited !== null &&
|
||||
environment.edited !== 0
|
||||
? new Date(environment.edited * 1000).toISOString()
|
||||
: 0
|
||||
}
|
||||
/>
|
||||
<ListItemText
|
||||
style={{
|
||||
minWidth: 300,
|
||||
maxWidth: 300,
|
||||
minWidth: 200,
|
||||
maxWidth: 200,
|
||||
overflow: "hidden",
|
||||
marginLeft: 10,
|
||||
}}
|
||||
@@ -4145,9 +4131,24 @@ If you're interested, please let me know a time that works for you, or set up a
|
||||
>
|
||||
{isCloud && environment.Name.toLowerCase() === "cloud" ? "Rerun" : "Clear"}
|
||||
</Button>
|
||||
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
</ListItemText>
|
||||
<ListItemText
|
||||
style={{
|
||||
minWidth: 150,
|
||||
maxWidth: 150,
|
||||
overflow: "hidden",
|
||||
}}
|
||||
primary={
|
||||
environment.edited !== undefined &&
|
||||
environment.edited !== null &&
|
||||
environment.edited !== 0
|
||||
? new Date(environment.edited * 1000).toISOString()
|
||||
: 0
|
||||
}
|
||||
/>
|
||||
</ListItem>
|
||||
{showCPUAlert === false ? null :
|
||||
<ListItem key={index+"_cpu"} style={{ backgroundColor: bgColor }}>
|
||||
|
||||
@@ -395,9 +395,10 @@ const AngularWorkflow = (defaultprops) => {
|
||||
var to_be_copied = "";
|
||||
const [firstrequest, setFirstrequest] = React.useState(true);
|
||||
const [cystyle] = useState(cytoscapestyle);
|
||||
|
||||
const [cy, setCy] = React.useState();
|
||||
|
||||
const [toolsApp, setToolsApp] = React.useState({});
|
||||
const [toolsApp, setToolsApp] = React.useState({});
|
||||
const [currentView, setCurrentView] = React.useState(0);
|
||||
const [triggerAuthentication, setTriggerAuthentication] = React.useState({});
|
||||
const [triggerFolders, setTriggerFolders] = React.useState([]);
|
||||
@@ -6344,6 +6345,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
}
|
||||
|
||||
const fetchRecommendations = (inputWorkflow) => {
|
||||
//console.log("Disabled recommendations")
|
||||
//return
|
||||
|
||||
const parsedWorkflow = JSON.parse(JSON.stringify(inputWorkflow))
|
||||
|
||||
fetch(globalUrl + "/api/v1/workflows/recommend", {
|
||||
@@ -14992,6 +14996,18 @@ const AngularWorkflow = (defaultprops) => {
|
||||
</Tooltip>
|
||||
) : null}
|
||||
</div>
|
||||
{executionData.workflow !== undefined && executionData.workflow !== null && executionData.workflow.actions !== undefined && executionData.workflow.actions !== null && executionData.workflow.actions.length > 0 && executionData.workflow.actions[0].environment !== "Cloud" ?
|
||||
<div style={{ display: "flex", marginLeft: 10, }}>
|
||||
<Typography variant="body1">
|
||||
<b>Env </b>
|
||||
</Typography>
|
||||
<Typography variant="body1" color="textSecondary" style={{color: "#f85a3e", cursor: "pointer", }} onClick={() => {
|
||||
window.open("/admin?tab=environments", "_blank")
|
||||
}}>
|
||||
{executionData.workflow.actions[0].environment}
|
||||
</Typography>
|
||||
</div>
|
||||
: null}
|
||||
{executionData.status !== undefined &&
|
||||
executionData.status.length > 0 ? (
|
||||
<div style={{ display: "flex", marginLeft: 10, }}>
|
||||
@@ -15973,8 +15989,9 @@ const AngularWorkflow = (defaultprops) => {
|
||||
cy={(incy) => {
|
||||
// FIXME: There's something specific loading when
|
||||
// you do the first hover of a node. Why is this different?
|
||||
//console.log("CY: ", incy)
|
||||
setCy(incy);
|
||||
|
||||
|
||||
setCy(incy);
|
||||
}}
|
||||
/>
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user