summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/core/context/context.component.html
blob: 63af29e13592891a365b9ceace0b6a2d00e76be0 (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
<ng-container *ngIf="{ ftMap: featureToggleMap$ | async, daemons: rgwDaemonService.daemons$ | async, selectedDaemon: rgwDaemonService.selectedDaemon$ | async } as data">
  <ng-container *ngIf="data.ftMap && data.ftMap.rgw && permissions.rgw.read && isRgwRoute && data.daemons.length > 1">
    <div class="cd-context-bar pt-3 pb-3">
      <span class="mr-1"
            i18n>Selected Object Gateway:</span>
      <div ngbDropdown
           placement="bottom-left"
           class="d-inline-block ml-2">
        <button ngbDropdownToggle
                class="btn btn-outline-info ctx-bar-selected-rgw-daemon"
                i18n-title
                title="Select Object Gateway">
          {{ data.selectedDaemon.id }} ( {{ data.selectedDaemon.zonegroup_name }} )
        </button>
        <div ngbDropdownMenu>
          <ng-container *ngFor="let daemon of data.daemons">
            <button ngbDropdownItem
                    class="ctx-bar-available-rgw-daemon"
                    (click)="onDaemonSelection(daemon)">
              {{ daemon.id }} ( {{ daemon.zonegroup_name }} )
            </button>
          </ng-container>
        </div>
      </div>
    </div>
  </ng-container>
</ng-container>