mirror of https://github.com/apache/nifi.git
[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:
parent
5d63ba6a19
commit
7f45251bbd
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue