aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/system/debug/debug.component.ts
blob: 8a77f79f753e8e7c65ca3d283814a8424081178e (plain) (blame)
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
import { Component, OnInit } from '@angular/core'
import { Notifier } from '@app/core'
import { Debug } from '@shared/models/server'
import { DebugService } from '@app/+admin/system/debug/debug.service'

@Component({
  templateUrl: './debug.component.html',
  styleUrls: [ './debug.component.scss' ]
})
export class DebugComponent implements OnInit {
  debug: Debug

  constructor (
    private debugService: DebugService,
    private notifier: Notifier
  ) {
  }

  ngOnInit (): void {
    this.load()
  }

  load () {
    this.debugService.getDebug()
        .subscribe(
          debug => this.debug = debug,

          err => this.notifier.error(err.message)
        )
  }
}