Skip to content

Commit 20abbf2

Browse files
committed
NIFI-14319: remove error abstractions from shared folder
1 parent be7401d commit 20abbf2

File tree

72 files changed

+877
-1201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+877
-1201
lines changed

nifi-frontend/src/main/frontend/apps/nifi-registry/project.json

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"executor": "@nx/angular:application",
1515
"outputs": ["{options.outputPath}"],
1616
"options": {
17-
"outputPath": "dist/apps/nifi-registry",
17+
"outputPath": "dist/nifi-registry",
1818
"index": "apps/nifi-registry/src/index.html",
1919
"browser": "apps/nifi-registry/src/main.ts",
2020
"polyfills": ["zone.js"],
@@ -60,7 +60,7 @@
6060
"outputHashing": "none",
6161
"assets": [
6262
{
63-
"glob": "**/*",
63+
"glob": "**/*.svg",
6464
"input": "libs/shared/src/assets/",
6565
"output": "./assets"
6666
}
@@ -91,7 +91,8 @@
9191
"proxyConfig": "apps/nifi-registry/proxy.config.mjs",
9292
"buildTarget": "nifi-registry:build",
9393
"port": 4204
94-
}
94+
},
95+
"continuous": true
9596
},
9697
"extract-i18n": {
9798
"executor": "@angular-devkit/build-angular:extract-i18n",
@@ -128,14 +129,6 @@
128129
"options": {
129130
"jestConfig": "apps/nifi-registry/jest.config.ts"
130131
}
131-
},
132-
"serve-static": {
133-
"executor": "@nx/web:file-server",
134-
"options": {
135-
"buildTarget": "nifi-registry:build",
136-
"staticFilePath": "dist/apps/nifi-registry/browser",
137-
"spa": true
138-
}
139132
}
140133
}
141134
}

nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/app-routing.module.ts

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,20 @@
1717

1818
import { NgModule } from '@angular/core';
1919
import { RouterModule, Routes } from '@angular/router';
20-
import { ResourcesComponent } from './pages/resources/feature/resources.component';
21-
import { Error } from './pages/error/feature/error.component';
2220

2321
const routes: Routes = [
24-
{
25-
path: 'error',
26-
loadComponent: () => Error
27-
},
28-
{
29-
path: 'resources',
30-
component: ResourcesComponent,
31-
children: [
32-
{
33-
path: ':id',
34-
component: ResourcesComponent
35-
}
36-
]
37-
},
38-
{
39-
path: 'nifi-registry',
40-
redirectTo: 'resources'
41-
},
4222
{
4323
path: '',
4424
redirectTo: 'resources',
4525
pathMatch: 'full'
4626
},
4727
{
48-
path: '',
49-
loadComponent: () => import('./pages/resources/feature/resources.component').then((m) => m.ResourcesComponent)
28+
path: 'resources',
29+
loadChildren: () => import('./pages/resources/feature/resources.module').then((m) => m.ResourcesModule)
5030
}
31+
// TODO: buckets
32+
// TODO: Users/groups
33+
// TODO: Page not found
5134
];
5235

