[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
This commit is contained in:
Scott Aslan 2016-08-01 12:54:09 -04:00 committed by Matt Gilman
parent 5d63ba6a19
commit 7f45251bbd
1 changed files with 5 additions and 6 deletions

View File

@ -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