Fixed autocompletion names to always match latest node name
This commit is contained in:
@@ -11587,6 +11587,17 @@ const AngularWorkflow = (defaultprops) => {
|
||||
width: 30,
|
||||
}}
|
||||
onClick={() => {
|
||||
if (validate.valid) {
|
||||
//console.log("Find and change result: ",
|
||||
//const oldstartnode = cy.getElementById(selectedResult.action.id);
|
||||
//if (oldstartnode !== undefined && oldstartnode !== null) {
|
||||
// const foundname = oldstartnode.data("label")
|
||||
// if (foundname !== undefined && foundname !== null) {
|
||||
// result.action.label = foundname
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
setSelectedResult({
|
||||
"action": {
|
||||
"label": "Execution Argument",
|
||||
@@ -11597,6 +11608,7 @@ const AngularWorkflow = (defaultprops) => {
|
||||
"result": validate.valid ? JSON.stringify(validate.result) : validate.result,
|
||||
"status": "SUCCESS"
|
||||
})
|
||||
|
||||
setCodeModalOpen(true);
|
||||
}}
|
||||
>
|
||||
@@ -11786,6 +11798,20 @@ const AngularWorkflow = (defaultprops) => {
|
||||
//var newitem = JSON.parse(base);
|
||||
var newitem = validateJson(base).result
|
||||
|
||||
// Check if base_node_name has changed
|
||||
if (cy !== undefined && cy !== null) {
|
||||
console.log("Change name?")
|
||||
//const allNodes = cy.nodes().jsons();
|
||||
//for (var key in allNodes) {
|
||||
//const currentNode = allNodes[key];
|
||||
|
||||
//if (currentNode.
|
||||
//}
|
||||
|
||||
//const nodedata = cy.getElementById(data.action.id).data();
|
||||
//base_node_name =
|
||||
}
|
||||
|
||||
to_be_copied = "$" + base_node_name.toLowerCase().replaceAll(" ", "_");
|
||||
for (var key in copy.namespace) {
|
||||
if (copy.namespace[key].includes("Results for")) {
|
||||
@@ -12661,6 +12687,17 @@ const AngularWorkflow = (defaultprops) => {
|
||||
width: 30,
|
||||
}}
|
||||
onClick={() => {
|
||||
const oldstartnode = cy.getElementById(data.action.id);
|
||||
console.log("FOUND NODe: ", oldstartnode)
|
||||
if (oldstartnode !== undefined && oldstartnode !== null) {
|
||||
const foundname = oldstartnode.data("label")
|
||||
if (foundname !== undefined && foundname !== null) {
|
||||
data.action.label = foundname
|
||||
}
|
||||
}
|
||||
|
||||
console.log("Click data: ", data)
|
||||
//data.action.label = ""
|
||||
setSelectedResult(data);
|
||||
setCodeModalOpen(true);
|
||||
}}
|
||||
@@ -12922,7 +12959,16 @@ const AngularWorkflow = (defaultprops) => {
|
||||
data.status === "SUCCESS" &&
|
||||
data.action.id === selectedResult.action.id
|
||||
);
|
||||
|
||||
if (result !== undefined) {
|
||||
const oldstartnode = cy.getElementById(selectedResult.action.id);
|
||||
if (oldstartnode !== undefined && oldstartnode !== null) {
|
||||
const foundname = oldstartnode.data("label")
|
||||
if (foundname !== undefined && foundname !== null) {
|
||||
result.action.label = foundname
|
||||
}
|
||||
}
|
||||
|
||||
setSelectedResult(result);
|
||||
setUpdate(Math.random());
|
||||
break;
|
||||
@@ -12956,7 +13002,16 @@ const AngularWorkflow = (defaultprops) => {
|
||||
data.status !== "SKIPPED" &&
|
||||
data.status !== "WAITING"
|
||||
);
|
||||
|
||||
if (result !== undefined) {
|
||||
const oldstartnode = cy.getElementById(selectedResult.action.id);
|
||||
if (oldstartnode !== undefined && oldstartnode !== null) {
|
||||
const foundname = oldstartnode.data("label")
|
||||
if (foundname !== undefined && foundname !== null) {
|
||||
result.action.label = foundname
|
||||
}
|
||||
}
|
||||
|
||||
setSelectedResult(result);
|
||||
setUpdate(Math.random());
|
||||
break;
|
||||
|
||||
@@ -62,7 +62,7 @@ import NestedMenuItem from "material-ui-nested-menu-item";
|
||||
//import {Search as SearchIcon, ArrowUpward as ArrowUpwardIcon, Visibility as VisibilityIcon, Done as DoneIcon, Close as CloseIcon, Error as ErrorIcon, FindReplace as FindreplaceIcon, ArrowLeft as ArrowLeftIcon, Cached as CachedIcon, DirectionsRun as DirectionsRunIcon, Add as AddIcon, Polymer as PolymerIcon, FormatListNumbered as FormatListNumberedIcon, Create as CreateIcon, PlayArrow as PlayArrowIcon, AspectRatio as AspectRatioIcon, MoreVert as MoreVertIcon, Apps as AppsIcon, Schedule as ScheduleIcon, FavoriteBorder as FavoriteBorderIcon, Pause as PauseIcon, Delete as DeleteIcon, AddCircleOutline as AddCircleOutlineIcon, Save as SaveIcon, KeyboardArrowLeft as KeyboardArrowLeftIcon, KeyboardArrowRight as KeyboardArrowRightIcon, ArrowBack as ArrowBackIcon, Settings as SettingsIcon, LockOpen as LockOpenIcon, ExpandMore as ExpandMoreIcon, VpnKey as VpnKeyIcon} from '@material-ui/icons';
|
||||
|
||||
//https://next.material-ui.com/components/material-icons/
|
||||
import { DataGrid, GridToolbar } from "@material-ui/data-grid";
|
||||
import { DataGrid, GridToolbar } from "@mui/x-data-grid";
|
||||
|
||||
//import JSONPretty from 'react-json-pretty';
|
||||
//import JSONPrettyMon from 'react-json-pretty/dist/monikai'
|
||||
|
||||
@@ -76,7 +76,7 @@ import NestedMenuItem from "material-ui-nested-menu-item";
|
||||
//import {Search as SearchIcon, ArrowUpward as ArrowUpwardIcon, Visibility as VisibilityIcon, Done as DoneIcon, Close as CloseIcon, Error as ErrorIcon, FindReplace as FindreplaceIcon, ArrowLeft as ArrowLeftIcon, Cached as CachedIcon, DirectionsRun as DirectionsRunIcon, Add as AddIcon, Polymer as PolymerIcon, FormatListNumbered as FormatListNumberedIcon, Create as CreateIcon, PlayArrow as PlayArrowIcon, AspectRatio as AspectRatioIcon, MoreVert as MoreVertIcon, Apps as AppsIcon, Schedule as ScheduleIcon, FavoriteBorder as FavoriteBorderIcon, Pause as PauseIcon, Delete as DeleteIcon, AddCircleOutline as AddCircleOutlineIcon, Save as SaveIcon, KeyboardArrowLeft as KeyboardArrowLeftIcon, KeyboardArrowRight as KeyboardArrowRightIcon, ArrowBack as ArrowBackIcon, Settings as SettingsIcon, LockOpen as LockOpenIcon, ExpandMore as ExpandMoreIcon, VpnKey as VpnKeyIcon} from '@material-ui/icons';
|
||||
|
||||
//https://next.material-ui.com/components/material-icons/
|
||||
import { DataGrid, GridToolbar } from "@material-ui/data-grid";
|
||||
import { DataGrid, GridToolbar } from "@mui/x-data-grid";
|
||||
|
||||
//import JSONPretty from 'react-json-pretty';
|
||||
//import JSONPrettyMon from 'react-json-pretty/dist/monikai'
|
||||
|
||||
Reference in New Issue
Block a user