2020-03-10 15:57:02 +01:00
|
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
|
|
import { NgModule } from '@angular/core';
|
2020-03-14 03:11:05 +01:00
|
|
|
import { HttpClientModule, HttpClientXsrfModule } from '@angular/common/http';
|
2020-03-10 15:57:02 +01:00
|
|
|
|
2020-03-11 03:51:50 +01:00
|
|
|
import { MatTableModule } from '@angular/material/table';
|
|
|
|
import { MatPaginatorModule } from '@angular/material/paginator';
|
|
|
|
import { MatSortModule } from '@angular/material/sort';
|
2020-03-11 16:01:11 +01:00
|
|
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
2020-03-16 17:11:27 +01:00
|
|
|
import { MatCardModule } from '@angular/material/card';
|
|
|
|
import { FlexLayoutModule } from '@angular/flex-layout';
|
2020-03-11 21:00:59 +01:00
|
|
|
|
|
|
|
import { AppRoutingModule } from './app-routing.module';
|
|
|
|
import { AppComponent } from './app.component';
|
2020-03-16 17:11:27 +01:00
|
|
|
|
2020-03-11 21:00:59 +01:00
|
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
2020-03-16 17:11:27 +01:00
|
|
|
import { StatusListComponent } from './list/status-list/status-list.component';
|
|
|
|
import { FolderListComponent } from './list/folder-list/folder-list.component';
|
|
|
|
import { DeviceListComponent } from './list/device-list/device-list.component';
|
|
|
|
import { DonutChartComponent } from './chart/donut-chart/donut-chart.component';
|
|
|
|
import { DeviceChartComponent } from './chart/device-chart/device-chart.component';
|
|
|
|
import { FolderChartComponent } from './chart/folder-chart/folder-chart.component';
|
|
|
|
import { DashboardComponent } from './dashboard/dashboard.component';
|
2020-03-20 00:00:28 +01:00
|
|
|
import { ListToggleComponent } from './list-toggle/list-toggle.component';
|
2020-03-16 17:11:27 +01:00
|
|
|
|
2020-03-15 17:33:21 +01:00
|
|
|
import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';
|
|
|
|
import { InMemoryConfigDataService } from './in-memory-config-data.service';
|
2020-03-16 17:11:27 +01:00
|
|
|
|
2020-03-15 01:06:35 +01:00
|
|
|
import { deviceID } from './api-utils';
|
2020-03-15 22:01:19 +01:00
|
|
|
import { environment } from '../environments/environment';
|
2020-03-20 00:00:28 +01:00
|
|
|
import { ChartItemComponent } from './chart/chart-item/chart-item.component';
|
2020-03-10 15:57:02 +01:00
|
|
|
|
|
|
|
@NgModule({
|
|
|
|
declarations: [
|
2020-03-11 03:51:50 +01:00
|
|
|
AppComponent,
|
|
|
|
StatusListComponent,
|
2020-03-11 21:00:59 +01:00
|
|
|
FolderListComponent,
|
|
|
|
DeviceListComponent,
|
2020-03-20 00:00:28 +01:00
|
|
|
ListToggleComponent,
|
2020-03-15 22:01:19 +01:00
|
|
|
DashboardComponent,
|
2020-03-16 03:07:11 +01:00
|
|
|
DonutChartComponent,
|
2020-03-16 17:11:27 +01:00
|
|
|
DeviceChartComponent,
|
|
|
|
FolderChartComponent,
|
2020-03-20 00:00:28 +01:00
|
|
|
ChartItemComponent,
|
2020-03-10 15:57:02 +01:00
|
|
|
],
|
|
|
|
imports: [
|
|
|
|
BrowserModule,
|
2020-03-11 03:51:50 +01:00
|
|
|
AppRoutingModule,
|
|
|
|
BrowserAnimationsModule,
|
|
|
|
MatTableModule,
|
|
|
|
MatPaginatorModule,
|
|
|
|
MatSortModule,
|
2020-03-14 03:11:05 +01:00
|
|
|
MatButtonToggleModule,
|
2020-03-16 17:11:27 +01:00
|
|
|
MatCardModule,
|
|
|
|
FlexLayoutModule,
|
2020-03-14 03:11:05 +01:00
|
|
|
HttpClientModule,
|
|
|
|
HttpClientXsrfModule.withOptions({
|
|
|
|
headerName: 'X-CSRF-Token-' + deviceID(),
|
|
|
|
cookieName: 'CSRF-Token-' + deviceID(),
|
2020-03-15 17:33:21 +01:00
|
|
|
}),
|
|
|
|
environment.production ?
|
2020-03-19 00:38:06 +01:00
|
|
|
[] : HttpClientInMemoryWebApiModule.forRoot(InMemoryConfigDataService,
|
|
|
|
{ dataEncapsulation: false, delay: 200 }),
|
2020-03-10 15:57:02 +01:00
|
|
|
],
|
|
|
|
providers: [],
|
|
|
|
bootstrap: [AppComponent]
|
|
|
|
})
|
2020-03-14 03:11:05 +01:00
|
|
|
|
2020-03-10 15:57:02 +01:00
|
|
|
export class AppModule { }
|
2020-03-14 03:11:05 +01:00
|
|
|
|
|
|
|
|