Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import {BrowserModule} from '@angular/platform-browser';
import {BrowserAnimationsModule} from "@angular/platform-browser/animations";
import {APP_INITIALIZER, NgModule} from '@angular/core';
import {NgbModule} from "@ng-bootstrap/ng-bootstrap";
import {HttpClientModule} from "@angular/common/http";
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {EnvServiceProvider} from "./env/env.service.provider";
import {ConfigurationService} from "./env/configuration.service";
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {SettingsComponent} from './settings/settings.component';
import {TilesComponent} from './tiles/tiles.component';
import {CalibratorsComponent} from './calibrators/calibrators.component';
import {ProductsComponent} from './products/products.component';
import {JobspecsComponent} from './jobspecs/jobspecs.component';
import {ExecutionsComponent} from './executions/executions.component';
import {TileComponent} from './tiles/tile/tile.component';
import {CalibratorComponent} from './calibrators/calibrator/calibrator.component';
import {ProductComponent} from './products/product/product.component';
import {JobspecComponent} from './jobspecs/jobspec/jobspec.component';
import {ExecutionComponent} from './executions/execution/execution.component';
import {FileeditorComponent} from './fileeditor/fileeditor.component';
import {ContentEditableDirective} from './directives/content-editable.directive';
import {AlertComponent} from './alert/alert.component';
import {HomeComponent} from './home/home.component';
import {JobspecDetailComponent} from './jobspecs/jobspec/jobspec-detail/jobspec-detail.component';
import {ProductVersionComponent} from './products/product/product-details/product-version/product-version.component';
import {ProductDetailsComponent} from './products/product/product-details/product-details.component';
import {ProductPrerequsitesComponent} from './products/product/product-details/product-prerequsites/product-prerequsites.component';
import {JobspecTargetComponent} from './jobspecs/jobspec/jobspec-detail/jobspec-target/jobspec-target.component';
import {JobspecInputComponent} from './jobspecs/jobspec/jobspec-detail/jobspec-input/jobspec-input.component';
import {JobspecExecutionComponent} from './jobspecs/jobspec/jobspec-detail/jobspec-execution/jobspec-execution.component';
import {ExecutionDetailComponent} from './executions/execution/execution-detail/execution-detail.component';
import {FontAwesomeModule} from "@fortawesome/angular-fontawesome";
import {LoadingComponent} from './loading/loading.component';
import {QueueSettingsComponent} from './settings/queue-settings/queue-settings.component';
/*
We will 'provide' this function below to load and set the global configuration from the
configuration.service before the app loads using APP_INITIALIZER.
This function (and the configuration.service method it calls) must return a promise.
Angular will wait for the promise to resolve before loading the app.
*/
export function init_app(configService: ConfigurationService) {
return () => configService.getSettings();
}
@NgModule({
declarations: [
AppComponent,
SettingsComponent,
TilesComponent,
CalibratorsComponent,
ProductsComponent,
JobspecsComponent,
ExecutionsComponent,
TileComponent,
CalibratorComponent,
ProductComponent,
JobspecComponent,
ExecutionComponent,
FileeditorComponent,
ContentEditableDirective,
AlertComponent,
HomeComponent,
JobspecDetailComponent,
ProductVersionComponent,
ProductDetailsComponent,
ProductPrerequsitesComponent,
JobspecTargetComponent,
JobspecInputComponent,
JobspecExecutionComponent,
ExecutionDetailComponent,
LoadingComponent,
QueueSettingsComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
AppRoutingModule,
NgbModule,
HttpClientModule,
ReactiveFormsModule,
FormsModule,
FontAwesomeModule
],
providers: [EnvServiceProvider, {
provide: APP_INITIALIZER,
useFactory: init_app,
deps: [ConfigurationService],
multi: true
}],
bootstrap: [AppComponent]
})
export class AppModule {
}