NIFI-2254: - Addressing accessing URI on the wrong object.

This closes #644

Signed-off-by: jpercivall <joepercivall@yahoo.com>
This commit is contained in:
Matt Gilman 2016-07-13 14:13:42 -04:00 committed by jpercivall
parent 6b87e1ea84
commit a989f6b9c2
8 changed files with 15 additions and 8 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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)) {

View File

@ -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);

View File

@ -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) {

View File

@ -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);

View File

@ -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);