diff options
Diffstat (limited to 'client/src/app/shared/shared-instance/instance-statistics.component.ts')
-rw-r--r-- | client/src/app/shared/shared-instance/instance-statistics.component.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/client/src/app/shared/shared-instance/instance-statistics.component.ts b/client/src/app/shared/shared-instance/instance-statistics.component.ts new file mode 100644 index 000000000..40aa8a4c0 --- /dev/null +++ b/client/src/app/shared/shared-instance/instance-statistics.component.ts | |||
@@ -0,0 +1,22 @@ | |||
1 | import { Component, OnInit } from '@angular/core' | ||
2 | import { ServerStats } from '@shared/models/server' | ||
3 | import { ServerService } from '@app/core' | ||
4 | |||
5 | @Component({ | ||
6 | selector: 'my-instance-statistics', | ||
7 | templateUrl: './instance-statistics.component.html', | ||
8 | styleUrls: [ './instance-statistics.component.scss' ] | ||
9 | }) | ||
10 | export class InstanceStatisticsComponent implements OnInit { | ||
11 | serverStats: ServerStats = null | ||
12 | |||
13 | constructor ( | ||
14 | private serverService: ServerService | ||
15 | ) { | ||
16 | } | ||
17 | |||
18 | ngOnInit () { | ||
19 | this.serverService.getServerStats() | ||
20 | .subscribe(res => this.serverStats = res) | ||
21 | } | ||
22 | } | ||