mirror of
https://github.com/ceph/ceph
synced 2024-12-27 14:03:25 +00:00
Merge pull request #34729 from votdev/issue_43081_show_prom_alerts_in_navbar
Reviewed-by: Ernesto Puerta <epuertat@redhat.com> Reviewed-by: Patrick Seidensal <pnawracay@suse.com> Reviewed-by: Stephan Müller <smueller@suse.com>
This commit is contained in:
commit
4b536f04bd
@ -156,7 +156,11 @@
|
||||
class="tc_submenuitem tc_submenuitem_monitoring"
|
||||
*ngIf="permissions.prometheus.read">
|
||||
<a i18n
|
||||
routerLink="/monitoring">Monitoring</a>
|
||||
routerLink="/monitoring">
|
||||
<ng-container i18n>Monitoring</ng-container>
|
||||
<small *ngIf="prometheusAlertService.alerts.length > 0"
|
||||
class="badge badge-danger">{{ prometheusAlertService.alerts.length }}</small>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -190,6 +190,10 @@ $sidebar-width: 200px;
|
||||
background: $color-primary;
|
||||
}
|
||||
|
||||
& > .badge {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
@ -12,6 +12,7 @@ import {
|
||||
FeatureTogglesMap,
|
||||
FeatureTogglesService
|
||||
} from '../../../shared/services/feature-toggles.service';
|
||||
import { PrometheusAlertService } from '../../../shared/services/prometheus-alert.service';
|
||||
import { SummaryService } from '../../../shared/services/summary.service';
|
||||
import { NavigationModule } from '../navigation.module';
|
||||
import { NavigationComponent } from './navigation.component';
|
||||
@ -61,7 +62,8 @@ describe('NavigationComponent', () => {
|
||||
}
|
||||
},
|
||||
{ provide: SummaryService, useValue: { subscribe: jest.fn() } },
|
||||
{ provide: FeatureTogglesService, useValue: { get: jest.fn() } }
|
||||
{ provide: FeatureTogglesService, useValue: { get: jest.fn() } },
|
||||
{ provide: PrometheusAlertService, useValue: { alerts: [] } }
|
||||
]
|
||||
});
|
||||
});
|
||||
|
@ -9,6 +9,7 @@ import {
|
||||
FeatureTogglesMap$,
|
||||
FeatureTogglesService
|
||||
} from '../../../shared/services/feature-toggles.service';
|
||||
import { PrometheusAlertService } from '../../../shared/services/prometheus-alert.service';
|
||||
import { SummaryService } from '../../../shared/services/summary.service';
|
||||
|
||||
@Component({
|
||||
@ -36,7 +37,8 @@ export class NavigationComponent implements OnInit, OnDestroy {
|
||||
constructor(
|
||||
private authStorageService: AuthStorageService,
|
||||
private summaryService: SummaryService,
|
||||
private featureToggles: FeatureTogglesService
|
||||
private featureToggles: FeatureTogglesService,
|
||||
public prometheusAlertService: PrometheusAlertService
|
||||
) {
|
||||
this.permissions = this.authStorageService.getPermissions();
|
||||
this.enabledFeature$ = this.featureToggles.get();
|
||||
|
Loading…
Reference in New Issue
Block a user