Return-Path: X-Original-To: apmail-nifi-commits-archive@minotaur.apache.org Delivered-To: apmail-nifi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 967AF17F88 for ; Tue, 13 Jan 2015 21:01:42 +0000 (UTC) Received: (qmail 33928 invoked by uid 500); 13 Jan 2015 21:01:44 -0000 Delivered-To: apmail-nifi-commits-archive@nifi.apache.org Received: (qmail 33886 invoked by uid 500); 13 Jan 2015 21:01:44 -0000 Mailing-List: contact commits-help@nifi.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.incubator.apache.org Delivered-To: mailing list commits@nifi.incubator.apache.org Received: (qmail 33876 invoked by uid 99); 13 Jan 2015 21:01:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jan 2015 21:01:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 13 Jan 2015 21:01:43 +0000 Received: (qmail 31588 invoked by uid 99); 13 Jan 2015 21:00:07 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jan 2015 21:00:07 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 5AD72A103D7; Tue, 13 Jan 2015 21:00:07 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: mcgilman@apache.org To: commits@nifi.incubator.apache.org Message-Id: <6a6fe14debb746c28db7dbb35ec22bd4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-nifi git commit: NIFI-258: - Ensuring connection stays up to date when processor configuration changes. Date: Tue, 13 Jan 2015 21:00:07 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Repository: incubator-nifi Updated Branches: refs/heads/develop b142d7a9b -> 80793ccbb NIFI-258: - Ensuring connection stays up to date when processor configuration changes. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/80793ccb Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/80793ccb Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/80793ccb Branch: refs/heads/develop Commit: 80793ccbb829e079ef8cc2fe703bad6397a71d48 Parents: b142d7a Author: Matt Gilman Authored: Tue Jan 13 15:54:21 2015 -0500 Committer: Matt Gilman Committed: Tue Jan 13 15:54:21 2015 -0500 ---------------------------------------------------------------------- .../js/nf/canvas/nf-processor-configuration.js | 23 +++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/80793ccb/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 4dec734..14ffa95 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 @@ -363,6 +363,20 @@ nf.ProcessorConfiguration = (function () { return true; } }; + + /** + * Reloads the outgoing connections for the specified processor. + * + * @param {object} processor + */ + var reloadProcessorConnections = function (processor) { + var connections = nf.Connection.getComponentConnections(processor.id); + $.each(connections, function (_, connection) { + if (connection.source.id === processor.id) { + nf.Connection.reload(connection); + } + }); + }; return { /** @@ -601,8 +615,11 @@ nf.ProcessorConfiguration = (function () { // update the revision nf.Client.setRevision(response.revision); - // set the new processor state + // set the new processor state based on the response nf.Processor.set(response.processor); + + // reload the processor's outgoing connections + reloadProcessorConnections(processor); // close the details panel $('#processor-configuration').modal('hide'); @@ -632,7 +649,11 @@ nf.ProcessorConfiguration = (function () { // show the custom ui nf.CustomProcessorUi.showCustomUi($('#processor-id').text(), processor.config.customUiUrl, true).done(function () { + // once the custom ui is closed, reload the processor nf.Processor.reload(processor); + + // and reload the processor's outgoing connections + reloadProcessorConnections(processor); }); };