diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/app-routing.module.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/app-routing.module.ts index 3a70a49d5b..704d6df973 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/app-routing.module.ts +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/app-routing.module.ts @@ -24,6 +24,10 @@ const routes: Routes = [ path: 'login', loadChildren: () => import('./pages/login/feature/login.module').then((m) => m.LoginModule) }, + { + path: 'error', + loadChildren: () => import('./pages/error/feature/error.module').then((m) => m.ErrorModule) + }, { path: 'settings', canMatch: [authenticationGuard], diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/app.module.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/app.module.ts index 749a8dda7a..56c94fe9c4 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/app.module.ts +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/app.module.ts @@ -42,6 +42,8 @@ import { ControllerServiceStateEffects } from './state/contoller-service-state/c import { SystemDiagnosticsEffects } from './state/system-diagnostics/system-diagnostics.effects'; import { FlowConfigurationEffects } from './state/flow-configuration/flow-configuration.effects'; import { ComponentStateEffects } from './state/component-state/component-state.effects'; +import { ErrorEffects } from './state/error/error.effects'; +import { MatSnackBarModule } from '@angular/material/snack-bar'; @NgModule({ declarations: [AppComponent], @@ -60,6 +62,7 @@ import { ComponentStateEffects } from './state/component-state/component-state.e navigationActionTiming: NavigationActionTiming.PostActivation }), EffectsModule.forRoot( + ErrorEffects, CurrentUserEffects, ExtensionTypesEffects, AboutEffects, @@ -76,7 +79,8 @@ import { ComponentStateEffects } from './state/component-state/component-state.e }), MatProgressSpinnerModule, MatNativeDateModule, - MatDialogModule + MatDialogModule, + MatSnackBarModule ], providers: [ { diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error-routing.module.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error-routing.module.ts new file mode 100644 index 0000000000..110e54ca8c --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error-routing.module.ts @@ -0,0 +1,28 @@ +/* + * 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. + */ + +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { Error } from './error.component'; + +const routes: Routes = [{ path: '', component: Error }]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class ErrorRoutingModule {} 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/common/banner/banner.component.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.html similarity index 61% rename from nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/common/banner/banner.component.html rename to nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.html index 7fa5559faf..2dcd49203f 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/common/banner/banner.component.html +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.html @@ -15,4 +15,15 @@ ~ limitations under the License. --> -
{{ message }}
+
+ + +
{{ errorDetail.message }}
+
+
+ + +
Please check the logs or navigate home and try again.
+
+
+
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/common/banner/banner.component.scss b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.scss similarity index 88% rename from nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/common/banner/banner.component.scss rename to nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.scss index d6751e31d6..ed2e32658f 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/common/banner/banner.component.scss +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.scss @@ -15,8 +15,6 @@ * limitations under the License. */ -div { - &.error { - background-color: #ffcdd2; - } +.error-background { + background: #fff url(../../../../assets/icons/bg-error.png) left top no-repeat; } diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.spec.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.spec.ts new file mode 100644 index 0000000000..795a953ec6 --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.spec.ts @@ -0,0 +1,50 @@ +/* + * 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. + */ + +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { Error } from './error.component'; +import { provideMockStore } from '@ngrx/store/testing'; +import { initialState } from '../../../state/current-user/current-user.reducer'; +import { Component } from '@angular/core'; + +describe('Error', () => { + let component: Error; + let fixture: ComponentFixture; + + @Component({ + selector: 'page-content', + standalone: true, + template: '' + }) + class MockPageContent {} + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [Error], + imports: [MockPageContent], + providers: [provideMockStore({ initialState })] + }); + fixture = TestBed.createComponent(Error); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.ts new file mode 100644 index 0000000000..2bfa544afd --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.component.ts @@ -0,0 +1,32 @@ +/* + * 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. + */ + +import { Component } from '@angular/core'; +import { Store } from '@ngrx/store'; +import { selectFullScreenError } from '../../../state/error/error.selectors'; +import { NiFiState } from '../../../state'; + +@Component({ + selector: 'error', + templateUrl: './error.component.html', + styleUrls: ['./error.component.scss'] +}) +export class Error { + errorDetail$ = this.store.select(selectFullScreenError); + + constructor(private store: Store) {} +} diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.module.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.module.ts new file mode 100644 index 0000000000..2e1fb41518 --- /dev/null +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/error/feature/error.module.ts @@ -0,0 +1,29 @@ +/* + * 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. + */ + +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { Error } from './error.component'; +import { ErrorRoutingModule } from './error-routing.module'; +import { PageContent } from '../../../ui/common/page-content/page-content.component'; + +@NgModule({ + declarations: [Error], + exports: [Error], + imports: [CommonModule, ErrorRoutingModule, PageContent] +}) +export class ErrorModule {} diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/flow.service.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/flow.service.ts index 8d841d986c..818e802663 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/flow.service.ts +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/service/flow.service.ts @@ -18,7 +18,6 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { HttpClient } from '@angular/common/http'; -import { CanvasUtils } from './canvas-utils.service'; import { ComponentRunStatusRequest, CreateComponentRequest, @@ -48,7 +47,6 @@ export class FlowService implements PropertyDescriptorRetriever { constructor( private httpClient: HttpClient, - private canvasUtils: CanvasUtils, private client: Client, private nifiCommon: NiFiCommon ) {} @@ -198,12 +196,10 @@ export class FlowService implements PropertyDescriptorRetriever { } updateComponent(updateComponent: UpdateComponentRequest): Observable { - // return throwError('API Error'); return this.httpClient.put(this.nifiCommon.stripProtocol(updateComponent.uri), updateComponent.payload); } deleteComponent(deleteComponent: DeleteComponentRequest): Observable { - // return throwError('API Error'); const revision: any = this.client.getRevision(deleteComponent.entity); return this.httpClient.delete(this.nifiCommon.stripProtocol(deleteComponent.uri), { params: revision }); } 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/items/port/create-port/create-port.component.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/port/create-port/create-port.component.html index 04feabd8f9..b214a166d2 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/items/port/create-port/create-port.component.html +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/port/create-port/create-port.component.html @@ -17,7 +17,7 @@

Create New {{ portTypeLabel }}

- + {{ portTypeLabel }} Name 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/items/port/create-port/create-port.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/items/port/create-port/create-port.component.ts index eb7a38c31f..926aa98daa 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/items/port/create-port/create-port.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/items/port/create-port/create-port.component.ts @@ -28,7 +28,7 @@ import { ComponentType, SelectOption, TextTipInput } from '../../../../../../../ import { MatInputModule } from '@angular/material/input'; import { MatSelectModule } from '@angular/material/select'; import { MatTooltipModule } from '@angular/material/tooltip'; -import { Banner } from '../../../../common/banner/banner.component'; +import { ErrorBanner } from '../../../../../../../ui/common/error-banner/error-banner.component'; import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; import { MatButtonModule } from '@angular/material/button'; import { NifiSpinnerDirective } from '../../../../../../../ui/common/spinner/nifi-spinner.directive'; @@ -44,7 +44,7 @@ import { NifiTooltipDirective } from '../../../../../../../ui/common/tooltips/ni MatInputModule, MatSelectModule, MatTooltipModule, - Banner, + ErrorBanner, NgIf, NgForOf, MatButtonModule, 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/items/port/edit-port/edit-port.component.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/port/edit-port/edit-port.component.html index 9bb3faf242..2742b7170c 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/items/port/edit-port/edit-port.component.html +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/port/edit-port/edit-port.component.html @@ -17,7 +17,7 @@

Edit {{ portTypeLabel }}

- +
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/items/port/edit-port/edit-port.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/items/port/edit-port/edit-port.component.ts index 94b68953d1..2fbe452dc4 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/items/port/edit-port/edit-port.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/items/port/edit-port/edit-port.component.ts @@ -24,7 +24,7 @@ import { updateComponent } from '../../../../../state/flow/flow.actions'; import { Client } from '../../../../../../../service/client.service'; import { EditComponentDialogRequest } from '../../../../../state/flow'; import { ComponentType } from '../../../../../../../state/shared'; -import { Banner } from '../../../../common/banner/banner.component'; +import { ErrorBanner } from '../../../../../../../ui/common/error-banner/error-banner.component'; import { MatInputModule } from '@angular/material/input'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatButtonModule } from '@angular/material/button'; @@ -38,7 +38,7 @@ import { NifiSpinnerDirective } from '../../../../../../../ui/common/spinner/nif templateUrl: './edit-port.component.html', imports: [ ReactiveFormsModule, - Banner, + ErrorBanner, MatDialogModule, MatInputModule, MatCheckboxModule, @@ -68,10 +68,6 @@ export class EditPort { this.portTypeLabel = 'Output Port'; } - // TODO - consider updating the request to only provide the id of the port and selecting that item - // from the store. this would also allow us to be informed when another client has submitted an - // update to the same port which this editing is happening - // build the form this.editPortForm = this.formBuilder.group({ name: new FormControl(request.entity.component.name, Validators.required), 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/items/process-group/create-process-group/create-process-group.component.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/process-group/create-process-group/create-process-group.component.html index 6ce3fb0f78..965492caca 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/items/process-group/create-process-group/create-process-group.component.html +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/process-group/create-process-group/create-process-group.component.html @@ -17,6 +17,7 @@

Create Process Group

+ Name 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/items/process-group/create-process-group/create-process-group.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/items/process-group/create-process-group/create-process-group.component.ts index 74b8865aed..2caa01168e 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/items/process-group/create-process-group/create-process-group.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/items/process-group/create-process-group/create-process-group.component.ts @@ -24,7 +24,7 @@ import { createProcessGroup, uploadProcessGroup } from '../../../../../state/flo import { SelectOption, TextTipInput } from '../../../../../../../state/shared'; import { selectSaving } from '../../../../../state/flow/flow.selectors'; import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; -import { Banner } from '../../../../common/banner/banner.component'; +import { ErrorBanner } from '../../../../../../../ui/common/error-banner/error-banner.component'; import { MatButtonModule } from '@angular/material/button'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; @@ -42,7 +42,7 @@ import { NiFiCommon } from '../../../../../../../service/nifi-common.service'; standalone: true, imports: [ AsyncPipe, - Banner, + ErrorBanner, MatButtonModule, MatDialogModule, MatFormFieldModule, 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/items/process-group/group-components/group-components.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/items/process-group/group-components/group-components.component.ts index 690f03f3e4..84bd09f637 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/items/process-group/group-components/group-components.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/items/process-group/group-components/group-components.component.ts @@ -24,7 +24,6 @@ import { groupComponents } from '../../../../../state/flow/flow.actions'; import { ComponentType, SelectOption, TextTipInput } from '../../../../../../../state/shared'; import { selectSaving } from '../../../../../state/flow/flow.selectors'; import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; -import { Banner } from '../../../../common/banner/banner.component'; import { MatButtonModule } from '@angular/material/button'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatInputModule } from '@angular/material/input'; @@ -42,7 +41,6 @@ import { Client } from '../../../../../../../service/client.service'; standalone: true, imports: [ AsyncPipe, - Banner, MatButtonModule, MatDialogModule, MatFormFieldModule, 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/items/processor/edit-processor/edit-processor.component.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/processor/edit-processor/edit-processor.component.html index 166f54860f..8a67cb245a 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/items/processor/edit-processor/edit-processor.component.html +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/flow-designer/ui/canvas/items/processor/edit-processor/edit-processor.component.html @@ -17,6 +17,7 @@

Edit Processor

+ 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/items/processor/edit-processor/edit-processor.component.spec.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/items/processor/edit-processor/edit-processor.component.spec.ts index 18db2e5513..c181d773a3 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/items/processor/edit-processor/edit-processor.component.spec.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/items/processor/edit-processor/edit-processor.component.spec.ts @@ -22,6 +22,9 @@ import { EditComponentDialogRequest } from '../../../../../state/flow'; import { MAT_DIALOG_DATA } from '@angular/material/dialog'; import { ComponentType } from '../../../../../../../state/shared'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { Component } from '@angular/core'; +import { provideMockStore } from '@ngrx/store/testing'; +import { initialState } from '../../../../../../../state/error/error.reducer'; describe('EditProcessor', () => { let component: EditProcessor; @@ -719,10 +722,22 @@ describe('EditProcessor', () => { } }; + @Component({ + selector: 'error-banner', + standalone: true, + template: '' + }) + class MockErrorBanner {} + beforeEach(() => { TestBed.configureTestingModule({ - imports: [EditProcessor, BrowserAnimationsModule], - providers: [{ provide: MAT_DIALOG_DATA, useValue: data }] + imports: [EditProcessor, MockErrorBanner, BrowserAnimationsModule], + providers: [ + { provide: MAT_DIALOG_DATA, useValue: data }, + provideMockStore({ + initialState + }) + ] }); fixture = TestBed.createComponent(EditProcessor); component = fixture.componentInstance; 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/items/processor/edit-processor/edit-processor.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/items/processor/edit-processor/edit-processor.component.ts index 6cb5893bd7..c494728d35 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/items/processor/edit-processor/edit-processor.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/items/processor/edit-processor/edit-processor.component.ts @@ -47,6 +47,7 @@ import { RelationshipConfiguration, RelationshipSettings } from './relationship-settings/relationship-settings.component'; +import { ErrorBanner } from '../../../../../../../ui/common/error-banner/error-banner.component'; @Component({ selector: 'edit-processor', @@ -68,7 +69,8 @@ import { NifiSpinnerDirective, NifiTooltipDirective, RunDurationSlider, - RelationshipSettings + RelationshipSettings, + ErrorBanner ], styleUrls: ['./edit-processor.component.scss'] }) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/feature/login.component.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/feature/login.component.html index 81fb3394e3..3f6d3a7f34 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/feature/login.component.html +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/feature/login.component.html @@ -23,12 +23,16 @@ - + +
{{ access.error.message }}
+
- + +
{{ access.accessStatus.message }}
+
@@ -36,11 +40,9 @@ - + +
This NiFi is not configured to support username/password logins.
+
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/feature/login.module.ts b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/feature/login.module.ts index 339c933ede..9d317caa47 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/feature/login.module.ts +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/feature/login.module.ts @@ -28,11 +28,11 @@ import { EffectsModule } from '@ngrx/effects'; import { loginFeatureKey, reducers } from '../state'; import { AccessEffects } from '../state/access/access.effects'; import { LoginForm } from '../ui/login-form/login-form.component'; -import { LoginMessage } from '../ui/login-message/login-message.component'; +import { PageContent } from '../../../ui/common/page-content/page-content.component'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; @NgModule({ - declarations: [Login, LoginForm, LoginMessage], + declarations: [Login, LoginForm], exports: [Login], imports: [ CommonModule, @@ -44,7 +44,8 @@ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; MatFormFieldModule, MatInputModule, MatButtonModule, - NgxSkeletonLoaderModule + NgxSkeletonLoaderModule, + PageContent ] }) export class LoginModule {} diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/ui/login-form/login-form.component.html b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/ui/login-form/login-form.component.html index bad2efb042..7f5d6dc18e 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/ui/login-form/login-form.component.html +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/pages/login/ui/login-form/login-form.component.html @@ -15,7 +15,7 @@ ~ limitations under the License. --> -