aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-instance/instance-statistics.component.ts
blob: 0618efe699f0df3184cea7c572c22e1c2a8ea890 (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
import { Component, OnInit } from '@angular/core'
import { ServerStats } from '@shared/models/server'
import { ServerService } from '@app/core'

@Component({
  selector: 'my-instance-statistics',
  templateUrl: './instance-statistics.component.html',
  styleUrls: [ './instance-statistics.component.scss' ]
})
export class InstanceStatisticsComponent implements OnInit {
  serverStats: ServerStats = null

  constructor (
    private serverService: ServerService
  ) {
  }

  ngOnInit () {
    this.serverService.getServerStats()
        .subscribe(res => {
          this.serverStats = res
        })
  }
}