Skip to content

Commit

Permalink
fix(speed-diff): make value human-readable
Browse files Browse the repository at this point in the history
  • Loading branch information
ElonH committed May 29, 2020
1 parent 43bcaba commit fdecc54
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/pages/jobs/speed-chart/speed-diff.component.ts
@@ -1,9 +1,10 @@
import { Component, OnInit, Input } from '@angular/core';
import { FormatBytes } from 'src/app/utils/format-bytes';

@Component({
selector: 'jobs-speed-diff',
template: `
<span> {{ val }} </span>
<span> {{ (val < 0 ? '-' + FormatBytes(-val) : FormatBytes(val)) + '/s' }} </span>
<nb-icon
[icon]="'arrow-' + (val < 0 ? 'down' : 'up')"
[status]="val < 0 ? 'danger' : 'success'"
Expand All @@ -23,6 +24,8 @@ export class SpeedDiffComponent implements OnInit {
@Input()
val = 0;

FormatBytes = FormatBytes;

constructor() {}

ngOnInit() {}
Expand Down

0 comments on commit fdecc54

Please sign in to comment.