[NIFI-3813] fix broken PG config dialog when user has read only perms on the PG. This closes #1757

This commit is contained in:
Scott Aslan 2017-05-05 11:07:46 -04:00 committed by Matt Gilman
parent d9410d6404
commit 85405dae15
No known key found for this signature in database
GPG Key ID: DF61EC19432AEE37
1 changed files with 4 additions and 3 deletions

View File

@ -177,9 +177,10 @@
// store the process group // store the process group
$('#process-group-configuration').data('process-group', response); $('#process-group-configuration').data('process-group', response);
if (response.permissions.canWrite) {
var processGroup = response.component; var processGroup = response.component;
if (response.permissions.canWrite) {
// populate the process group settings // populate the process group settings
$('#process-group-name').removeClass('unset').val(processGroup.name); $('#process-group-name').removeClass('unset').val(processGroup.name);
$('#process-group-comments').removeClass('unset').val(processGroup.comments); $('#process-group-comments').removeClass('unset').val(processGroup.comments);
@ -196,8 +197,8 @@
} else { } else {
if (response.permissions.canRead) { if (response.permissions.canRead) {
// populate the process group settings // populate the process group settings
$('#read-only-process-group-name').removeClass('unset').text(response.component.name); $('#read-only-process-group-name').removeClass('unset').text(processGroup.name);
$('#read-only-process-group-comments').removeClass('unset').text(response.component.comments); $('#read-only-process-group-comments').removeClass('unset').text(processGroup.comments);
// populate the header // populate the header
$('#process-group-configuration-header-text').text(processGroup.name + ' Configuration'); $('#process-group-configuration-header-text').text(processGroup.name + ' Configuration');