summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-details/rgw-user-details.component.html
blob: 2283f4c546f053982c7def5fbd5d9937c9abc555 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<ng-container *ngIf="selection">
  <ul ngbNav
      #nav="ngbNav"
      class="nav-tabs"
      cdStatefulTab="rgw-user-details">
    <li ngbNavItem="details">
      <a ngbNavLink
         i18n>Details</a>
      <ng-template ngbNavContent>
        <div *ngIf="user">
          <table class="table table-striped table-bordered">
            <tbody>
              <tr>
                <td i18n
                    class="bold w-25">Tenant</td>
                <td class="w-75">{{ user.tenant }}</td>
              </tr>
              <tr>
                <td i18n
                    class="bold w-25">User ID</td>
                <td class="w-75">{{ user.user_id }}</td>
              </tr>
              <tr>
                <td i18n
                    class="bold w-25">Username</td>
                <td class="w-75">{{ user.uid }}</td>
              </tr>
              <tr>
                <td i18n
                    class="bold">Full name</td>
                <td>{{ user.display_name }}</td>
              </tr>
              <tr *ngIf="user.email?.length">
                <td i18n
                    class="bold">Email address</td>
                <td>{{ user.email }}</td>
              </tr>
              <tr>
                <td i18n
                    class="bold">Suspended</td>
                <td>{{ user.suspended | booleanText }}</td>
              </tr>
              <tr>
                <td i18n
                    class="bold">System</td>
                <td>{{ user.system === 'true' | booleanText }}</td>
              </tr>
              <tr>
                <td i18n
                    class="bold">Maximum buckets</td>
                <td>{{ user.max_buckets | map:maxBucketsMap }}</td>
              </tr>
              <tr *ngIf="user.subusers && user.subusers.length">
                <td i18n
                    class="bold">Subusers</td>
                <td>
                  <div *ngFor="let subuser of user.subusers">
                    {{ subuser.id }} ({{ subuser.permissions }})
                  </div>
                </td>
              </tr>
              <tr *ngIf="user.caps && user.caps.length">
                <td i18n
                    class="bold">Capabilities</td>
                <td>
                  <div *ngFor="let cap of user.caps">
                    {{ cap.type }} ({{ cap.perm }})
                  </div>
                </td>
              </tr>
              <tr *ngIf="user.mfa_ids?.length">
                <td i18n
                    class="bold">MFAs(Id)</td>
                <td>{{ user.mfa_ids | join}}</td>
              </tr>
            </tbody>
          </table>

          <!-- User quota -->
          <div *ngIf="user.user_quota">
            <legend i18n>User quota</legend>
            <table class="table table-striped table-bordered">
              <tbody>
                <tr>
                  <td i18n
                      class="bold w-25">Enabled</td>
                  <td class="w-75">{{ user.user_quota.enabled | booleanText }}</td>
                </tr>
                <tr>
                  <td i18n
                      class="bold">Maximum size</td>
                  <td *ngIf="!user.user_quota.enabled">-</td>
                  <td *ngIf="user.user_quota.enabled && user.user_quota.max_size <= -1"
                      i18n>Unlimited</td>
                  <td *ngIf="user.user_quota.enabled && user.user_quota.max_size > -1">
                    {{ user.user_quota.max_size | dimlessBinary }}
                  </td>
                </tr>
                <tr>
                  <td i18n
                      class="bold">Maximum objects</td>
                  <td *ngIf="!user.user_quota.enabled">-</td>
                  <td *ngIf="user.user_quota.enabled && user.user_quota.max_objects <= -1"
                      i18n>Unlimited</td>
                  <td *ngIf="user.user_quota.enabled && user.user_quota.max_objects > -1">
                    {{ user.user_quota.max_objects }}
                  </td>
                </tr>
              </tbody>
            </table>
          </div>

          <!-- Bucket quota -->
          <div *ngIf="user.bucket_quota">
            <legend i18n>Bucket quota</legend>
            <table class="table table-striped table-bordered">
              <tbody>
                <tr>
                  <td i18n
                      class="bold w-25">Enabled</td>
                  <td class="w-75">{{ user.bucket_quota.enabled | booleanText }}</td>
                </tr>
                <tr>
                  <td i18n
                      class="bold">Maximum size</td>
                  <td *ngIf="!user.bucket_quota.enabled">-</td>
                  <td *ngIf="user.bucket_quota.enabled && user.bucket_quota.max_size <= -1"
                      i18n>Unlimited</td>
                  <td *ngIf="user.bucket_quota.enabled && user.bucket_quota.max_size > -1">
                    {{ user.bucket_quota.max_size | dimlessBinary }}
                  </td>
                </tr>
                <tr>
                  <td i18n
                      class="bold">Maximum objects</td>
                  <td *ngIf="!user.bucket_quota.enabled">-</td>
                  <td *ngIf="user.bucket_quota.enabled && user.bucket_quota.max_objects <= -1"
                      i18n>Unlimited</td>
                  <td *ngIf="user.bucket_quota.enabled && user.bucket_quota.max_objects > -1">
                    {{ user.bucket_quota.max_objects }}
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </ng-template>
    </li>
    <li ngbNavItem="keys"
        *ngIf="keys.length">
      <a ngbNavLink
         i18n>Keys</a>
      <ng-template ngbNavContent>
        <cd-table [data]="keys"
                  [columns]="keysColumns"
                  columnMode="flex"
                  selectionType="multi"
                  forceIdentifier="true"
                  (updateSelection)="updateKeysSelection($event)">
          <div class="table-actions">
            <div class="btn-group"
                 dropdown>
              <button type="button"
                      class="btn btn-accent"
                      [disabled]="!keysSelection.hasSingleSelection"
                      (click)="showKeyModal()">
                <i [ngClass]="[icons.show]"></i>
                <ng-container i18n>Show</ng-container>
              </button>
            </div>
          </div>
        </cd-table>
      </ng-template>
    </li>
  </ul>

  <div [ngbNavOutlet]="nav"></div>
</ng-container>