mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Canvas] Fix map embeddables not showing up on PDF reports (#61149)
* Allow embeddables to track their own render complete for report generation in canvas * Updating following consult with reporting team Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
4c70ef54a7
commit
a16968dd3a
2 changed files with 8 additions and 3 deletions
|
@ -28,6 +28,7 @@ export class ExportApp extends React.PureComponent {
|
|||
const { workpad, selectedPageId } = this.props;
|
||||
const { pages, height, width } = workpad;
|
||||
const activePage = pages.find(page => page.id === selectedPageId);
|
||||
const pageElementCount = activePage.elements.length;
|
||||
|
||||
return (
|
||||
<div className="canvasExport">
|
||||
|
@ -39,7 +40,7 @@ export class ExportApp extends React.PureComponent {
|
|||
</div>
|
||||
{Style.it(
|
||||
workpad.css,
|
||||
<div className="canvasExport__stageContent">
|
||||
<div className="canvasExport__stageContent" data-shared-items-count={pageElementCount}>
|
||||
<WorkpadPage
|
||||
isSelected
|
||||
key={activePage.id}
|
||||
|
|
|
@ -81,11 +81,15 @@ export class ElementShareContainer extends React.PureComponent {
|
|||
};
|
||||
|
||||
render() {
|
||||
const shouldTrackComplete = this.props.functionName !== 'embeddable';
|
||||
|
||||
// NOTE: the data-shared-item and data-render-complete attributes are used for reporting
|
||||
// Embeddables should be setting data-shared-item and data-render-complete on themselves
|
||||
// so we should not be tracking them here.
|
||||
return (
|
||||
<div
|
||||
data-shared-item
|
||||
data-render-complete={this.state.renderComplete}
|
||||
data-shared-item={shouldTrackComplete ? this.state.renderComplete : undefined}
|
||||
data-render-complete={shouldTrackComplete ? this.state.renderComplete : undefined}
|
||||
className={this.props.className}
|
||||
ref={ref => (this.sharedItemRef = ref)}
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue