-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathapp.module.ts
154 lines (150 loc) · 6.45 KB
/
app.module.ts
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, Injectable, ErrorHandler } from '@angular/core';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
import { FormsModule } from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { UserComponent, UserExtraComponent } from './user/user.component';
import { LoginComponent } from './auth/login/login.component';
import { LogoutComponent } from './auth/logout/logout.component';
import { HomeComponent } from './home/home.component';
import { MyDeleteConfirmComponent } from './my-delete-confirm/my-delete-confirm.component';
import { MyExpireConfirmComponent } from './my-expire-confirm/my-expire-confirm.component';
import { TpsComponent } from './tps/tps.component';
import { ProjectComponent } from './project/project.component';
import { UsersComponent, MyStatusFilterPipe } from './admin/users/users.component';
import { AdminStatComponent} from './admin/stats/stats.component';
import { GroupsComponent } from './admin/groups/groups.component';
import { GroupComponent } from './admin/group/group.component';
import { ProjectsComponent as AdminProjectsComponent} from './admin/projects/projects.component';
import { ProjectComponent as AdminProjectComponent} from './admin/project/project.component';
import { MessagesComponent } from './admin/messages/messages.component';
import { DatabasesComponent } from './admin/databases/databases.component';
import { DatabaseComponent } from './database/database.component';
import { WebsitesComponent } from './admin/websites/websites.component';
import { LogsComponent } from './admin/logs/logs.component';
import { RegisterComponent } from './auth/register/register.component';
import { InfoComponent } from './info/info.component';
import { RegisteredInfoComponent } from "./info/RegisteredInfoComponent";
import { PendingApprovalInfoComponent } from "./info/PendingApprovalInfoComponent";
import { RenewInfoComponent } from "./info/RenewInfoComponent";
import { PwdResetConfirmInfoComponent } from "./info/PwdResetConfirmInfoComponent";
import { PluginDirective, PluginComponent, TestPluginComponent, GalaxyPluginComponent, DataAccessPluginComponent, PopulateHomePluginComponent, GenostackPluginComponent, QuotasPluginComponent, GomailPluginComponent, AdminQuotaExamplePluginComponent } from './plugin/plugin.component';
import { ProjectsComponent as UserProjectsComponent} from './user/projects/projects.component';
import { RegisteredComponent } from './callback/registered/registered.component';
import { PasswordResetConfirmComponent } from './callback/password-reset-confirm/password-reset-confirm.component';
import { UserExtendComponent } from './callback/user-extend/user-extend.component';
import { PendingAccountComponent } from './callback/pending-account/pending-account.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { CalendarModule, DateAdapter } from 'angular-calendar';
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
import { AuthInterceptor } from './auth/auth.service';
import { BasePluginComponent } from './plugin/base-plugin/base-plugin.component';
import { WindowWrapper, getWindow } from './windowWrapper.module';
import { AdminpluginComponent } from './admin/adminplugin/adminplugin.component';
import { FlashComponent } from './utils/flash/flash.component';
import { TagComponent } from './utils/tag/tag.component';
import { UserLogsComponent } from './user/userlogs.component';
import {TableModule} from 'primeng/table';
import { environment } from '../environments/environment';
import * as Sentry from "@sentry/browser";
if (environment.sentry) {
Sentry.init({
dsn: environment.sentry
});
}
@Injectable()
export class SentryErrorHandler implements ErrorHandler {
constructor() {}
handleError(error) {
if (!environment.sentry && !environment.production) {
console.log(error.originalError || error)
return
}
const eventId = Sentry.captureException(error.originalError || error);
Sentry.showReportDialog({ eventId });
}
}
@NgModule({
declarations: [
AppComponent,
UserComponent,
UserExtraComponent,
LoginComponent,
LogoutComponent,
HomeComponent,
MyDeleteConfirmComponent,
MyExpireConfirmComponent,
TpsComponent,
ProjectComponent,
UsersComponent,
AdminStatComponent,
GroupsComponent,
GroupComponent,
AdminProjectsComponent,
AdminProjectComponent,
UserProjectsComponent,
MessagesComponent,
DatabasesComponent,
DatabaseComponent,
WebsitesComponent,
LogsComponent,
RegisterComponent,
InfoComponent,
RegisteredInfoComponent,
PendingApprovalInfoComponent,
RenewInfoComponent,
PwdResetConfirmInfoComponent,
PluginComponent,
TestPluginComponent,
GalaxyPluginComponent,
DataAccessPluginComponent,
PopulateHomePluginComponent,
GenostackPluginComponent,
QuotasPluginComponent,
GomailPluginComponent,
PluginDirective,
MyStatusFilterPipe,
RegisteredComponent,
PasswordResetConfirmComponent,
UserExtendComponent,
PendingAccountComponent,
BasePluginComponent,
AdminpluginComponent,
AdminQuotaExamplePluginComponent,
FlashComponent,
TagComponent,
UserLogsComponent
],
imports: [
BrowserModule,
NgbModule,
HttpClientModule,
AppRoutingModule,
FormsModule,
BrowserAnimationsModule,
TableModule,
CalendarModule.forRoot({
provide: DateAdapter,
useFactory: adapterFactory
})
],
providers: [
{provide: WindowWrapper, useFactory: getWindow, multi: true},
{provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true},
{ provide: ErrorHandler, useClass: SentryErrorHandler }
],
bootstrap: [AppComponent],
entryComponents: [
TestPluginComponent,
GalaxyPluginComponent,
DataAccessPluginComponent,
PopulateHomePluginComponent,
GenostackPluginComponent,
QuotasPluginComponent,
GomailPluginComponent,
AdminQuotaExamplePluginComponent
]
})
export class AppModule { }