2017-07-24 19:10:59 +03:00
|
|
|
import { Component } from '@angular/core';
|
2017-07-14 19:46:28 +03:00
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'ngx-traffic',
|
|
|
|
|
styleUrls: ['./traffic.component.scss'],
|
|
|
|
|
template: `
|
2017-08-01 17:42:21 +03:00
|
|
|
<nb-card size="xsmall">
|
|
|
|
|
<nb-card-header>
|
2017-07-24 19:10:59 +03:00
|
|
|
<span>Traffic Consumption</span>
|
|
|
|
|
<div class="ghost-dropdown" ngbDropdown>
|
|
|
|
|
<button type="button" class="btn btn-sm btn-primary" ngbDropdownToggle>
|
|
|
|
|
{{ type }}
|
|
|
|
|
</button>
|
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
|
<li class="dropdown-item" *ngFor="let t of types" (click)="type = t">{{ t }}</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2017-08-01 17:42:21 +03:00
|
|
|
</nb-card-header>
|
|
|
|
|
<nb-card-body class="p-0">
|
2017-07-24 19:10:59 +03:00
|
|
|
<ngx-traffic-chart></ngx-traffic-chart>
|
2017-08-01 17:42:21 +03:00
|
|
|
</nb-card-body>
|
|
|
|
|
</nb-card>
|
2017-07-14 19:46:28 +03:00
|
|
|
`,
|
|
|
|
|
})
|
|
|
|
|
export class TrafficComponent {
|
2017-07-24 19:10:59 +03:00
|
|
|
type: string = 'month';
|
|
|
|
|
types = ['week', 'month', 'year'];
|
2017-07-14 19:46:28 +03:00
|
|
|
}
|