Reorganize client shared modules
[oweals/peertube.git] / client / src / app / +admin / system / debug / debug.component.ts
1 import { Component, OnInit } from '@angular/core'
2 import { Notifier } from '@app/core'
3 import { Debug } from '@shared/models'
4 import { DebugService } from './debug.service'
5
6 @Component({
7   templateUrl: './debug.component.html',
8   styleUrls: [ './debug.component.scss' ]
9 })
10 export class DebugComponent implements OnInit {
11   debug: Debug
12
13   constructor (
14     private debugService: DebugService,
15     private notifier: Notifier
16   ) {
17   }
18
19   ngOnInit (): void {
20     this.load()
21   }
22
23   load () {
24     this.debugService.getDebug()
25         .subscribe(
26           debug => this.debug = debug,
27
28           err => this.notifier.error(err.message)
29         )
30   }
31 }