5336
@NgModule({

nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/app.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
-->
1717

1818
<div class="flex flex-col h-screen">
19-
<app-header></app-header>
19+
<header class="mb-5 nifi-registry-header">
20+
<app-header></app-header>
21+
</header>
2022
<router-outlet></router-outlet>
2123
</div>

nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/app.module.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@ import {
2525
provideNoopAnimations
2626
} from '@angular/platform-browser/animations';
2727
import { StoreModule } from '@ngrx/store';
28+
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
2829
import { provideHttpClient, withInterceptors, withXsrfConfiguration } from '@angular/common/http';
2930
import { NavigationActionTiming, RouterState, StoreRouterConnectingModule } from '@ngrx/router-store';
3031
import { EffectsModule } from '@ngrx/effects';
3132
import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';
3233
import { HeaderComponent } from './ui/header/header.component';
3334
import { rootReducers } from './state';
34-
import { DropletsEffects } from './state/droplets/droplets.effects';
35-
import { BucketsEffects } from './state/buckets/buckets.effects';
3635
import { ErrorEffects } from './state/error/error.effects';
37-
import { ResourcesComponent } from './pages/resources/feature/resources.component';
36+
import { environment } from '../environments/environment';
3837

3938
const entry = localStorage.getItem('disable-animations');
4039
let disableAnimations = '';
@@ -62,13 +61,19 @@ try {
6261
AppRoutingModule,
6362
BrowserAnimationsModule,
6463
HeaderComponent,
65-
ResourcesComponent,
6664
StoreModule.forRoot(rootReducers),
6765
StoreRouterConnectingModule.forRoot({
6866
routerState: RouterState.Minimal,
6967
navigationActionTiming: NavigationActionTiming.PostActivation
7068
}),
71-
EffectsModule.forRoot(DropletsEffects, BucketsEffects, ErrorEffects)
69+
EffectsModule.forRoot(ErrorEffects),
70+
StoreDevtoolsModule.instrument({
71+
maxAge: 25,
72+
logOnly: environment.production,
73+
autoPause: true,
74+
name: 'NiFi Registry',
75+
trace: !environment.production
76+
})
7277
],
7378
providers: [
7479
disableAnimations === 'true' ? provideNoopAnimations() : provideAnimations(),

nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/pages/error/feature/error.component.html

Lines changed: 0 additions & 28 deletions
This file was deleted.

nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/pages/error/feature/error.component.scss

Lines changed: 0 additions & 20 deletions
This file was deleted.

nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/pages/error/feature/error.component.spec.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/pages/error/feature/error.component.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.
Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* (the "License"); you may not use this file except in compliance with
77
* the License. You may obtain a copy of the License at
88
*
9-
* http://www.apache.org/licenses/LICENSE-2.0
9+
* http://www.apache.org/licenses/LICENSE-2.0
1010
*
1111
* Unless required by applicable law or agreed to in writing, software
1212
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -15,17 +15,25 @@
1515
* limitations under the License.
1616
*/
1717

18-
@use '@angular/material' as mat;
18+
import { RouterModule, Routes } from '@angular/router';
19+
import { NgModule } from '@angular/core';
20+
import { ResourcesComponent } from './resources.component';
1921

20-
.banner-container {
21-
@include mat.button-density(-1);
22-
23-
.error-banner-message {
24-
word-break: break-word;
22+
const routes: Routes = [
23+
{
24+
path: '',
25+
component: ResourcesComponent,
26+
children: [
27+
{
28+
path: ':id',
29+
component: ResourcesComponent
30+
}
31+
]
2532
}
33+
];
2634

27-
ul {
28-
list-style-type: disc;
29-
list-style-position: inside;
30-
}
31-
}
35+
@NgModule({
36+
imports: [RouterModule.forChild(routes)],
37+
exports: [RouterModule]
38+
})
39+
export class ResourcesRoutingModule {}

nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/pages/resources/feature/resources.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,19 @@
1818
<div class="pb-5 px-5 flex flex-col h-full">
1919
<div class="h-full flex flex-col">
2020
<h3 class="primary-color">Resources</h3>
21+
<context-error-banner [context]="ErrorContextKey.GLOBAL"></context-error-banner>
2122
<div class="flex justify-between items-baseline">
2223
<droplet-table-filter
2324
[buckets]="buckets"
2425
[filterTerm]="filterTerm"
2526
[filterBucket]="filterBucket"
2627
[filterColumn]="filterColumn"
28+
[filterableColumns]="filterableColumns"
2729
[filteredCount]="dataSource.filteredData.length"
2830
[totalCount]="dataSource.data.length"
2931
(filterChanged)="applyFilter($event)"></droplet-table-filter>
3032
<div class="flex justify-end">
31-
<button mat-icon-button class="primary-icon-button" (click)="openImportNewFlowDialog()">
33+
<button mat-icon-button class="primary-icon-button" (click)="openImportNewDropletDialog()">
3234
<i class="fa fa-plus"></i>
3335
</button>
3436
</div>

0 commit comments

Comments
 (0)