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