Skip to content

Commit

Permalink
[Lens][Visualize] Align inspector header in Lens and Visualize (elast…
Browse files Browse the repository at this point in the history
…ic#112443)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
dej611 and kibanamachine authored Sep 20, 2021
1 parent e676b67 commit 5f994b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ export class VisualizeEmbeddable
if (!adapters) return;

return this.deps.start().plugins.inspector.open(adapters, {
title: this.getTitle(),
title:
this.getTitle() ||
i18n.translate('visualizations.embeddable.inspectorTitle', {
defaultMessage: 'Inspector',
}),
});
};

Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/lens/public/app_plugin/lens_top_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export const LensTopNavMenu = ({
},
},
actions: {
inspect: lensInspector.inspect,
inspect: () => lensInspector.inspect({ title }),
exportToCSV: () => {
if (!activeData) {
return;
Expand Down Expand Up @@ -335,7 +335,7 @@ export const LensTopNavMenu = ({
setIsSaveModalVisible,
uiSettings,
unsavedTitle,
lensInspector.inspect,
lensInspector,
]
);

Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/lens/public/lens_inspector_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import type {
Adapters,
InspectorOptions,
Start as InspectorStartContract,
} from '../../../../src/plugins/inspector/public';

Expand All @@ -16,7 +17,7 @@ export const getLensInspectorService = (inspector: InspectorStartContract) => {
const adapters: Adapters = createDefaultInspectorAdapters();
return {
adapters,
inspect: () => inspector.open(adapters),
inspect: (options?: InspectorOptions) => inspector.open(adapters, options),
};
};

Expand Down

0 comments on commit 5f994b1

Please sign in to comment.