rfellows commented on code in PR #8185:
URL: https://github.com/apache/nifi/pull/8185#discussion_r1437221742


##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/app.module.ts:
##########
@@ -56,7 +57,13 @@ import { MatDialogModule } from '@angular/material/dialog';
             routerState: RouterState.Minimal,
             navigationActionTiming: NavigationActionTiming.PostActivation
         }),
-        EffectsModule.forRoot(UserEffects, ExtensionTypesEffects, 
AboutEffects, StatusHistoryEffects),
+        EffectsModule.forRoot(
+            UserEffects,
+            ExtensionTypesEffects,
+            AboutEffects,
+            StatusHistoryEffects,
+            EnableControllerServiceEffects

Review Comment:
   This name, `EnableControllerServiceEffects`, gives the impression the 
effects are only useful for enabling controller services. However, all of the 
disable-related effects are defined in there as well.
   Can we find a more appropriate name? I suppose this would include the 
actions, reducers, and selectors as well.



##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/controller-service/disable-controller-service/disable-controller-service.component.html:
##########
@@ -0,0 +1,119 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<h2 mat-dialog-title>Disable Controller Service</h2>
+<ng-container *ngIf="(controllerService$ | async)! as controllerService">
+    <div class="controller-service-disable-form" *ngIf="(disableRequest$ | 
async)! as disableRequest">
+        <ng-container *ngIf="disableRequest.currentStep === 
SetEnableStep.Pending; else disableInProgress">
+            <mat-dialog-content>
+                <div class="tab-content py-4 flex gap-x-4">
+                    <div class="w-full flex flex-col gap-y-4">
+                        <div class="flex flex-col">
+                            <div>Service</div>
+                            <div class="value">{{ 
controllerService.component.name }}</div>
+                        </div>
+                        <div class="flex flex-col">
+                            <div>Scope</div>
+                            <div class="value">Service and referencing 
components</div>
+                        </div>
+                    </div>
+                    <div class="w-full flex flex-col">
+                        <div>Referencing Components</div>
+                        <div>
+                            <controller-service-references
+                                
[serviceReferences]="controllerService.component.referencingComponents"
+                                
[goToReferencingComponent]="goToReferencingComponent"></controller-service-references>
+                        </div>
+                    </div>
+                </div>
+            </mat-dialog-content>
+            <mat-dialog-actions align="end">
+                <button color="accent" mat-raised-button 
mat-dialog-close>Cancel</button>
+                <button type="button" color="primary" (click)="submitForm()" 
mat-raised-button>Disable</button>
+            </mat-dialog-actions>
+        </ng-container>
+        <ng-template #disableInProgress>
+            <mat-dialog-content>
+                <div class="tab-content py-4 flex gap-x-4">
+                    <div class="w-full flex flex-col gap-y-4">
+                        <div class="flex flex-col">
+                            <div>Service</div>
+                            <div class="value">{{ 
controllerService.component.name }}</div>
+                        </div>
+                        <div class="flex flex-col">
+                            <div>Steps To Disable {{ 
controllerService.component.name }}</div>
+                            <div class="flex flex-col gap-y-1.5">
+                                <div class="flex justify-between items-center">
+                                    <div class="value">Stopping referencing 
processors and reporting tasks</div>
+                                    <ng-container
+                                        *ngTemplateOutlet="
+                                            
getTemplateForStep(SetEnableStep.StopReferencingComponents, disableRequest)
+                                        "></ng-container>
+                                </div>
+                                <div class="flex justify-between items-center">
+                                    <div class="value">Disabling referencing 
controller services</div>
+                                    <ng-container
+                                        *ngTemplateOutlet="
+                                            
getTemplateForStep(SetEnableStep.DisableReferencingServices, disableRequest)
+                                        "></ng-container>
+                                </div>
+                                <div class="flex justify-between items-center">
+                                    <div class="value">Disabling this 
controller service</div>
+                                    <ng-container
+                                        *ngTemplateOutlet="
+                                            
getTemplateForStep(SetEnableStep.DisableService, disableRequest)
+                                        "></ng-container>
+                                </div>
+                            </div>
+                        </div>
+                        <mat-error *ngIf="disableRequest.error">{{ 
disableRequest.error.error }}</mat-error>

Review Comment:
   Might consider putting some kind of max-width or something on these error 
containers. At the moment, they make the dialog grow when an error is 
encountered:
   
   Before error:
   <img width="770" alt="Screenshot 2023-12-27 at 11 39 09 AM" 
src="https://github.com/apache/nifi/assets/713866/372425e2-44ab-4f4d-80b7-a939d5318851";>
   
   
   After error: 
   <img width="1364" alt="Screenshot 2023-12-27 at 11 39 26 AM" 
src="https://github.com/apache/nifi/assets/713866/1f7066b9-33d4-4284-8e7d-1150fa150733";>
   
   
   _almost doubles in width_
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to