]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/card-row/card-row.component.ts
add stop-gap to fix compat with CPUs not supporting SSE 4.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / dashboard-v3 / card-row / card-row.component.ts
1 import { Component, Input, OnChanges } from '@angular/core';
2 import { Icons } from '~/app/shared/enum/icons.enum';
3
4 @Component({
5 selector: 'cd-card-row',
6 templateUrl: './card-row.component.html',
7 styleUrls: ['./card-row.component.scss']
8 })
9 export class CardRowComponent implements OnChanges {
10 @Input()
11 title: string;
12
13 @Input()
14 link: string;
15
16 @Input()
17 data: any;
18
19 @Input()
20 summaryType = 'default';
21
22 icons = Icons;
23 total: number;
24
25 ngOnChanges(): void {
26 if (this.data.total || this.data.total === 0) {
27 this.total = this.data.total;
28 } else if (this.summaryType === 'iscsi') {
29 this.total = this.data.up + this.data.down || 0;
30 } else {
31 this.total = this.data;
32 }
33 }
34 }