This is an automated email from the ASF dual-hosted git repository.

scottyaslan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-registry.git

commit 04dfb9d61577225fc143880bf5cf05f191c1f3e5
Author: Bryan Bende <[email protected]>
AuthorDate: Thu May 2 13:03:33 2019 -0400

    NIFIREG-256 Addressing review feedback
---
 .../sidenav/manage-bucket/nf-registry-manage-bucket.html         | 9 ++++-----
 .../workflow/sidenav/manage-bucket/nf-registry-manage-bucket.js  | 8 ++++++--
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git 
a/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/sidenav/manage-bucket/nf-registry-manage-bucket.html
 
b/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/sidenav/manage-bucket/nf-registry-manage-bucket.html
index 514920c..2fe52af 100644
--- 
a/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/sidenav/manage-bucket/nf-registry-manage-bucket.html
+++ 
b/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/sidenav/manage-bucket/nf-registry-manage-bucket.html
@@ -23,7 +23,7 @@ limitations under the License.
         </button>
     </div>
     <div class="sidenav-content">
-        <div class="pad-bottom-md pad-left-md pad-right-md" flex 
fxLayoutAlign="start center">
+        <div class="pad-left-md pad-right-md" flex fxLayoutAlign="start 
center">
             <mat-input-container flex>
                 <input #bucketnameInput
                        matInput
@@ -41,21 +41,20 @@ limitations under the License.
                 Save
             </button>
         </div>
-        <div class="pad-top-md pad-bottom-sm pad-left-md pad-right-md">
+        <div class="pad-top-md pad-left-md pad-right-md">
             <div class="pad-bottom-sm">
                 <span class="md-card-title">Bundle Settings</span>
             </div>
             <div>
                 <mat-checkbox #bundleRedeployCheckbox
                               
[disabled]="!nfRegistryService.currentUser.resourcePermissions.buckets.canWrite"
-                              
[(checked)]="nfRegistryService.bucket.allowBundleRedeploy"
                               [(ngModel)]="allowBundleRedeploy"
                               (change)="toggleBucketBundleRedeploy($event)">
                     Allow bundle overwrite<i matTooltip="Allows released 
bundles in this bucket to be overwritten" class="pad-left-sm fa 
fa-question-circle-o help-icon"></i>
                 </mat-checkbox>
             </div>
         </div>
-        <div *ngIf="!nfRegistryService.currentUser.anonymous || 
nfRegistryService.currentUser.resourcePermissions.policies.canRead" 
class="pad-top-md pad-bottom-sm pad-left-md pad-right-md">
+        <div *ngIf="!nfRegistryService.currentUser.anonymous || 
nfRegistryService.currentUser.resourcePermissions.policies.canRead" 
class="pad-top-md pad-left-md pad-right-md">
             <div flex fxLayout="row" fxLayoutAlign="space-between center">
                 <span class="md-card-title">Policies 
({{userIdentitiesWithPolicies.length + 
groupIdentitiesWithPolicies.length}})</span>
                 <button color="fds-secondary"
@@ -135,7 +134,7 @@ limitations under the License.
                 </div>
             </div>
         </div>
-        <div class="pad-top-md pad-bottom-sm pad-left-md pad-right-md">
+        <div class="pad-top-md pad-left-md pad-right-md">
             <div class="pad-bottom-sm">
                 <span class="md-card-title">About</span>
             </div>
diff --git 
a/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/sidenav/manage-bucket/nf-registry-manage-bucket.js
 
b/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/sidenav/manage-bucket/nf-registry-manage-bucket.js
index 4c671a1..392a464 100644
--- 
a/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/sidenav/manage-bucket/nf-registry-manage-bucket.js
+++ 
b/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/administration/workflow/sidenav/manage-bucket/nf-registry-manage-bucket.js
@@ -102,7 +102,8 @@ NfRegistryManageBucket.prototype = {
                     self.nfRegistryService.sidenav.open();
                     var bucket = response[0];
                     self.nfRegistryService.bucket = bucket;
-                    self.bucketname = response[0].name;
+                    self.bucketname = bucket.name;
+                    self.allowBundleRedeploy = bucket.allowBundleRedeploy;
                     if (!self.nfRegistryService.currentUser.anonymous) {
                         if (!response[1].status || response[1].status === 200) 
{
                             var policies = response[1];
@@ -163,6 +164,7 @@ NfRegistryManageBucket.prototype = {
                 .subscribe(function (response) {
                     self.nfRegistryService.bucket = response;
                     self.bucketname = response.name;
+                    self.allowBundleRedeploy = response.allowBundleRedeploy;
 
                     if (dialogResult) {
                         if (dialogResult.userOrGroup.type === 'user') {
@@ -200,6 +202,7 @@ NfRegistryManageBucket.prototype = {
                 .subscribe(function (response) {
                     self.nfRegistryService.bucket = response;
                     self.bucketname = response.name;
+                    self.allowBundleRedeploy = response.allowBundleRedeploy;
 
                     if (dialogResult) {
                         if (dialogResult.userOrGroup.type === 'user') {
@@ -426,6 +429,7 @@ NfRegistryManageBucket.prototype = {
                 });
             } else if (response.status === 400) {
                 self.bucketname = self.nfRegistryService.bucket.name;
+                self.allowBundleRedeploy = 
self.nfRegistryService.bucket.allowBundleRedeploy;
                 self.dialogService.openConfirm({
                     title: 'Error',
                     message: response.error,
@@ -459,7 +463,7 @@ NfRegistryManageBucket.prototype = {
                     duration: 3000
                 });
             }  else if (response.status === 400) {
-                self.allowBundleRedeploy = 
self.nfRegistryService.bucket.allowBundleRedeploy;
+                self.allowBundleRedeploy = !event.checked
                 self.dialogService.openConfirm({
                     title: 'Error',
                     message: response.error,

Reply via email to