This is an automated email from the ASF dual-hosted git repository.
rfellows pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new b06c1779a3 NIFI-13055: Moving the loading of flow configuration out of
individual pages and into the navigation component (#8695)
b06c1779a3 is described below
commit b06c1779a37b55332f3a6b2d95f0c2738d5e3fbb
Author: Matt Gilman <[email protected]>
AuthorDate: Wed Apr 24 15:20:19 2024 -0400
NIFI-13055: Moving the loading of flow configuration out of individual
pages and into the navigation component (#8695)
* NIFI-13055:
- Moving the loading of flow configuration out of individual pages and into
the navigation component which requires it for rendering the Users and Policies
menu item.
* NIFI-13055:
- Moving the loading of current user out of each page and into the
Navigation component.
This closes #8695
---
.../feature/access-policies.component.ts | 3 ---
.../component-access-policies.component.ts | 2 --
.../global-access-policies.component.ts | 2 --
.../pages/bulletins/feature/bulletins.component.spec.ts | 4 ++--
.../app/pages/bulletins/feature/bulletins.component.ts | 17 ++---------------
.../app/pages/counters/feature/counters.component.ts | 10 ++--------
.../flow-designer/feature/flow-designer.component.ts | 10 ++--------
.../pages/flow-designer/ui/canvas/canvas.component.ts | 2 --
.../controller-service/controller-services.component.ts | 9 ++-------
.../manage-remote-ports.component.ts | 2 --
.../feature/parameter-contexts.component.ts | 3 ---
.../parameter-context-listing.component.ts | 2 --
.../pages/provenance/feature/provenance.component.ts | 10 ++--------
.../nifi/src/app/pages/queue/feature/queue.component.ts | 10 ++--------
.../app/pages/settings/feature/settings.component.ts | 3 ---
.../management-controller-services.component.ts | 2 --
.../parameter-providers.component.ts | 2 --
.../ui/reporting-tasks/reporting-tasks.component.ts | 2 --
.../src/app/pages/summary/feature/summary.component.ts | 3 ---
.../nifi/src/app/pages/users/feature/users.component.ts | 3 ---
.../users/ui/user-listing/user-listing.component.ts | 2 --
.../app/ui/common/navigation/navigation.component.ts | 15 +++++++++++++--
22 files changed, 27 insertions(+), 91 deletions(-)
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/feature/access-policies.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/feature/access-policies.component.ts
index 150899f686..7fac3cb07d 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/feature/access-policies.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/feature/access-policies.component.ts
@@ -18,7 +18,6 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { NiFiState } from '../../../state';
-import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
import {
loadClusterSummary,
startClusterSummaryPolling,
@@ -35,12 +34,10 @@ export class AccessPolicies implements OnInit, OnDestroy {
ngOnInit(): void {
this.store.dispatch(loadClusterSummary());
- this.store.dispatch(startCurrentUserPolling());
this.store.dispatch(startClusterSummaryPolling());
}
ngOnDestroy(): void {
this.store.dispatch(stopClusterSummaryPolling());
- this.store.dispatch(stopCurrentUserPolling());
}
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/ui/component-access-policies/component-access-policies.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/ui/component-access-policies/component-access-policies.component.ts
index 256b11be91..bd64b36227 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/ui/component-access-policies/component-access-policies.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/ui/component-access-policies/component-access-policies.component.ts
@@ -42,7 +42,6 @@ import { NiFiCommon } from
'../../../../service/nifi-common.service';
import { ComponentType, isDefinedAndNotNull, SelectOption, TextTipInput } from
'../../../../state/shared';
import { TextTip } from
'../../../../ui/common/tooltips/text-tip/text-tip.component';
import { AccessPolicyEntity, Action, PolicyStatus, ResourceAction } from
'../../state/shared';
-import { loadFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.actions';
import { selectFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.selectors';
import { loadTenants, resetTenantsState } from
'../../state/tenants/tenants.actions';
import { loadPolicyComponent, resetPolicyComponentState } from
'../../state/policy-component/policy-component.actions';
@@ -209,7 +208,6 @@ export class ComponentAccessPolicies implements OnInit,
OnDestroy {
}
ngOnInit(): void {
- this.store.dispatch(loadFlowConfiguration());
this.store.dispatch(loadTenants());
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/ui/global-access-policies/global-access-policies.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/ui/global-access-policies/global-access-policies.component.ts
index a2229eb81b..eb89e853a5 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/ui/global-access-policies/global-access-policies.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/access-policies/ui/global-access-policies/global-access-policies.component.ts
@@ -50,7 +50,6 @@ import { TextTip } from
'../../../../ui/common/tooltips/text-tip/text-tip.compon
import { AccessPolicyEntity, Action, PolicyStatus } from '../../state/shared';
import { loadExtensionTypesForPolicies } from
'../../../../state/extension-types/extension-types.actions';
import { selectRequiredPermissions } from
'../../../../state/extension-types/extension-types.selectors';
-import { loadFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.actions';
import { selectFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.selectors';
import { AccessPoliciesState } from '../../state';
import { loadTenants, resetTenantsState } from
'../../state/tenants/tenants.actions';
@@ -166,7 +165,6 @@ export class GlobalAccessPolicies implements OnInit,
OnDestroy {
}
ngOnInit(): void {
- this.store.dispatch(loadFlowConfiguration());
this.store.dispatch(loadTenants());
this.store.dispatch(loadExtensionTypesForPolicies());
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/bulletins/feature/bulletins.component.spec.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/bulletins/feature/bulletins.component.spec.ts
index b7f30e5e71..cf0219bdf4 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/bulletins/feature/bulletins.component.spec.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/bulletins/feature/bulletins.component.spec.ts
@@ -19,10 +19,10 @@ import { Bulletins } from './bulletins.component';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterModule } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
-import { provideMockStore } from '@ngrx/store/testing';
-import { initialBulletinBoardState } from
'../state/bulletin-board/bulletin-board.reducer';
import { Component } from '@angular/core';
import { BulletinBoard } from '../ui/bulletin-board/bulletin-board.component';
+import { provideMockStore } from '@ngrx/store/testing';
+import { initialBulletinBoardState } from
'../state/bulletin-board/bulletin-board.reducer';
describe('Bulletins', () => {
let component: Bulletins;
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/bulletins/feature/bulletins.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/bulletins/feature/bulletins.component.ts
index 19d391c8b4..9fed6761d5 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/bulletins/feature/bulletins.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/bulletins/feature/bulletins.component.ts
@@ -15,24 +15,11 @@
* limitations under the License.
*/
-import { Component, OnDestroy, OnInit } from '@angular/core';
-import { NiFiState } from '../../../state';
-import { Store } from '@ngrx/store';
-import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
+import { Component } from '@angular/core';
@Component({
selector: 'bulletins',
templateUrl: './bulletins.component.html',
styleUrls: ['./bulletins.component.scss']
})
-export class Bulletins implements OnInit, OnDestroy {
- constructor(private store: Store<NiFiState>) {}
-
- ngOnInit(): void {
- this.store.dispatch(startCurrentUserPolling());
- }
-
- ngOnDestroy(): void {
- this.store.dispatch(stopCurrentUserPolling());
- }
-}
+export class Bulletins {}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/counters/feature/counters.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/counters/feature/counters.component.ts
index 0bdb85f9bb..9f74d5e9c7 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/counters/feature/counters.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/counters/feature/counters.component.ts
@@ -15,10 +15,9 @@
* limitations under the License.
*/
-import { Component, OnDestroy, OnInit } from '@angular/core';
+import { Component, OnDestroy } from '@angular/core';
import { Store } from '@ngrx/store';
import { NiFiState } from '../../../state';
-import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
import { resetCounterState } from
'../state/counter-listing/counter-listing.actions';
@Component({
@@ -26,15 +25,10 @@ import { resetCounterState } from
'../state/counter-listing/counter-listing.acti
templateUrl: './counters.component.html',
styleUrls: ['./counters.component.scss']
})
-export class Counters implements OnInit, OnDestroy {
+export class Counters implements OnDestroy {
constructor(private store: Store<NiFiState>) {}
- ngOnInit(): void {
- this.store.dispatch(startCurrentUserPolling());
- }
-
ngOnDestroy(): void {
this.store.dispatch(resetCounterState());
- this.store.dispatch(stopCurrentUserPolling());
}
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/feature/flow-designer.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/feature/flow-designer.component.ts
index 4d2f43dea6..708a1a2589 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/feature/flow-designer.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/feature/flow-designer.component.ts
@@ -15,9 +15,8 @@
* limitations under the License.
*/
-import { Component, OnDestroy, OnInit } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
-import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
import { loadExtensionTypesForCanvas } from
'../../../state/extension-types/extension-types.actions';
import { NiFiState } from '../../../state';
@@ -26,15 +25,10 @@ import { NiFiState } from '../../../state';
templateUrl: './flow-designer.component.html',
styleUrls: ['./flow-designer.component.scss']
})
-export class FlowDesigner implements OnInit, OnDestroy {
+export class FlowDesigner implements OnInit {
constructor(private store: Store<NiFiState>) {}
ngOnInit(): void {
- this.store.dispatch(startCurrentUserPolling());
this.store.dispatch(loadExtensionTypesForCanvas());
}
-
- ngOnDestroy(): void {
- this.store.dispatch(stopCurrentUserPolling());
- }
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/canvas.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/canvas.component.ts
index b6cf6d57b8..4b0418d1dd 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/canvas.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/canvas.component.ts
@@ -63,7 +63,6 @@ import { ComponentType, isDefinedAndNotNull } from
'../../../../state/shared';
import { initialState } from '../../state/flow/flow.reducer';
import { CanvasContextMenu } from '../../service/canvas-context-menu.service';
import { getStatusHistoryAndOpenDialog } from
'../../../../state/status-history/status-history.actions';
-import { loadFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.actions';
import { concatLatestFrom } from '@ngrx/operators';
import { selectUrl } from '../../../../state/router/router.selectors';
import { Storage } from '../../../../service/storage.service';
@@ -288,7 +287,6 @@ export class Canvas implements OnInit, OnDestroy {
this.createSvg();
this.canvasView.init(this.svg, this.canvas);
- this.store.dispatch(loadFlowConfiguration());
this.store.dispatch(loadClusterSummary());
this.store.dispatch(startProcessGroupPolling());
this.store.dispatch(startClusterSummaryPolling());
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/controller-service/controller-services.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/controller-service/controller-services.component.ts
index 1d233e0f0e..5a6204577d 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/controller-service/controller-services.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/controller-service/controller-services.component.ts
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import { Component, OnDestroy, OnInit } from '@angular/core';
+import { Component, OnDestroy } from '@angular/core';
import { Store } from '@ngrx/store';
import { filter, Observable, switchMap, take, tap } from 'rxjs';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -46,7 +46,6 @@ import { BreadcrumbEntity } from '../../state/shared';
import { selectCurrentUser } from
'../../../../state/current-user/current-user.selectors';
import { selectFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.selectors';
import { NiFiState } from '../../../../state';
-import { loadFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.actions';
import { getComponentStateAndOpenDialog } from
'../../../../state/component-state/component-state.actions';
import { navigateToComponentDocumentation } from
'../../../../state/documentation/documentation.actions';
import { FlowConfiguration } from '../../../../state/flow-configuration';
@@ -56,7 +55,7 @@ import { FlowConfiguration } from
'../../../../state/flow-configuration';
templateUrl: './controller-services.component.html',
styleUrls: ['./controller-services.component.scss']
})
-export class ControllerServices implements OnInit, OnDestroy {
+export class ControllerServices implements OnDestroy {
serviceState$ = this.store.select(selectControllerServicesState);
selectedServiceId$ = this.store.select(selectControllerServiceIdFromRoute);
currentUser$ = this.store.select(selectCurrentUser);
@@ -111,10 +110,6 @@ export class ControllerServices implements OnInit,
OnDestroy {
});
}
- ngOnInit(): void {
- this.store.dispatch(loadFlowConfiguration());
- }
-
isInitialLoading(state: ControllerServicesState): boolean {
// using the current timestamp to detect the initial load event
return state.loadedTimestamp == initialState.loadedTimestamp;
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/manage-remote-ports/manage-remote-ports.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/manage-remote-ports/manage-remote-ports.component.ts
index a8b9ca50c7..d5bb341de4 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/manage-remote-ports/manage-remote-ports.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/manage-remote-ports/manage-remote-ports.component.ts
@@ -47,7 +47,6 @@ import { MatTableDataSource } from '@angular/material/table';
import { Sort } from '@angular/material/sort';
import { TextTip } from
'../../../../ui/common/tooltips/text-tip/text-tip.component';
import { concatLatestFrom } from '@ngrx/operators';
-import { loadFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.actions';
import {
selectFlowConfiguration,
selectTimeOffset
@@ -169,7 +168,6 @@ export class ManageRemotePorts implements OnInit, OnDestroy
{
}
ngOnInit(): void {
- this.store.dispatch(loadFlowConfiguration());
this.store.dispatch(loadAbout());
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/parameter-contexts/feature/parameter-contexts.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/parameter-contexts/feature/parameter-contexts.component.ts
index b5c62fe996..1e5faa907a 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/parameter-contexts/feature/parameter-contexts.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/parameter-contexts/feature/parameter-contexts.component.ts
@@ -18,7 +18,6 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { NiFiState } from '../../../state';
-import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
import {
loadClusterSummary,
startClusterSummaryPolling,
@@ -35,12 +34,10 @@ export class ParameterContexts implements OnInit, OnDestroy
{
ngOnInit(): void {
this.store.dispatch(loadClusterSummary());
- this.store.dispatch(startCurrentUserPolling());
this.store.dispatch(startClusterSummaryPolling());
}
ngOnDestroy(): void {
this.store.dispatch(stopClusterSummaryPolling());
- this.store.dispatch(stopCurrentUserPolling());
}
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/parameter-contexts/ui/parameter-context-listing/parameter-context-listing.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/parameter-contexts/ui/parameter-context-listing/parameter-context-listing.component.ts
index a6adf510e0..850ddf2a39 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/parameter-contexts/ui/parameter-context-listing/parameter-context-listing.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/parameter-contexts/ui/parameter-context-listing/parameter-context-listing.component.ts
@@ -37,7 +37,6 @@ import { filter, switchMap, take } from 'rxjs';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { selectCurrentUser } from
'../../../../state/current-user/current-user.selectors';
import { selectFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.selectors';
-import { loadFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.actions';
@Component({
selector: 'parameter-context-listing',
@@ -77,7 +76,6 @@ export class ParameterContextListing implements OnInit {
}
ngOnInit(): void {
- this.store.dispatch(loadFlowConfiguration());
this.store.dispatch(loadParameterContexts());
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/feature/provenance.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/feature/provenance.component.ts
index 1344a2ce4f..349592a07f 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/feature/provenance.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/provenance/feature/provenance.component.ts
@@ -15,10 +15,9 @@
* limitations under the License.
*/
-import { Component, OnDestroy, OnInit } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { NiFiState } from '../../../state';
-import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
import { loadProvenanceOptions } from
'../state/provenance-event-listing/provenance-event-listing.actions';
import { loadAbout } from '../../../state/about/about.actions';
@@ -27,16 +26,11 @@ import { loadAbout } from
'../../../state/about/about.actions';
templateUrl: './provenance.component.html',
styleUrls: ['./provenance.component.scss']
})
-export class Provenance implements OnInit, OnDestroy {
+export class Provenance implements OnInit {
constructor(private store: Store<NiFiState>) {}
ngOnInit(): void {
- this.store.dispatch(startCurrentUserPolling());
this.store.dispatch(loadProvenanceOptions());
this.store.dispatch(loadAbout());
}
-
- ngOnDestroy(): void {
- this.store.dispatch(stopCurrentUserPolling());
- }
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/queue/feature/queue.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/queue/feature/queue.component.ts
index 1c00fd0415..fcdc6c74b0 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/queue/feature/queue.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/queue/feature/queue.component.ts
@@ -15,10 +15,9 @@
* limitations under the License.
*/
-import { Component, OnDestroy, OnInit } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { NiFiState } from '../../../state';
-import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
import { loadAbout } from '../../../state/about/about.actions';
@Component({
@@ -26,15 +25,10 @@ import { loadAbout } from
'../../../state/about/about.actions';
templateUrl: './queue.component.html',
styleUrls: ['./queue.component.scss']
})
-export class Queue implements OnInit, OnDestroy {
+export class Queue implements OnInit {
constructor(private store: Store<NiFiState>) {}
ngOnInit(): void {
- this.store.dispatch(startCurrentUserPolling());
this.store.dispatch(loadAbout());
}
-
- ngOnDestroy(): void {
- this.store.dispatch(stopCurrentUserPolling());
- }
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/feature/settings.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/feature/settings.component.ts
index 813bb1445e..10569fe68b 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/feature/settings.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/feature/settings.component.ts
@@ -18,7 +18,6 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { NiFiState } from '../../../state';
-import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
import { loadExtensionTypesForSettings } from
'../../../state/extension-types/extension-types.actions';
import {
loadClusterSummary,
@@ -63,13 +62,11 @@ export class Settings implements OnInit, OnDestroy {
ngOnInit(): void {
this.store.dispatch(loadClusterSummary());
- this.store.dispatch(startCurrentUserPolling());
this.store.dispatch(startClusterSummaryPolling());
this.store.dispatch(loadExtensionTypesForSettings());
}
ngOnDestroy(): void {
this.store.dispatch(stopClusterSummaryPolling());
- this.store.dispatch(stopCurrentUserPolling());
}
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/management-controller-services/management-controller-services.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/management-controller-services/management-controller-services.component.ts
index edcfef84ec..c5de03c853 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/management-controller-services/management-controller-services.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/management-controller-services/management-controller-services.component.ts
@@ -44,7 +44,6 @@ import { takeUntilDestroyed } from
'@angular/core/rxjs-interop';
import { selectCurrentUser } from
'../../../../state/current-user/current-user.selectors';
import { NiFiState } from '../../../../state';
import { selectFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.selectors';
-import { loadFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.actions';
import { CurrentUser } from '../../../../state/current-user';
import { getComponentStateAndOpenDialog } from
'../../../../state/component-state/component-state.actions';
import { navigateToComponentDocumentation } from
'../../../../state/documentation/documentation.actions';
@@ -88,7 +87,6 @@ export class ManagementControllerServices implements OnInit,
OnDestroy {
}
ngOnInit(): void {
- this.store.dispatch(loadFlowConfiguration());
this.store.dispatch(loadManagementControllerServices());
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/parameter-providers/parameter-providers.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/parameter-providers/parameter-providers.component.ts
index 13c7e01987..37f71bed8a 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/parameter-providers/parameter-providers.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/parameter-providers/parameter-providers.component.ts
@@ -28,7 +28,6 @@ import {
selectSingleFetchParameterProvider
} from '../../state/parameter-providers/parameter-providers.selectors';
import { selectFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.selectors';
-import { loadFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.actions';
import * as ParameterProviderActions from
'../../state/parameter-providers/parameter-providers.actions';
import { initialParameterProvidersState } from
'../../state/parameter-providers/parameter-providers.reducer';
import { switchMap, take } from 'rxjs';
@@ -92,7 +91,6 @@ export class ParameterProviders implements OnInit, OnDestroy {
}
ngOnInit(): void {
- this.store.dispatch(loadFlowConfiguration());
this.store.dispatch(ParameterProviderActions.loadParameterProviders());
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/reporting-tasks/reporting-tasks.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/reporting-tasks/reporting-tasks.component.ts
index 257a0b5fce..b8ceed7ad2 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/reporting-tasks/reporting-tasks.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/settings/ui/reporting-tasks/reporting-tasks.component.ts
@@ -42,7 +42,6 @@ import {
import { initialState } from
'../../state/reporting-tasks/reporting-tasks.reducer';
import { selectCurrentUser } from
'../../../../state/current-user/current-user.selectors';
import { NiFiState } from '../../../../state';
-import { loadFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.actions';
import { selectFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.selectors';
import { getComponentStateAndOpenDialog } from
'../../../../state/component-state/component-state.actions';
import { navigateToComponentDocumentation } from
'../../../../state/documentation/documentation.actions';
@@ -86,7 +85,6 @@ export class ReportingTasks implements OnInit, OnDestroy {
}
ngOnInit(): void {
- this.store.dispatch(loadFlowConfiguration());
this.store.dispatch(loadReportingTasks());
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/summary/feature/summary.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/summary/feature/summary.component.ts
index decf588398..6ed1ed4eb4 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/summary/feature/summary.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/summary/feature/summary.component.ts
@@ -18,7 +18,6 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { NiFiState } from '../../../state';
-import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
import { loadSummaryListing, resetSummaryState } from
'../state/summary-listing/summary-listing.actions';
import { loadClusterSummary, searchCluster } from
'../../../state/cluster-summary/cluster-summary.actions';
import { selectClusterSummary } from
'../../../state/cluster-summary/cluster-summary.selectors';
@@ -61,13 +60,11 @@ export class Summary implements OnInit, OnDestroy {
}
ngOnInit(): void {
- this.store.dispatch(startCurrentUserPolling());
this.store.dispatch(loadSummaryListing({ recursive: true }));
this.store.dispatch(loadClusterSummary());
}
ngOnDestroy(): void {
this.store.dispatch(resetSummaryState());
- this.store.dispatch(stopCurrentUserPolling());
}
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/users/feature/users.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/users/feature/users.component.ts
index 90e10f52ca..0023350518 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/users/feature/users.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/users/feature/users.component.ts
@@ -18,7 +18,6 @@
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { NiFiState } from '../../../state';
-import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
import { resetUsersState } from '../state/user-listing/user-listing.actions';
import {
loadClusterSummary,
@@ -36,13 +35,11 @@ export class Users implements OnInit, OnDestroy {
ngOnInit(): void {
this.store.dispatch(loadClusterSummary());
- this.store.dispatch(startCurrentUserPolling());
this.store.dispatch(startClusterSummaryPolling());
}
ngOnDestroy(): void {
this.store.dispatch(resetUsersState());
this.store.dispatch(stopClusterSummaryPolling());
- this.store.dispatch(stopCurrentUserPolling());
}
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/users/ui/user-listing/user-listing.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/users/ui/user-listing/user-listing.component.ts
index 960a68186e..da9389ca38 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/users/ui/user-listing/user-listing.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/users/ui/user-listing/user-listing.component.ts
@@ -42,7 +42,6 @@ import {
import { filter, switchMap, take } from 'rxjs';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { UserEntity, UserGroupEntity } from '../../../../state/shared';
-import { loadFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.actions';
import { selectFlowConfiguration } from
'../../../../state/flow-configuration/flow-configuration.selectors';
@Component({
@@ -127,7 +126,6 @@ export class UserListing implements OnInit {
}
ngOnInit(): void {
- this.store.dispatch(loadFlowConfiguration());
this.store.dispatch(loadTenants());
}
diff --git
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/navigation/navigation.component.ts
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/navigation/navigation.component.ts
index a314f4399e..2e5bf355ad 100644
---
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/navigation/navigation.component.ts
+++
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/navigation/navigation.component.ts
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import { Component } from '@angular/core';
+import { Component, OnDestroy, OnInit } from '@angular/core';
import { AsyncPipe, NgOptimizedImage } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { MatDividerModule } from '@angular/material/divider';
@@ -34,6 +34,8 @@ import { selectFlowConfiguration } from
'../../../state/flow-configuration/flow-
import { Storage } from '../../../service/storage.service';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { OS_SETTING, LIGHT_THEME, DARK_THEME, ThemingService } from
'../../../service/theming.service';
+import { loadFlowConfiguration } from
'../../../state/flow-configuration/flow-configuration.actions';
+import { startCurrentUserPolling, stopCurrentUserPolling } from
'../../../state/current-user/current-user.actions';
@Component({
selector: 'navigation',
@@ -52,7 +54,7 @@ import { OS_SETTING, LIGHT_THEME, DARK_THEME, ThemingService
} from '../../../se
templateUrl: './navigation.component.html',
styleUrls: ['./navigation.component.scss']
})
-export class Navigation {
+export class Navigation implements OnInit, OnDestroy {
theme: any | undefined;
darkModeOn: boolean | undefined;
LIGHT_THEME: string = LIGHT_THEME;
@@ -80,6 +82,15 @@ export class Navigation {
}
}
+ ngOnInit(): void {
+ this.store.dispatch(loadFlowConfiguration());
+ this.store.dispatch(startCurrentUserPolling());
+ }
+
+ ngOnDestroy(): void {
+ this.store.dispatch(stopCurrentUserPolling());
+ }
+
allowLogin(user: CurrentUser): boolean {
return user.anonymous && location.protocol === 'https:';
}