* hides overview item when no other obs plugin is available. * reverting tests changes * reverting tests changes * adding overview to observability tests
15 lines
628 B
TypeScript
15 lines
628 B
TypeScript
/*
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
* or more contributor license agreements. Licensed under the Elastic License;
|
|
* you may not use this file except in compliance with the Elastic License.
|
|
*/
|
|
|
|
import { CoreStart } from 'kibana/public';
|
|
|
|
export function toggleOverviewLinkInNav(core: CoreStart) {
|
|
const { apm, logs, metrics, uptime } = core.application.capabilities.navLinks;
|
|
const someVisible = Object.values({ apm, logs, metrics, uptime }).some((visible) => visible);
|
|
if (!someVisible) {
|
|
core.chrome.navLinks.update('observability-overview', { hidden: true });
|
|
}
|
|
}
|