InputModule,
ModalModule,
TreeviewModule,
- ListModule
+ ListModule,
+ ToggletipModule
} from 'carbon-components-angular';
import {
ButtonModule,
InputModule,
ModalModule,
- ListModule
+ ListModule,
+ ToggletipModule
],
declarations: [
- HostsComponent,
MonitorComponent,
ConfigurationComponent,
OsdListComponent,
MultiClusterComponent,
MultiClusterFormComponent,
MultiClusterListComponent,
- MultiClusterDetailsComponent
+ MultiClusterDetailsComponent,
+ HostsComponent
],
providers: [NgbActiveModal]
})
i18n-aria-label
id="clusterStatus">
<div class="d-flex flex-column justify-content-center align-items-center">
- <ng-template #healthChecks>
- <cd-health-checks [healthData]="healthData.health.checks"></cd-health-checks>
- </ng-template>
<ng-template #healthWarningAndError>
- <div class="info-card-content-clickable mt-1"
- [ngStyle]="healthData.health.status | healthColor"
- [ngbPopover]="healthChecks"
- popoverClass="info-card-popover-cluster-status">
+ <cds-toggletip [ngStyle]="healthData.health.status | healthColor"
+ [dropShadow]="true"
+ [autoAlign]="true"
+ class="info-card-content-clickable mt-1">
+ <div cdsToggletipButton>
{{ healthData.health.status | healthLabel | uppercase }}
- <i *ngIf="healthData.health?.status !== 'HEALTH_OK'"
- class="fa fa-exclamation-triangle"></i>
- </div></ng-template>
+ <i *ngIf="healthData.health?.status !== 'HEALTH_OK'"
+ class="fa fa-exclamation-triangle">
+ </i>
+ </div>
+ <div cdsToggletipContent>
+ <cd-health-checks [healthData]="healthData.health.checks"></cd-health-checks>
+ </div>
+ </cds-toggletip>
+ </ng-template>
<ng-container *ngIf="!healthData.health?.checks?.length; else healthWarningAndError">
<div [ngStyle]="healthData.health.status | healthColor">
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
-import { NgbNavModule, NgbPopoverModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
+import { NgbNavModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
import { provideCharts, withDefaultRegisterables, BaseChartDirective } from 'ng2-charts';
import { SimplebarAngularModule } from 'simplebar-angular';
import { DashboardTimeSelectorComponent } from './dashboard-time-selector/dashboard-time-selector.component';
import { DashboardV3Component } from './dashboard/dashboard-v3.component';
import { PgSummaryPipe } from './pg-summary.pipe';
+import { ToggletipModule } from 'carbon-components-angular';
@NgModule({
imports: [
NgbNavModule,
SharedModule,
RouterModule,
- NgbPopoverModule,
NgbTooltipModule,
FormsModule,
ReactiveFormsModule,
SimplebarAngularModule,
- BaseChartDirective
+ BaseChartDirective,
+ ToggletipModule
],
declarations: [
DashboardV3Component,
</a>
</div>
<div class="d-flex flex-column ms-4 me-4 mt-4 mb-4">
- <ng-template #healthChecks>
- <cd-health-checks *ngIf="healthData?.health?.checks"
- [healthData]="healthData.health.checks"></cd-health-checks>
- </ng-template>
-
<div class="d-flex flex-row col-md-3 ms-4">
- <i *ngIf="healthData.health?.status"
- [ngClass]="[healthData.health.status | healthIcon, icons.large2x]"
- [ngStyle]="healthData.health.status | healthColor"
- [title]="healthData.health.status"></i>
+ <i *ngIf="healthData.health?.status"
+ [ngClass]="[healthData.health.status | healthIcon, icons.large2x]"
+ [ngStyle]="healthData.health.status | healthColor"
+ [title]="healthData.health.status">
+ </i>
+ <span class="ms-2 mt-n1 lead"
+ *ngIf="!healthData.health?.checks?.length"
+ i18n>Cluster</span>
+ <cds-toggletip [dropShadow]="true"
+ [autoAlign]="true">
+ <div cdsToggletipButton>
<a class="ms-2 mt-n1 lead text-primary"
- [ngbPopover]="healthChecks"
popoverClass="info-card-popover-cluster-status"
- [openDelay]="300"
- [closeDelay]="500"
- triggers="mouseenter"
*ngIf="healthData.health?.checks?.length"
- i18n>Cluster</a>
- <span class="ms-2 mt-n1 lead"
- *ngIf="!healthData.health?.checks?.length"
- i18n>Cluster</span>
+ i18n>Cluster
+ </a>
</div>
- </div>
+ <div cdsToggletipContent
+ #healthCheck>
+ <cd-health-checks *ngIf="healthData?.health?.checks"
+ [healthData]="healthData.health.checks">
+ </cd-health-checks>
+ </div>
+ </cds-toggletip>
+ </div>
+ </div>
<div class="d-flex flex-column col-md-3">
<div *ngIf="hasHardwareError"
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
-import { NgbNavModule, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';
+import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap';
import { provideCharts, withDefaultRegisterables, BaseChartDirective } from 'ng2-charts';
import { SharedModule } from '~/app/shared/shared.module';
import { MgrDashboardSummaryPipe } from './mgr-dashboard-summary.pipe';
import { MonSummaryPipe } from './mon-summary.pipe';
import { osdDashboardSummaryPipe } from './osd-dashboard-summary.pipe';
+import { ToggletipModule } from 'carbon-components-angular';
@NgModule({
imports: [
NgbNavModule,
SharedModule,
RouterModule,
- NgbPopoverModule,
FormsModule,
ReactiveFormsModule,
DashboardV3Module,
- BaseChartDirective
+ BaseChartDirective,
+ ToggletipModule
],
declarations: [
HealthComponent,
i18n-cardTitle
class="cd-status-card"
contentClass="content-highlight"
- *ngIf="healthData?.health?.status">
- <ng-container *ngIf="healthData?.health?.checks?.length > 0">
- <ng-template #healthChecks>
- <cd-health-checks [healthData]="healthData"></cd-health-checks>
- </ng-template>
- <div class="info-card-content-clickable"
- [ngStyle]="healthData?.health?.status | healthColor"
- [ngbPopover]="healthChecks"
- popoverClass="info-card-popover-cluster-status">
- {{ healthData?.health?.status | healthLabel | uppercase }}
- <i *ngIf="healthData?.health?.status !== 'HEALTH_OK'"
- class="fa fa-exclamation-triangle"></i>
- </div>
+ *ngIf="healthData.health?.status">
+ <ng-container *ngIf="healthData.health?.checks?.length > 0">
+ <cds-toggletip [dropShadow]="true"
+ [autoAlign]="true">
+ <div cdsToggletipButton>
+ <span [ngStyle]="healthData.health.status | healthColor"
+ class="info-card-content-clickable">
+ {{ healthData.health.status | healthLabel | uppercase }}
+ <i *ngIf="healthData.health?.status !== 'HEALTH_OK'"
+ class="fa fa-exclamation-triangle"></i>
+ </span>
+ </div>
+ <div cdsToggletipContent>
+ <cd-health-checks [healthData]="healthData"></cd-health-checks>
+ </div>
+ </cds-toggletip>
</ng-container>
<ng-container *ngIf="!healthData?.health?.checks?.length">
<div [ngStyle]="healthData?.health.status | healthColor">
i18n-cardTitle
class="cd-capacity-card cd-chart-card"
contentClass="content-chart"
- *ngIf="healthData?.pg_info">
- <ng-template #pgStatus>
- <ng-container *ngTemplateOutlet="logsLink"></ng-container>
- <ul>
- <li *ngFor="let pgStatesText of healthData?.pg_info.statuses | keyvalue">
- {{ pgStatesText.key }}: {{ pgStatesText.value }}
- </li>
- </ul>
- </ng-template>
- <div class="pg-status-popover-wrapper">
- <div [ngbPopover]="pgStatus">
- <cd-health-pie [data]="healthData"
- [config]="pgStatusChartConfig"
- (prepareFn)="preparePgStatus($event[0], $event[1])">
- </cd-health-pie>
+ *ngIf="healthData.pg_info">
+ <div cdsPopover
+ [dropShadow]="true"
+ placement="bottom"
+ class="pg-status-popover-wrapper">
+
+ <div class="popover-trigger">
+ <cd-health-pie [data]="healthData"
+ [config]="pgStatusChartConfig"
+ (prepareFn)="preparePgStatus($event[0], $event[1])">
+ </cd-health-pie>
</div>
+ <cds-popover-content>
+ <ng-container *ngTemplateOutlet="logsLink"></ng-container>
+ <ul>
+ <li *ngFor="let pgStatesText of healthData.pg_info.statuses | keyvalue">
+ {{ pgStatesText.key }}: {{ pgStatesText.value }}
+ </li>
+ </ul>
+ </cds-popover-content>
</div>
</cd-info-card>
<ng-template #logsLink>
<ng-container *ngIf="permissions?.log?.read">
<p class="logs-link"
- i18n><i [ngClass]="[icons.infoCircle]"></i> See <a routerLink="/logs">Logs</a> for more details.</p>
+ i18n>
+ <i [ngClass]="[icons.infoCircle]"></i> See
+ <a routerLink="/logs">Logs</a> for more details.
+ </p>
</ng-container>
</ng-template>
</div>
enabledFeature$: FeatureTogglesMap$;
icons = Icons;
color: string;
-
clientStatsConfig: any = {};
rawCapacityChartConfig: any = {};
-
pgStatusChartConfig = {
options: {
events: ['']
-<ng-template #syncPopover>
- <ul class="text-center">
- <li><h5><b>Sync Status:</b></h5></li>
- <li *ngFor="let status of zone.fullSyncStatus">
- <span *ngIf="!status?.includes(zone.name) && !status?.includes(zone.syncstatus) && !status?.includes('failed') && !status?.includes('error')">
- <span *ngIf="status?.includes(':')">
- <b>{{ status.split(': ')[0] | titlecase }}</b>:{{ status.split(': ')[1] | titlecase}}
- </span>
- <span *ngIf="!status?.includes(':')">
- <b>{{ status | titlecase }}</b>
- </span>
- </span>
- <span *ngIf="status?.includes('failed') || status?.includes('error')">
- {{ status | titlecase }}
- </span>
- </li>
- </ul>
-</ng-template>
<ul class="me-2">
<ng-template #upToDateTpl>
- <li class="badge badge-success">Up to Date</li>
- </ng-template>
- <ng-template #showStatus>
- <a *ngIf="zone.syncstatus !== 'Not Syncing From Zone'"
- class="lead text-primary"
- [ngbPopover]="syncPopover"
- placement="top"
- popoverClass="rgw-overview-card-popover"
- i18n>{{ zone.syncstatus | titlecase }}</a>
- <a *ngIf="zone.syncstatus === 'Not Syncing From Zone'"
- class="lead text-primary"
- [ngbPopover]="syncPopover"
- placement="top"
- popoverClass="rgw-overview-card-popover"
- i18n>Not Syncing</a>
+ <li class="badge badge-success"
+ i18n>Up to Date</li>
</ng-template>
- <li><b>Status:</b></li>
- <li *ngIf="zone.syncstatus?.includes('failed') || zone.syncstatus?.includes('error'); else showStatus">
- <i [ngClass]="[icons.danger]"
- class="text-danger"></i>
- <a class="lead text-danger"
- [ngbPopover]="syncPopover"
- placement="top"
- popoverClass="rgw-overview-card-popover"
- i18n>Error</a></li>
- <li class="mt-4 fw-bold">
- Last Synced:
+ <cds-toggletip [dropShadow]="true"
+ [align]="align">
+ <div cdsToggletipButton
+ class="toggleTipBtn">
+ <ng-template #showStatus>
+ <a *ngIf="zone.syncstatus !== 'Not Syncing From Zone'"
+ class="lead text-primary"
+ i18n>{{ zone.syncstatus | titlecase }}</a>
+ <a *ngIf="zone.syncstatus === 'Not Syncing From Zone'"
+ class="lead text-primary"
+ i18n>Not Syncing</a>
+ </ng-template>
+ <li><b>Status:</b></li>
+ <li *ngIf="zone.syncstatus?.includes('failed') || zone.syncstatus?.includes('error'); else showStatus">
+ <i [ngClass]="[icons.danger]"
+ class="text-danger"></i>
+ <a class="lead text-danger"
+ i18n>Error</a>
+ </li>
+ </div>
+ <div cdsToggletipContent>
+ <ul class="text-center">
+ <li><h5><b i18n>Sync Status:</b></h5></li>
+ <li *ngFor="let status of zone.fullSyncStatus">
+ <span *ngIf="!status?.includes(zone.name) && !status?.includes(zone.syncstatus) && !status?.includes('failed') && !status?.includes('error')">
+ <span *ngIf="status?.includes(':')">
+ <b>{{ status.split(': ')[0] | titlecase }}</b>:{{ status.split(': ')[1] | titlecase}}
+ </span>
+ <span *ngIf="!status?.includes(':')">
+ <b>{{ status | titlecase }}</b>
+ </span>
+ </span>
+ <span *ngIf="status?.includes('failed') || status?.includes('error')">
+ {{ status | titlecase }}
+ </span>
+ </li>
+ </ul>
+ </div>
+ </cds-toggletip>
+ <li class="mt-4 fw-bold"
+ i18n>
+ Last Synced:
</li>
<li class="badge badge-info"
*ngIf="zone.timestamp; else upToDateTpl">{{ zone.timestamp | relativeDate }}</li>
flex-direction: column;
list-style-type: none;
}
+
+.toggle-tip-btn {
+ flex-direction: column;
+}
})
export class RgwSyncDataInfoComponent {
icons = Icons;
-
+ align = 'top';
@Input()
zone: any = {};
-
constructor() {}
}
<span *ngIf="metadataSyncInfo === 'no sync (zone is master)'">
<ul class="me-2">
- <li><b>Status:</b></li>
+ <li><b i18n>Status:</b></li>
<li>No Sync</li>
</ul>
</span>
<span *ngIf="metadataSyncInfo !== 'no sync (zone is master)'">
- <ng-template #metadataSyncPopover>
- <ul class="text-center">
- <li><h5><b>Metadata Sync Status:</b></h5></li>
- <li *ngFor="let status of metadataSyncInfo.fullSyncStatus">
- <span *ngIf="!status?.includes(metadataSyncInfo.syncstatus) && !status?.includes('failed') && !status?.includes('error')">
- <span *ngIf="status?.includes(':')">
- <b>{{ status.split(':')[0] | titlecase }}</b>:{{ status.split(':')[1] | titlecase}}
- </span>
- <span *ngIf="!status?.includes(':')">
- <b>{{ status | titlecase }}</b>
- </span>
- </span>
- <span *ngIf="status?.includes('failed') || status?.includes('error')">
- {{ status | titlecase }}
- </span>
- </li>
- </ul>
- </ng-template>
<ul class="me-2">
<ng-template #upToDateTpl>
- <li class="badge badge-success">Up to Date</li>
+ <li class="badge badge-success"
+ i18n>Up to Date</li>
</ng-template>
- <ng-template #showMetadataStatus>
- <a *ngIf="metadataSyncInfo.syncstatus !== 'Not Syncing From Zone'"
- class="lead text-primary"
- [ngbPopover]="metadataSyncPopover"
- placement="top"
- popoverClass="rgw-overview-card-popover"
- i18n>{{ metadataSyncInfo.syncstatus | titlecase }}</a>
- <a *ngIf="metadataSyncInfo.syncstatus === 'Not Syncing From Zone'"
- class="lead text-primary"
- [ngbPopover]="metadataSyncPopover"
- placement="top"
- popoverClass="rgw-overview-card-popover"
- i18n>Not Syncing</a>
- </ng-template>
- <li><b>Status:</b></li>
- <li *ngIf="metadataSyncInfo.syncstatus?.includes('failed') || metadataSyncInfo.syncstatus?.includes('error'); else showMetadataStatus">
- <i class="text-danger"
- [ngClass]="[icons.danger]"></i>
- <a class="lead text-danger"
- [ngbPopover]="metadataSyncPopover"
- placement="top"
- popoverClass="rgw-overview-card-popover"
- i18n>Error</a></li>
- <li class="mt-4 fw-bold">
- Last Synced:
+ <cds-toggletip [dropShadow]="true"
+ [align]="align">
+ <div cdsToggletipButton
+ class="toggleTipBtn">
+ <ng-template #showMetadataStatus>
+ <a *ngIf="metadataSyncInfo.syncstatus !== 'Not Syncing From Zone'"
+ class="lead text-primary"
+ popoverClass="rgw-overview-card-popover"
+ i18n>{{ metadataSyncInfo.syncstatus | titlecase }}</a>
+ <a *ngIf="metadataSyncInfo.syncstatus === 'Not Syncing From Zone'"
+ class="lead text-primary"
+ i18n>Not Syncing</a>
+ </ng-template>
+ <li><b i18n>Status:</b></li>
+ <li *ngIf="metadataSyncInfo.syncstatus?.includes('failed') || metadataSyncInfo.syncstatus?.includes('error'); else showMetadataStatus">
+ <i class="text-danger"
+ [ngClass]="[icons.danger]"></i>
+ <a class="lead text-danger"
+ i18n>Error</a>
+ </li>
+ </div>
+ <div cdsToggletipContent>
+ <ul class="text-center">
+ <li><h5><b i18n>Metadata Sync Status:</b></h5></li>
+ <li *ngFor="let status of metadataSyncInfo.fullSyncStatus">
+ <span *ngIf="!status?.includes(metadataSyncInfo.syncstatus) && !status?.includes('failed') && !status?.includes('error')">
+ <span *ngIf="status?.includes(':')">
+ <b>{{ status.split(':')[0] | titlecase }}</b>:{{ status.split(':')[1] | titlecase}}
+ </span>
+ <span *ngIf="!status?.includes(':')">
+ <b>{{ status | titlecase }}</b>
+ </span>
+ </span>
+ <span *ngIf="status?.includes('failed') || status?.includes('error')">
+ {{ status | titlecase }}
+ </span>
+ </li>
+ </ul>
+ </div>
+ </cds-toggletip>
+ <li class="mt-4 fw-bold"
+ i18n>
+ Last Synced:
</li>
<li class="badge badge-info"
*ngIf="metadataSyncInfo.timestamp; else upToDateTpl">{{ metadataSyncInfo.timestamp | relativeDate }}</li>
flex-direction: column;
list-style-type: none;
}
+
+.toggleTipBtn {
+ flex-direction: column;
+}
})
export class RgwSyncMetadataInfoComponent {
icons = Icons;
-
+ align = 'top';
@Input()
metadataSyncInfo: any = {};
AccordionModule,
TagModule,
TooltipModule,
- ComboBoxModule
+ ComboBoxModule,
+ ToggletipModule
} from 'carbon-components-angular';
import { CephSharedModule } from '../shared/ceph-shared.module';
import { RgwUserAccountsComponent } from './rgw-user-accounts/rgw-user-accounts.component';
RadioModule,
TagModule,
TooltipModule,
- ComboBoxModule
+ ComboBoxModule,
+ ToggletipModule
],
exports: [
- RgwDaemonListComponent,
RgwDaemonDetailsComponent,
RgwBucketFormComponent,
RgwBucketListComponent,
$flex-grid-columns: 16,
$use-flexbox-grid: true,
);
+@use '@carbon/layout';
@use '@carbon/colors';
@use './src/styles/vendor/variables' as vv;
@use './themes/default';
******************************************/
@use '@carbon/styles/scss/components/button/tokens' as button-tokens with (
- $button-primary: vv.$primary,
- $button-primary-hover: darken(vv.$primary, 5%),
+ $button-primary: vv.$primary,
+ $button-primary-hover: darken(vv.$primary, 5%),
$button-primary-active: darken(vv.$primary, 10%),
- $button-secondary: vv.$secondary,
- $button-secondary-hover: darken(vv.$secondary, 5%),
+ $button-secondary: vv.$secondary,
+ $button-secondary-hover: darken(vv.$secondary, 5%),
$button-secondary-active: darken(vv.$secondary, 10%),
- $button-tertiary: vv.$primary,
- $button-tertiary-hover: darken(vv.$primary, 5%),
+ $button-tertiary: vv.$primary,
+ $button-tertiary-hover: darken(vv.$primary, 5%),
$button-tertiary-active: darken(vv.$primary, 10%)
);
.cds--tooltip-content {
background-color: theme.$layer-02;
}
+/******************************************
+Carbon Popover
+******************************************/
+.cds--popover-content {
+ background-color: theme.$layer-02;
+ max-height: layout.$spacing-13;
+ overflow: auto;
+}