Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyb149 committed Nov 18, 2024
1 parent 588e84e commit 6de7ad6
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,19 @@
}
"></ng-container>
</mat-expansion-panel>
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title>Flow Registry Clients</mat-panel-title>
</mat-expansion-panel-header>
<ng-container
*ngTemplateOutlet="
extensionLinks;
context: {
$implicit: filterExtensions((registryClientTypes$ | async)!),
componentType: ComponentType.FlowRegistryClient
}
"></ng-container>
</mat-expansion-panel>
</mat-accordion>
<ng-template #extensionLinks let-extensionTypes let-componentType="componentType">
@if (extensionTypes.length === 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,26 @@ export class ExtensionTypesEffects {
this.extensionTypesService.getControllerServiceTypes(),
this.extensionTypesService.getReportingTaskTypes(),
this.extensionTypesService.getParameterProviderTypes(),
this.extensionTypesService.getFlowAnalysisRuleTypes()
this.extensionTypesService.getFlowAnalysisRuleTypes(),
this.extensionTypesService.getRegistryClientTypes()
]).pipe(
map(
([
processorTypes,
controllerServiceTypes,
reportingTaskTypes,
parameterProviderTypes,
flowAnalysisRuleTypes
flowAnalysisRuleTypes,
registryClientTypes
]) =>
ExtensionTypesActions.loadExtensionTypesForPoliciesSuccess({
response: {
processorTypes: processorTypes.processorTypes,
controllerServiceTypes: controllerServiceTypes.controllerServiceTypes,
reportingTaskTypes: reportingTaskTypes.reportingTaskTypes,
parameterProviderTypes: parameterProviderTypes.parameterProviderTypes,
flowAnalysisRuleTypes: flowAnalysisRuleTypes.flowAnalysisRuleTypes
flowAnalysisRuleTypes: flowAnalysisRuleTypes.flowAnalysisRuleTypes,
registryClientTypes: registryClientTypes.registryClientTypes
}
})
),
Expand All @@ -137,23 +140,26 @@ export class ExtensionTypesEffects {
this.extensionTypesService.getControllerServiceTypes(),
this.extensionTypesService.getReportingTaskTypes(),
this.extensionTypesService.getParameterProviderTypes(),
this.extensionTypesService.getFlowAnalysisRuleTypes()
this.extensionTypesService.getFlowAnalysisRuleTypes(),
this.extensionTypesService.getRegistryClientTypes()
]).pipe(
map(
([
processorTypes,
controllerServiceTypes,
reportingTaskTypes,
parameterProviderTypes,
flowAnalysisRuleTypes
flowAnalysisRuleTypes,
registryClientTypes
]) =>
ExtensionTypesActions.loadExtensionTypesForDocumentationSuccess({
response: {
processorTypes: processorTypes.processorTypes,
controllerServiceTypes: controllerServiceTypes.controllerServiceTypes,
reportingTaskTypes: reportingTaskTypes.reportingTaskTypes,
parameterProviderTypes: parameterProviderTypes.parameterProviderTypes,
flowAnalysisRuleTypes: flowAnalysisRuleTypes.flowAnalysisRuleTypes
flowAnalysisRuleTypes: flowAnalysisRuleTypes.flowAnalysisRuleTypes,
registryClientTypes: registryClientTypes.registryClientTypes
}
})
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }) => ({
Expand All @@ -74,6 +75,7 @@ export const extensionTypesReducer = createReducer(
reportingTaskTypes: response.reportingTaskTypes,
parameterProviderTypes: response.parameterProviderTypes,
flowAnalysisRuleTypes: response.flowAnalysisRuleTypes,
registryClientTypes: response.registryClientTypes,
status: 'success' as const
}))
);
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ export const selectTypesToIdentifyComponentRestrictions = createSelector(
if (state.flowAnalysisRuleTypes) {
types.push(...state.flowAnalysisRuleTypes);
}
if (state.registryClientTypes) {
types.push(...state.registryClientTypes);
}

return types;
}
Expand Down Expand Up @@ -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;
});
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export interface LoadExtensionTypesForPoliciesResponse {
reportingTaskTypes: DocumentedType[];
flowAnalysisRuleTypes: DocumentedType[];
parameterProviderTypes: DocumentedType[];
registryClientTypes: DocumentedType[];
}

export interface LoadExtensionTypesForDocumentationResponse {
Expand All @@ -47,6 +48,7 @@ export interface LoadExtensionTypesForDocumentationResponse {
reportingTaskTypes: DocumentedType[];
flowAnalysisRuleTypes: DocumentedType[];
parameterProviderTypes: DocumentedType[];
registryClientTypes: DocumentedType[];
}

export interface ExtensionTypesState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
nonService;
context: {
$implicit: getReferencesByType(references, 'FlowRegistryClient'),
referenceTypeLabel: 'Registry Clients'
referenceTypeLabel: 'Flow Registry Clients'
}
"></ng-container>
<ng-container
Expand Down

0 comments on commit 6de7ad6

Please sign in to comment.