Repository: nifi Updated Branches: refs/heads/master 5d63ba6a1 -> 7f45251bb
[NIFI-2426] Update visibility of New service/task button in Controller Settings - Ensuring button is hidden when the user doesn't have permissions to modify the controller. - This closes #759 Project: http://git-wip-us.apache.org/repos/asf/nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/7f45251b Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/7f45251b Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/7f45251b Branch: refs/heads/master Commit: 7f45251bbd735c8941db384e4d31860798c66b4d Parents: 5d63ba6 Author: Scott Aslan <jas...@hortonworks.com> Authored: Mon Aug 1 12:54:09 2016 -0400 Committer: Matt Gilman <matt.c.gil...@gmail.com> Committed: Mon Aug 1 13:32:42 2016 -0400 ---------------------------------------------------------------------- .../src/main/webapp/js/nf/canvas/nf-settings.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi/blob/7f45251b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js ---------------------------------------------------------------------- diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js index 5456a02..b18339e 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js @@ -952,17 +952,14 @@ nf.Settings = (function () { * Shows the process group configuration. */ var showSettings = function () { - if (nf.Common.canModifyController()) { - $('#new-service-or-task').show(); - } else { - $('#new-service-or-task').hide(); - } - // show the settings dialog nf.Shell.showContent('#settings').done(function () { reset(); }); + //reset content to account for possible policy changes + $('#settings-tabs').find('.selected-tab').click(); + // adjust the table size nf.Settings.resetTableSize(); }; @@ -1014,6 +1011,8 @@ nf.Settings = (function () { return 'Create a new reporting task'; } }); + } else { + $('#new-service-or-task').hide(); } // resize the table