mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Ensure we are showing the cluster name in the breadcrumbs (#30087)
This commit is contained in:
parent
59ff1d0056
commit
cdf3266f23
1 changed files with 7 additions and 1 deletions
|
@ -71,7 +71,7 @@ export class MonitoringMainController {
|
|||
}
|
||||
|
||||
const uiModule = uiModules.get('plugins/monitoring/directives', []);
|
||||
uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl, config) => {
|
||||
uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl, config, $injector) => {
|
||||
return {
|
||||
restrict: 'E',
|
||||
transclude: true,
|
||||
|
@ -82,6 +82,12 @@ uiModule.directive('monitoringMain', (breadcrumbs, license, kbnUrl, config) => {
|
|||
link(scope, _element, attributes, controller) {
|
||||
config.watch('k7design', (val) => scope.showPluginBreadcrumbs = !val);
|
||||
|
||||
if (!scope.cluster) {
|
||||
const $route = $injector.get('$route');
|
||||
const globalState = $injector.get('globalState');
|
||||
scope.cluster = $route.current.locals.clusters.find(cluster => cluster.cluster_uuid === globalState.cluster_uuid);
|
||||
}
|
||||
|
||||
function getSetupObj() {
|
||||
return {
|
||||
licenseService: license,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue