| "styles": [ | "styles": [ | ||||
| "@angular/material/prebuilt-themes/indigo-pink.css", | "@angular/material/prebuilt-themes/indigo-pink.css", | ||||
| "src/styles.scss", | "src/styles.scss", | ||||
| "node_modules/leaflet/dist/leaflet.css" | |||||
| "node_modules/leaflet/dist/leaflet.css", | |||||
| "node_modules/ngx-toastr/toastr.css" | |||||
| ], | ], | ||||
| "scripts": [], | "scripts": [], | ||||
| "allowedCommonJsDependencies": [ | "allowedCommonJsDependencies": [ |
| "@asymmetrik/ngx-leaflet": "^16.0.1", | "@asymmetrik/ngx-leaflet": "^16.0.1", | ||||
| "@asymmetrik/ngx-leaflet-markercluster": "^16.0.0", | "@asymmetrik/ngx-leaflet-markercluster": "^16.0.0", | ||||
| "leaflet": "^1.9.4", | "leaflet": "^1.9.4", | ||||
| "ngx-toastr": "^17.0.2", | |||||
| "rtsp-relay": "^1.8.0", | "rtsp-relay": "^1.8.0", | ||||
| "rxjs": "~7.8.0", | "rxjs": "~7.8.0", | ||||
| "rxjs-websockets": "^9.0.0", | "rxjs-websockets": "^9.0.0", |
| import {SharedModule} from "./shared/shared.module"; | import {SharedModule} from "./shared/shared.module"; | ||||
| import {HttpClientModule} from "@angular/common/http"; | import {HttpClientModule} from "@angular/common/http"; | ||||
| import {AppInitService} from "./shared/services/app-init.service"; | import {AppInitService} from "./shared/services/app-init.service"; | ||||
| import { ToastrModule } from 'ngx-toastr'; | |||||
| export function appInitializerFactory(appInitializerService: AppInitService): () => Promise<any> { | export function appInitializerFactory(appInitializerService: AppInitService): () => Promise<any> { | ||||
| return () => appInitializerService.initializeApp(); | return () => appInitializerService.initializeApp(); | ||||
| AppRoutingModule, | AppRoutingModule, | ||||
| BrowserAnimationsModule, | BrowserAnimationsModule, | ||||
| SharedModule, | SharedModule, | ||||
| HttpClientModule | |||||
| HttpClientModule, | |||||
| ToastrModule.forRoot(), // ToastrModule added | |||||
| ], | ], | ||||
| providers: [ | providers: [ | ||||
| import { Component, OnDestroy, OnInit } from '@angular/core'; | import { Component, OnDestroy, OnInit } from '@angular/core'; | ||||
| import {SocketService} from "../../../shared/services/socket.service"; | import {SocketService} from "../../../shared/services/socket.service"; | ||||
| import {Subscription} from "rxjs"; | import {Subscription} from "rxjs"; | ||||
| import {ToastrService} from "ngx-toastr"; | |||||
| @Component({ | @Component({ | ||||
| selector: 'app-overall-ground', | selector: 'app-overall-ground', | ||||
| private intervalId: any; | private intervalId: any; | ||||
| constructor(private socketService$: SocketService) { | |||||
| constructor( | |||||
| private socketService$: SocketService, | |||||
| private toastr: ToastrService | |||||
| ) { | |||||
| } | } | ||||
| ngOnInit() { | ngOnInit() { | ||||
| this.Sstate1 = this.state1 === 'ON';// alarm 12h | this.Sstate1 = this.state1 === 'ON';// alarm 12h | ||||
| this.Sstate2 = this.state2 === 'ON';// alarm 1h | this.Sstate2 = this.state2 === 'ON';// alarm 1h | ||||
| if (message.ready === '0'){ | |||||
| this.toastr.warning('System not ready', 'Warning', {timeOut: 5000}); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||