]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/blob
71160010a73f2953f1d614927a00b919382e9ab7
[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             (updateSelection)="updateSelection($event)">
9
10     <div class="table-actions btn-toolbar">
11       <cd-table-actions [permission]="permissions.cephfs"
12                         [selection]="selection"
13                         class="btn-group"
14                         id="cephfs-subvolume-actions"
15                         [tableActions]="tableActions">
16       </cd-table-actions>
17     </div>
18   </cd-table>
19 </ng-container>
20
21 <ng-template #quotaUsageTpl
22              let-row="row">
23   <cd-usage-bar *ngIf="row.info.bytes_pcent && row.info.bytes_pcent !== 'undefined'; else noLimitTpl"
24                 [total]="row.info.bytes_quota"
25                 [used]="row.info.bytes_used"
26                 [title]="row.name"
27                 [showFreeToolTip]="false"
28                 customLegend="Quota"
29                 [customLegendValue]="row.info.bytes_quota"
30                 decimals="2"></cd-usage-bar>
31
32   <ng-template #noLimitTpl>
33     <span ngbTooltip="Quota limit is not set"
34           *ngIf="row.info.bytes_pcent === 'undefined'"
35           i18n-ngbTooltip>
36       {{row.info.bytes_used | dimlessBinary}}</span>
37   </ng-template>
38 </ng-template>
39
40 <ng-template #typeTpl
41              let-value="value">
42   <cd-label [value]="value"></cd-label>
43 </ng-template>
44
45 <ng-template #modeToHumanReadableTpl
46              let-value="value">
47   <span *ngFor="let result of (value | octalToHumanReadable)"
48         [ngClass]="result.class"
49         [ngbTooltip]="result.toolTip">
50     {{ result.content }}
51   </span>
52 </ng-template>
53
54 <ng-template #nameTpl
55              let-row="row">
56   <span class="fw-bold">{{row.name}}</span>
57
58   <span *ngIf="row.info.state === 'complete'; else snapshotRetainedTpl">
59     <i [ngClass]="[icons.success, icons.large]"
60        ngbTooltip="{{row.name}} is ready to use"
61        class="text-success"></i>
62   </span>
63
64   <ng-template #snapshotRetainedTpl>
65     <i [ngClass]="[icons.warning, icons.large]"
66        class="text-warning"
67        ngbTooltip="{{row.name}} is removed after retaining the snapshots"></i>
68   </ng-template>
69
70   <cd-label [value]="row.info.type"
71             *ngIf="row.info.type !== 'subvolume'"></cd-label>
72
73   <cd-label value="namespaced"
74             *ngIf="row.info.pool_namespace"
75             [tooltipText]="row.info.pool_namespace"></cd-label>
76 </ng-template>
77
78 <ng-template #removeTmpl
79              let-form="form">
80   <ng-container [formGroup]="form">
81     <ng-container formGroupName="child">
82       <cd-alert-panel *ngIf="errorMessage.length > 1"
83                       type="error">
84               {{errorMessage}}
85       </cd-alert-panel>
86       <div class="form-group">
87         <div class="custom-control custom-checkbox">
88           <input type="checkbox"
89                  class="custom-control-input"
90                  name="retainSnapshots"
91                  id="retainSnapshots"
92                  formControlName="retainSnapshots">
93           <label class="custom-control-label"
94                  for="retainSnapshots"
95                  i18n>Retain snapshots <cd-helper>The subvolume can be removed retaining
96                   existing snapshots using this option.
97                    If snapshots are retained, the subvolume is considered empty for all
98                     operations not involving the retained snapshots.</cd-helper></label>
99         </div>
100       </div>
101     </ng-container>
102   </ng-container>
103 </ng-template>