From dd2770c7316d0348dd9d064752ab1245bb3a155f Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Wed, 13 Jul 2016 14:13:42 -0400 Subject: [PATCH] NIFI-2254: - Addressing accessing URI on the wrong object. --- .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js | 3 ++- .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js | 3 ++- .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js | 3 ++- .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js | 3 ++- .../src/main/webapp/js/nf/canvas/nf-process-group.js | 3 ++- .../src/main/webapp/js/nf/canvas/nf-processor-configuration.js | 2 +- .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js | 3 ++- .../src/main/webapp/js/nf/canvas/nf-remote-process-group.js | 3 ++- 8 files changed, 15 insertions(+), 8 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js index eeefa38bd20c..5107ccfbc15a 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js @@ -1727,9 +1727,10 @@ nf.Connection = (function () { */ reload: function (connection) { if (connectionMap.has(connection.id)) { + var connectionEntity = connectionMap.get(connection.id); return $.ajax({ type: 'GET', - url: connection.uri, + url: connectionEntity.uri, dataType: 'json' }).done(function (response) { nf.Connection.set(response); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js index efda58c352f3..937806f968dc 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-funnel.js @@ -281,9 +281,10 @@ nf.Funnel = (function () { */ reload: function (funnel) { if (funnelMap.has(funnel.id)) { + var funnelEntity = funnelMap.get(funnel.id); return $.ajax({ type: 'GET', - url: funnel.uri, + url: funnelEntity.uri, dataType: 'json' }).done(function (response) { nf.Funnel.set(response); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js index bde87d505181..890985d09324 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js @@ -461,9 +461,10 @@ nf.Label = (function () { */ reload: function (label) { if (labelMap.has(label.id)) { + var labelEntity = labelMap.get(label.id); return $.ajax({ type: 'GET', - url: label.uri, + url: labelEntity.uri, dataType: 'json' }).done(function (response) { nf.Label.set(response); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js index 4505aa4738af..b09efce494f6 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js @@ -606,9 +606,10 @@ nf.Port = (function () { */ reload: function (port) { if (portMap.has(port.id)) { + var portEntity = portMap.get(port.id); return $.ajax({ type: 'GET', - url: port.uri, + url: portEntity.uri, dataType: 'json' }).done(function (response) { if (nf.Common.isDefinedAndNotNull(response.inputPort)) { diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js index fc96c012b8ef..ac0f89e1c5c7 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js @@ -1088,9 +1088,10 @@ nf.ProcessGroup = (function () { */ reload: function (processGroup) { if (processGroupMap.has(processGroup.id)) { + var processGroupEntity = processGroupMap.get(processGroup.id); return $.ajax({ type: 'GET', - url: processGroup.uri, + url: processGroupEntity.uri, dataType: 'json' }).done(function (response) { nf.ProcessGroup.set(response); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js index 120f05c90660..3201a5ae1c01 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js @@ -433,7 +433,7 @@ nf.ProcessorConfiguration = (function () { return $.ajax({ type: 'PUT', data: JSON.stringify(updatedProcessor), - url: processor.uri, + url: d.uri, dataType: 'json', contentType: 'application/json' }).done(function (response) { diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js index 1f133ce073db..169318c996af 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js @@ -863,9 +863,10 @@ nf.Processor = (function () { */ reload: function (processor) { if (processorMap.has(processor.id)) { + var processorEntity = processorMap.get(processor.id); return $.ajax({ type: 'GET', - url: processor.uri, + url: processorEntity.uri, dataType: 'json' }).done(function (response) { nf.Processor.set(response); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js index b0537614f9a6..7983bbb1858f 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js @@ -934,9 +934,10 @@ nf.RemoteProcessGroup = (function () { */ reload: function (remoteProcessGroup) { if (remoteProcessGroupMap.has(remoteProcessGroup.id)) { + var remoteProcessGroupEntity = remoteProcessGroupMap.get(remoteProcessGroup.id); return $.ajax({ type: 'GET', - url: remoteProcessGroup.uri, + url: remoteProcessGroupEntity.uri, dataType: 'json' }).done(function (response) { nf.RemoteProcessGroup.set(response);