]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/blob
7ecb3faae8013fe8add94393c307af6a1bba5d5a
[ceph-ci.git] /
1 <ng-container *ngIf="subVolumes$ | async as subVolumes">
2   <cd-table [data]="subVolumes"
3             columnMode="flex"
4             [columns]="columns"
5             selectionType="single"
6             [hasDetails]="false">
7   </cd-table>
8 </ng-container>
9
10 <ng-template #quotaUsageTpl
11              let-row="row">
12   <cd-usage-bar *ngIf="row.info.bytes_pcent && row.info.bytes_pcent !== 'undefined'; else noLimitTpl"
13                 [total]="row.info.bytes_quota"
14                 [used]="row.info.bytes_pcent"
15                 [title]="row.name"
16                 [calculatePerc]="false"
17                 customLegend="Quota"
18                 [customLegendValue]="row.info.bytes_quota"
19                 decimals="2"></cd-usage-bar>
20
21   <ng-template #noLimitTpl>
22     <span ngbTooltip="Quota limit is not set"
23           *ngIf="row.info.bytes_pcent === 'undefined'"
24           i18n-ngbTooltip>
25       {{row.info.bytes_used | dimlessBinary}}</span>
26   </ng-template>
27 </ng-template>
28
29 <ng-template #typeTpl
30              let-value="value">
31   <cd-label [value]="value"></cd-label>
32 </ng-template>
33
34 <ng-template #modeToHumanReadableTpl
35              let-value="value">
36   <span *ngFor="let result of (value | octalToHumanReadable)"
37         [ngClass]="result.class"
38         [ngbTooltip]="result.toolTip">
39     {{ result.content }}
40   </span>
41 </ng-template>
42
43 <ng-template #nameTpl
44              let-row="row">
45   <span class="fw-bold">{{row.name}}</span>
46
47   <span *ngIf="row.info.state === 'complete'; else snapshotRetainedTpl">
48     <i [ngClass]="[icons.success, icons.large]"
49        ngbTooltip="{{row.name}} is ready to use"
50        class="text-success"></i>
51   </span>
52
53   <ng-template #snapshotRetainedTpl>
54     <i [ngClass]="[icons.warning, icons.large]"
55        class="text-warning"
56        ngbTooltip="{{row.name}} is removed after retaining the snapshots"></i>
57   </ng-template>
58
59   <cd-label [value]="row.info.type"
60             *ngIf="row.info.type !== 'subvolume'"></cd-label>
61
62   <cd-label value="namespaced"
63             *ngIf="row.info.pool_namespace"
64             [tooltipText]="row.info.pool_namespace"></cd-label>
65 </ng-template>