Repository: nifi Updated Branches: refs/heads/master 220b76803 -> 6676e94a7
[NIFI-2929] remove canvas element names when zoomed out and view permissions are removed. This closes #1152 Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/6676e94a Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/6676e94a Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/6676e94a Branch: refs/heads/master Commit: 6676e94a7cce68501dc5c010e42c036a2d92a472 Parents: 220b768 Author: Scott Aslan <[email protected]> Authored: Fri Oct 21 15:45:46 2016 -0400 Committer: Matt Gilman <[email protected]> Committed: Fri Oct 21 16:11:27 2016 -0400 ---------------------------------------------------------------------- .../src/main/webapp/js/nf/canvas/nf-port.js | 3 +++ .../webapp/js/nf/canvas/nf-process-group.js | 20 +++----------------- .../main/webapp/js/nf/canvas/nf-processor.js | 20 +++----------------- .../js/nf/canvas/nf-remote-process-group.js | 20 +++----------------- 4 files changed, 12 insertions(+), 51 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/6676e94a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-port.js ---------------------------------------------------------------------- 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 5b58d44..d5e4ac7 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 @@ -309,6 +309,9 @@ nf.Port = (function () { return name; } }); + } else { + // clear the port name + port.select('text.port-name').text(null); } // remove tooltips if necessary http://git-wip-us.apache.org/repos/asf/nifi/blob/6676e94a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js ---------------------------------------------------------------------- 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 80c7eec..89c1c85 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 @@ -144,17 +144,6 @@ nf.ProcessGroup = (function () { 'class': 'process-group-name' }); - // process group preview - processGroup.append('image') - .call(nf.CanvasUtils.disableImageHref) - .attr({ - 'width': 352, - 'height': 113, - 'x': 6, - 'y': 22, - 'class': 'process-group-preview' - }); - // always support selecting and navigation processGroup.on('dblclick', function (d) { // enter this group on double click @@ -813,9 +802,6 @@ nf.ProcessGroup = (function () { processGroup.select('text.process-group-name').text(null); } - // hide the preview - processGroup.select('image.process-group-preview').style('display', 'none'); - // populate the stats processGroup.call(updateProcessGroupStatus); } else { @@ -830,11 +816,11 @@ nf.ProcessGroup = (function () { return name; } }); + } else { + // clear the process group name + processGroup.select('text.process-group-name').text(null); } - // show the preview - processGroup.select('image.process-group-preview').style('display', 'block'); - // remove the tooltips processGroup.call(removeTooltips); http://git-wip-us.apache.org/repos/asf/nifi/blob/6676e94a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor.js ---------------------------------------------------------------------- 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 183d1b5..0279882 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 @@ -122,17 +122,6 @@ nf.Processor = (function () { }) .text('\ue807'); - // processor stats preview - processor.append('image') - .call(nf.CanvasUtils.disableImageHref) - .attr({ - 'width': 294, - 'height': 58, - 'x': 8, - 'y': 35, - 'class': 'processor-stats-preview' - }); - // make processors selectable processor.call(nf.Selectable.activate).call(nf.ContextMenu.activate); }; @@ -517,9 +506,6 @@ nf.Processor = (function () { processor.select('text.processor-type').text(null); } - // hide the preview - processor.select('image.processor-stats-preview').style('display', 'none'); - // populate the stats processor.call(updateProcessorStatus); } else { @@ -534,11 +520,11 @@ nf.Processor = (function () { return name; } }); + } else { + // clear the processor name + processor.select('text.processor-name').text(null); } - // show the preview - processor.select('image.processor-stats-preview').style('display', 'block'); - // remove the tooltips processor.call(removeTooltips); http://git-wip-us.apache.org/repos/asf/nifi/blob/6676e94a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-remote-process-group.js ---------------------------------------------------------------------- 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 39df01f..9d429c7 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 @@ -144,17 +144,6 @@ nf.RemoteProcessGroup = (function () { 'class': 'remote-process-group-name' }); - // remote process group icon - remoteProcessGroup.append('image') - .call(nf.CanvasUtils.disableImageHref) - .attr({ - 'width': 352, - 'height': 89, - 'x': 6, - 'y': 38, - 'class': 'remote-process-group-preview' - }); - // always support selection remoteProcessGroup.call(nf.Selectable.activate).call(nf.ContextMenu.activate); }; @@ -615,9 +604,6 @@ nf.RemoteProcessGroup = (function () { remoteProcessGroup.select('text.remote-process-group-name').text(null); } - // show the preview - remoteProcessGroup.select('image.remote-process-group-preview').style('display', 'none'); - // populate the stats remoteProcessGroup.call(updateProcessGroupStatus); } else { @@ -632,11 +618,11 @@ nf.RemoteProcessGroup = (function () { return name; } }); + } else { + // clear the name + remoteProcessGroup.select('text.remote-process-group-name').text(null); } - // show the preview - remoteProcessGroup.select('image.remote-process-group-preview').style('display', 'block'); - // remove the tooltips remoteProcessGroup.call(removeTooltips);
