</button>
</ng-template>
<!-- TOTAL COUNT -->
+ @if (vm?.total) {
<div>
<span class="cds--type-heading-07">{{ vm.total }}</span>
<cd-icon [type]="vm.icon"></cd-icon>
i18n>
{{ vm.statusText }}
</small>
-
<!-- SUB TOTAL COUNTS -->
<div class="cds-mt-6">
@if (vm.badges.length) {
</div>
}
</div>
+ }@else {
+ <cds-skeleton-placeholder></cds-skeleton-placeholder>
+ <div class="cds-mt-3">
+ <cds-skeleton-text [lines]="1"></cds-skeleton-text>
+ </div>
+ }
}
</cd-productive-card>
GridModule,
LayoutModule,
LinkModule,
+ SkeletonModule,
TilesModule
} from 'carbon-components-angular';
import { RouterModule } from '@angular/router';
ButtonModule,
LinkModule,
LayoutModule,
- PipesModule
+ PipesModule,
+ SkeletonModule
],
templateUrl: './overview-alerts-card.component.html',
styleUrl: './overview-alerts-card.component.scss',
}
readonly vm$ = combineLatest([
- this.prometheusAlertService.totalAlerts$.pipe(startWith(0)),
this.prometheusAlertService.criticalAlerts$.pipe(startWith(0)),
this.prometheusAlertService.warningAlerts$.pipe(startWith(0))
]).pipe(
- map(([total, critical, warning]) => {
+ map(([critical, warning]) => {
+ const total = (critical ?? 0) + (warning ?? 0);
const hasAlerts = total > 0;
const hasCritical = critical > 0;
const hasWarning = warning > 0;