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 2018/08/13 16:46:56 UTC

nifi git commit: NIFI-4535 Only update Page Title to root flow name when user has permission.

Repository: nifi
Updated Branches:
  refs/heads/master 59a79c134 -> 5106dc0af


NIFI-4535 Only update Page Title to root flow name when user has permission.

This closes #2899


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

Branch: refs/heads/master
Commit: 5106dc0af96d93bcd978c66d27c0164ec7cd4f20
Parents: 59a79c1
Author: patricker <pa...@gmail.com>
Authored: Mon Jul 16 13:03:05 2018 -0600
Committer: Matt Gilman <ma...@gmail.com>
Committed: Mon Aug 13 12:46:16 2018 -0400

----------------------------------------------------------------------
 .../src/main/webapp/js/nf/canvas/nf-canvas.js           | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/5106dc0a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 3fdbfbb..b15d443 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -81,6 +81,8 @@
     var MIN_SCALE = 0.2;
     var MIN_SCALE_TO_RENDER = 0.6;
 
+    var DEFAULT_PAGE_TITLE = '';
+
     var polling = false;
     var allowPageRefresh = false;
     var groupId = 'root';
@@ -172,7 +174,15 @@
                 rootBreadcrumb = rootBreadcrumb.parentBreadcrumb
             }
 
-            document.title = rootBreadcrumb.breadcrumb.name;
+            if(DEFAULT_PAGE_TITLE == ''){
+                DEFAULT_PAGE_TITLE = document.title;
+            }
+
+            if(rootBreadcrumb.permissions.canRead){
+                document.title = rootBreadcrumb.breadcrumb.name;
+            } else {
+                document.title = DEFAULT_PAGE_TITLE;
+            }
 
             // update the timestamp
             $('#stats-last-refreshed').text(processGroupFlow.lastRefreshed);