mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
(cherry picked from commit 72c40f2119
)
Co-authored-by: Andrew Tate <andrew.tate@elastic.co>
This commit is contained in:
parent
84fed4732f
commit
cbab89d8a4
4 changed files with 13 additions and 15 deletions
|
@ -30,7 +30,7 @@ pageLoadAssetSize:
|
|||
inputControlVis: 172675
|
||||
inspector: 148711
|
||||
kibanaOverview: 56279
|
||||
lens: 96624
|
||||
lens: 35000
|
||||
licenseManagement: 41817
|
||||
licensing: 29004
|
||||
lists: 22900
|
||||
|
|
|
@ -31,11 +31,7 @@ import {
|
|||
DispatchSetState,
|
||||
} from '../state_management';
|
||||
import { getIndexPatternsObjects, getIndexPatternsIds, getResolvedDateRange } from '../utils';
|
||||
import {
|
||||
combineQueryAndFilters,
|
||||
getLayerMetaInfo,
|
||||
getShowUnderlyingDataLabel,
|
||||
} from './show_underlying_data';
|
||||
import { combineQueryAndFilters, getLayerMetaInfo } from './show_underlying_data';
|
||||
|
||||
function getLensTopNavConfig(options: {
|
||||
showSaveAndReturn: boolean;
|
||||
|
@ -103,11 +99,15 @@ function getLensTopNavConfig(options: {
|
|||
}
|
||||
|
||||
if (showOpenInDiscover) {
|
||||
const exploreDataInDiscoverLabel = i18n.translate('xpack.lens.app.exploreDataInDiscover', {
|
||||
defaultMessage: 'Explore data in Discover',
|
||||
});
|
||||
|
||||
topNavMenu.push({
|
||||
label: getShowUnderlyingDataLabel(),
|
||||
label: exploreDataInDiscoverLabel,
|
||||
run: () => {},
|
||||
testId: 'lnsApp_openInDiscover',
|
||||
description: getShowUnderlyingDataLabel(),
|
||||
description: exploreDataInDiscoverLabel,
|
||||
disableButton: Boolean(tooltips.showUnderlyingDataWarning()),
|
||||
tooltip: tooltips.showUnderlyingDataWarning,
|
||||
target: '_blank',
|
||||
|
|
|
@ -20,11 +20,6 @@ import { partition } from 'lodash';
|
|||
import { TableInspectorAdapter } from '../editor_frame_service/types';
|
||||
import { Datasource } from '../types';
|
||||
|
||||
export const getShowUnderlyingDataLabel = () =>
|
||||
i18n.translate('xpack.lens.app.exploreRawData', {
|
||||
defaultMessage: 'Explore data in Discover',
|
||||
});
|
||||
|
||||
/**
|
||||
* Joins a series of queries.
|
||||
*
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
*/
|
||||
|
||||
import type { IEmbeddable } from 'src/plugins/embeddable/public';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { createAction } from '../../../../../src/plugins/ui_actions/public';
|
||||
import type { Embeddable } from '../embeddable';
|
||||
import type { DiscoverStart } from '../../../../../src/plugins/discover/public';
|
||||
import { DOC_TYPE } from '../../common';
|
||||
import { getShowUnderlyingDataLabel } from '../app_plugin/show_underlying_data';
|
||||
|
||||
const ACTION_OPEN_IN_DISCOVER = 'ACTION_OPEN_IN_DISCOVER';
|
||||
|
||||
|
@ -20,7 +20,10 @@ export const createOpenInDiscoverAction = (discover: DiscoverStart, hasDiscoverA
|
|||
id: ACTION_OPEN_IN_DISCOVER,
|
||||
order: 19, // right after Inspect which is 20
|
||||
getIconType: () => 'popout',
|
||||
getDisplayName: () => getShowUnderlyingDataLabel(),
|
||||
getDisplayName: () =>
|
||||
i18n.translate('xpack.lens.app.exploreDataInDiscover', {
|
||||
defaultMessage: 'Explore data in Discover',
|
||||
}),
|
||||
isCompatible: async (context: { embeddable: IEmbeddable }) => {
|
||||
if (!hasDiscoverAccess) return false;
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue