]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/blob
53aa454e4cb6a6cc91c449c763bd01128bc8500c
[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             (fetchData)="fetchData()">
8
9     <div class="table-actions btn-toolbar">
10       <cd-table-actions [permission]="permissions.cephfs"
11                         [selection]="selection"
12                         class="btn-group"
13                         id="cephfs-subvolume-actions"
14                         [tableActions]="tableActions">
15       </cd-table-actions>
16     </div>
17   </cd-table>
18 </ng-container>
19
20 <ng-template #quotaUsageTpl
21              let-row="row">
22   <cd-usage-bar *ngIf="row.info.bytes_pcent && row.info.bytes_pcent !== 'undefined'; else noLimitTpl"
23                 [total]="row.info.bytes_quota"
24                 [used]="row.info.bytes_pcent"
25                 [title]="row.name"
26                 [calculatePerc]="false"
27                 customLegend="Quota"
28                 [customLegendValue]="row.info.bytes_quota"
29                 decimals="2"></cd-usage-bar>
30
31   <ng-template #noLimitTpl>
32     <span ngbTooltip="Quota limit is not set"
33           *ngIf="row.info.bytes_pcent === 'undefined'"
34           i18n-ngbTooltip>
35       {{row.info.bytes_used | dimlessBinary}}</span>
36   </ng-template>
37 </ng-template>
38
39 <ng-template #typeTpl
40              let-value="value">
41   <cd-label [value]="value"></cd-label>
42 </ng-template>
43
44 <ng-template #modeToHumanReadableTpl
45              let-value="value">
46   <span *ngFor="let result of (value | octalToHumanReadable)"
47         [ngClass]="result.class"
48         [ngbTooltip]="result.toolTip">
49     {{ result.content }}
50   </span>
51 </ng-template>
52
53 <ng-template #nameTpl
54              let-row="row">
55   <span class="fw-bold">{{row.name}}</span>
56
57   <span *ngIf="row.info.state === 'complete'; else snapshotRetainedTpl">
58     <i [ngClass]="[icons.success, icons.large]"
59        ngbTooltip="{{row.name}} is ready to use"
60        class="text-success"></i>
61   </span>
62
63   <ng-template #snapshotRetainedTpl>
64     <i [ngClass]="[icons.warning, icons.large]"
65        class="text-warning"
66        ngbTooltip="{{row.name}} is removed after retaining the snapshots"></i>
67   </ng-template>
68
69   <cd-label [value]="row.info.type"
70             *ngIf="row.info.type !== 'subvolume'"></cd-label>
71
72   <cd-label value="namespaced"
73             *ngIf="row.info.pool_namespace"
74             [tooltipText]="row.info.pool_namespace"></cd-label>
75 </ng-template>