]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/blob
a1e063e6d1bc6b4a98de65445beaf472e2517c73
[ceph-ci.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                 decimals="2"></cd-usage-bar>
37
38   <ng-template #noLimitTpl>
39     <span ngbTooltip="Quota limit is not set"
40           *ngIf="row.info.bytes_pcent === 'undefined'"
41           i18n-ngbTooltip>
42       {{row.info.bytes_used | dimlessBinary}}</span>
43   </ng-template>
44 </ng-template>
45
46 <ng-template #typeTpl
47              let-value="data.value">
48   <cd-label [value]="value"></cd-label>
49 </ng-template>
50
51 <ng-template #modeToHumanReadableTpl
52              let-value="data.value">
53   <span *ngFor="let result of (value | octalToHumanReadable)"
54         [ngClass]="result.class"
55         [ngbTooltip]="result.toolTip">
56     {{ result.content }}
57   </span>
58 </ng-template>
59
60 <ng-template #nameTpl
61              let-row="data.row">
62   <span class="fw-bold">{{row.name}}</span>
63
64   <span *ngIf="row?.info?.state === 'complete'; else snapshotRetainedTpl">
65     <i [ngClass]="[icons.success, icons.large]"
66        ngbTooltip="{{row.name}} is ready to use"
67        class="text-success"></i>
68   </span>
69
70   <ng-template #snapshotRetainedTpl>
71     <i [ngClass]="[icons.warning, icons.large]"
72        class="text-warning"
73        ngbTooltip="{{row.name}} is removed after retaining the snapshots"></i>
74   </ng-template>
75
76   <cd-label [value]="row?.info?.type"
77             *ngIf="row?.info?.type !== 'subvolume'"></cd-label>
78
79   <cd-label value="namespaced"
80             *ngIf="row?.info?.pool_namespace"
81             [tooltipText]="row?.info?.pool_namespace"></cd-label>
82 </ng-template>
83
84 <ng-template #removeTmpl
85              let-form="form">
86   <ng-container [formGroup]="form">
87     <ng-container formGroupName="child">
88       <cd-alert-panel *ngIf="errorMessage.length > 1"
89                       type="error">
90               {{errorMessage}}
91       </cd-alert-panel>
92       <div class="form-group">
93         <div class="custom-control custom-checkbox">
94           <input type="checkbox"
95                  class="custom-control-input"
96                  name="retainSnapshots"
97                  id="retainSnapshots"
98                  formControlName="retainSnapshots">
99           <label class="custom-control-label"
100                  for="retainSnapshots"
101                  i18n>Retain snapshots <cd-helper>The subvolume can be removed retaining
102                   existing snapshots using this option.
103                    If snapshots are retained, the subvolume is considered empty for all
104                     operations not involving the retained snapshots.</cd-helper></label>
105         </div>
106       </div>
107     </ng-container>
108   </ng-container>
109 </ng-template>