diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-11 10:56:29 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-11 10:58:09 +0200 |
commit | 5d79474cc66383ecbfcef6366f63a34c3af21cbf (patch) | |
tree | 6b2cd85c25294ca04c94cbbcc90353d25e9cee06 /client/src/app/+admin/system/debug/debug.component.ts | |
parent | 2b3f1919fda81c2781ceeb9071d426c184e1b21c (diff) | |
download | PeerTube-5d79474cc66383ecbfcef6366f63a34c3af21cbf.tar.gz PeerTube-5d79474cc66383ecbfcef6366f63a34c3af21cbf.tar.zst PeerTube-5d79474cc66383ecbfcef6366f63a34c3af21cbf.zip |
Add debug component to help admins to fix IP issues
Diffstat (limited to 'client/src/app/+admin/system/debug/debug.component.ts')
-rw-r--r-- | client/src/app/+admin/system/debug/debug.component.ts | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/client/src/app/+admin/system/debug/debug.component.ts b/client/src/app/+admin/system/debug/debug.component.ts new file mode 100644 index 000000000..8a77f79f7 --- /dev/null +++ b/client/src/app/+admin/system/debug/debug.component.ts | |||
@@ -0,0 +1,31 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | ||
2 | import { Notifier } from '@app/core' | ||
3 | import { Debug } from '@shared/models/server' | ||
4 | import { DebugService } from '@app/+admin/system/debug/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 | } | ||