You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2015/01/07 16:25:46 UTC

incubator-nifi git commit: NIFI-231: - Cleaning up all tooltips that are based on dynamic content.

Repository: incubator-nifi
Updated Branches:
  refs/heads/develop 645837491 -> 2de45b62a


NIFI-231:
- Cleaning up all tooltips that are based on dynamic content.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/2de45b62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/2de45b62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/2de45b62

Branch: refs/heads/develop
Commit: 2de45b62a75deab3b2801b30d5f0a45301afbf90
Parents: 6458374
Author: Matt Gilman <ma...@gmail.com>
Authored: Wed Jan 7 10:22:27 2015 -0500
Committer: Matt Gilman <ma...@gmail.com>
Committed: Wed Jan 7 10:22:27 2015 -0500

----------------------------------------------------------------------
 .../js/nf/canvas/nf-processor-property-table.js |  8 ++++-
 .../nf/canvas/nf-remote-process-group-ports.js  |  5 ++++
 .../src/main/webapp/js/nf/nf-common.js          | 16 ++++++++++
 .../main/webapp/js/nf/nf-processor-details.js   | 10 +++++--
 .../webapp/js/nf/summary/nf-summary-table.js    | 31 ++++++++++++++++----
 5 files changed, 62 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2de45b62/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 12a652c..4c04702 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
@@ -553,7 +553,13 @@ nf.ProcessorPropertyTable = (function () {
          * Clears the property table.
          */
         clear: function () {
-            var propertyGrid = $('#processor-properties').data('gridInstance');
+            var propertyGridElement = $('#processor-properties');
+            
+            // clean up any tooltips that may have been generated
+            nf.Common.cleanUpTooltips(propertyGridElement, 'img.icon-info');
+            
+            // clear the data in the grid
+            var propertyGrid = propertyGridElement.data('gridInstance');
             var propertyData = propertyGrid.getData();
             propertyData.setItems([]);
         }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2de45b62/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 caadfea..d80e4ea 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
@@ -161,6 +161,11 @@ nf.RemoteProcessGroupPorts = (function () {
                     $('#remote-process-group-ports-id').text('');
                     $('#remote-process-group-ports-name').text('');
                     $('#remote-process-group-ports-url').text('');
+                    
+                    // clear any tooltips
+                    var dialog = $('#remote-process-group-ports');
+                    nf.Common.cleanUpTooltips(dialog, 'div.remote-port-removed');
+                    nf.Common.cleanUpTooltips(dialog, 'img.concurrent-tasks-info');
 
                     // clear the input and output ports
                     $('#remote-process-group-input-ports-container').empty();

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2de45b62/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
index 24dcf24..171b96f 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-common.js
@@ -296,6 +296,22 @@ nf.Common = {
     },
     
     /**
+     * Cleans up any tooltips that have been created for the specified container.
+     * 
+     * @param {jQuery} container
+     * @param {string} tooltipTarget
+     */
+    cleanUpTooltips: function(container, tooltipTarget) {
+        container.find(tooltipTarget).each(function () {
+            var tip = $(this);
+            if (tip.data('qtip')) {
+                var api = tip.qtip('api');
+                api.destroy(true);
+            }
+        });
+    },
+    
+    /**
      * Formats the tooltip for the specified property.
      * 
      * @param {object} propertyDescriptor      The property descriptor

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2de45b62/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
index 220338f..a3a2589 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
@@ -230,8 +230,14 @@ nf.ProcessorDetails = (function () {
                         // empty the relationship list
                         $('#read-only-auto-terminate-relationship-names').css('border-width', '0').empty();
 
-                        // clear the grid
-                        var propertyGrid = $('#read-only-processor-properties').data('gridInstance');
+                        // get the property grid element
+                        var propertyGridElement = $('#read-only-processor-properties');
+            
+                        // clean up any tooltips that may have been generated
+                        nf.Common.cleanUpTooltips(propertyGridElement, 'img.icon-info');
+
+                        // clear the data in the grid
+                        var propertyGrid = propertyGridElement.data('gridInstance');
                         var propertyData = propertyGrid.getData();
                         propertyData.setItems([]);
 

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2de45b62/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
index 85826ff..969d7bf 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/summary/nf-summary-table.js
@@ -1959,7 +1959,7 @@ nf.SummaryTable = (function () {
             }
         }).fail(nf.Common.handleAjaxError);
     };
-
+    
     return {
         /**
          * URL for loading system diagnostics.
@@ -2040,19 +2040,40 @@ nf.SummaryTable = (function () {
                 var processGroupStatus = response.processGroupStatus;
 
                 if (nf.Common.isDefinedAndNotNull(processGroupStatus)) {
-                    var processorsGrid = $('#processor-summary-table').data('gridInstance');
+                    // remove any tooltips from the processor table
+                    var processorsGridElement = $('#processor-summary-table');
+                    nf.Common.cleanUpTooltips(processorsGridElement, 'img.has-bulletins');
+                    
+                    // get the processor grid/data
+                    var processorsGrid = processorsGridElement.data('gridInstance');
                     var processorsData = processorsGrid.getData();
 
+                    // get the connections grid/data (do not render bulletins)
                     var connectionsGrid = $('#connection-summary-table').data('gridInstance');
                     var connectionsData = connectionsGrid.getData();
 
-                    var inputPortsGrid = $('#input-port-summary-table').data('gridInstance');
+                    // remove any tooltips from the input port table
+                    var inputPortsGridElement = $('#input-port-summary-table');
+                    nf.Common.cleanUpTooltips(inputPortsGridElement, 'img.has-bulletins');
+
+                    // get the input ports grid/data
+                    var inputPortsGrid = inputPortsGridElement.data('gridInstance');
                     var inputPortsData = inputPortsGrid.getData();
 
-                    var outputPortsGrid = $('#output-port-summary-table').data('gridInstance');
+                    // remove any tooltips from the output port table
+                    var outputPortsGridElement = $('#output-port-summary-table');
+                    nf.Common.cleanUpTooltips(outputPortsGridElement, 'img.has-bulletins');
+
+                    // get the output ports grid/data
+                    var outputPortsGrid = outputPortsGridElement.data('gridInstance');
                     var outputPortsData = outputPortsGrid.getData();
 
-                    var remoteProcessGroupsGrid = $('#remote-process-group-summary-table').data('gridInstance');
+                    // remove any tooltips from the remote process group table
+                    var remoteProcessGroupsGridElement = $('#remote-process-group-summary-table');
+                    nf.Common.cleanUpTooltips(remoteProcessGroupsGridElement, 'img.has-bulletins');
+
+                    // get the remote process groups grid
+                    var remoteProcessGroupsGrid = remoteProcessGroupsGridElement.data('gridInstance');
                     var remoteProcessGroupsData = remoteProcessGroupsGrid.getData();
 
                     var processorItems = [];