From 6de7ad62f3146e8b08dcbecea42379b55a747c4c Mon Sep 17 00:00:00 2001 From: Matt Burgess Date: Mon, 18 Nov 2024 14:26:04 -0500 Subject: [PATCH] WIP --- .../feature/documentation-routing.module.ts | 4 ++++ .../feature/documentation.component.html | 13 +++++++++++++ .../feature/documentation.component.ts | 5 +++++ .../extension-types/extension-types.effects.ts | 18 ++++++++++++------ .../extension-types/extension-types.reducer.ts | 2 ++ .../extension-types.selectors.ts | 6 +++++- .../src/app/state/extension-types/index.ts | 2 ++ ...ontroller-service-references.component.html | 2 +- 8 files changed, 44 insertions(+), 8 deletions(-) diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation-routing.module.ts b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation-routing.module.ts index bb4dda1228f01..5cea12cb6d600 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation-routing.module.ts +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation-routing.module.ts @@ -52,6 +52,10 @@ const routes: Routes = [ path: `${ComponentType.FlowAnalysisRule}/:group/:artifact/:version/:type`, component: FlowAnalysisRuleDefinition }, + /*{ + path: `${ComponentType.FlowRegistryClient}/:group/:artifact/:version/:type`, + component: RegistryClientDefinition + },*/ { path: 'overview', component: Overview diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation.component.html b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation.component.html index ab48c6f930868..2768fc6b643b2 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation.component.html +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation.component.html @@ -112,6 +112,19 @@ } "> + + + Flow Registry Clients + + + @if (extensionTypes.length === 0) { diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation.component.ts b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation.component.ts index 291dd8781ecfc..3bcd5df4da269 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation.component.ts +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/documentation/feature/documentation.component.ts @@ -33,6 +33,7 @@ import { selectFlowAnalysisRuleTypes, selectParameterProviderTypes, selectProcessorTypes, + selectRegistryClientTypes, selectReportingTaskTypes } from '../../../state/extension-types/extension-types.selectors'; import { ComponentType, isDefinedAndNotNull, NiFiCommon, selectCurrentRoute } from '@nifi/shared'; @@ -71,6 +72,10 @@ export class Documentation implements OnInit, AfterViewInit { flowAnalysisRuleTypes$ = this.store .select(selectFlowAnalysisRuleTypes) .pipe(map((extensionTypes) => this.sortExtensions(extensionTypes))); + registryClientTypes$ = this.store + .select(selectRegistryClientTypes) + .pipe(map((extensionTypes) => this.sortExtensions(extensionTypes))); + accordion = viewChild.required(MatAccordion); diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.effects.ts b/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.effects.ts index 48f034b6b367c..4c82f8391954d 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.effects.ts +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.effects.ts @@ -100,7 +100,8 @@ export class ExtensionTypesEffects { this.extensionTypesService.getControllerServiceTypes(), this.extensionTypesService.getReportingTaskTypes(), this.extensionTypesService.getParameterProviderTypes(), - this.extensionTypesService.getFlowAnalysisRuleTypes() + this.extensionTypesService.getFlowAnalysisRuleTypes(), + this.extensionTypesService.getRegistryClientTypes() ]).pipe( map( ([ @@ -108,7 +109,8 @@ export class ExtensionTypesEffects { controllerServiceTypes, reportingTaskTypes, parameterProviderTypes, - flowAnalysisRuleTypes + flowAnalysisRuleTypes, + registryClientTypes ]) => ExtensionTypesActions.loadExtensionTypesForPoliciesSuccess({ response: { @@ -116,7 +118,8 @@ export class ExtensionTypesEffects { controllerServiceTypes: controllerServiceTypes.controllerServiceTypes, reportingTaskTypes: reportingTaskTypes.reportingTaskTypes, parameterProviderTypes: parameterProviderTypes.parameterProviderTypes, - flowAnalysisRuleTypes: flowAnalysisRuleTypes.flowAnalysisRuleTypes + flowAnalysisRuleTypes: flowAnalysisRuleTypes.flowAnalysisRuleTypes, + registryClientTypes: registryClientTypes.registryClientTypes } }) ), @@ -137,7 +140,8 @@ export class ExtensionTypesEffects { this.extensionTypesService.getControllerServiceTypes(), this.extensionTypesService.getReportingTaskTypes(), this.extensionTypesService.getParameterProviderTypes(), - this.extensionTypesService.getFlowAnalysisRuleTypes() + this.extensionTypesService.getFlowAnalysisRuleTypes(), + this.extensionTypesService.getRegistryClientTypes() ]).pipe( map( ([ @@ -145,7 +149,8 @@ export class ExtensionTypesEffects { controllerServiceTypes, reportingTaskTypes, parameterProviderTypes, - flowAnalysisRuleTypes + flowAnalysisRuleTypes, + registryClientTypes ]) => ExtensionTypesActions.loadExtensionTypesForDocumentationSuccess({ response: { @@ -153,7 +158,8 @@ export class ExtensionTypesEffects { controllerServiceTypes: controllerServiceTypes.controllerServiceTypes, reportingTaskTypes: reportingTaskTypes.reportingTaskTypes, parameterProviderTypes: parameterProviderTypes.parameterProviderTypes, - flowAnalysisRuleTypes: flowAnalysisRuleTypes.flowAnalysisRuleTypes + flowAnalysisRuleTypes: flowAnalysisRuleTypes.flowAnalysisRuleTypes, + registryClientTypes: registryClientTypes.registryClientTypes } }) ), diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.reducer.ts b/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.reducer.ts index 2aafec37bf4a2..a302f0a600b0c 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.reducer.ts +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.reducer.ts @@ -65,6 +65,7 @@ export const extensionTypesReducer = createReducer( reportingTaskTypes: response.reportingTaskTypes, parameterProviderTypes: response.parameterProviderTypes, flowAnalysisRuleTypes: response.flowAnalysisRuleTypes, + registryClientTypes: response.registryClientTypes, status: 'success' as const })), on(loadExtensionTypesForDocumentationSuccess, (state, { response }) => ({ @@ -74,6 +75,7 @@ export const extensionTypesReducer = createReducer( reportingTaskTypes: response.reportingTaskTypes, parameterProviderTypes: response.parameterProviderTypes, flowAnalysisRuleTypes: response.flowAnalysisRuleTypes, + registryClientTypes: response.registryClientTypes, status: 'success' as const })) ); diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.selectors.ts b/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.selectors.ts index 37b6f10a47886..ebaba04504386 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.selectors.ts +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/extension-types.selectors.ts @@ -76,6 +76,9 @@ export const selectTypesToIdentifyComponentRestrictions = createSelector( if (state.flowAnalysisRuleTypes) { types.push(...state.flowAnalysisRuleTypes); } + if (state.registryClientTypes) { + types.push(...state.registryClientTypes); + } return types; } @@ -130,6 +133,7 @@ export const selectExtensionFromTypes = (extensionTypes: string[]) => controllerServiceTypes: state.controllerServiceTypes.filter(typeFilter), reportingTaskTypes: state.reportingTaskTypes.filter(typeFilter), parameterProviderTypes: state.parameterProviderTypes.filter(typeFilter), - flowAnalysisRuleTypes: state.flowAnalysisRuleTypes.filter(typeFilter) + flowAnalysisRuleTypes: state.flowAnalysisRuleTypes.filter(typeFilter), + registryClientTypes: state.registryClientTypes.filter(typeFilter) } as LoadExtensionTypesForDocumentationResponse; }); diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/index.ts b/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/index.ts index 468a6c2f9b7c5..a79b3ac1ef9fb 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/index.ts +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/extension-types/index.ts @@ -39,6 +39,7 @@ export interface LoadExtensionTypesForPoliciesResponse { reportingTaskTypes: DocumentedType[]; flowAnalysisRuleTypes: DocumentedType[]; parameterProviderTypes: DocumentedType[]; + registryClientTypes: DocumentedType[]; } export interface LoadExtensionTypesForDocumentationResponse { @@ -47,6 +48,7 @@ export interface LoadExtensionTypesForDocumentationResponse { reportingTaskTypes: DocumentedType[]; flowAnalysisRuleTypes: DocumentedType[]; parameterProviderTypes: DocumentedType[]; + registryClientTypes: DocumentedType[]; } export interface ExtensionTypesState { diff --git a/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/controller-service/controller-service-references/controller-service-references.component.html b/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/controller-service/controller-service-references/controller-service-references.component.html index 7b7361ff4e089..d27b6077438b5 100644 --- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/controller-service/controller-service-references/controller-service-references.component.html +++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/controller-service/controller-service-references/controller-service-references.component.html @@ -68,7 +68,7 @@ nonService; context: { $implicit: getReferencesByType(references, 'FlowRegistryClient'), - referenceTypeLabel: 'Registry Clients' + referenceTypeLabel: 'Flow Registry Clients' } ">