From 07e6fd5ca18fb3161319ce0bf6f5df956ab8221d Mon Sep 17 00:00:00 2001 From: CTomlyn Date: Mon, 1 Jul 2024 12:20:48 -0700 Subject: [PATCH] #2046 Miscellaneous improvements to sample apps (#2047) Signed-off-by: CTomlyn --- .../constants/canvas-constants.js | 18 +- .../src/object-model/config-utils.js | 8 +- .../src/object-model/layout-dimensions.js | 5 +- canvas_modules/harness/src/client/App.js | 38 ++-- .../all-ports/all-ports-flow.json | 156 ++++++++--------- .../explain/explain-canvas.jsx | 5 +- .../{explainCanvas.json => explain-flow.json} | 0 .../explain2/explain2-canvas.jsx | 4 +- ...explain2Canvas.json => explain2-flow.json} | 0 .../custom-canvases/flows/flows-canvas.jsx | 26 +-- .../{flowsCanvas.json => flows-flow.json} | 0 .../{flowsPalette.json => flows-palette.json} | 0 .../flows/flows-properties.jsx | 2 +- .../flows/flowsLoadingPalette.json | 164 ------------------ .../jsx-icons/jsx-icons-canvas.jsx | 8 +- ...s-canvas-flow.json => jsx-icons-flow.json} | 0 ...as-palette.json => jsx-icons-palette.json} | 0 .../custom-canvases/logic/logic-canvas.jsx | 9 +- .../{logicCanvas.json => logic-flow.json} | 0 .../{logicPalette.json => logic-palette.json} | 0 .../{progress.jsx => progress-canvas.jsx} | 4 +- .../{progress.json => progress-flow.json} | 0 ...rbon.jsx => react-nodes-carbon-canvas.jsx} | 0 ...ing.jsx => react-nodes-mapping-canvas.jsx} | 0 .../{read-only.jsx => read-only-canvas.jsx} | 11 +- ...eadOnlyCanvas.json => read-only-flow.json} | 0 ...nlyPalette.json => read-only-palette.json} | 0 .../stages-card-node-canvas.jsx | 3 +- ...Canvas.json => stages-card-node-flow.json} | 0 .../custom-canvases/stages/stages-canvas.jsx | 5 +- .../{stagesCanvas.json => stages-flow.json} | 0 .../streams/streams-canvas.jsx | 4 +- .../{streams.json => streams-flow.json} | 129 ++++++++------ .../custom-canvases/tables/tables-canvas.jsx | 4 +- .../{tablesCanvas.json => tables-flow.json} | 26 +-- .../sidepanel/api/sidepanel-api.jsx | 2 +- .../sidepanel/canvas/sidepanel-canvas.jsx | 102 +++++------ .../properties/sidepanel-properties.jsx | 2 +- .../client/components/sidepanel/sidepanel.jsx | 2 +- .../{constants.js => harness-constants.js} | 41 ----- 40 files changed, 308 insertions(+), 470 deletions(-) rename canvas_modules/harness/src/client/components/custom-canvases/explain/{explainCanvas.json => explain-flow.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/explain2/{explain2Canvas.json => explain2-flow.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/flows/{flowsCanvas.json => flows-flow.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/flows/{flowsPalette.json => flows-palette.json} (100%) delete mode 100644 canvas_modules/harness/src/client/components/custom-canvases/flows/flowsLoadingPalette.json rename canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/{jsx-icons-canvas-flow.json => jsx-icons-flow.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/{jsx-icons-canvas-palette.json => jsx-icons-palette.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/logic/{logicCanvas.json => logic-flow.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/logic/{logicPalette.json => logic-palette.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/progress/{progress.jsx => progress-canvas.jsx} (98%) rename canvas_modules/harness/src/client/components/custom-canvases/progress/{progress.json => progress-flow.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/react-nodes-carbon/{react-nodes-carbon.jsx => react-nodes-carbon-canvas.jsx} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/react-nodes-mapping/{react-nodes-mapping.jsx => react-nodes-mapping-canvas.jsx} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/read-only/{read-only.jsx => read-only-canvas.jsx} (96%) rename canvas_modules/harness/src/client/components/custom-canvases/read-only/{readOnlyCanvas.json => read-only-flow.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/read-only/{readOnlyPalette.json => read-only-palette.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/stages-card-node/{stagesCardNodeCanvas.json => stages-card-node-flow.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/stages/{stagesCanvas.json => stages-flow.json} (100%) rename canvas_modules/harness/src/client/components/custom-canvases/streams/{streams.json => streams-flow.json} (94%) rename canvas_modules/harness/src/client/components/custom-canvases/tables/{tablesCanvas.json => tables-flow.json} (95%) rename canvas_modules/harness/src/client/constants/{constants.js => harness-constants.js} (74%) diff --git a/canvas_modules/common-canvas/src/common-canvas/constants/canvas-constants.js b/canvas_modules/common-canvas/src/common-canvas/constants/canvas-constants.js index cd3a49858e..672e6ee302 100644 --- a/canvas_modules/common-canvas/src/common-canvas/constants/canvas-constants.js +++ b/canvas_modules/common-canvas/src/common-canvas/constants/canvas-constants.js @@ -1,5 +1,5 @@ /* - * Copyright 2017-2023 Elyra Authors + * Copyright 2017-2024 Elyra Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +31,10 @@ export const DEFAULT_NOTIFICATION_HEADER = "Notifications"; // Used by both toolbar and notification panel. export const NOTIFICATION_ICON_CLASS = "notificationCounterIcon"; +// Values for enableNodeFormatType config parameter +export const NODE_FORMAT_VERTICAL = "Vertical"; +export const NODE_FORMAT_HORIZONTAL = "Horizontal"; + // Values for enableInteractionType config parameter export const INTERACTION_MOUSE = "Mouse"; export const INTERACTION_TRACKPAD = "Trackpad"; @@ -81,11 +85,21 @@ export const STATE_TAG_NONE = "None"; export const STATE_TAG_LOCKED = "Locked"; export const STATE_TAG_READ_ONLY = "ReadOnly"; -// Values for enableSaveZoom +// Values for enableUnderlay config parameter +export const UNDERLAY_NONE = "None"; +export const UNDERLAY_VARIABLE = "Variable"; + +// Values for enableSaveZoom config parameter export const SAVE_ZOOM_NONE = "None"; export const SAVE_ZOOM_PIPELINE_FLOW = "Pipelineflow"; export const SAVE_ZOOM_LOCAL_STORAGE = "LocalStorage"; +// Values for enableImageDisplay config parameter +export const IMAGE_DISPLAY_SVG_INLINE = "SVGInline"; +export const IMAGE_DISPLAY_LOAD_SVG_TO_DEFS = "LoadSVGToDefs"; +export const IMAGE_DISPLAY_SVG_AS_IMAGE = "SVGAsImage"; + + export const ERROR = "error"; export const WARNING = "warning"; export const INFO = "info"; diff --git a/canvas_modules/common-canvas/src/object-model/config-utils.js b/canvas_modules/common-canvas/src/object-model/config-utils.js index 7c81e16232..6b3803b959 100644 --- a/canvas_modules/common-canvas/src/object-model/config-utils.js +++ b/canvas_modules/common-canvas/src/object-model/config-utils.js @@ -19,7 +19,11 @@ import { isMatch, isMatchWith, omit } from "lodash"; import LayoutDimensions from "./layout-dimensions.js"; -import { ASSOC_STRAIGHT, LINK_SELECTION_NONE } from "../common-canvas/constants/canvas-constants"; +import { + ASSOC_STRAIGHT, + LINK_SELECTION_NONE, + NODE_FORMAT_HORIZONTAL +} from "../common-canvas/constants/canvas-constants"; export default class ConfigUtils { @@ -51,7 +55,7 @@ export default class ConfigUtils { // TODO Remove this when paletteInitialState is removed from common-canvas. // paletteInitialState: false, enableInteractionType: "Mouse", - enableNodeFormatType: "Horizontal", + enableNodeFormatType: NODE_FORMAT_HORIZONTAL, enableLinkType: "Curve", enableStraightLinksAsFreeform: false, // TODO - Remove in next major release. enableLinkMethod: "Ports", diff --git a/canvas_modules/common-canvas/src/object-model/layout-dimensions.js b/canvas_modules/common-canvas/src/object-model/layout-dimensions.js index a01ab79fee..3ebc53f6f8 100644 --- a/canvas_modules/common-canvas/src/object-model/layout-dimensions.js +++ b/canvas_modules/common-canvas/src/object-model/layout-dimensions.js @@ -19,7 +19,8 @@ import { LINK_METHOD_FREEFORM, LINK_METHOD_PORTS, LINK_TYPE_STRAIGHT, - LINK_DIR_LEFT_RIGHT + LINK_DIR_LEFT_RIGHT, + NODE_FORMAT_VERTICAL } from "../common-canvas/constants/canvas-constants"; const portsHorizontalDefaultLayout = { @@ -860,7 +861,7 @@ export default class LayoutDimensions { static getDefaultLayout(config) { let defaultLayout; - if (config && config.enableNodeFormatType === "Vertical") { + if (config && config.enableNodeFormatType === NODE_FORMAT_VERTICAL) { defaultLayout = portsVerticalDefaultLayout; } else { diff --git a/canvas_modules/harness/src/client/App.js b/canvas_modules/harness/src/client/App.js index aa9f2238cb..3a91401dc0 100644 --- a/canvas_modules/harness/src/client/App.js +++ b/canvas_modules/harness/src/client/App.js @@ -46,8 +46,8 @@ import TablesCanvas from "./components/custom-canvases/tables/tables-canvas"; import StagesCanvas from "./components/custom-canvases/stages/stages-canvas"; import StagesCardNodeCanvas from "./components/custom-canvases/stages-card-node/stages-card-node-canvas"; import LogicCanvas from "./components/custom-canvases/logic/logic-canvas"; -import ReadOnlyCanvas from "./components/custom-canvases/read-only/read-only"; -import ProgressCanvas from "./components/custom-canvases/progress/progress"; +import ReadOnlyCanvas from "./components/custom-canvases/read-only/read-only-canvas"; +import ProgressCanvas from "./components/custom-canvases/progress/progress-canvas"; import ExplainCanvas from "./components/custom-canvases/explain/explain-canvas"; import Explain2Canvas from "./components/custom-canvases/explain2/explain2-canvas"; import StreamsCanvas from "./components/custom-canvases/streams/streams-canvas"; @@ -55,8 +55,8 @@ import JsxIconsCanvas from "./components/custom-canvases/jsx-icons/jsx-icons-can import AllPortsCanvas from "./components/custom-canvases/all-ports/all-ports-canvas"; import ParallaxCanvas from "./components/custom-canvases/parallax/parallax-canvas"; import NetworkCanvas from "./components/custom-canvases/network/network-canvas"; -import ReactNodesCarbonCanvas from "./components/custom-canvases/react-nodes-carbon/react-nodes-carbon"; -import ReactNodesMappingCanvas from "./components/custom-canvases/react-nodes-mapping/react-nodes-mapping"; +import ReactNodesCarbonCanvas from "./components/custom-canvases/react-nodes-carbon/react-nodes-carbon-canvas"; +import ReactNodesMappingCanvas from "./components/custom-canvases/react-nodes-mapping/react-nodes-mapping-canvas"; import Breadcrumbs from "./components/breadcrumbs.jsx"; import Console from "./components/console/console.jsx"; @@ -97,12 +97,6 @@ import { SIDE_PANEL_MODAL, SIDE_PANEL_API, CHOOSE_FROM_LOCATION, - INTERACTION_MOUSE, - VERTICAL_FORMAT, - NONE_SAVE_ZOOM, - IMAGE_DISPLAY_SVG_INLINE, - ASSOC_STRAIGHT, - UNDERLAY_NONE, EXAMPLE_APP_NONE, EXAMPLE_APP_FLOWS, EXAMPLE_APP_STAGES, @@ -121,15 +115,12 @@ import { EXAMPLE_APP_REACT_NODES_CARBON, EXAMPLE_APP_REACT_NODES_MAPPING, CUSTOM, - PALETTE_FLYOUT, PROPERTIES_FLYOUT, - NONE_DRAG, INPUT_PORT, OUTPUT_PORT, NOTIFICATION_MESSAGE_TYPE, PARAMETER_DEFS, PRIMARY, - TOOLBAR_LAYOUT_TOP, TOOLBAR_TYPE_DEFAULT, TOOLBAR_TYPE_SUB_AREAS, TOOLBAR_TYPE_SINGLE_BAR, @@ -139,14 +130,23 @@ import { TOOLBAR_TYPE_CUSTOM_ACTIONS, TOOLBAR_TYPE_OVERRIDE_AUTO_ENABLE_DISABLE, CATEGORY_VIEW_ACCORDIONS -} from "./constants/constants.js"; +} from "./constants/harness-constants.js"; import { + NODE_FORMAT_VERTICAL, + INTERACTION_MOUSE, + SNAP_TO_GRID_NONE, + SAVE_ZOOM_NONE, STATE_TAG_NONE, LINK_TYPE_CURVE, LINK_DIR_LEFT_RIGHT, LINK_METHOD_PORTS, - LINK_SELECTION_NONE + LINK_SELECTION_NONE, + ASSOC_STRAIGHT, + IMAGE_DISPLAY_SVG_INLINE, + UNDERLAY_NONE, + PALETTE_LAYOUT_FLYOUT, + TOOLBAR_LAYOUT_TOP } from "../../../common-canvas/src/common-canvas/constants/canvas-constants.js"; import EXTERNAL_SUB_FLOW_CANVAS_1 from "../../test_resources/diagrams/externalSubFlowCanvas1.json"; @@ -188,14 +188,14 @@ class App extends React.Component { selectedAssocLinkCreation: false, selectedMarkdownInComments: false, selectedContextToolbar: false, - selectedSnapToGridType: NONE_DRAG, + selectedSnapToGridType: SNAP_TO_GRID_NONE, enteredSnapToGridX: "", enteredSnapToGridY: "", selectedInteractionType: INTERACTION_MOUSE, - selectedNodeFormatType: VERTICAL_FORMAT, + selectedNodeFormatType: NODE_FORMAT_VERTICAL, selectedToolbarLayout: TOOLBAR_LAYOUT_TOP, selectedToolbarType: TOOLBAR_TYPE_DEFAULT, - selectedSaveZoom: NONE_SAVE_ZOOM, + selectedSaveZoom: SAVE_ZOOM_NONE, selectedZoomIntoSubFlows: false, selectedSingleOutputPortDisplay: false, selectedImageDisplay: IMAGE_DISPLAY_SVG_INLINE, @@ -209,7 +209,7 @@ class App extends React.Component { selectedAssocLinkType: ASSOC_STRAIGHT, selectedCanvasUnderlay: UNDERLAY_NONE, selectedExampleApp: EXAMPLE_APP_NONE, - selectedPaletteLayout: PALETTE_FLYOUT, + selectedPaletteLayout: PALETTE_LAYOUT_FLYOUT, selectedStateTag: STATE_TAG_NONE, selectedTipConfig: { "palette": { diff --git a/canvas_modules/harness/src/client/components/custom-canvases/all-ports/all-ports-flow.json b/canvas_modules/harness/src/client/components/custom-canvases/all-ports/all-ports-flow.json index e30927ce68..0a93e4ea78 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/all-ports/all-ports-flow.json +++ b/canvas_modules/harness/src/client/components/custom-canvases/all-ports/all-ports-flow.json @@ -16,8 +16,8 @@ "ui_data": { "label": "East output port node", "image": "images/custom-canvases/flows/palette/icons/autodataprep.svg", - "x_pos": 297.5, - "y_pos": 420, + "x_pos": 315, + "y_pos": 450, "description": "A node with 1 east output node" } }, @@ -44,8 +44,8 @@ "ui_data": { "label": "West input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 87.5, - "y_pos": 240, + "x_pos": 105, + "y_pos": 270, "description": "A node with 1 west input node" } }, @@ -79,8 +79,8 @@ "ui_data": { "label": "West input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 87.5, - "y_pos": 420, + "x_pos": 105, + "y_pos": 450, "description": "A node with 1 west input node" } }, @@ -114,8 +114,8 @@ "ui_data": { "label": "West input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 87.5, - "y_pos": 615, + "x_pos": 105, + "y_pos": 645, "description": "A node with 1 west input node" } }, @@ -149,8 +149,8 @@ "ui_data": { "label": "West input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 507.5, - "y_pos": 240, + "x_pos": 525, + "y_pos": 270, "description": "A node with 1 west input node" } }, @@ -184,8 +184,8 @@ "ui_data": { "label": "West input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 507.5, - "y_pos": 615, + "x_pos": 525, + "y_pos": 645, "description": "A node with 1 west input node" } }, @@ -219,8 +219,8 @@ "ui_data": { "label": "East input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 700, - "y_pos": 240, + "x_pos": 717.5, + "y_pos": 270, "description": "A node with 1 east input node" } }, @@ -254,8 +254,8 @@ "ui_data": { "label": "East output port node", "image": "images/custom-canvases/flows/palette/icons/autodataprep.svg", - "x_pos": 927.5, - "y_pos": 420, + "x_pos": 945, + "y_pos": 450, "description": "A node with 1 east output node" } }, @@ -282,8 +282,8 @@ "ui_data": { "label": "East input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 1137.5, - "y_pos": 255, + "x_pos": 1155, + "y_pos": 285, "description": "A node with 1 east input node" } }, @@ -317,8 +317,8 @@ "ui_data": { "label": "East input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 700, - "y_pos": 630, + "x_pos": 717.5, + "y_pos": 660, "description": "A node with 1 east input node" } }, @@ -352,8 +352,8 @@ "ui_data": { "label": "East input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 1137.5, - "y_pos": 630, + "x_pos": 1155, + "y_pos": 660, "description": "A node with 1 east input node" } }, @@ -387,8 +387,8 @@ "ui_data": { "label": "East input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 700, - "y_pos": 420, + "x_pos": 717.5, + "y_pos": 450, "description": "A node with 1 east input node" } }, @@ -422,8 +422,8 @@ "ui_data": { "label": "East output port node", "image": "images/custom-canvases/flows/palette/icons/autodataprep.svg", - "x_pos": 297.5, - "y_pos": 1035, + "x_pos": 315, + "y_pos": 1065, "description": "A node with 1 east output node" } }, @@ -450,8 +450,8 @@ "ui_data": { "label": "North input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 87.5, - "y_pos": 870, + "x_pos": 105, + "y_pos": 900, "description": "A node with 1 north input node" } }, @@ -485,8 +485,8 @@ "ui_data": { "label": "North input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 507.5, - "y_pos": 870, + "x_pos": 525, + "y_pos": 900, "description": "A node with 1 north input node" } }, @@ -520,8 +520,8 @@ "ui_data": { "label": "North input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 507.5, - "y_pos": 1215, + "x_pos": 525, + "y_pos": 1245, "description": "A node with 1 north input node" } }, @@ -555,8 +555,8 @@ "ui_data": { "label": "North input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 87.5, - "y_pos": 1215, + "x_pos": 105, + "y_pos": 1245, "description": "A node with 1 north input node" } }, @@ -590,8 +590,8 @@ "ui_data": { "label": "East output port node", "image": "images/custom-canvases/flows/palette/icons/autodataprep.svg", - "x_pos": 910, - "y_pos": 1035, + "x_pos": 927.5, + "y_pos": 1065, "description": "A node with 1 east output node" } }, @@ -618,8 +618,8 @@ "ui_data": { "label": "South input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 700, - "y_pos": 870, + "x_pos": 717.5, + "y_pos": 900, "description": "A node with 1 south input node" } }, @@ -653,8 +653,8 @@ "ui_data": { "label": "South input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 1137.5, - "y_pos": 870, + "x_pos": 1155, + "y_pos": 900, "description": "A node with 1 south input node" } }, @@ -688,8 +688,8 @@ "ui_data": { "label": "South input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 1137.5, - "y_pos": 1215, + "x_pos": 1155, + "y_pos": 1245, "description": "A node with 1 south input node" } }, @@ -723,8 +723,8 @@ "ui_data": { "label": "South input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 700, - "y_pos": 1215, + "x_pos": 717.5, + "y_pos": 1245, "description": "A node with 1 south input node" } }, @@ -758,8 +758,8 @@ "ui_data": { "label": "South input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 700, - "y_pos": 1035, + "x_pos": 717.5, + "y_pos": 1065, "description": "A node with 1 south input node" } }, @@ -793,8 +793,8 @@ "ui_data": { "label": "North input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 87.5, - "y_pos": 1035, + "x_pos": 105, + "y_pos": 1065, "description": "A node with 1 north input node" } }, @@ -828,8 +828,8 @@ "ui_data": { "label": "All ports node", "image": "images/custom-canvases/flows/palette/icons/userinput.svg", - "x_pos": 402.5, - "y_pos": 1590, + "x_pos": 420, + "y_pos": 1620, "description": "A node with 4 input and 4 output ports" } }, @@ -970,8 +970,8 @@ "ui_data": { "label": "North input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 472.5, - "y_pos": 1815, + "x_pos": 490, + "y_pos": 1845, "description": "A node with 1 north input node" } }, @@ -1005,8 +1005,8 @@ "ui_data": { "label": "South input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 437.5, - "y_pos": 1410, + "x_pos": 455, + "y_pos": 1440, "description": "A node with 1 south input node" } }, @@ -1040,8 +1040,8 @@ "ui_data": { "label": "East input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 157.5, - "y_pos": 1650, + "x_pos": 175, + "y_pos": 1680, "description": "A node with 1 east input node" } }, @@ -1075,8 +1075,8 @@ "ui_data": { "label": "West input port node", "image": "images/custom-canvases/flows/palette/icons/table.svg", - "x_pos": 665, - "y_pos": 1650, + "x_pos": 682.5, + "y_pos": 1680, "description": "A node with 1 west input node" } }, @@ -1110,8 +1110,8 @@ "ui_data": { "label": "North output port node", "image": "images/custom-canvases/flows/palette/icons/autodataprep.svg", - "x_pos": 332.5, - "y_pos": 1815, + "x_pos": 350, + "y_pos": 1845, "description": "A node with 1 north output node" } }, @@ -1138,8 +1138,8 @@ "ui_data": { "label": "South output port node", "image": "images/custom-canvases/flows/palette/icons/autodataprep.svg", - "x_pos": 297.5, - "y_pos": 1410, + "x_pos": 315, + "y_pos": 1440, "description": "A node with 1 south output node" } }, @@ -1166,8 +1166,8 @@ "ui_data": { "label": "East output port node", "image": "images/custom-canvases/flows/palette/icons/autodataprep.svg", - "x_pos": 157.5, - "y_pos": 1530, + "x_pos": 175, + "y_pos": 1560, "description": "A node with 1 east output node" } }, @@ -1194,8 +1194,8 @@ "ui_data": { "label": "West output port node", "image": "images/custom-canvases/flows/palette/icons/autodataprep.svg", - "x_pos": 665, - "y_pos": 1545, + "x_pos": 682.5, + "y_pos": 1575, "description": "A node with 1 west output node" } }, @@ -1222,8 +1222,8 @@ "ui_data": { "label": "All ports node", "image": "images/custom-canvases/flows/palette/icons/userinput.svg", - "x_pos": 1032.5, - "y_pos": 1590, + "x_pos": 1050, + "y_pos": 1620, "description": "A node with 4 input and 4 output ports" } }, @@ -1341,8 +1341,8 @@ "comments": [ { "id": "123", - "x_pos": 0, - "y_pos": 15, + "x_pos": 17.5, + "y_pos": 45, "width": 262.5, "height": 135, "class_name": "d3-comment-rect bkg-col-orange-40", @@ -1351,8 +1351,8 @@ }, { "id": "84d7fcf0-be52-4e7b-a056-0bfb1f9bdbc9", - "x_pos": 210, - "y_pos": 165, + "x_pos": 227.5, + "y_pos": 195, "width": 175, "height": 42, "content": "## East -> West", @@ -1360,8 +1360,8 @@ }, { "id": "c403eefa-3ffd-4cd1-8af8-92f73833bebc", - "x_pos": 857.5, - "y_pos": 165, + "x_pos": 875, + "y_pos": 195, "width": 175, "height": 42, "content": "## East -> East", @@ -1369,8 +1369,8 @@ }, { "id": "6799cc71-310e-4941-a3ea-7ba2a8178aeb", - "x_pos": 227.5, - "y_pos": 780, + "x_pos": 245, + "y_pos": 810, "width": 175, "height": 42, "content": "## East -> North", @@ -1378,8 +1378,8 @@ }, { "id": "a1d2c3a0-17a6-4c39-94e0-1c29602edddd", - "x_pos": 857.5, - "y_pos": 780, + "x_pos": 875, + "y_pos": 810, "width": 175, "height": 42, "content": "## East -> South", diff --git a/canvas_modules/harness/src/client/components/custom-canvases/explain/explain-canvas.jsx b/canvas_modules/harness/src/client/components/custom-canvases/explain/explain-canvas.jsx index c645a0c387..396f3185dc 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/explain/explain-canvas.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/explain/explain-canvas.jsx @@ -18,7 +18,7 @@ import React from "react"; import PropTypes from "prop-types"; import { get } from "lodash"; import { CommonCanvas, CanvasController } from "common-canvas"; // eslint-disable-line import/no-unresolved -import ExplainCanvasFlow from "./explainCanvas.json"; +import ExplainFlow from "./explain-flow.json"; export default class ExplainCanvas extends React.Component { @@ -26,11 +26,12 @@ export default class ExplainCanvas extends React.Component { super(props); this.canvasController = new CanvasController(); - this.canvasController.setPipelineFlow(ExplainCanvasFlow); + this.canvasController.setPipelineFlow(ExplainFlow); this.config = Object.assign({}, props.config, { enableParentClass: "explain", enableLinkType: "Straight", + enableLinkMethod: "Freeform", enablePaletteLayout: "None", enableEditingActions: false, enableNodeFormatType: "Vertical", diff --git a/canvas_modules/harness/src/client/components/custom-canvases/explain/explainCanvas.json b/canvas_modules/harness/src/client/components/custom-canvases/explain/explain-flow.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/explain/explainCanvas.json rename to canvas_modules/harness/src/client/components/custom-canvases/explain/explain-flow.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/explain2/explain2-canvas.jsx b/canvas_modules/harness/src/client/components/custom-canvases/explain2/explain2-canvas.jsx index e13944a60f..519f0f334e 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/explain2/explain2-canvas.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/explain2/explain2-canvas.jsx @@ -17,7 +17,7 @@ import React from "react"; import PropTypes from "prop-types"; import { CommonCanvas, CanvasController } from "common-canvas"; // eslint-disable-line import/no-unresolved -import Explain2CanvasFlow from "./explain2Canvas.json"; +import Explain2Flow from "./explain2-flow.json"; const DEFAULT_HEIGHT = 80; @@ -32,7 +32,7 @@ export default class Explain2Canvas extends React.Component { super(props); this.canvasController = new CanvasController(); - this.canvasController.setPipelineFlow(Explain2CanvasFlow); + this.canvasController.setPipelineFlow(Explain2Flow); this.config = Object.assign({}, props.config, { enableParentClass: "explain2", diff --git a/canvas_modules/harness/src/client/components/custom-canvases/explain2/explain2Canvas.json b/canvas_modules/harness/src/client/components/custom-canvases/explain2/explain2-flow.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/explain2/explain2Canvas.json rename to canvas_modules/harness/src/client/components/custom-canvases/explain2/explain2-flow.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/flows/flows-canvas.jsx b/canvas_modules/harness/src/client/components/custom-canvases/flows/flows-canvas.jsx index f8613b5ba7..74cfc8c9e4 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/flows/flows-canvas.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/flows/flows-canvas.jsx @@ -19,9 +19,8 @@ import PropTypes from "prop-types"; import { CommonCanvas, CanvasController } from "common-canvas"; // eslint-disable-line import/no-unresolved -import FlowsCanvasFlow from "./flowsCanvas.json"; -import FlowsPalette from "./flowsPalette.json"; -import FlowsLoadingPalette from "./flowsLoadingPalette.json"; +import FlowsFlow from "./flows-flow.json"; +import FlowsPalette from "./flows-palette.json"; import FlowsProperties from "./flows-properties"; export default class FlowsCanvas extends React.Component { @@ -29,10 +28,8 @@ export default class FlowsCanvas extends React.Component { super(props); this.propertiesRef = React.createRef(); this.canvasController = new CanvasController(); - this.canvasController.setPipelineFlow(FlowsCanvasFlow); - this.canvasController.setPipelineFlowPalette(FlowsLoadingPalette); - - this.activateLoadingCanvas(); + this.canvasController.setPipelineFlow(FlowsFlow); + this.canvasController.setPipelineFlowPalette(FlowsPalette); this.getConfig = this.getConfig.bind(this); this.decorationActionHandler = this.decorationActionHandler.bind(this); @@ -44,6 +41,7 @@ export default class FlowsCanvas extends React.Component { enableParentClass: "flows", enableNodeFormatType: "Vertical", enableLinkType: "Straight", + enableLinkMethod: "Freeform", enableLinkDirection: "LeftRight", enableSaveZoom: "LocalStorage", enableSnapToGridType: "After", @@ -113,20 +111,6 @@ export default class FlowsCanvas extends React.Component { } } - activateLoadingCanvas() { - this.canvasController.setCategoryLoadingText("recordOp", "Loading record ops"); - this.canvasController.setCategoryLoadingText("fieldOp", "Loading field ops"); - this.canvasController.setCategoryLoadingText("modeling", "Loading modeling"); - this.canvasController.setCategoryLoadingText("TextMining", "Loading text mining"); - this.canvasController.setCategoryLoadingText("graph", "Loading graphs"); - this.canvasController.setCategoryLoadingText("output", "Loading outputs"); - this.canvasController.setCategoryLoadingText("export", "Loading exports"); - this.canvasController.setCategoryLoadingText("models", "Loading models"); - setTimeout(() => { - this.canvasController.setPipelineFlowPalette(FlowsPalette); - }, 3000); - } - render() { const config = this.getConfig(); diff --git a/canvas_modules/harness/src/client/components/custom-canvases/flows/flowsCanvas.json b/canvas_modules/harness/src/client/components/custom-canvases/flows/flows-flow.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/flows/flowsCanvas.json rename to canvas_modules/harness/src/client/components/custom-canvases/flows/flows-flow.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/flows/flowsPalette.json b/canvas_modules/harness/src/client/components/custom-canvases/flows/flows-palette.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/flows/flowsPalette.json rename to canvas_modules/harness/src/client/components/custom-canvases/flows/flows-palette.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/flows/flows-properties.jsx b/canvas_modules/harness/src/client/components/custom-canvases/flows/flows-properties.jsx index 1873f4e1eb..3870a71d40 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/flows/flows-properties.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/flows/flows-properties.jsx @@ -20,7 +20,7 @@ import { FormattedMessage } from "react-intl"; import { CommonProperties } from "common-canvas"; // eslint-disable-line import/no-unresolved import { isEmpty } from "lodash"; import FormsService from "../../../services/FormsService"; -import { PARAMETER_DEFS, CUSTOM } from "../../../constants/constants.js"; +import { PARAMETER_DEFS, CUSTOM } from "../../../constants/harness-constants.js"; import CustomTableControl from "../../../components/custom-controls/CustomTableControl"; export default class FlowsProperties extends React.Component { diff --git a/canvas_modules/harness/src/client/components/custom-canvases/flows/flowsLoadingPalette.json b/canvas_modules/harness/src/client/components/custom-canvases/flows/flowsLoadingPalette.json deleted file mode 100644 index 3b27b16237..0000000000 --- a/canvas_modules/harness/src/client/components/custom-canvases/flows/flowsLoadingPalette.json +++ /dev/null @@ -1,164 +0,0 @@ -{ - "version": "3.0", - "categories": [ - { - "label": "Import", - "description": "This category defines data importers", - "image": "images/custom-canvases/flows/palette/icons/palette-import.svg", - "id": "import", - "node_types": [ - { - "id": "", - "type": "binding", - "op": "dataassetimport", - "outputs": [ - { - "id": "outPort", - "app_data": { - "ui_data": { - "cardinality": { - "min": 0, - "max": -1 - }, - "label": "Output Port" - } - } - } - ], - "parameters": {}, - "app_data": { - "ui_data": { - "label": "Data Asset", - "description": "Pull in data from remote data sources using connections, or pull in data from a file.", - "image": "images/custom-canvases/flows/palette/icons/dataassetimport.svg", - "x_pos": 0, - "y_pos": 0 - } - } - }, - { - "id": "", - "type": "binding", - "op": "userinput", - "outputs": [ - { - "id": "outPort", - "app_data": { - "ui_data": { - "cardinality": { - "min": 0, - "max": -1 - }, - "label": "Output Port" - } - } - } - ], - "parameters": {}, - "app_data": { - "ui_data": { - "label": "User Input", - "description": "Easily create synthetic data—either from scratch or by altering existing data.", - "image": "images/custom-canvases/flows/palette/icons/userinput.svg", - "x_pos": 0, - "y_pos": 0 - } - } - }, - { - "id": "", - "type": "binding", - "op": "simgen", - "outputs": [ - { - "id": "outPort", - "app_data": { - "ui_data": { - "cardinality": { - "min": 0, - "max": -1 - }, - "label": "Output Port" - } - } - } - ], - "parameters": {}, - "app_data": { - "ui_data": { - "label": "Sim Gen", - "description": "Generate simulated data automatically or with user-specified statistical distributions.", - "image": "images/custom-canvases/flows/palette/icons/simgen.svg", - "x_pos": 0, - "y_pos": 0 - } - } - } - ] - }, - { - "label": "Record Operations", - "description": "This category defines operations on records", - "image": "images/custom-canvases/flows/palette/icons/palette-record-ops.svg", - "id": "recordOp", - "node_types": [ - ] - }, - { - "label": "Field Operations", - "description": "This category defines operations on fields", - "image": "images/custom-canvases/flows/palette/icons/palette-field-ops.svg", - "id": "fieldOp", - "node_types": [ - ] - }, - { - "label": "Graphs", - "description": "This category defines chart builders", - "image": "images/custom-canvases/flows/palette/icons/palette-charts.svg", - "id": "graph", - "node_types": [ - ] - }, - { - "label": "Modeling", - "description": "This category defines model builders", - "image": "images/custom-canvases/flows/palette/icons/palette-modeling.svg", - "id": "modeling", - "node_types": [ - ] - }, - { - "label": "Text Analytics", - "description": "This category defines Text Mining operations", - "image": "images/custom-canvases/flows/palette/icons/palette-textmining.svg", - "id": "TextMining", - "node_types": [ - ] - }, - { - "label": "Outputs", - "description": "This category defines output builders", - "image": "images/custom-canvases/flows/palette/icons/palette-output.svg", - "id": "output", - "node_types": [ - ] - }, - { - "label": "Export", - "description": "This category defines data exporters", - "image": "images/custom-canvases/flows/palette/icons/palette-export.svg", - "id": "export", - "node_types": [ - ] - }, - { - "label": "Models", - "description": "This category defines models built from the modeling nodes", - "image": "images/custom-canvases/flows/palette/icons/palette-modeling.svg", - "id": "models", - "node_types": [ - ] - } - ] -} diff --git a/canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-canvas.jsx b/canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-canvas.jsx index 2a1d1795db..a29af83939 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-canvas.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-canvas.jsx @@ -23,16 +23,16 @@ import { ChartColumn, CurrencyPound, Db2Database, DataTable, Debug, FaceCool, Fish, Folder, FolderOpen, FolderMoveTo, JoinInner, MachineLearning } from "@carbon/react/icons"; -import JsxIconsCanvasFlow from "./jsx-icons-canvas-flow.json"; -import JsxIconsCanvasPalette from "./jsx-icons-canvas-palette.json"; +import JsxIconsFlow from "./jsx-icons-flow.json"; +import JsxIconsPalette from "./jsx-icons-palette.json"; export default class JsxIconsCanvas extends React.Component { constructor(props) { super(props); this.canvasController = new CanvasController(); - this.canvasController.setPipelineFlowPalette(this.getConvertedPalette(JsxIconsCanvasPalette)); - this.canvasController.setPipelineFlow(this.getConvertedFlow(JsxIconsCanvasFlow)); + this.canvasController.setPipelineFlowPalette(this.getConvertedPalette(JsxIconsPalette)); + this.canvasController.setPipelineFlow(this.getConvertedFlow(JsxIconsFlow)); this.getConfig = this.getConfig.bind(this); this.beforeEditActionHandler = this.beforeEditActionHandler.bind(this); diff --git a/canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-canvas-flow.json b/canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-flow.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-canvas-flow.json rename to canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-flow.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-canvas-palette.json b/canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-palette.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-canvas-palette.json rename to canvas_modules/harness/src/client/components/custom-canvases/jsx-icons/jsx-icons-palette.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/logic/logic-canvas.jsx b/canvas_modules/harness/src/client/components/custom-canvases/logic/logic-canvas.jsx index 5b0d3aeed1..2d32198923 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/logic/logic-canvas.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/logic/logic-canvas.jsx @@ -19,15 +19,15 @@ import PropTypes from "prop-types"; import { CommonCanvas, CanvasController } from "common-canvas"; // eslint-disable-line import/no-unresolved -import LogicCanvasFlow from "./logicCanvas.json"; -import LogicPalette from "./logicPalette.json"; +import LogicFlow from "./logic-flow.json"; +import LogicPalette from "./logic-palette.json"; export default class LogicCanvas extends React.Component { constructor(props) { super(props); this.canvasController = new CanvasController(); - this.canvasController.setPipelineFlow(LogicCanvasFlow); + this.canvasController.setPipelineFlow(LogicFlow); this.canvasController.setPipelineFlowPalette(LogicPalette); this.getConfig = this.getConfig.bind(this); @@ -40,9 +40,10 @@ export default class LogicCanvas extends React.Component { enableParentClass: "logic-canvas", enableNodeFormatType: "Horizontal", enableLinkType: "Straight", + enableLinkMethod: "Freeform", enableLinkDirection: "TopBottom", - enableSnapToGridType: "During", enableLinkSelection: "LinkOnly", + enableSnapToGridType: "During", paletteInitialState: true, enableInsertNodeDroppedOnLink: true, enableHighlightNodeOnNewLinkDrag: true, diff --git a/canvas_modules/harness/src/client/components/custom-canvases/logic/logicCanvas.json b/canvas_modules/harness/src/client/components/custom-canvases/logic/logic-flow.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/logic/logicCanvas.json rename to canvas_modules/harness/src/client/components/custom-canvases/logic/logic-flow.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/logic/logicPalette.json b/canvas_modules/harness/src/client/components/custom-canvases/logic/logic-palette.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/logic/logicPalette.json rename to canvas_modules/harness/src/client/components/custom-canvases/logic/logic-palette.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/progress/progress.jsx b/canvas_modules/harness/src/client/components/custom-canvases/progress/progress-canvas.jsx similarity index 98% rename from canvas_modules/harness/src/client/components/custom-canvases/progress/progress.jsx rename to canvas_modules/harness/src/client/components/custom-canvases/progress/progress-canvas.jsx index a948e1d7b1..210f8d04d4 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/progress/progress.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/progress/progress-canvas.jsx @@ -20,7 +20,7 @@ import PropTypes from "prop-types"; import { CommonCanvas, CanvasController } from "common-canvas"; // eslint-disable-line import/no-unresolved import { Play, StopFilledAlt } from "@carbon/react/icons"; -import ProgressCanvasFlow from "./progress.json"; +import ProgressFlow from "./progress-flow.json"; import ProgressPalette from "../../../../../test_resources/palettes/modelerPalette.json"; const nodeAnimation = @@ -71,7 +71,7 @@ export default class ProgressCanvas extends React.Component { constructor(props) { super(props); this.canvasController = new CanvasController(); - this.canvasController.setPipelineFlow(ProgressCanvasFlow); + this.canvasController.setPipelineFlow(ProgressFlow); this.canvasController.setPipelineFlowPalette(ProgressPalette); this.getConfig = this.getConfig.bind(this); diff --git a/canvas_modules/harness/src/client/components/custom-canvases/progress/progress.json b/canvas_modules/harness/src/client/components/custom-canvases/progress/progress-flow.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/progress/progress.json rename to canvas_modules/harness/src/client/components/custom-canvases/progress/progress-flow.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/react-nodes-carbon/react-nodes-carbon.jsx b/canvas_modules/harness/src/client/components/custom-canvases/react-nodes-carbon/react-nodes-carbon-canvas.jsx similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/react-nodes-carbon/react-nodes-carbon.jsx rename to canvas_modules/harness/src/client/components/custom-canvases/react-nodes-carbon/react-nodes-carbon-canvas.jsx diff --git a/canvas_modules/harness/src/client/components/custom-canvases/react-nodes-mapping/react-nodes-mapping.jsx b/canvas_modules/harness/src/client/components/custom-canvases/react-nodes-mapping/react-nodes-mapping-canvas.jsx similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/react-nodes-mapping/react-nodes-mapping.jsx rename to canvas_modules/harness/src/client/components/custom-canvases/react-nodes-mapping/react-nodes-mapping-canvas.jsx diff --git a/canvas_modules/harness/src/client/components/custom-canvases/read-only/read-only.jsx b/canvas_modules/harness/src/client/components/custom-canvases/read-only/read-only-canvas.jsx similarity index 96% rename from canvas_modules/harness/src/client/components/custom-canvases/read-only/read-only.jsx rename to canvas_modules/harness/src/client/components/custom-canvases/read-only/read-only-canvas.jsx index 4042c88d31..89ff30d822 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/read-only/read-only.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/read-only/read-only-canvas.jsx @@ -20,9 +20,9 @@ import PropTypes from "prop-types"; import { CommonCanvas, CanvasController } from "common-canvas"; // eslint-disable-line import/no-unresolved import { LINK_SELECTION_LINK_ONLY, PALETTE_LAYOUT_NONE, STATE_TAG_NONE, STATE_TAG_LOCKED, STATE_TAG_READ_ONLY } - from "../../../../../../common-canvas/src/common-canvas/constants/canvas-constants.js"; -import DetachedCanvasFlow from "./readOnlyCanvas.json"; -import DetachedPalette from "./readOnlyPalette.json"; + from "@elyra/canvas/src/common-canvas/constants/canvas-constants.js"; +import ReadOnlyFlow from "./read-only-flow.json"; +import ReadOnlyPalette from "./read-only-palette.json"; import { Edit, EditOff, Locked } from "@carbon/react/icons"; @@ -35,8 +35,8 @@ export default class ReadOnlyCanvas extends React.Component { }; this.canvasController = new CanvasController(); - this.canvasController.setPipelineFlow(DetachedCanvasFlow); - this.canvasController.setPipelineFlowPalette(DetachedPalette); + this.canvasController.setPipelineFlow(ReadOnlyFlow); + this.canvasController.setPipelineFlowPalette(ReadOnlyPalette); this.getConfig = this.getConfig.bind(this); this.editActionHandler = this.editActionHandler.bind(this); @@ -78,6 +78,7 @@ export default class ReadOnlyCanvas extends React.Component { enableParentClass: "read-only", enableNodeFormatType: "Vertical", enableLinkType: "Straight", + enableLinkMethod: "Freeform", enableLinkDirection: "LeftRight", enableSaveZoom: "LocalStorage", enableSnapToGridType: "After", diff --git a/canvas_modules/harness/src/client/components/custom-canvases/read-only/readOnlyCanvas.json b/canvas_modules/harness/src/client/components/custom-canvases/read-only/read-only-flow.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/read-only/readOnlyCanvas.json rename to canvas_modules/harness/src/client/components/custom-canvases/read-only/read-only-flow.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/read-only/readOnlyPalette.json b/canvas_modules/harness/src/client/components/custom-canvases/read-only/read-only-palette.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/read-only/readOnlyPalette.json rename to canvas_modules/harness/src/client/components/custom-canvases/read-only/read-only-palette.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/stages-card-node/stages-card-node-canvas.jsx b/canvas_modules/harness/src/client/components/custom-canvases/stages-card-node/stages-card-node-canvas.jsx index 265cde434d..716b80b577 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/stages-card-node/stages-card-node-canvas.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/stages-card-node/stages-card-node-canvas.jsx @@ -23,7 +23,7 @@ import { Edit } from "@carbon/react/icons"; import { CommonCanvas, CanvasController } from "common-canvas"; // eslint-disable-line import/no-unresolved -import StagesCardNodeFlow from "./stagesCardNodeCanvas.json"; +import StagesCardNodeFlow from "./stages-card-node-flow.json"; import StagesCardNodePalette from "../../../../../test_resources/palettes/stagesPalette.json"; export default class DetachedCanvas extends React.Component { @@ -80,6 +80,7 @@ export default class DetachedCanvas extends React.Component { enableParentClass: "stages-card-node", enableNodeFormatType: "Horizontal", enableLinkType: "Straight", + enableLinkMethod: "Freeform", enableLinkDirection: "LeftRight", enableSaveZoom: "LocalStorage", enableSnapToGridType: "After", diff --git a/canvas_modules/harness/src/client/components/custom-canvases/stages-card-node/stagesCardNodeCanvas.json b/canvas_modules/harness/src/client/components/custom-canvases/stages-card-node/stages-card-node-flow.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/stages-card-node/stagesCardNodeCanvas.json rename to canvas_modules/harness/src/client/components/custom-canvases/stages-card-node/stages-card-node-flow.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/stages/stages-canvas.jsx b/canvas_modules/harness/src/client/components/custom-canvases/stages/stages-canvas.jsx index 01a2aff8fa..864a2d6a9b 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/stages/stages-canvas.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/stages/stages-canvas.jsx @@ -23,14 +23,14 @@ import { Edit } from "@carbon/react/icons"; import MultiCommandPanel from "./multi-command-panel"; -import StagesCanvasFlow from "./stagesCanvas.json"; +import StagesFlow from "./stages-flow.json"; import StagesPalette from "../../../../../test_resources/palettes/stagesPalette.json"; export default class DetachedCanvas extends React.Component { constructor(props) { super(props); this.canvasController = new CanvasController(); - this.canvasController.setPipelineFlow(StagesCanvasFlow); + this.canvasController.setPipelineFlow(StagesFlow); this.canvasController.setPipelineFlowPalette(StagesPalette); this.getConfig = this.getConfig.bind(this); @@ -85,6 +85,7 @@ export default class DetachedCanvas extends React.Component { enableParentClass: "stages", enableNodeFormatType: "Vertical", enableLinkType: "Straight", + enableLinkMethod: "Freeform", enableLinkDirection: "LeftRight", enableSaveZoom: "LocalStorage", enableSnapToGridType: "After", diff --git a/canvas_modules/harness/src/client/components/custom-canvases/stages/stagesCanvas.json b/canvas_modules/harness/src/client/components/custom-canvases/stages/stages-flow.json similarity index 100% rename from canvas_modules/harness/src/client/components/custom-canvases/stages/stagesCanvas.json rename to canvas_modules/harness/src/client/components/custom-canvases/stages/stages-flow.json diff --git a/canvas_modules/harness/src/client/components/custom-canvases/streams/streams-canvas.jsx b/canvas_modules/harness/src/client/components/custom-canvases/streams/streams-canvas.jsx index 5c6305a814..b79cd79d0c 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/streams/streams-canvas.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/streams/streams-canvas.jsx @@ -20,14 +20,14 @@ import PropTypes from "prop-types"; import { CommonCanvas, CanvasController } from "common-canvas"; // eslint-disable-line import/no-unresolved import { CharacterSentenceCase, CharacterWholeNumber } from "@carbon/react/icons"; -import StreamsCanvasFlow from "./streams.json"; +import StreamsFlow from "./streams-flow.json"; export default class StreamsCanvas extends React.Component { constructor(props) { super(props); this.canvasController = new CanvasController(); - this.canvasController.setPipelineFlow(StreamsCanvasFlow); + this.canvasController.setPipelineFlow(StreamsFlow); // The below overrides were provided by Mary Komor from the Streams team this.config = Object.assign({}, props.config, { diff --git a/canvas_modules/harness/src/client/components/custom-canvases/streams/streams.json b/canvas_modules/harness/src/client/components/custom-canvases/streams/streams-flow.json similarity index 94% rename from canvas_modules/harness/src/client/components/custom-canvases/streams/streams.json rename to canvas_modules/harness/src/client/components/custom-canvases/streams/streams-flow.json index db59c876cc..4dbd7f9df3 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/streams/streams.json +++ b/canvas_modules/harness/src/client/components/custom-canvases/streams/streams-flow.json @@ -31,8 +31,8 @@ ], "ui_data": { "label": "Custom1", - "x_pos": 236.96334838867188, - "y_pos": 182.65391540527344 + "x_pos": 457.9633483886719, + "y_pos": 165.65391540527344 } }, "inputs": [ @@ -45,7 +45,9 @@ }, "links": [ { + "id": "27a43f12-d34b-4c2c-96de-c9f50f283424", "node_id_ref": "0ab9f1f1-746c-4077-b107-8d03a572947d", + "port_id_ref": "d66ca268-990a-410d-98b0-11d2e2b4dfa2", "app_data": { "schemaRef": "0", "ui_data": { @@ -69,7 +71,6 @@ ] } }, - "port_id_ref": "d66ca268-990a-410d-98b0-11d2e2b4dfa2", "link_name": "83009023-f926-4bc8-a669-310e36513d4a" } ] @@ -104,8 +105,8 @@ ], "ui_data": { "label": "Custom2_1", - "x_pos": 850.4027099609375, - "y_pos": 180.86521911621094 + "x_pos": 1071.4027099609375, + "y_pos": 163.86521911621094 } }, "inputs": [ @@ -118,14 +119,15 @@ }, "links": [ { + "id": "a748ad2b-4d1e-4f31-958d-605ee727d84a", "node_id_ref": "2bc8345a-a683-4f7b-baca-6bd78eaded26", + "port_id_ref": "fafb2bbb-20b0-481f-bbfa-2b9b99395dda", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "fafb2bbb-20b0-481f-bbfa-2b9b99395dda", "link_name": "6781ccac-ce11-4198-a538-48525d3d27cd" } ] @@ -139,14 +141,15 @@ }, "links": [ { + "id": "471c80e6-306b-43d9-87bf-99181ea40fa5", "node_id_ref": "b75095cb-9eb7-4d9a-bbcd-463969248877", + "port_id_ref": "f6a33dfe-15ac-450d-b1ea-0433140b43d5", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "f6a33dfe-15ac-450d-b1ea-0433140b43d5", "link_name": "cee2f0b8-5651-4c41-bd9f-4f66732982f0" } ] @@ -230,8 +233,8 @@ "peId": "51", "ui_data": { "label": "Custom3_1", - "x_pos": 1186.4793701171875, - "y_pos": 58.69218444824219 + "x_pos": 1407.4793701171875, + "y_pos": 41.69218444824219 } }, "inputs": [ @@ -244,14 +247,15 @@ }, "links": [ { + "id": "8f3f45df-b390-45af-9628-143c28c35e60", "node_id_ref": "14ce3e97-43d1-4574-b82b-4a20547e170a", + "port_id_ref": "6a49db99-1983-4f94-ba36-58d606bf8cd4", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "6a49db99-1983-4f94-ba36-58d606bf8cd4", "link_name": "c5468f21-d9dc-40c7-98ba-d8468b42a9d7" } ] @@ -268,8 +272,8 @@ "peId": "51", "ui_data": { "label": "Custom3_2", - "x_pos": 1197.344482421875, - "y_pos": 170 + "x_pos": 1418.344482421875, + "y_pos": 153 } }, "inputs": [ @@ -282,14 +286,15 @@ }, "links": [ { + "id": "06324666-8873-4ea9-8bfe-d6ca52e23920", "node_id_ref": "14ce3e97-43d1-4574-b82b-4a20547e170a", + "port_id_ref": "c8186d31-5c7e-4c02-b0e5-adcbffb8e6e5", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "c8186d31-5c7e-4c02-b0e5-adcbffb8e6e5", "link_name": "bd5ac1d9-44c7-4657-b550-839953102c08" } ] @@ -306,8 +311,8 @@ "peId": "51", "ui_data": { "label": "Custom3_3", - "x_pos": 1184.30615234375, - "y_pos": 290 + "x_pos": 1405.30615234375, + "y_pos": 273 } }, "inputs": [ @@ -320,14 +325,15 @@ }, "links": [ { + "id": "77b5c7e9-7f2f-47f2-9d25-d94f7672eca7", "node_id_ref": "14ce3e97-43d1-4574-b82b-4a20547e170a", + "port_id_ref": "cc4a57f5-c909-4df9-b5fb-bc7835c86a97", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "cc4a57f5-c909-4df9-b5fb-bc7835c86a97", "link_name": "2ae26bf7-36a4-4e71-a869-372885aaf41f" } ] @@ -344,8 +350,8 @@ "peId": "51", "ui_data": { "label": "Custom4_1", - "x_pos": 1910.2691650390625, - "y_pos": 424.5739440917969 + "x_pos": 2131.2691650390625, + "y_pos": 407.5739440917969 } }, "inputs": [ @@ -358,25 +364,27 @@ }, "links": [ { + "id": "0ab24498-e80b-42d7-a4c2-3f5e2a631bd2", "node_id_ref": "9481aaa7-615e-42c8-94c8-c09a684244cd", + "port_id_ref": "0ff47479-0564-452a-88f0-8f51d7c106bd", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "0ff47479-0564-452a-88f0-8f51d7c106bd", "link_name": "e64f2ac6-e080-475f-8eb9-2eb6c8c71ca2" }, { + "id": "9f679f49-ebf9-4aa1-b803-2bbafbe60218", "node_id_ref": "7eab2030-4d6e-4441-9528-319a23de660b", + "port_id_ref": "56eff26f-12b0-4a24-9fa8-0471ef24e3c2", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "56eff26f-12b0-4a24-9fa8-0471ef24e3c2", "link_name": "3fe7316a-2c08-4e39-abfd-e1c575ba4ab8" } ] @@ -393,8 +401,8 @@ "peId": "51", "ui_data": { "label": "Custom4_2", - "x_pos": 1906.8575439453125, - "y_pos": 690.6295166015625 + "x_pos": 2127.8575439453125, + "y_pos": 673.6295166015625 } }, "inputs": [ @@ -407,14 +415,15 @@ }, "links": [ { + "id": "47c4da3d-272f-4264-a3bb-0c7cd36b11f2", "node_id_ref": "9481aaa7-615e-42c8-94c8-c09a684244cd", + "port_id_ref": "c8e519ee-7f69-4ebc-8a17-88e210c0433b", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "c8e519ee-7f69-4ebc-8a17-88e210c0433b", "link_name": "630f72c0-0c4a-44a3-b7b8-1a5e06c58cf2" } ] @@ -431,8 +440,8 @@ "peId": "51", "ui_data": { "label": "BeaconOut", - "x_pos": -194.40286445617676, - "y_pos": 77.17704010009766 + "x_pos": 26.597135543823242, + "y_pos": 60.177040100097656 } }, "outputs": [ @@ -461,8 +470,8 @@ "peId": "51", "ui_data": { "label": "Custom2_2", - "x_pos": 503.92333984375, - "y_pos": 288.90350341796875 + "x_pos": 724.92333984375, + "y_pos": 271.90350341796875 } }, "inputs": [ @@ -475,14 +484,15 @@ }, "links": [ { + "id": "0ab7ee50-6b57-48a2-b8b9-9fbcb3060a33", "node_id_ref": "2bc8345a-a683-4f7b-baca-6bd78eaded26", + "port_id_ref": "fafb2bbb-20b0-481f-bbfa-2b9b99395dda", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "fafb2bbb-20b0-481f-bbfa-2b9b99395dda", "link_name": "5c3d64e6-a4b6-4efc-aa8f-13ef366f2970" } ] @@ -514,8 +524,8 @@ "peId": "51", "ui_data": { "label": "Custom4_3", - "x_pos": 1930.5047607421875, - "y_pos": 918.0635375976562 + "x_pos": 2151.5047607421875, + "y_pos": 901.0635375976562 } }, "inputs": [ @@ -528,14 +538,15 @@ }, "links": [ { + "id": "5e87ab2a-60f8-4cfc-b7b0-c067e19c9984", "node_id_ref": "9481aaa7-615e-42c8-94c8-c09a684244cd", + "port_id_ref": "938c6e02-74d8-416c-b3c0-0f02a0cc091b", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "938c6e02-74d8-416c-b3c0-0f02a0cc091b", "link_name": "da5893bb-d7f7-47ee-8872-dde952a2f42a" } ] @@ -554,8 +565,8 @@ "ui_data": { "label": "Comp3_4", "image": "data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMzIgMzIiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDpub25lO308L3N0eWxlPjwvZGVmcz48dGl0bGU+dHJlZS12aWV3PC90aXRsZT48cGF0aCBkPSJNMzAsMjBWMTJIMjJ2M0gxN1Y3YTIsMiwwLDAsMC0yLTJIMTBWMkgydjhoOFY3aDVWMjVhMiwyLDAsMCwwLDIsMmg1djNoOFYyMkgyMnYzSDE3VjE3aDV2M1pNOCw4SDRWNEg4Wk0yNCwyNGg0djRIMjRabTAtMTBoNHY0SDI0WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCkiLz48cmVjdCBpZD0iX1RyYW5zcGFyZW50X1JlY3RhbmdsZV8iIGRhdGEtbmFtZT0iJmx0O1RyYW5zcGFyZW50IFJlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtMSIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIi8+PC9zdmc+", - "x_pos": 1284.7703857421875, - "y_pos": 553.6122741699219, + "x_pos": 1505.7703857421875, + "y_pos": 536.6122741699219, "is_expanded": true, "expanded_width": 397.6427001953125, "expanded_height": 304.1263427734375 @@ -572,14 +583,15 @@ }, "links": [ { + "id": "14cf3668-7d54-4a8a-a5f1-e70842f1c0f9", "node_id_ref": "14ce3e97-43d1-4574-b82b-4a20547e170a", + "port_id_ref": "c6fda012-8461-41eb-bca1-280a9fa42743", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "c6fda012-8461-41eb-bca1-280a9fa42743", "link_name": "1a6fc304-5aa1-4656-ae3f-3b7cc2fdfab8" } ] @@ -594,14 +606,15 @@ }, "links": [ { + "id": "ef612c4e-fa21-4ce5-b68d-0a38b1634917", "node_id_ref": "14ce3e97-43d1-4574-b82b-4a20547e170a", + "port_id_ref": "950dbf7d-e9bb-4fd5-ae41-43b20e4ca67f", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "950dbf7d-e9bb-4fd5-ae41-43b20e4ca67f", "link_name": "07c0a560-1547-4769-93d9-4cd0f04d03ce" } ] @@ -664,8 +677,8 @@ "ui_data": { "label": "SubSubFlowComp_18", "image": "data:image/svg+xml;base64,PHN2ZyBpZD0iaWNvbiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMzIgMzIiPjxkZWZzPjxzdHlsZT4uY2xzLTF7ZmlsbDpub25lO308L3N0eWxlPjwvZGVmcz48dGl0bGU+dHJlZS12aWV3PC90aXRsZT48cGF0aCBkPSJNMzAsMjBWMTJIMjJ2M0gxN1Y3YTIsMiwwLDAsMC0yLTJIMTBWMkgydjhoOFY3aDVWMjVhMiwyLDAsMCwwLDIsMmg1djNoOFYyMkgyMnYzSDE3VjE3aDV2M1pNOCw4SDRWNEg4Wk0yNCwyNGg0djRIMjRabTAtMTBoNHY0SDI0WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMCkiLz48cmVjdCBpZD0iX1RyYW5zcGFyZW50X1JlY3RhbmdsZV8iIGRhdGEtbmFtZT0iJmx0O1RyYW5zcGFyZW50IFJlY3RhbmdsZSZndDsiIGNsYXNzPSJjbHMtMSIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIi8+PC9zdmc+", - "x_pos": 1385.8433837890625, - "y_pos": 277.0398254394531, + "x_pos": 1606.8433837890625, + "y_pos": 260.0398254394531, "is_expanded": true, "expanded_width": 297.9930419921875, "expanded_height": 200 @@ -682,14 +695,15 @@ }, "links": [ { + "id": "f40c9d3c-9114-44af-a166-e66033dc58ad", "node_id_ref": "14ce3e97-43d1-4574-b82b-4a20547e170a", + "port_id_ref": "6a49db99-1983-4f94-ba36-58d606bf8cd4", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "6a49db99-1983-4f94-ba36-58d606bf8cd4", "link_name": "7b229017-523d-4caa-a5f7-a5a42ef60166" } ] @@ -783,14 +797,15 @@ }, "links": [ { + "id": "d80cbebb-d2c3-4990-ba31-355f6fe9d78b", "node_id_ref": "4d09d88d-2af6-464d-b838-b0714f3a39c4", + "port_id_ref": "2262e537-da33-4e39-86d6-9023f32c1df8", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "2262e537-da33-4e39-86d6-9023f32c1df8", "link_name": "22240ef7-5746-47f3-b32e-dafe590cec82" } ] @@ -804,14 +819,15 @@ }, "links": [ { + "id": "8c528824-d31a-468c-aeb6-020aba43eae7", "node_id_ref": "412b967e-a779-4c1e-aa65-7f3dcac72674", + "port_id_ref": "4571c243-1184-417f-bf5e-fd69ba67f12f", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "4571c243-1184-417f-bf5e-fd69ba67f12f", "link_name": "16b1b622-51e6-4ac8-b2b9-f5582fe13383" } ] @@ -825,14 +841,15 @@ }, "links": [ { + "id": "62d2989b-04a0-4923-99ce-3b1f333b2ec2", "node_id_ref": "8e88713f-b83c-4dab-b3b6-0d4ee2e41943", + "port_id_ref": "7d30a9db-87ea-4c85-b7c1-beba93c9b798", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "7d30a9db-87ea-4c85-b7c1-beba93c9b798", "link_name": "5de90827-0025-4d61-a38e-1675851f55e4" } ] @@ -863,14 +880,15 @@ }, "links": [ { + "id": "2d77c005-92b5-46a9-ab97-c09a65f2646a", "node_id_ref": "25f03da7-fd64-4bf8-9b6d-1ce23039fd85", + "port_id_ref": "3a1bd8c8-e73e-4bed-bac3-33c78ec8e825", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "3a1bd8c8-e73e-4bed-bac3-33c78ec8e825", "link_name": "ca1bb70e-0a8d-4829-9298-dcfbbad94f8d" } ] @@ -916,14 +934,15 @@ }, "links": [ { + "id": "91e9eca5-bdc6-4d7c-b918-46f75be23b83", "node_id_ref": "254c7ce3-5e4d-4a00-a566-47e0c1b7c2a3", + "port_id_ref": "777439a4-65be-49fe-9190-b5e2ae7995ae", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "777439a4-65be-49fe-9190-b5e2ae7995ae", "link_name": "60a00df6-69a5-4b14-a8ef-ba93945399a6" } ] @@ -969,14 +988,15 @@ }, "links": [ { + "id": "9d6f3f43-527f-471f-9879-a855136db7f6", "node_id_ref": "25f03da7-fd64-4bf8-9b6d-1ce23039fd85", + "port_id_ref": "3a1bd8c8-e73e-4bed-bac3-33c78ec8e825", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "3a1bd8c8-e73e-4bed-bac3-33c78ec8e825", "link_name": "e1d92231-d101-425c-afd4-a78596d405c0" } ] @@ -990,14 +1010,15 @@ }, "links": [ { + "id": "f2cc1a2c-618d-49ac-a330-33874275b675", "node_id_ref": "f3899526-ace5-4174-bcb5-94c798893e9d", + "port_id_ref": "d43a8bd1-dcef-4817-a0dd-51f44dc39b82", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "d43a8bd1-dcef-4817-a0dd-51f44dc39b82", "link_name": "22d8a3f4-da2a-4caf-b42b-77e18d6c70a1" } ] @@ -1043,14 +1064,15 @@ }, "links": [ { + "id": "90a3a746-58f9-4e5d-85c2-a4ee166b3097", "node_id_ref": "254c7ce3-5e4d-4a00-a566-47e0c1b7c2a3", + "port_id_ref": "25aaf09b-4fc4-4252-acdd-18483305cbe2", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "25aaf09b-4fc4-4252-acdd-18483305cbe2", "link_name": "a049402a-ab89-40f1-966c-db43c7b40790" } ] @@ -1105,14 +1127,15 @@ }, "links": [ { + "id": "e0b83731-d12b-4ca7-b2a2-aeb2c0944c34", "node_id_ref": "254c7ce3-5e4d-4a00-a566-47e0c1b7c2a3", + "port_id_ref": "25aaf09b-4fc4-4252-acdd-18483305cbe2", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "25aaf09b-4fc4-4252-acdd-18483305cbe2", "link_name": "ed95d0c7-f6ea-4599-934b-904bebc84cc4" } ] @@ -1195,14 +1218,15 @@ }, "links": [ { + "id": "c8d0dd7a-7772-4f06-9efb-4abf7bb2b3ca", "node_id_ref": "fdd4b612-8819-45b7-bd76-661ab5d1481f", + "port_id_ref": "2f81e096-2403-4a83-a3f8-8ad89148136e", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "2f81e096-2403-4a83-a3f8-8ad89148136e", "link_name": "30ea00c9-df01-47e4-896c-33c5c8da1009" } ] @@ -1233,13 +1257,14 @@ }, "links": [ { + "id": "13264e7e-6c61-45d0-8df2-39a56127a867", "node_id_ref": "1d97a350-bfe8-46b2-8c61-98735cbd8949", + "port_id_ref": "d6522919-db93-4511-a89d-8131c01c7ebb", "app_data": { "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "d6522919-db93-4511-a89d-8131c01c7ebb", "link_name": "769acae5-c3c4-40cd-bf9f-81c5bd3dc685" } ] @@ -1322,14 +1347,15 @@ }, "links": [ { + "id": "f62fbe9a-c07c-495c-b105-3ecf79a9c0c6", "node_id_ref": "9cb012b5-c875-426b-b400-fd5a2c55efb5", + "port_id_ref": "b976d329-2948-444f-bd6b-22bb1c6b2861", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "b976d329-2948-444f-bd6b-22bb1c6b2861", "link_name": "7a0553b2-a00e-482d-938b-c50906cb3eef" } ] @@ -1360,14 +1386,15 @@ }, "links": [ { + "id": "ca063e54-3f36-480e-93f5-3b0b739b79bf", "node_id_ref": "8fe1b9ee-a2e7-4a41-9dbd-571f43567981", + "port_id_ref": "91527775-5eae-4565-bfd8-124c5a65c207", "app_data": { "schemaRef": "0", "ui_data": { "class_name": "d3-data-link" } }, - "port_id_ref": "91527775-5eae-4565-bfd8-124c5a65c207", "link_name": "d8ec408f-8513-4fc3-bdb5-c53c2fa913cc" } ] diff --git a/canvas_modules/harness/src/client/components/custom-canvases/tables/tables-canvas.jsx b/canvas_modules/harness/src/client/components/custom-canvases/tables/tables-canvas.jsx index d035986c71..461b42c4a3 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/tables/tables-canvas.jsx +++ b/canvas_modules/harness/src/client/components/custom-canvases/tables/tables-canvas.jsx @@ -19,7 +19,7 @@ import PropTypes from "prop-types"; import { CommonCanvas, CanvasController } from "common-canvas"; // eslint-disable-line import/no-unresolved -import TablesCanvasFlow from "./tablesCanvas.json"; +import TablesFlow from "./tables-flow.json"; export default class TablesCanvas extends React.Component { @@ -27,7 +27,7 @@ export default class TablesCanvas extends React.Component { super(props); this.canvasController = new CanvasController(); - this.canvasController.setPipelineFlow(TablesCanvasFlow); + this.canvasController.setPipelineFlow(TablesFlow); this.left = 10; this.right = 210; diff --git a/canvas_modules/harness/src/client/components/custom-canvases/tables/tablesCanvas.json b/canvas_modules/harness/src/client/components/custom-canvases/tables/tables-flow.json similarity index 95% rename from canvas_modules/harness/src/client/components/custom-canvases/tables/tablesCanvas.json rename to canvas_modules/harness/src/client/components/custom-canvases/tables/tables-flow.json index 20fd783539..3155ba31e7 100644 --- a/canvas_modules/harness/src/client/components/custom-canvases/tables/tablesCanvas.json +++ b/canvas_modules/harness/src/client/components/custom-canvases/tables/tables-flow.json @@ -17,8 +17,8 @@ "ui_data": { "label": "File_Name_1.csv", "image": "", - "x_pos": 183, - "y_pos": 96, + "x_pos": 57, + "y_pos": 114, "description": "File One", "decorations": [ { @@ -97,8 +97,8 @@ "ui_data": { "label": "File_Name_2.csv", "image": "", - "x_pos": 596, - "y_pos": 46, + "x_pos": 470, + "y_pos": 64, "description": "File Two", "decorations": [ { @@ -150,8 +150,8 @@ "ui_data": { "label": "File_Name_3.csv", "image": "", - "x_pos": 595, - "y_pos": 120, + "x_pos": 469, + "y_pos": 138, "description": "File Three", "decorations": [ { @@ -203,8 +203,8 @@ "ui_data": { "label": "File_Name_4.csv", "image": "", - "x_pos": 595, - "y_pos": 210, + "x_pos": 469, + "y_pos": 228, "description": "File Four", "decorations": [ { @@ -256,8 +256,8 @@ "ui_data": { "label": "File_Name_5.csv", "image": "", - "x_pos": 595, - "y_pos": 300, + "x_pos": 469, + "y_pos": 318, "description": "File Five", "decorations": [ { @@ -304,7 +304,11 @@ ], "app_data": { "ui_data": { - "zoom": 100, + "zoom": { + "x": 0, + "y": 0, + "k": 1 + }, "comments": [] } }, diff --git a/canvas_modules/harness/src/client/components/sidepanel/api/sidepanel-api.jsx b/canvas_modules/harness/src/client/components/sidepanel/api/sidepanel-api.jsx index 7d8fb9baef..d615cd6a4f 100644 --- a/canvas_modules/harness/src/client/components/sidepanel/api/sidepanel-api.jsx +++ b/canvas_modules/harness/src/client/components/sidepanel/api/sidepanel-api.jsx @@ -35,7 +35,7 @@ import { INPUT_PORT, OUTPUT_PORT, NOTIFICATION_MESSAGE_TYPE -} from "../../../constants/constants.js"; +} from "../../../constants/harness-constants.js"; const defaultNodeType = { "id": "custop", diff --git a/canvas_modules/harness/src/client/components/sidepanel/canvas/sidepanel-canvas.jsx b/canvas_modules/harness/src/client/components/sidepanel/canvas/sidepanel-canvas.jsx index fc63c87730..2e92482df8 100644 --- a/canvas_modules/harness/src/client/components/sidepanel/canvas/sidepanel-canvas.jsx +++ b/canvas_modules/harness/src/client/components/sidepanel/canvas/sidepanel-canvas.jsx @@ -23,26 +23,8 @@ import { TextInput, FileUploader, Button, Select, SelectItemGroup, SelectItem, C from "@carbon/react"; import { get, set } from "lodash"; import { - NONE_SAVE_ZOOM, - LOCAL_STORAGE, - PIPELINE_FLOW, - NONE_DRAG, - DURING_DRAG, - AFTER_DRAG, CHOOSE_FROM_LOCATION, LOCAL_FILE_OPTION, - VERTICAL_FORMAT, - HORIZONTAL_FORMAT, - INTERACTION_MOUSE, - INTERACTION_TRACKPAD, - INTERACTION_CARBON, - IMAGE_DISPLAY_SVG_INLINE, - IMAGE_DISPLAY_LOAD_SVG_TO_DEFS, - IMAGE_DISPLAY_SVG_AS_IMAGE, - ASSOC_RIGHT_SIDE_CURVE, - ASSOC_STRAIGHT, - UNDERLAY_NONE, - UNDERLAY_VARIABLE, EXAMPLE_APP_NONE, EXAMPLE_APP_FLOWS, EXAMPLE_APP_STAGES, @@ -60,9 +42,6 @@ import { EXAMPLE_APP_NETWORK, EXAMPLE_APP_REACT_NODES_CARBON, EXAMPLE_APP_REACT_NODES_MAPPING, - PALETTE_FLYOUT, - PALETTE_MODAL, - PALETTE_NONE, TIP_PALETTE_CATEGORIES, TIP_PALETTE_NODE_TEMPLATES, TIP_NODES, @@ -70,8 +49,6 @@ import { TIP_DECORATIONS, TIP_LINKS, TIP_STATE_TAG, - TOOLBAR_LAYOUT_NONE, - TOOLBAR_LAYOUT_TOP, TOOLBAR_TYPE_DEFAULT, TOOLBAR_TYPE_SUB_AREAS, TOOLBAR_TYPE_SINGLE_BAR, @@ -80,10 +57,22 @@ import { TOOLBAR_TYPE_CARBON_BUTTONS, TOOLBAR_TYPE_CUSTOM_ACTIONS, TOOLBAR_TYPE_OVERRIDE_AUTO_ENABLE_DISABLE -} from "../../../constants/constants.js"; +} from "../../../constants/harness-constants.js"; -import { STATE_TAG_NONE, STATE_TAG_LOCKED, STATE_TAG_READ_ONLY, - LINK_METHOD_FREEFORM, LINK_METHOD_PORTS, +import { + NODE_FORMAT_VERTICAL, + NODE_FORMAT_HORIZONTAL, + STATE_TAG_NONE, + STATE_TAG_LOCKED, + STATE_TAG_READ_ONLY, + SNAP_TO_GRID_NONE, + SNAP_TO_GRID_AFTER, + SNAP_TO_GRID_DURING, + SAVE_ZOOM_NONE, + SAVE_ZOOM_PIPELINE_FLOW, + SAVE_ZOOM_LOCAL_STORAGE, + LINK_METHOD_PORTS, + LINK_METHOD_FREEFORM, LINK_DIR_LEFT_RIGHT, LINK_DIR_RIGHT_LEFT, LINK_DIR_TOP_BOTTOM, @@ -95,7 +84,22 @@ import { STATE_TAG_NONE, STATE_TAG_LOCKED, STATE_TAG_READ_ONLY, LINK_SELECTION_NONE, LINK_SELECTION_LINK_ONLY, LINK_SELECTION_HANDLES, - LINK_SELECTION_DETACHABLE + LINK_SELECTION_DETACHABLE, + ASSOC_RIGHT_SIDE_CURVE, + ASSOC_STRAIGHT, + INTERACTION_MOUSE, + INTERACTION_TRACKPAD, + INTERACTION_CARBON, + IMAGE_DISPLAY_SVG_INLINE, + IMAGE_DISPLAY_LOAD_SVG_TO_DEFS, + IMAGE_DISPLAY_SVG_AS_IMAGE, + UNDERLAY_NONE, + UNDERLAY_VARIABLE, + PALETTE_LAYOUT_FLYOUT, + PALETTE_LAYOUT_MODAL, + PALETTE_LAYOUT_NONE, + TOOLBAR_LAYOUT_NONE, + TOOLBAR_LAYOUT_TOP } from "@elyra/canvas/src/common-canvas/constants/canvas-constants.js"; import FormsService from "../../../services/FormsService"; @@ -557,16 +561,16 @@ export default class SidePanelForms extends React.Component { orientation="vertical" > @@ -609,16 +613,16 @@ export default class SidePanelForms extends React.Component { orientation="vertical" > @@ -1077,12 +1081,12 @@ export default class SidePanelForms extends React.Component { orientation="vertical" > @@ -1269,16 +1273,16 @@ export default class SidePanelForms extends React.Component { orientation="vertical" > diff --git a/canvas_modules/harness/src/client/components/sidepanel/properties/sidepanel-properties.jsx b/canvas_modules/harness/src/client/components/sidepanel/properties/sidepanel-properties.jsx index 0e8bfa5000..6ee9285379 100644 --- a/canvas_modules/harness/src/client/components/sidepanel/properties/sidepanel-properties.jsx +++ b/canvas_modules/harness/src/client/components/sidepanel/properties/sidepanel-properties.jsx @@ -38,7 +38,7 @@ import { CHOOSE_FROM_LOCATION, LOCAL_FILE_OPTION, PARAMETER_DEFS -} from "../../../constants/constants.js"; +} from "../../../constants/harness-constants.js"; import FormsService from "../../../services/FormsService"; diff --git a/canvas_modules/harness/src/client/components/sidepanel/sidepanel.jsx b/canvas_modules/harness/src/client/components/sidepanel/sidepanel.jsx index 24a9c6d976..8fe66ff9ee 100644 --- a/canvas_modules/harness/src/client/components/sidepanel/sidepanel.jsx +++ b/canvas_modules/harness/src/client/components/sidepanel/sidepanel.jsx @@ -24,7 +24,7 @@ import { SIDE_PANEL_CANVAS, SIDE_PANEL_MODAL, SIDE_PANEL_API -} from "../../constants/constants.js"; +} from "../../constants/harness-constants.js"; export default class SidePanel extends React.Component { diff --git a/canvas_modules/harness/src/client/constants/constants.js b/canvas_modules/harness/src/client/constants/harness-constants.js similarity index 74% rename from canvas_modules/harness/src/client/constants/constants.js rename to canvas_modules/harness/src/client/constants/harness-constants.js index d0bf8f468a..e929703a4b 100644 --- a/canvas_modules/harness/src/client/constants/constants.js +++ b/canvas_modules/harness/src/client/constants/harness-constants.js @@ -30,40 +30,6 @@ _defineConstant("SIDE_PANEL_CANVAS", "sidepanel-canvas"); _defineConstant("SIDE_PANEL_MODAL", "sidepanel-modal"); _defineConstant("SIDE_PANEL_API", "sidepanel-api"); -// Used by the autoLayout method in CanvasController -_defineConstant("HORIZONTAL", "horizontal"); -_defineConstant("VERTICAL", "vertical"); - -_defineConstant("NONE_SAVE_ZOOM", "None"); -_defineConstant("LOCAL_STORAGE", "LocalStorage"); -_defineConstant("PIPELINE_FLOW", "Pipelineflow"); - -_defineConstant("UNDERLAY_NONE", "None"); -_defineConstant("UNDERLAY_VARIABLE", "Variable"); - -_defineConstant("NONE_DRAG", "None"); -_defineConstant("DURING_DRAG", "During"); -_defineConstant("AFTER_DRAG", "After"); - -_defineConstant("INTERACTION_MOUSE", "Mouse"); -_defineConstant("INTERACTION_TRACKPAD", "Trackpad"); -_defineConstant("INTERACTION_CARBON", "Carbon"); - -_defineConstant("VERTICAL_FORMAT", "Vertical"); -_defineConstant("HORIZONTAL_FORMAT", "Horizontal"); - -_defineConstant("IMAGE_DISPLAY_SVG_INLINE", "SVGInline"); -_defineConstant("IMAGE_DISPLAY_LOAD_SVG_TO_DEFS", "LoadSVGToDefs"); -_defineConstant("IMAGE_DISPLAY_SVG_AS_IMAGE", "SVGAsImage"); - -_defineConstant("LINK_SELECTION_NONE", "None"); -_defineConstant("LINK_SELECTION_LINK_ONLY", "LinkOnly"); -_defineConstant("LINK_SELECTION_HANDLES", "Handles"); -_defineConstant("LINK_SELECTION_DETACHABLE", "Detachable"); - -_defineConstant("ASSOC_RIGHT_SIDE_CURVE", "RightSideCurve"); -_defineConstant("ASSOC_STRAIGHT", "Straight"); - _defineConstant("EXAMPLE_APP_NONE", "None - use options below"); _defineConstant("EXAMPLE_APP_FLOWS", "Flows"); _defineConstant("EXAMPLE_APP_READ_ONLY", "Read Only"); @@ -82,19 +48,12 @@ _defineConstant("EXAMPLE_APP_NETWORK", "Network"); _defineConstant("EXAMPLE_APP_REACT_NODES_CARBON", "React Nodes - Carbon Charts"); _defineConstant("EXAMPLE_APP_REACT_NODES_MAPPING", "React Nodes - Mapping"); -_defineConstant("PALETTE_FLYOUT", "Flyout"); -_defineConstant("PALETTE_MODAL", "Modal"); -_defineConstant("PALETTE_NONE", "None"); - _defineConstant("PROPERTIES_FLYOUT", "Flyout"); _defineConstant("PROPERTIES_MODAL", "Modal"); _defineConstant("PROPERTIES_TEARSHEET", "Tearsheet"); _defineConstant("CUSTOM", "Custom"); _defineConstant("EDITING", "Editing"); -_defineConstant("TOOLBAR_LAYOUT_NONE", "None"); -_defineConstant("TOOLBAR_LAYOUT_TOP", "Top"); - _defineConstant("TOOLBAR_TYPE_DEFAULT", "Default"); _defineConstant("TOOLBAR_TYPE_SUB_AREAS", "SubAreas"); _defineConstant("TOOLBAR_TYPE_SINGLE_BAR", "SingleLeftBarArray");