fix: dialog lazy loading
This commit is contained in:
parent
f658073bcf
commit
c1293b4da1
|
@ -2,17 +2,18 @@ import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
import {HomeComponent} from './home/home.component';
|
import {HomeComponent} from './home/home.component';
|
||||||
import {AuthGuardService} from '../shared/guards/auth-guard.service';
|
import {AuthGuardService} from '../shared/guards/auth-guard.service';
|
||||||
|
import {Route} from '@shared/models/route.enum';
|
||||||
|
|
||||||
export const START_PAGE = 'projects';
|
export const START_PAGE = Route.PROJECT_OVERVIEW;
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'home',
|
path: Route.HOME,
|
||||||
component: HomeComponent,
|
component: HomeComponent,
|
||||||
canActivate: [AuthGuardService]
|
canActivate: [AuthGuardService]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'projects',
|
path: Route.PROJECT_OVERVIEW,
|
||||||
loadChildren: () => import('./project-overview').then(mod => mod.ProjectOverviewModule),
|
loadChildren: () => import('./project-overview').then(mod => mod.ProjectOverviewModule),
|
||||||
canActivate: [AuthGuardService]
|
canActivate: [AuthGuardService]
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,7 +6,13 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
|
||||||
import {
|
import {
|
||||||
NbLayoutModule,
|
NbLayoutModule,
|
||||||
NbToastrModule,
|
NbToastrModule,
|
||||||
NbIconModule, NbCardModule, NbButtonModule, NbDialogService, NbDialogModule, NbSelectModule
|
NbIconModule,
|
||||||
|
NbCardModule,
|
||||||
|
NbButtonModule,
|
||||||
|
NbSelectModule,
|
||||||
|
NbThemeModule,
|
||||||
|
NbOverlayContainerAdapter,
|
||||||
|
NbDialogModule,
|
||||||
} from '@nebular/theme';
|
} from '@nebular/theme';
|
||||||
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
|
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
|
||||||
import {HttpClient, HttpClientModule} from '@angular/common/http';
|
import {HttpClient, HttpClientModule} from '@angular/common/http';
|
||||||
|
@ -25,11 +31,11 @@ import {HomeModule} from './home/home.module';
|
||||||
import {KeycloakService} from 'keycloak-angular';
|
import {KeycloakService} from 'keycloak-angular';
|
||||||
import {httpInterceptorProviders} from '@shared/interceptors';
|
import {httpInterceptorProviders} from '@shared/interceptors';
|
||||||
import {FlexLayoutModule} from '@angular/flex-layout';
|
import {FlexLayoutModule} from '@angular/flex-layout';
|
||||||
import {DialogService} from '@shared/services/dialog-service/dialog.service';
|
|
||||||
import {ConfirmDialogModule} from '@shared/modules/confirm-dialog/confirm-dialog.module';
|
|
||||||
import {OverlayContainer} from '@angular/cdk/overlay';
|
|
||||||
import {NgxsLoggerPluginModule} from '@shared/stores/plugins/store-logger-plugin';
|
import {NgxsLoggerPluginModule} from '@shared/stores/plugins/store-logger-plugin';
|
||||||
import {ProjectState} from '@shared/stores/project-state/project-state';
|
import {ProjectState} from '@shared/stores/project-state/project-state';
|
||||||
|
import {CustomOverlayContainer} from '@shared/modules/custom-overlay-container.component';
|
||||||
|
import {DialogService} from '@shared/services/dialog-service/dialog.service';
|
||||||
|
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -40,16 +46,19 @@ import {ProjectState} from '@shared/stores/project-state/project-state';
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
RouterModule,
|
RouterModule,
|
||||||
NbLayoutModule,
|
NbLayoutModule,
|
||||||
NbDialogModule.forRoot(),
|
|
||||||
NbCardModule,
|
NbCardModule,
|
||||||
NbIconModule,
|
NbIconModule,
|
||||||
NbButtonModule,
|
NbButtonModule,
|
||||||
|
NbDialogModule.forRoot(),
|
||||||
|
NbThemeModule.forRoot(),
|
||||||
NbToastrModule.forRoot(), // used for notification service
|
NbToastrModule.forRoot(), // used for notification service
|
||||||
|
FlexLayoutModule,
|
||||||
|
ReactiveFormsModule,
|
||||||
|
FormsModule,
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
ThemeModule.forRoot(),
|
ThemeModule.forRoot(),
|
||||||
NbSelectModule,
|
NbSelectModule,
|
||||||
ConfirmDialogModule,
|
|
||||||
NgxsModule.forRoot([SessionState, ProjectState], {developmentMode: !environment.production}),
|
NgxsModule.forRoot([SessionState, ProjectState], {developmentMode: !environment.production}),
|
||||||
NgxsLoggerPluginModule.forRoot({developmentMode: !environment.production}),
|
NgxsLoggerPluginModule.forRoot({developmentMode: !environment.production}),
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
|
@ -62,7 +71,6 @@ import {ProjectState} from '@shared/stores/project-state/project-state';
|
||||||
}),
|
}),
|
||||||
HeaderModule,
|
HeaderModule,
|
||||||
HomeModule,
|
HomeModule,
|
||||||
FlexLayoutModule
|
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
HttpClient,
|
HttpClient,
|
||||||
|
@ -72,12 +80,11 @@ import {ProjectState} from '@shared/stores/project-state/project-state';
|
||||||
multi: true,
|
multi: true,
|
||||||
deps: [KeycloakService]
|
deps: [KeycloakService]
|
||||||
},
|
},
|
||||||
OverlayContainer,
|
|
||||||
KeycloakService,
|
KeycloakService,
|
||||||
httpInterceptorProviders,
|
httpInterceptorProviders,
|
||||||
NotificationService,
|
NotificationService,
|
||||||
DialogService,
|
DialogService,
|
||||||
NbDialogService,
|
{provide: NbOverlayContainerAdapter, useClass: CustomOverlayContainer}
|
||||||
],
|
],
|
||||||
bootstrap: [
|
bootstrap: [
|
||||||
AppComponent
|
AppComponent
|
||||||
|
|
|
@ -6,9 +6,9 @@ import {HttpClient, HttpClientModule} from '@angular/common/http';
|
||||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||||
import {FlexLayoutModule, FlexModule} from '@angular/flex-layout';
|
import {FlexLayoutModule, FlexModule} from '@angular/flex-layout';
|
||||||
import {MomentModule} from 'ngx-moment';
|
import {MomentModule} from 'ngx-moment';
|
||||||
import {NotificationService} from '../shared/services/notification.service';
|
import {NotificationService} from '@shared/services/notification.service';
|
||||||
import {NbToastrModule} from '@nebular/theme';
|
import {NbOverlayContainerAdapter, NbSpinnerModule, NbToastrModule} from '@nebular/theme';
|
||||||
import {ThemeModule} from '../assets/@theme/theme.module';
|
import {ThemeModule} from '@assets/@theme/theme.module';
|
||||||
import {LoadingSpinnerComponent} from '@shared/widgets/loading-spinner/loading-spinner.component';
|
import {LoadingSpinnerComponent} from '@shared/widgets/loading-spinner/loading-spinner.component';
|
||||||
|
|
||||||
export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
||||||
|
@ -22,6 +22,7 @@ export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
NbToastrModule, // used for notification service
|
NbToastrModule, // used for notification service
|
||||||
|
NbSpinnerModule,
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
FlexLayoutModule,
|
FlexLayoutModule,
|
||||||
ThemeModule.forRoot(),
|
ThemeModule.forRoot(),
|
||||||
|
@ -37,7 +38,8 @@ export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
HttpClient,
|
HttpClient,
|
||||||
NotificationService
|
NotificationService,
|
||||||
|
NbOverlayContainerAdapter
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
LoadingSpinnerComponent,
|
LoadingSpinnerComponent,
|
||||||
|
|
|
@ -20,43 +20,42 @@ import {RouterModule} from '@angular/router';
|
||||||
import {FormsModule} from '@angular/forms';
|
import {FormsModule} from '@angular/forms';
|
||||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||||
import {FlexLayoutModule} from '@angular/flex-layout';
|
import {FlexLayoutModule} from '@angular/flex-layout';
|
||||||
import {LoadingSpinnerComponent} from '@shared/widgets/loading-spinner/loading-spinner.component';
|
|
||||||
import {CommonAppModule} from '../common-app.module';
|
import {CommonAppModule} from '../common-app.module';
|
||||||
|
import {ObjectiveOverviewRoutingModule} from './objective-overview-routing.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ObjectiveHeaderComponent,
|
ObjectiveHeaderComponent,
|
||||||
ObjectiveCategoriesComponent,
|
ObjectiveCategoriesComponent,
|
||||||
ObjectiveTableComponent,
|
ObjectiveTableComponent,
|
||||||
// LoadingSpinnerComponent
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
NbLayoutModule,
|
CommonAppModule,
|
||||||
NbCardModule,
|
NbLayoutModule,
|
||||||
NbMenuModule.forRoot(),
|
NbCardModule,
|
||||||
NbButtonModule,
|
NbMenuModule.forRoot(),
|
||||||
// nbTooltip crashes app right now if used in component,
|
NbButtonModule,
|
||||||
// workaround: use title in html for now
|
// nbTooltip crashes app right now if used in component,
|
||||||
NbTooltipModule,
|
// workaround: use title in html for now
|
||||||
NbTreeGridModule,
|
NbTooltipModule,
|
||||||
TranslateModule,
|
NbTreeGridModule,
|
||||||
StatusTagModule,
|
TranslateModule,
|
||||||
FindigWidgetModule,
|
StatusTagModule,
|
||||||
RouterModule,
|
FindigWidgetModule,
|
||||||
NbMenuModule,
|
RouterModule,
|
||||||
FormsModule,
|
NbMenuModule,
|
||||||
NbListModule,
|
FormsModule,
|
||||||
FontAwesomeModule,
|
NbListModule,
|
||||||
FlexLayoutModule,
|
FontAwesomeModule,
|
||||||
NbActionsModule,
|
FlexLayoutModule,
|
||||||
CommonAppModule
|
NbActionsModule,
|
||||||
],
|
ObjectiveOverviewRoutingModule
|
||||||
|
],
|
||||||
exports: [
|
exports: [
|
||||||
ObjectiveHeaderComponent,
|
ObjectiveHeaderComponent,
|
||||||
ObjectiveCategoriesComponent,
|
ObjectiveCategoriesComponent,
|
||||||
ObjectiveTableComponent,
|
ObjectiveTableComponent,
|
||||||
// LoadingSpinnerComponent
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ObjectiveOverviewModule {
|
export class ObjectiveOverviewModule {
|
||||||
|
|
|
@ -53,7 +53,8 @@ export class PentestHeaderComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickRouteBack(): void {
|
onClickRouteBack(): void {
|
||||||
this.router.navigate([Route.PENTEST_OVERVIEW])
|
// ToDo: Change to Objective Overview after routing is fixed
|
||||||
|
this.router.navigate([Route.PROJECT_OVERVIEW])
|
||||||
.then(
|
.then(
|
||||||
() => {
|
() => {
|
||||||
this.store.dispatch(new ChangePentest(null));
|
this.store.dispatch(new ChangePentest(null));
|
||||||
|
|
|
@ -27,6 +27,7 @@ import {FindingDialogModule} from '@shared/modules/finding-dialog/finding-dialog
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
CommonAppModule,
|
||||||
RouterModule.forChild([{
|
RouterModule.forChild([{
|
||||||
path: '',
|
path: '',
|
||||||
component: PentestComponent
|
component: PentestComponent
|
||||||
|
@ -40,7 +41,6 @@ import {FindingDialogModule} from '@shared/modules/finding-dialog/finding-dialog
|
||||||
StatusTagModule,
|
StatusTagModule,
|
||||||
NbTabsetModule,
|
NbTabsetModule,
|
||||||
NbTreeGridModule,
|
NbTreeGridModule,
|
||||||
CommonAppModule,
|
|
||||||
SeverityTagModule,
|
SeverityTagModule,
|
||||||
FindingDialogModule
|
FindingDialogModule
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,7 @@ import {ProjectOverviewComponent} from './project-overview.component';
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: ProjectOverviewComponent
|
component: ProjectOverviewComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'id',
|
path: 'id',
|
||||||
|
|
|
@ -24,10 +24,10 @@ export class ProjectOverviewComponent implements OnInit {
|
||||||
projects$: BehaviorSubject<Project[]> = new BehaviorSubject<Project[]>([]);
|
projects$: BehaviorSubject<Project[]> = new BehaviorSubject<Project[]>([]);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private readonly projectService: ProjectService,
|
private readonly notificationService: NotificationService,
|
||||||
private readonly dialogService: DialogService,
|
private projectService: ProjectService,
|
||||||
private readonly projectDialogService: ProjectDialogService,
|
private dialogService: DialogService,
|
||||||
private readonly notificationService: NotificationService) {
|
private projectDialogService: ProjectDialogService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
@ -37,8 +37,8 @@ export class ProjectOverviewComponent implements OnInit {
|
||||||
loadProjects(): void {
|
loadProjects(): void {
|
||||||
this.projectService.getProjects()
|
this.projectService.getProjects()
|
||||||
.pipe(
|
.pipe(
|
||||||
untilDestroyed(this),
|
tap(() => this.loading$.next(true)),
|
||||||
tap(() => this.loading$.next(true))
|
untilDestroyed(this)
|
||||||
)
|
)
|
||||||
.subscribe({
|
.subscribe({
|
||||||
next: (projects: Project[]) => {
|
next: (projects: Project[]) => {
|
||||||
|
@ -72,8 +72,8 @@ export class ProjectOverviewComponent implements OnInit {
|
||||||
this.loadProjects();
|
this.loadProjects();
|
||||||
this.notificationService.showPopup('project.popup.save.success', PopupType.SUCCESS);
|
this.notificationService.showPopup('project.popup.save.success', PopupType.SUCCESS);
|
||||||
},
|
},
|
||||||
error: error => {
|
error: err => {
|
||||||
console.error(error);
|
console.error(err);
|
||||||
this.notificationService.showPopup('project.popup.save.failed', PopupType.FAILURE);
|
this.notificationService.showPopup('project.popup.save.failed', PopupType.FAILURE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -2,31 +2,32 @@ import {NgModule} from '@angular/core';
|
||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {ProjectOverviewComponent} from './project-overview.component';
|
import {ProjectOverviewComponent} from './project-overview.component';
|
||||||
import {ProjectOverviewRoutingModule} from './project-overview-routing.module';
|
import {ProjectOverviewRoutingModule} from './project-overview-routing.module';
|
||||||
import {NbButtonModule, NbCardModule, NbProgressBarModule, NbSpinnerModule} from '@nebular/theme';
|
import {NbButtonModule, NbCardModule, NbProgressBarModule} from '@nebular/theme';
|
||||||
import {FlexLayoutModule} from '@angular/flex-layout';
|
import {FlexLayoutModule} from '@angular/flex-layout';
|
||||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||||
import {TranslateModule} from '@ngx-translate/core';
|
import {TranslateModule} from '@ngx-translate/core';
|
||||||
import {DateTimeFormatPipe} from '@shared/pipes/date-time-format.pipe';
|
import {DateTimeFormatPipe} from '@shared/pipes/date-time-format.pipe';
|
||||||
import {ProjectDialogModule} from '@shared/modules/project-dialog/project-dialog.module';
|
import {ProjectDialogModule} from '@shared/modules/project-dialog/project-dialog.module';
|
||||||
import {CommonAppModule} from '../common-app.module';
|
import {CommonAppModule} from '../common-app.module';
|
||||||
|
import {ConfirmDialogModule} from '@shared/modules/confirm-dialog/confirm-dialog.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
ProjectOverviewComponent,
|
ProjectOverviewComponent,
|
||||||
DateTimeFormatPipe,
|
DateTimeFormatPipe
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
CommonAppModule,
|
||||||
NbCardModule,
|
NbCardModule,
|
||||||
NbButtonModule,
|
NbButtonModule,
|
||||||
NbSpinnerModule,
|
|
||||||
NbProgressBarModule,
|
NbProgressBarModule,
|
||||||
ProjectOverviewRoutingModule,
|
ProjectOverviewRoutingModule,
|
||||||
FlexLayoutModule,
|
FlexLayoutModule,
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
ProjectDialogModule,
|
ConfirmDialogModule,
|
||||||
CommonAppModule
|
ProjectDialogModule
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ProjectOverviewModule {
|
export class ProjectOverviewModule {
|
||||||
|
|
|
@ -5,9 +5,9 @@ import {ProjectComponent} from './project.component';
|
||||||
import {NbCardModule, NbLayoutModule} from '@nebular/theme';
|
import {NbCardModule, NbLayoutModule} from '@nebular/theme';
|
||||||
import {FlexLayoutModule} from '@angular/flex-layout';
|
import {FlexLayoutModule} from '@angular/flex-layout';
|
||||||
import {TranslateModule} from '@ngx-translate/core';
|
import {TranslateModule} from '@ngx-translate/core';
|
||||||
import {ProjectDialogModule} from '@shared/modules/project-dialog/project-dialog.module';
|
|
||||||
import {ProjectRoutingModule} from './project-routing.module';
|
import {ProjectRoutingModule} from './project-routing.module';
|
||||||
import {ObjectiveOverviewModule} from '../../objective-overview';
|
import {ObjectiveOverviewModule} from '../../objective-overview';
|
||||||
|
import {CommonAppModule} from '../../common-app.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -15,6 +15,7 @@ import {ObjectiveOverviewModule} from '../../objective-overview';
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
CommonAppModule,
|
||||||
NbCardModule,
|
NbCardModule,
|
||||||
NbLayoutModule,
|
NbLayoutModule,
|
||||||
RouterModule.forChild([{
|
RouterModule.forChild([{
|
||||||
|
@ -24,7 +25,6 @@ import {ObjectiveOverviewModule} from '../../objective-overview';
|
||||||
ProjectRoutingModule,
|
ProjectRoutingModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
FlexLayoutModule,
|
FlexLayoutModule,
|
||||||
ProjectDialogModule,
|
|
||||||
ObjectiveOverviewModule
|
ObjectiveOverviewModule
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
.dialog-header {
|
.dialog-header {
|
||||||
height: 6.75vh;
|
height: 6.75vh !important;
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
|
|
||||||
.dialog-headline {
|
.dialog-headline {
|
||||||
|
@ -8,11 +8,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-body {
|
.dialog-body {
|
||||||
font-size: 1.15rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dialog-button {
|
.dialog-button {
|
||||||
width: 5.25rem;
|
width: 5.75rem !important;
|
||||||
height: 2.5rem;
|
height: 2.15rem !important;
|
||||||
// font-size: 0.85rem;
|
text-transform: none !important;
|
||||||
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import {v4 as UUID} from 'uuid';
|
import {v4 as UUID} from 'uuid';
|
||||||
import {Severity} from '@shared/models/severity.enum';
|
|
||||||
|
|
||||||
export class Comment {
|
export class Comment {
|
||||||
id?: string;
|
id?: string;
|
||||||
|
|
|
@ -1 +1,4 @@
|
||||||
@import "../../../assets/@theme/styles/_dialog.scss";
|
@import "../../../assets/@theme/styles/_dialog.scss";
|
||||||
|
|
||||||
|
* {
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import { NgModule } from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {ConfirmDialogComponent} from '@shared/modules/confirm-dialog/confirm-dialog.component';
|
import {ConfirmDialogComponent} from '@shared/modules/confirm-dialog/confirm-dialog.component';
|
||||||
import {NbButtonModule, NbCardModule} from '@nebular/theme';
|
import {NbButtonModule, NbCardModule, NbLayoutModule, NbSelectModule} from '@nebular/theme';
|
||||||
import {FlexLayoutModule} from '@angular/flex-layout';
|
import {FlexLayoutModule} from '@angular/flex-layout';
|
||||||
import {TranslateModule} from '@ngx-translate/core';
|
import {TranslateModule} from '@ngx-translate/core';
|
||||||
|
import {CommonAppModule} from '../../../app/common-app.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -11,13 +12,17 @@ import {TranslateModule} from '@ngx-translate/core';
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
CommonAppModule,
|
||||||
NbCardModule,
|
NbCardModule,
|
||||||
NbButtonModule,
|
NbButtonModule,
|
||||||
FlexLayoutModule,
|
FlexLayoutModule,
|
||||||
TranslateModule
|
TranslateModule,
|
||||||
|
NbLayoutModule,
|
||||||
|
NbSelectModule
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
ConfirmDialogComponent
|
ConfirmDialogComponent
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class ConfirmDialogModule { }
|
export class ConfirmDialogModule {
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
import {Inject, Injectable, OnDestroy} from '@angular/core';
|
||||||
|
import {DOCUMENT} from '@angular/common';
|
||||||
|
import {Platform} from '@angular/cdk/platform';
|
||||||
|
import {NbOverlayContainerAdapter} from '@nebular/theme';
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class CustomOverlayContainer extends NbOverlayContainerAdapter implements OnDestroy {
|
||||||
|
// tslint:disable-next-line:variable-name
|
||||||
|
constructor(@Inject(DOCUMENT) document: Document, _platform: Platform) {
|
||||||
|
super(document, _platform);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected _createContainer(): void {
|
||||||
|
super._createContainer();
|
||||||
|
if (!this._containerElement) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const parent = document.body;
|
||||||
|
parent.appendChild(this._containerElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
super.ngOnDestroy();
|
||||||
|
this._containerElement = null;
|
||||||
|
}
|
||||||
|
}
|
|
@ -79,7 +79,7 @@
|
||||||
</label>
|
</label>
|
||||||
<nb-select class="severities" placeholder="{{formArray[1].placeholder | translate}} *"
|
<nb-select class="severities" placeholder="{{formArray[1].placeholder | translate}} *"
|
||||||
[(selected)]="formArray[1].controlsConfig[0].value"
|
[(selected)]="formArray[1].controlsConfig[0].value"
|
||||||
status="{{getSeverityFillStatus(formArray[1].controlsConfig[0].value)}}" filled>
|
shape="round" status="{{getSeverityFillStatus(formArray[1].controlsConfig[0].value)}}" filled>
|
||||||
<nb-option *ngFor="let severity of severityTexts" [value]="severity.value">
|
<nb-option *ngFor="let severity of severityTexts" [value]="severity.value">
|
||||||
{{ severity.translationText | translate }}
|
{{ severity.translationText | translate }}
|
||||||
</nb-option>
|
</nb-option>
|
||||||
|
|
|
@ -1,38 +1,48 @@
|
||||||
import { NgModule } from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {FindingDialogComponent} from '@shared/modules/finding-dialog/finding-dialog.component';
|
import {FindingDialogComponent} from '@shared/modules/finding-dialog/finding-dialog.component';
|
||||||
import {DialogService} from '@shared/services/dialog-service/dialog.service';
|
import {DialogService} from '@shared/services/dialog-service/dialog.service';
|
||||||
import {NbButtonModule, NbCardModule, NbDialogService, NbFormFieldModule, NbInputModule, NbSelectModule, NbTagModule} from '@nebular/theme';
|
import {
|
||||||
|
NbButtonModule,
|
||||||
|
NbCardModule,
|
||||||
|
NbDialogModule,
|
||||||
|
NbDialogService,
|
||||||
|
NbFormFieldModule,
|
||||||
|
NbInputModule,
|
||||||
|
NbSelectModule,
|
||||||
|
NbTagModule
|
||||||
|
} from '@nebular/theme';
|
||||||
import {FindingDialogService} from '@shared/modules/finding-dialog/service/finding-dialog.service';
|
import {FindingDialogService} from '@shared/modules/finding-dialog/service/finding-dialog.service';
|
||||||
import {FlexLayoutModule} from '@angular/flex-layout';
|
import {FlexLayoutModule} from '@angular/flex-layout';
|
||||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||||
import {TranslateModule} from '@ngx-translate/core';
|
import {TranslateModule} from '@ngx-translate/core';
|
||||||
|
import {CommonAppModule} from '../../../app/common-app.module';
|
||||||
import {ReactiveFormsModule} from '@angular/forms';
|
import {ReactiveFormsModule} from '@angular/forms';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
FindingDialogComponent
|
FindingDialogComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
NbCardModule,
|
CommonAppModule,
|
||||||
NbButtonModule,
|
NbCardModule,
|
||||||
NbFormFieldModule,
|
NbButtonModule,
|
||||||
NbInputModule,
|
NbFormFieldModule,
|
||||||
FlexLayoutModule,
|
NbInputModule,
|
||||||
FontAwesomeModule,
|
FlexLayoutModule,
|
||||||
TranslateModule,
|
FontAwesomeModule,
|
||||||
ReactiveFormsModule,
|
TranslateModule,
|
||||||
NbSelectModule,
|
NbSelectModule,
|
||||||
NbTagModule
|
NbTagModule,
|
||||||
],
|
ReactiveFormsModule,
|
||||||
|
],
|
||||||
providers: [
|
providers: [
|
||||||
DialogService,
|
|
||||||
FindingDialogService,
|
FindingDialogService,
|
||||||
NbDialogService
|
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
FindingDialogComponent
|
FindingDialogComponent
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class FindingDialogModule { }
|
export class FindingDialogModule {
|
||||||
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe('FindingDialogService', () => {
|
||||||
imports: [
|
imports: [
|
||||||
HttpClientTestingModule,
|
HttpClientTestingModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
NbDialogModule.forRoot()
|
NbDialogModule.forChild()
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: FindingDialogService, useClass: FindingDialogServiceMock},
|
{provide: FindingDialogService, useClass: FindingDialogServiceMock},
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {CommonModule} from '@angular/common';
|
import {CommonModule} from '@angular/common';
|
||||||
import {ProjectDialogComponent} from '@shared/modules/project-dialog/project-dialog.component';
|
import {ProjectDialogComponent} from '@shared/modules/project-dialog/project-dialog.component';
|
||||||
import {NbButtonModule, NbCardModule, NbDialogService, NbFormFieldModule, NbInputModule} from '@nebular/theme';
|
import {NbButtonModule, NbCardModule, NbFormFieldModule, NbInputModule} from '@nebular/theme';
|
||||||
import {FlexLayoutModule} from '@angular/flex-layout';
|
import {FlexLayoutModule} from '@angular/flex-layout';
|
||||||
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';
|
||||||
import {TranslateModule} from '@ngx-translate/core';
|
import {TranslateModule} from '@ngx-translate/core';
|
||||||
import {DialogService} from '@shared/services/dialog-service/dialog.service';
|
|
||||||
import {ReactiveFormsModule} from '@angular/forms';
|
|
||||||
import {ProjectDialogService} from '@shared/modules/project-dialog/service/project-dialog.service';
|
import {ProjectDialogService} from '@shared/modules/project-dialog/service/project-dialog.service';
|
||||||
|
import {CommonAppModule} from '../../../app/common-app.module';
|
||||||
|
import {ReactiveFormsModule} from '@angular/forms';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@ -15,6 +15,7 @@ import {ProjectDialogService} from '@shared/modules/project-dialog/service/proje
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
CommonAppModule,
|
||||||
NbCardModule,
|
NbCardModule,
|
||||||
NbButtonModule,
|
NbButtonModule,
|
||||||
NbFormFieldModule,
|
NbFormFieldModule,
|
||||||
|
@ -22,12 +23,10 @@ import {ProjectDialogService} from '@shared/modules/project-dialog/service/proje
|
||||||
FlexLayoutModule,
|
FlexLayoutModule,
|
||||||
FontAwesomeModule,
|
FontAwesomeModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
ReactiveFormsModule
|
ReactiveFormsModule,
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
DialogService,
|
|
||||||
ProjectDialogService,
|
ProjectDialogService,
|
||||||
NbDialogService
|
|
||||||
],
|
],
|
||||||
entryComponents: [
|
entryComponents: [
|
||||||
ProjectDialogComponent
|
ProjectDialogComponent
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe('ProjectDialogService', () => {
|
||||||
imports: [
|
imports: [
|
||||||
HttpClientTestingModule,
|
HttpClientTestingModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
NbDialogModule.forRoot()
|
NbDialogModule.forChild()
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: ProjectDialogService, useClass: ProjectDialogServiceMock},
|
{provide: ProjectDialogService, useClass: ProjectDialogServiceMock},
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe('DialogService', () => {
|
||||||
imports: [
|
imports: [
|
||||||
HttpClientTestingModule,
|
HttpClientTestingModule,
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
NbDialogModule.forRoot()
|
NbDialogModule.forChild()
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: DialogService, useClass: DialogServiceMock},
|
{provide: DialogService, useClass: DialogServiceMock},
|
||||||
|
|
Loading…
Reference in New Issue