http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js index 4eeee43..ddc501a 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-go-to.js @@ -336,6 +336,7 @@ nf.GoTo = (function () { } }); }, + /** * Shows components downstream from a processor. * @@ -348,7 +349,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' - }).then(function (response) { + }).done(function (response) { var connections = response.connections; // populate the downstream dialog @@ -372,8 +373,9 @@ nf.GoTo = (function () { // show the downstream dialog $('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }, + /** * Shows components upstream from a processor. * @@ -386,7 +388,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' - }).then(function (response) { + }).done(function (response) { var connections = response.connections; // populate the upstream dialog @@ -410,8 +412,9 @@ nf.GoTo = (function () { // show the upstream dialog $('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }, + /** * Shows components downstream from a process group or a remote process group. * @@ -424,7 +427,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' - }).then(function (response) { + }).done(function (response) { var connections = response.connections; // populate the downstream dialog @@ -448,8 +451,9 @@ nf.GoTo = (function () { // show the downstream dialog $('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }, + /** * Shows components upstream from a process group or a remote process group. * @@ -462,7 +466,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' - }).then(function (response) { + }).done(function (response) { var connections = response.connections; // populate the upstream dialog @@ -486,8 +490,9 @@ nf.GoTo = (function () { // show the dialog $('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }, + /** * Shows components downstream from an input port. * @@ -500,7 +505,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' - }).then(function (response) { + }).done(function (response) { var connections = response.connections; // populate the downstream dialog @@ -524,8 +529,9 @@ nf.GoTo = (function () { // show the downstream dialog $('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }, + /** * Shows components upstream from an input port. * @@ -538,7 +544,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(nf.Canvas.getParentGroupId()) + '/connections', dataType: 'json' - }).then(function (response) { + }).done(function (response) { var connections = response.connections; // populate the upstream dialog @@ -565,8 +571,9 @@ nf.GoTo = (function () { // show the upstream dialog $('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }, + /** * Shows components downstream from an output port. * @@ -579,7 +586,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(nf.Canvas.getParentGroupId()) + '/connections', dataType: 'json' - }).then(function (response) { + }).done(function (response) { var connections = response.connections; // populate the downstream dialog @@ -606,8 +613,9 @@ nf.GoTo = (function () { // show the downstream dialog $('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }, + /** * Shows components upstream from an output port. * @@ -620,7 +628,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' - }).then(function (response) { + }).done(function (response) { var connections = response.connections; // populate the upstream dialog @@ -644,8 +652,9 @@ nf.GoTo = (function () { // show the upstream dialog $('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }, + /** * Shows components downstream from a funnel. * @@ -658,7 +667,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' - }).then(function (response) { + }).done(function (response) { var connections = response.connections; // populate the downstream dialog @@ -679,8 +688,9 @@ nf.GoTo = (function () { // show the downstream dialog $('#connections-dialog').modal('setHeaderText', 'Downstream Connections').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }, + /** * Shows components upstream from a funnel. * @@ -693,7 +703,7 @@ nf.GoTo = (function () { type: 'GET', url: config.urls.controller + '/process-groups/' + encodeURIComponent(selectionData.component.parentGroupId) + '/connections', dataType: 'json' - }).then(function (response) { + }).done(function (response) { var connections = response.connections; // populate the upstream dialog @@ -714,7 +724,7 @@ nf.GoTo = (function () { // show the upstream dialog $('#connections-dialog').modal('setHeaderText', 'Upstream Connections').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); } }; }()); \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js index b1c5f17..100f0f8 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-graph.js @@ -55,6 +55,7 @@ nf.Graph = (function () { // load the graph return nf.CanvasUtils.enterGroup(nf.Canvas.getGroupId()); }, + /** * Populates the graph with the resources defined in the response. * @@ -96,6 +97,7 @@ nf.Graph = (function () { nf.Connection.add(processGroupContents.connections, selectAll); } }, + /** * Gets the components currently on the canvas. */ @@ -110,6 +112,7 @@ nf.Graph = (function () { connections: nf.Connection.get() }; }, + /** * Sets the components contained within the specified process group. * @@ -142,6 +145,7 @@ nf.Graph = (function () { nf.Connection.set(processGroupContents.connections); } }, + /** * Populates the status for the components specified. This will update the content * of the existing components on the graph and will not cause them to be repainted. @@ -160,6 +164,7 @@ nf.Graph = (function () { nf.Processor.setStatus(processGroupStatus.processorStatus); nf.Connection.setStatus(processGroupStatus.connectionStatus); }, + /** * Clears all the components currently on the canvas. This function does not automatically refresh. */ @@ -173,6 +178,7 @@ nf.Graph = (function () { nf.Processor.removeAll(); nf.Connection.removeAll(); }, + /** * Refreshes all components currently on the canvas. */ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js index 51dacfc..4c8e555 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label-configuration.js @@ -41,13 +41,13 @@ nf.LabelConfiguration = (function () { 'style[font-size]': fontSize.value }, dataType: 'json' - }).then(function (response) { + }).done(function (response) { // update the revision nf.Client.setRevision(response.revision); // get the label out of the response nf.Label.set(response.label); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); // reset and hide the dialog @@ -92,6 +92,7 @@ nf.LabelConfiguration = (function () { } }); }, + /** * Shows the configuration for the specified label. * http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js index 0d5db9e..c175418 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-label.js @@ -283,6 +283,7 @@ nf.Label = (function () { width: dimensions.width, height: dimensions.height }, + /** * Initializes of the Processor handler. */ @@ -342,13 +343,13 @@ nf.Label = (function () { 'height': labelData.dimensions.height }, dataType: 'json' - }).then(function (response) { + }).done(function (response) { // update the revision nf.Client.setRevision(response.revision); // request was successful, update the entry nf.Label.set(response.label); - }, function () { + }).fail(function () { // determine the previous width var width = dimensions.width; if (nf.Common.isDefinedAndNotNull(labelData.component.width)) { @@ -376,6 +377,7 @@ nf.Label = (function () { d3.event.sourceEvent.stopPropagation(); }); }, + /** * Populates the graph with the specified labels. * @@ -421,6 +423,7 @@ nf.Label = (function () { // apply the selection and handle all new labels select().enter().call(renderLabels, selectAll); }, + /** * If the label id is specified it is returned. If no label id * specified, all labels are returned. @@ -434,6 +437,7 @@ nf.Label = (function () { return labelMap.get(id); } }, + /** * If the label id is specified it is refresh according to the current * state. If not label id is specified, all labels are refreshed. @@ -447,6 +451,7 @@ nf.Label = (function () { d3.selectAll('g.label').call(updateLabels); } }, + /** * Reloads the label state from the server and refreshes the UI. * If the label is currently unknown, this function just returns. @@ -464,6 +469,7 @@ nf.Label = (function () { }); } }, + /** * Positions the component. * @@ -472,6 +478,7 @@ nf.Label = (function () { position: function (id) { d3.select('#id-' + id).call(position); }, + /** * Sets the specified label(s). If the is an array, it * will set each label. If it is not an array, it will @@ -516,6 +523,7 @@ nf.Label = (function () { set(labels); } }, + /** * Removes the specified label. * @@ -533,12 +541,14 @@ nf.Label = (function () { // apply the selection and handle all removed labels select().exit().call(removeLabels); }, + /** * Removes all label. */ removeAll: function () { nf.Label.remove(labelMap.keys()); }, + /** * Returns the default color that should be used when drawing a label. */ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js index 2b31401..189f19f 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-configuration.js @@ -58,7 +58,7 @@ nf.PortConfiguration = (function () { data: data, url: portData.component.uri, dataType: 'json' - }).then(function (response) { + }).done(function (response) { // update the revision nf.Client.setRevision(response.revision); @@ -74,7 +74,7 @@ nf.PortConfiguration = (function () { // close the details panel $('#port-configuration').modal('hide'); - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { // handle bad request locally to keep the dialog open, allowing the user // to make changes. if the request fails for another reason, the dialog // should be closed so the issue can be addressed (stale flow for instance) @@ -128,6 +128,7 @@ nf.PortConfiguration = (function () { init: function () { initPortConfigurationDialog(); }, + /** * Shows the details for the specified selection. * http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js index 2c19898..6b4bd8f 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port-details.js @@ -41,6 +41,7 @@ nf.PortDetails = (function () { } }); }, + showDetails: function (selection) { // if the specified component is a processor, load its properties if (nf.CanvasUtils.isInputPort(selection) || nf.CanvasUtils.isOutputPort(selection)) { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js index e80ff56..4eb3653 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js @@ -446,6 +446,7 @@ nf.Port = (function () { 'class': 'ports' }); }, + /** * Populates the graph with the specified ports. * @@ -485,6 +486,7 @@ nf.Port = (function () { // apply the selection and handle all new ports select().enter().call(renderPorts, selectAll); }, + /** * If the port id is specified it is returned. If no port id * specified, all ports are returned. @@ -498,6 +500,7 @@ nf.Port = (function () { return portMap.get(id); } }, + /** * If the port id is specified it is refresh according to the current * state. If not port id is specified, all ports are refreshed. @@ -511,12 +514,14 @@ nf.Port = (function () { d3.selectAll('g.input-port, g.output-port').call(updatePorts); } }, + /** * Refreshes the components necessary after a pan event. */ pan: function () { d3.selectAll('g.input-port.entering, g.output-port.entering, g.input-port.leaving, g.output-port.leaving').call(updatePorts); }, + /** * Reloads the port state from the server and refreshes the UI. * If the port is currently unknown, this function just returns. @@ -538,6 +543,7 @@ nf.Port = (function () { }); } }, + /** * Positions the component. * @@ -546,6 +552,7 @@ nf.Port = (function () { position: function (id) { d3.select('#id-' + id).call(nf.CanvasUtils.position); }, + /** * Sets the specified port(s). If the is an array, it * will set each port. If it is not an array, it will @@ -574,6 +581,7 @@ nf.Port = (function () { set(ports); } }, + /** * Sets the port status using the specified status. * @@ -595,6 +603,7 @@ nf.Port = (function () { // update the visible ports d3.selectAll('g.input-port.visible, g.output-port.visible').call(updatePortStatus); }, + /** * Removes the specified port. * @@ -612,6 +621,7 @@ nf.Port = (function () { // apply the selection and handle all removed ports select().exit().call(removePorts); }, + /** * Removes all ports.. */ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js index b74d0b4..de7a2d8 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-configuration.js @@ -42,7 +42,7 @@ nf.ProcessGroupConfiguration = (function () { }, url: processGroupData.component.uri, dataType: 'json' - }).then(function (response) { + }).done(function (response) { if (nf.Common.isDefinedAndNotNull(response.processGroup)) { // update the revision nf.Client.setRevision(response.revision); @@ -53,7 +53,7 @@ nf.ProcessGroupConfiguration = (function () { // close the details panel $('#process-group-configuration').modal('hide'); } - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { // close the details panel $('#process-group-configuration').modal('hide'); @@ -80,6 +80,7 @@ nf.ProcessGroupConfiguration = (function () { } }); }, + /** * Shows the details for the specified selection. * http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js index 56f0061..7c6badd 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group-details.js @@ -40,6 +40,7 @@ nf.ProcessGroupDetails = (function () { } }); }, + showDetails: function (selection) { // if the specified selection is a process group if (nf.CanvasUtils.isProcessGroup(selection)) { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js index 180484a..a585fc8 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js @@ -888,6 +888,7 @@ nf.ProcessGroup = (function () { 'class': 'process-groups' }); }, + /** * Populates the graph with the specified process groups. * @@ -918,6 +919,7 @@ nf.ProcessGroup = (function () { // apply the selection and handle all new process group select().enter().call(renderProcessGroups, selectAll); }, + /** * If the process group id is specified it is returned. If no process group id * specified, all process groups are returned. @@ -931,6 +933,7 @@ nf.ProcessGroup = (function () { return processGroupMap.get(id); } }, + /** * If the process group id is specified it is refresh according to the current * state. If no process group id is specified, all process groups are refreshed. @@ -944,12 +947,14 @@ nf.ProcessGroup = (function () { d3.selectAll('g.process-group').call(updateProcessGroups); } }, + /** * Refreshes the components necessary after a pan event. */ pan: function () { d3.selectAll('g.process-group.entering, g.process-group.leaving').call(updateProcessGroups); }, + /** * Reloads the process group state from the server and refreshes the UI. * If the process group is currently unknown, this function just returns. @@ -967,6 +972,7 @@ nf.ProcessGroup = (function () { }); } }, + /** * Positions the component. * @@ -975,6 +981,7 @@ nf.ProcessGroup = (function () { position: function (id) { d3.select('#id-' + id).call(nf.CanvasUtils.position); }, + /** * Sets the specified process group(s). If the is an array, it * will set each process group. If it is not an array, it will @@ -1003,6 +1010,7 @@ nf.ProcessGroup = (function () { set(processGroups); } }, + /** * Sets the process group status using the specified status. * @@ -1024,6 +1032,7 @@ nf.ProcessGroup = (function () { // update the visible process groups d3.selectAll('g.process-group.visible').call(updateProcessGroupStatus); }, + /** * Removes the specified process group. * @@ -1041,6 +1050,7 @@ nf.ProcessGroup = (function () { // apply the selection and handle all removed process groups select().exit().call(removeProcessGroups); }, + /** * Removes all process groups. */ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js index d8025ec..a904e6d 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js @@ -454,6 +454,7 @@ nf.ProcessorConfiguration = (function () { // initialize the property table nf.ProcessorPropertyTable.init(); }, + /** * Shows the configuration dialog for the specified processor. * @@ -586,7 +587,7 @@ nf.ProcessorConfiguration = (function () { dataType: 'json', processData: false, contentType: 'application/json' - }).then(function (response) { + }).done(function (response) { if (nf.Common.isDefinedAndNotNull(response.processor)) { // update the revision nf.Client.setRevision(response.revision); @@ -597,7 +598,7 @@ nf.ProcessorConfiguration = (function () { // close the details panel $('#processor-configuration').modal('hide'); } - }, handleProcessorConfigurationError); + }).fail(handleProcessorConfigurationError); } } } @@ -650,7 +651,7 @@ nf.ProcessorConfiguration = (function () { dataType: 'json', processData: false, contentType: 'application/json' - }).then(function (response) { + }).done(function (response) { if (nf.Common.isDefinedAndNotNull(response.processor)) { // update the revision nf.Client.setRevision(response.revision); @@ -658,7 +659,7 @@ nf.ProcessorConfiguration = (function () { // open the custom ui openCustomUi(); } - }, handleProcessorConfigurationError); + }).fail(handleProcessorConfigurationError); } } }); @@ -679,7 +680,7 @@ nf.ProcessorConfiguration = (function () { type: 'GET', url: '../nifi-api/controller/history/processors/' + encodeURIComponent(processor.id), dataType: 'json' - }).then(function (response) { + }).done(function (response) { var processorHistory = response.processorHistory; // record the processor history @@ -696,7 +697,7 @@ nf.ProcessorConfiguration = (function () { if (processorRelationships.is(':visible') && processorRelationships.get(0).scrollHeight > processorRelationships.innerHeight()) { processorRelationships.css('border-width', '1px'); } - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); } } }; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js index 486ded6..3ffc17b 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-property-table.js @@ -325,6 +325,7 @@ nf.ProcessorPropertyTable = (function () { config: { sensitiveText: 'Sensitive value set' }, + /** * Initializes the property table. */ @@ -332,6 +333,7 @@ nf.ProcessorPropertyTable = (function () { initNewPropertyDialog(); initProcessorPropertiesTable(); }, + /** * Determines if the specified property is sensitive. * @@ -344,6 +346,7 @@ nf.ProcessorPropertyTable = (function () { return false; } }, + /** * Determines if the specified property is required. * @@ -356,6 +359,7 @@ nf.ProcessorPropertyTable = (function () { return false; } }, + /** * Determines if the specified property is required. * @@ -368,6 +372,7 @@ nf.ProcessorPropertyTable = (function () { return false; } }, + /** * Gets the allowable values for the specified property. * @@ -380,6 +385,7 @@ nf.ProcessorPropertyTable = (function () { return null; } }, + /** * Returns whether the specified property supports EL. * @@ -392,6 +398,7 @@ nf.ProcessorPropertyTable = (function () { return false; } }, + /** * Saves the last edited row in the specified grid. */ @@ -403,6 +410,7 @@ nf.ProcessorPropertyTable = (function () { editController.commitCurrentEdit(); } }, + /** * Cancels the edit in the specified row. */ @@ -414,6 +422,7 @@ nf.ProcessorPropertyTable = (function () { editController.cancelCurrentEdit(); } }, + /** * Deletes the property in the specified row. * @@ -432,6 +441,7 @@ nf.ProcessorPropertyTable = (function () { propertyData.updateItem(property.id, property); } }, + /** * Update the size of the grid based on its container's current size. */ @@ -441,6 +451,7 @@ nf.ProcessorPropertyTable = (function () { propertyGrid.resizeCanvas(); } }, + /** * Loads the specified properties. * @@ -497,6 +508,7 @@ nf.ProcessorPropertyTable = (function () { propertyData.endUpdate(); } }, + /** * Determines if a save is required. */ @@ -515,6 +527,7 @@ nf.ProcessorPropertyTable = (function () { }); return isSaveRequired; }, + /** * Marshal's the properties to send to the server. */ @@ -535,6 +548,7 @@ nf.ProcessorPropertyTable = (function () { return properties; }, + /** * Clears the property table. */ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js index cbf980d..11bc106 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js @@ -651,6 +651,7 @@ nf.Processor = (function () { 'class': 'processors' }); }, + /** * Populates the graph with the specified processors. * @@ -681,6 +682,7 @@ nf.Processor = (function () { // apply the selection and handle all new processors select().enter().call(renderProcessors, selectAll); }, + /** * If the processor id is specified it is returned. If no processor id * specified, all processors are returned. @@ -694,6 +696,7 @@ nf.Processor = (function () { return processorMap.get(id); } }, + /** * If the processor id is specified it is refresh according to the current * state. If not processor id is specified, all processors are refreshed. @@ -707,6 +710,7 @@ nf.Processor = (function () { d3.selectAll('g.processor').call(updateProcessors); } }, + /** * Positions the component. * @@ -715,12 +719,14 @@ nf.Processor = (function () { position: function (id) { d3.select('#id-' + id).call(nf.CanvasUtils.position); }, + /** * Refreshes the components necessary after a pan event. */ pan: function () { d3.selectAll('g.processor.entering, g.processor.leaving').call(updateProcessors); }, + /** * Reloads the processor state from the server and refreshes the UI. * If the processor is currently unknown, this function just returns. @@ -738,6 +744,7 @@ nf.Processor = (function () { }); } }, + /** * Sets the specified processor(s). If the is an array, it * will set each processor. If it is not an array, it will @@ -766,6 +773,7 @@ nf.Processor = (function () { set(processors); } }, + /** * Removes the specified processor. * @@ -783,12 +791,14 @@ nf.Processor = (function () { // apply the selection and handle all removed processors select().exit().call(removeProcessors); }, + /** * Removes all processors. */ removeAll: function () { nf.Processor.remove(processorMap.keys()); }, + /** * Sets the processor status using the specified status. * @@ -810,6 +820,7 @@ nf.Processor = (function () { // update the visible processor status d3.selectAll('g.processor.visible').call(updateProcessorStatus); }, + /** * Returns the default color that should be used when drawing a processor. */ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-registration.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-registration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-registration.js index 293539e..ec64677 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-registration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-registration.js @@ -53,7 +53,7 @@ nf.Registration = (function () { data: { 'justification': justification } - }).then(function (response) { + }).done(function (response) { // hide the registration pane $('#registration-pane').hide(); @@ -61,7 +61,7 @@ nf.Registration = (function () { $('#message-pane').show(); $('#message-title').text('Thanks'); $('#message-content').text('Your request will be processed shortly.'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }); } }; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js index b2639b3..8920bdd 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-configuration.js @@ -45,13 +45,13 @@ nf.RemoteProcessGroupConfiguration = (function () { dataType: 'json', processData: false, contentType: 'application/json' - }).then(function (response) { + }).done(function (response) { // update the revision nf.Client.setRevision(response.revision); // close the details panel $('#remote-process-group-configuration').modal('hide'); - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { if (xhr.status === 400) { var errors = xhr.responseText.split('\n'); @@ -93,6 +93,7 @@ nf.RemoteProcessGroupConfiguration = (function () { } }); }, + /** * Shows the details for the remote process group in the specified selection. * http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js index 87cbbb1..296652b 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-details.js @@ -39,6 +39,7 @@ nf.RemoteProcessGroupDetails = (function () { } }); }, + /** * Shows the details for the remote process group in the specified selection. * http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js index 4e8eca6..3d68fe5 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group-ports.js @@ -59,7 +59,7 @@ nf.RemoteProcessGroupPorts = (function () { dataType: 'json', processData: false, contentType: 'application/json' - }).then(function (response) { + }).done(function (response) { // update the revision nf.Client.setRevision(response.revision); @@ -75,7 +75,7 @@ nf.RemoteProcessGroupPorts = (function () { // set the new values $('#' + remotePortId + '-concurrent-tasks').text(remotePort.concurrentlySchedulableTaskCount); $('#' + remotePortId + '-compression').text(compressionLabel); - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { if (xhr.status === 400) { var errors = xhr.responseText.split('\n'); @@ -270,7 +270,7 @@ nf.RemoteProcessGroupPorts = (function () { dataType: 'json', processData: false, contentType: 'application/json' - }).then(function (response) { + }).done(function (response) { // update the revision nf.Client.setRevision(response.revision); @@ -306,7 +306,7 @@ nf.RemoteProcessGroupPorts = (function () { } } } - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { if (xhr.status === 400) { var errors = xhr.responseText.split('\n'); @@ -428,6 +428,7 @@ nf.RemoteProcessGroupPorts = (function () { initRemotePortConfigurationDialog(); initRemoteProcessGroupConfigurationDialog(); }, + /** * Shows the details for the remote process group in the specified selection. * @@ -446,7 +447,7 @@ nf.RemoteProcessGroupPorts = (function () { verbose: true }, dataType: 'json' - }).then(function (response) { + }).done(function (response) { var remoteProcessGroup = response.remoteProcessGroup; // set the model locally @@ -509,7 +510,7 @@ nf.RemoteProcessGroupPorts = (function () { // show the details $('#remote-process-group-ports').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); } } }; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js index 6665d48..9c6da4c 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js @@ -881,6 +881,7 @@ nf.RemoteProcessGroup = (function () { 'class': 'remote-process-groups' }); }, + /** * Populates the graph with the specified remote process groups. * @@ -911,6 +912,7 @@ nf.RemoteProcessGroup = (function () { // apply the selection and handle all new remote process groups select().enter().call(renderRemoteProcessGroups, selectAll); }, + /** * If the remote process group id is specified it is returned. If no remote process * group id specified, all remote process groups are returned. @@ -924,6 +926,7 @@ nf.RemoteProcessGroup = (function () { return remoteProcessGroupMap.get(id); } }, + /** * If the remote process group id is specified it is refresh according to the current * state. If no remote process group id is specified, all remote process groups are refreshed. @@ -937,12 +940,14 @@ nf.RemoteProcessGroup = (function () { d3.selectAll('g.remote-process-group').call(updateRemoteProcessGroups); } }, + /** * Refreshes the components necessary after a pan event. */ pan: function () { d3.selectAll('g.remote-process-group.entering, g.remote-process-group.leaving').call(updateRemoteProcessGroups); }, + /** * Reloads the remote process group state from the server and refreshes the UI. * If the remote process group is currently unknown, this function just returns. @@ -966,6 +971,7 @@ nf.RemoteProcessGroup = (function () { }); } }, + /** * Positions the component. * @@ -974,6 +980,7 @@ nf.RemoteProcessGroup = (function () { position: function (id) { d3.select('#id-' + id).call(nf.CanvasUtils.position); }, + /** * Sets the specified remote process group(s). If the is an array, it * will set each remote process group. If it is not an array, it will @@ -1002,6 +1009,7 @@ nf.RemoteProcessGroup = (function () { set(remoteProcessGroups); } }, + /** * Sets the remote process group status using the specified status. * @@ -1023,6 +1031,7 @@ nf.RemoteProcessGroup = (function () { // only update the visible components d3.selectAll('g.remote-process-group.visible').call(updateProcessGroupStatus); }, + /** * Removes the specified process group. * @@ -1040,6 +1049,7 @@ nf.RemoteProcessGroup = (function () { // apply the selection and handle all removed remote process groups select().exit().call(removeRemoteProcessGroups); }, + /** * Removes all remote process groups. */ http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js index b21b1bf..54e2bb2 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-configuration.js @@ -80,7 +80,7 @@ nf.SecurePortConfiguration = (function () { contentType: 'application/json', url: portUri, dataType: 'json' - }).then(function (response) { + }).done(function (response) { // update the revision nf.Client.setRevision(response.revision); @@ -96,7 +96,7 @@ nf.SecurePortConfiguration = (function () { // close the details panel $('#secure-port-configuration').modal('hide'); - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { // close the details panel $('#secure-port-configuration').modal('hide'); @@ -322,6 +322,7 @@ nf.SecurePortConfiguration = (function () { init: function () { initPortConfigurationDialog(); }, + /** * Shows the details for the port specified selection. * http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js index de9769e..9b66b09 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-secure-port-details.js @@ -85,6 +85,7 @@ nf.SecurePortDetails = (function () { } }); }, + showDetails: function (selection) { // if the specified component is a port, load its properties if (nf.CanvasUtils.isInputPort(selection) || nf.CanvasUtils.isOutputPort(selection)) { http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-selectable.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-selectable.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-selectable.js index 47ac477..552d51e 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-selectable.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-selectable.js @@ -20,6 +20,7 @@ nf.Selectable = (function () { init: function () { }, + select: function (g) { // hide any context menus as necessary nf.ContextMenu.hide(); @@ -46,6 +47,7 @@ nf.Selectable = (function () { // stop propagation d3.event.stopPropagation(); }, + activate: function (components) { components.on('mousedown.selection', function () { // get the clicked component to update selection http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js index 2769ab3..3d573b3 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js @@ -54,7 +54,7 @@ nf.Settings = (function () { clientId: revision.clientId }, dataType: 'json' - }).then(function (response) { + }).done(function (response) { // update the revision nf.Client.setRevision(response.revision); @@ -63,7 +63,7 @@ nf.Settings = (function () { dialogContent: 'A new flow archive was successfully created.', overlayBackground: false }); - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { // close the details panel $('#settings-cancel').click(); @@ -87,7 +87,7 @@ nf.Settings = (function () { url: config.urls.controllerConfig, data: configuration, dataType: 'json' - }).then(function (response) { + }).done(function (response) { // update the revision nf.Client.setRevision(response.revision); @@ -99,7 +99,7 @@ nf.Settings = (function () { // close the settings dialog $('#shell-close-button').click(); - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { // close the details panel $('#settings-cancel').click(); @@ -113,6 +113,7 @@ nf.Settings = (function () { $('#shell-close-button').click(); }); }, + /** * Shows the settings dialog. */ @@ -121,7 +122,7 @@ nf.Settings = (function () { type: 'GET', url: config.urls.controllerConfig, dataType: 'json' - }).then(function (response) { + }).done(function (response) { // ensure the config is present if (nf.Common.isDefinedAndNotNull(response.config)) { // set the header @@ -139,7 +140,7 @@ nf.Settings = (function () { // reset button state $('#settings-save, #settings-cancel').mouseout(); }); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); } }; }()); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js index 4da7841..aa2ecf6 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-snippet.js @@ -69,6 +69,7 @@ nf.Snippet = (function () { return snippet; }, + /** * Creates a snippet. * @@ -90,6 +91,7 @@ nf.Snippet = (function () { nf.Client.setRevision(response.revision); }); }, + /** * Copies the snippet to the specified group and origin. * @@ -116,6 +118,7 @@ nf.Snippet = (function () { nf.Client.setRevision(response.revision); }); }, + /** * Removes the specified snippet. * @@ -135,6 +138,7 @@ nf.Snippet = (function () { nf.Client.setRevision(response.revision); }); }, + /** * Moves the snippet into the specified group. * @@ -158,6 +162,7 @@ nf.Snippet = (function () { nf.Client.setRevision(response.revision); }); }, + /** * Unlinks the snippet from the actual data flow. * @@ -180,6 +185,7 @@ nf.Snippet = (function () { nf.Client.setRevision(response.revision); }); }, + /** * Links the snippet from the actual data flow. * http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-storage.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-storage.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-storage.js index 1dab55f..0be05fe 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-storage.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-storage.js @@ -67,6 +67,7 @@ nf.Storage = (function () { alternativeStorage = d3.map(); } }, + /** * Stores the specified item. If supported, will be persisted * in localStorage. @@ -91,6 +92,7 @@ nf.Storage = (function () { alternativeStorage.set(key, item); } }, + /** * Gets the item with the specified key. If an item with this key does * not exist, null is returned. If an item exists but cannot be parsed @@ -117,6 +119,7 @@ nf.Storage = (function () { return alternativeStorage.get(key); } }, + /** * Removes the item with the specified key. * http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js index 12ee71b..c82caa0 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster-table.js @@ -95,14 +95,14 @@ nf.ClusterTable = (function () { status: 'CONNECTING' }, dataType: 'json' - }).then(function (response) { + }).done(function (response) { var node = response.node; // update the node in the table var clusterGrid = $('#cluster-table').data('gridInstance'); var clusterData = clusterGrid.getData(); clusterData.updateItem(node.nodeId, node); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }; /** @@ -118,14 +118,14 @@ nf.ClusterTable = (function () { status: 'DISCONNECTING' }, dataType: 'json' - }).then(function (response) { + }).done(function (response) { var node = response.node; // update the node in the table var clusterGrid = $('#cluster-table').data('gridInstance'); var clusterData = clusterGrid.getData(); clusterData.updateItem(node.nodeId, node); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }; /** @@ -138,12 +138,12 @@ nf.ClusterTable = (function () { type: 'DELETE', url: config.urls.nodes + '/' + encodeURIComponent(nodeId), dataType: 'json' - }).then(function () { + }).done(function () { // get the table and update the row accordingly var clusterGrid = $('#cluster-table').data('gridInstance'); var clusterData = clusterGrid.getData(); clusterData.deleteItem(nodeId); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }; /** @@ -391,6 +391,7 @@ nf.ClusterTable = (function () { // initialize the number of displayed items $('#displayed-nodes').text('0'); }, + /** * Prompts to verify node connection. * @@ -413,6 +414,7 @@ nf.ClusterTable = (function () { } }, + /** * Prompts to verify node disconnection. * @@ -434,6 +436,7 @@ nf.ClusterTable = (function () { }); } }, + /** * Makes the specified node the primary node of the cluster. * @@ -452,7 +455,7 @@ nf.ClusterTable = (function () { primary: true }, dataType: 'json' - }).then(function (response) { + }).done(function (response) { var node = response.node; var clusterGrid = $('#cluster-table').data('gridInstance'); @@ -482,9 +485,10 @@ nf.ClusterTable = (function () { // end the update clusterData.endUpdate(); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); } }, + /** * Prompts to verify node disconnection. * @@ -506,6 +510,7 @@ nf.ClusterTable = (function () { }); } }, + /** * Update the size of the grid based on its container's current size. */ @@ -515,6 +520,7 @@ nf.ClusterTable = (function () { clusterGrid.resizeCanvas(); } }, + /** * Load the processor cluster table. */ @@ -523,7 +529,7 @@ nf.ClusterTable = (function () { type: 'GET', url: config.urls.cluster, dataType: 'json' - }).then(function (response) { + }).done(function (response) { var cluster = response.cluster; // ensure there are groups specified @@ -544,8 +550,9 @@ nf.ClusterTable = (function () { } else { $('#total-nodes').text('0'); } - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }, + /** * Populate the expanded row. * @@ -561,7 +568,7 @@ nf.ClusterTable = (function () { type: 'GET', url: config.urls.nodes + '/' + encodeURIComponent(item.nodeId), dataType: 'json' - }).then(function (response) { + }).done(function (response) { var node = response.node; // update the dialog fields @@ -582,7 +589,7 @@ nf.ClusterTable = (function () { // show the dialog $('#node-details-dialog').modal('show'); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); } } }; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js index 3e6946e..f6cbdc6 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/cluster/nf-cluster.js @@ -41,7 +41,7 @@ nf.Cluster = (function () { type: 'GET', url: config.urls.authorities, dataType: 'json' - }).then(function (response) { + }).done(function (response) { if (nf.Common.isDefinedAndNotNull(response.authorities)) { // record the users authorities nf.Common.setAuthorities(response.authorities); @@ -49,7 +49,7 @@ nf.Cluster = (function () { } else { deferred.reject(); } - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { nf.Common.handleAjaxError(xhr, status, error); deferred.reject(); }); @@ -73,7 +73,7 @@ nf.Cluster = (function () { type: 'GET', url: config.urls.banners, dataType: 'json' - }).then(function (bannerResponse) { + }).done(function (bannerResponse) { // ensure the banners response is specified if (nf.Common.isDefinedAndNotNull(bannerResponse.banners)) { if (nf.Common.isDefinedAndNotNull(bannerResponse.banners.headerText) && bannerResponse.banners.headerText !== '') { @@ -105,7 +105,7 @@ nf.Cluster = (function () { } deferred.resolve(); - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { nf.Common.handleAjaxError(xhr, status, error); deferred.reject(); }); @@ -137,14 +137,14 @@ nf.Cluster = (function () { type: 'GET', url: config.urls.controllerAbout, dataType: 'json' - }).then(function (response) { + }).done(function (response) { var aboutDetails = response.about; var countersTitle = aboutDetails.title + ' Cluster'; // set the document title and the about title document.title = countersTitle; $('#counters-header-text').text(countersTitle); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }); }); }); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters-table.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters-table.js index 01c359a..536ffdb 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters-table.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters-table.js @@ -222,6 +222,7 @@ nf.CountersTable = (function () { // initialize the number of display items $('#displayed-counters').text('0'); }, + /** * Resets the specified counter. * @@ -237,16 +238,17 @@ nf.CountersTable = (function () { type: 'PUT', url: config.urls.counters + '/' + encodeURIComponent(item.id), dataType: 'json' - }).then(function (response) { + }).done(function (response) { var counter = response.counter; // get the table and update the row accordingly var countersGrid = $('#counters-table').data('gridInstance'); var countersData = countersGrid.getData(); countersData.updateItem(counter.id, counter); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); } }, + /** * Update the size of the grid based on its container's current size. */ @@ -256,6 +258,7 @@ nf.CountersTable = (function () { countersGrid.resizeCanvas(); } }, + /** * Load the processor counters table. */ @@ -264,7 +267,7 @@ nf.CountersTable = (function () { type: 'GET', url: config.urls.counters, dataType: 'json' - }).then(function (response) { + }).done(function (response) { var report = response.counters; // ensure there are groups specified @@ -285,7 +288,7 @@ nf.CountersTable = (function () { } else { $('#total-counters').text('0'); } - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); } }; }()); \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters.js index 83029da..1f9a861 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/counters/nf-counters.js @@ -41,7 +41,7 @@ nf.Counters = (function () { type: 'GET', url: config.urls.authorities, dataType: 'json' - }).then(function (response) { + }).done(function (response) { if (nf.Common.isDefinedAndNotNull(response.authorities)) { // record the users authorities nf.Common.setAuthorities(response.authorities); @@ -49,7 +49,7 @@ nf.Counters = (function () { } else { deferred.reject(); } - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { nf.Common.handleAjaxError(xhr, status, error); deferred.reject(); }); @@ -73,7 +73,7 @@ nf.Counters = (function () { type: 'GET', url: config.urls.banners, dataType: 'json' - }).then(function (response) { + }).done(function (response) { // ensure the banners response is specified if (nf.Common.isDefinedAndNotNull(response.banners)) { if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') { @@ -105,7 +105,7 @@ nf.Counters = (function () { } deferred.resolve(); - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { nf.Common.handleAjaxError(xhr, status, error); deferred.reject(); }); @@ -137,14 +137,14 @@ nf.Counters = (function () { type: 'GET', url: config.urls.controllerAbout, dataType: 'json' - }).then(function (response) { + }).done(function (response) { var aboutDetails = response.about; var countersTitle = aboutDetails.title + ' Counters'; // set the document title and the about title document.title = countersTitle; $('#counters-header-text').text(countersTitle); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }); }); }); http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js index 324f736..0564b17 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-model.js @@ -123,7 +123,7 @@ url: '../nifi-api/controller/history', data: query, dataType: 'json' - }).then(function (response) { + }).done(function (response) { var history = response.history; // calculate the indices @@ -160,7 +160,7 @@ from: from, to: to }); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); xhr.fromPage = fromPage; xhr.toPage = toPage; http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js index 0d2f15d..be0ea73 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history-table.js @@ -321,9 +321,9 @@ nf.HistoryTable = (function () { endDate: endDateTime }), dataType: 'json' - }).then(function () { + }).done(function () { nf.HistoryTable.loadHistoryTable(); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }; return { @@ -333,6 +333,7 @@ nf.HistoryTable = (function () { initPurgeDialog(); initHistoryTable(); }, + /** * Update the size of the grid based on its container's current size. */ @@ -342,6 +343,7 @@ nf.HistoryTable = (function () { historyGrid.resizeCanvas(); } }, + /** * Load the processor status table. */ @@ -355,6 +357,7 @@ nf.HistoryTable = (function () { // request refresh of the current 'page' historyGrid.onViewportChanged.notify(); }, + /** * Shows the details for the specified action. * http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2965258e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js ---------------------------------------------------------------------- diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js index 330d2d6..36364df 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/history/nf-history.js @@ -42,7 +42,7 @@ nf.History = (function () { type: 'GET', url: config.urls.authorities, dataType: 'json' - }).then(function (response) { + }).done(function (response) { if (nf.Common.isDefinedAndNotNull(response.authorities)) { // record the users authorities nf.Common.setAuthorities(response.authorities); @@ -50,7 +50,7 @@ nf.History = (function () { } else { deferred.reject(); } - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { nf.Common.handleAjaxError(xhr, status, error); deferred.reject(); }); @@ -74,7 +74,7 @@ nf.History = (function () { type: 'GET', url: config.urls.banners, dataType: 'json' - }).then(function (response) { + }).done(function (response) { // ensure the banners response is specified if (nf.Common.isDefinedAndNotNull(response.banners)) { if (nf.Common.isDefinedAndNotNull(response.banners.headerText) && response.banners.headerText !== '') { @@ -106,7 +106,7 @@ nf.History = (function () { } deferred.resolve(); - }, function (xhr, status, error) { + }).fail(function (xhr, status, error) { nf.Common.handleAjaxError(xhr, status, error); deferred.reject(); }); @@ -139,14 +139,14 @@ nf.History = (function () { type: 'GET', url: config.urls.controllerAbout, dataType: 'json' - }).then(function (response) { + }).done(function (response) { var aboutDetails = response.about; var historyTitle = aboutDetails.title + ' History'; // set the document title and the about title document.title = historyTitle; $('#history-header-text').text(historyTitle); - }, nf.Common.handleAjaxError); + }).fail(nf.Common.handleAjaxError); }); }); }