mcgilman commented on code in PR #10583:
URL: https://github.com/apache/nifi/pull/10583#discussion_r2578579899


##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/state/flow/index.ts:
##########
@@ -673,6 +673,7 @@ export interface FlowState {
 }
 
 export interface RunOnceRequest {
+    id: string;

Review Comment:
   Is `uri` below still needed?



##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/state/queue/queue.reducer.ts:
##########
@@ -47,7 +47,12 @@ export const queueReducer = createReducer(
     })),
     on(submitEmptyQueueRequestSuccess, pollEmptyQueueRequestSuccess, (state, { 
response }) => ({
         ...state,
-        dropEntity: response.dropEntity,
+        dropEntity: {
+            dropRequest: {
+                ...response.dropEntity.dropRequest,
+                connectionId: state.connectionId!
+            }
+        },

Review Comment:
   The connectionId is already in this store. We should be able to use it and 
pass it where needed instead of adding it to the `dropRequest`.



##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/service/component-state.service.ts:
##########
@@ -19,28 +19,40 @@ import { Injectable, inject } from '@angular/core';
 import { HttpClient } from '@angular/common/http';
 import { ClearComponentStateRequest, ComponentStateEntity, 
LoadComponentStateRequest } from '../state/component-state';
 import { Observable } from 'rxjs';
-import { NiFiCommon } from '@nifi/shared';
+import { ComponentType, NiFiCommon } from '@nifi/shared';
 
 @Injectable({ providedIn: 'root' })
 export class ComponentStateService {
+    private static readonly API = '../nifi-api';
+
     private httpClient = inject(HttpClient);
     private nifiCommon = inject(NiFiCommon);
 
     getComponentState(request: LoadComponentStateRequest): 
Observable<ComponentStateEntity> {
+        const path = 
this.nifiCommon.getComponentTypeApiPath(request.componentType);
         return this.httpClient.get<ComponentStateEntity>(
-            `${this.nifiCommon.stripProtocol(request.componentUri)}/state`
+            `${ComponentStateService.API}/${path}/${request.componentId}/state`
         );
     }
 
     clearComponentState(request: ClearComponentStateRequest): Observable<any> {
-        return 
this.httpClient.post(`${this.nifiCommon.stripProtocol(request.componentUri)}/state/clear-requests`,
 {});
+        const path = 
this.nifiCommon.getComponentTypeApiPath(request.componentType);
+        return this.httpClient.post(
+            
`${ComponentStateService.API}/${path}/${request.componentId}/state/clear-requests`,
+            {}

Review Comment:
   Did we intend to have an empty `{}` here?



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