From: vasary.daniel Date: Wed, 13 Apr 2022 14:31:10 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=dcad9276b6a0ffddbc08befbacace19ed37c081d;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C33156 --- diff --git a/server/-configuration/run-mediacube-server-local.launch b/server/-configuration/run-mediacube-server-local.launch index 6b842065..49282300 100644 --- a/server/-configuration/run-mediacube-server-local.launch +++ b/server/-configuration/run-mediacube-server-local.launch @@ -30,7 +30,7 @@ - + diff --git a/server/user.mediacube.gui/js/processVisualizer.js b/server/user.mediacube.gui/js/processVisualizer.js index 6376d732..e0630fe4 100644 --- a/server/user.mediacube.gui/js/processVisualizer.js +++ b/server/user.mediacube.gui/js/processVisualizer.js @@ -1,4 +1,4 @@ -/* global $ */ + var defaultFlowchartData = { operators: { operator1: { @@ -41,15 +41,53 @@ var defaultFlowchartData = { } }; +var otherFlowchartData = { + operators: { + operator1: { + top: 20, + left: 20, + properties: { + title: 'Operator 3', + inputs: {}, + outputs: { + output_1: { + label: 'Output 1', + } + } + } + }, + operator2: { + top: 80, + left: 300, + properties: { + title: 'Operator 4', + inputs: { + input_1: { + label: 'Input 1', + }, + input_2: { + label: 'Input 2', + }, + }, + outputs: {} + } + }, + }, + links: { + link_1: { + fromOperator: 'operator1', + fromConnector: 'output_1', + toOperator: 'operator2', + toConnector: 'input_2', + }, + } +}; + $(document).ready(function() { var $flowchart = $('#flowchartworkspace'); - var $container = $flowchart.parent(); - console.log("$flowchart: ", $flowchart); - console.log("$container: ", $container); - // Apply the plugin on a standard, empty div... - $flowchart.flowchart({ + var widget = $flowchart.flowchart({ data: defaultFlowchartData, defaultSelectedLinkColor: '#000055', grid: 10, @@ -57,31 +95,10 @@ $(document).ready(function() { multipleLinksOnOutput: true }); - function getOperatorData($element) { - var nbInputs = parseInt($element.data('nb-inputs'), 10); - var nbOutputs = parseInt($element.data('nb-outputs'), 10); - var data = { - properties: { - title: $element.text(), - inputs: {}, - outputs: {} - } - }; - - var i = 0; - for (i = 0; i < nbInputs; i++) { - data.properties.inputs['input_' + i] = { - label: 'Input ' + (i + 1) - }; - } - for (i = 0; i < nbOutputs; i++) { - data.properties.outputs['output_' + i] = { - label: 'Output ' + (i + 1) - }; - } - - return data; - } + setTimeout(() => { + console.log("Changing data", widget.flowchart); + widget.flowchart("setData", otherFlowchartData); + + }, 500); }); -if (true) console.log('remove lint unused warning', defaultFlowchartData); \ No newline at end of file diff --git a/server/user.mediacube.gui/pages/processVisualizer.zul b/server/user.mediacube.gui/pages/processVisualizer.zul index fd4a9dd7..81e29229 100644 --- a/server/user.mediacube.gui/pages/processVisualizer.zul +++ b/server/user.mediacube.gui/pages/processVisualizer.zul @@ -4,7 +4,7 @@