mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Have TSVB signal render-complete equals true on rendering (#35215)
Fix: #16290
This commit is contained in:
parent
5b6bc86815
commit
9d2be1b730
4 changed files with 8 additions and 3 deletions
|
@ -254,10 +254,8 @@ class VisEditorVisualization extends Component {
|
|||
style={style}
|
||||
className="tvbEditorVisualization"
|
||||
data-shared-items-container
|
||||
data-shared-item
|
||||
data-title={title}
|
||||
data-description={description}
|
||||
data-render-complete="disabled"
|
||||
ref={this._visEl}
|
||||
/>
|
||||
<div className="tvbEditor--hideForReporting">
|
||||
|
|
|
@ -15,6 +15,7 @@ exports[`EmbeddedVisualizeHandler update should add provided data- attributes to
|
|||
data-loading=""
|
||||
data-render-complete="false"
|
||||
data-rendering-count="0"
|
||||
data-shared-item=""
|
||||
/>
|
||||
`;
|
||||
|
||||
|
@ -24,5 +25,6 @@ exports[`EmbeddedVisualizeHandler update should remove null data- attributes fro
|
|||
data-loading=""
|
||||
data-render-complete="false"
|
||||
data-rendering-count="0"
|
||||
data-shared-item=""
|
||||
/>
|
||||
`;
|
||||
|
|
|
@ -56,6 +56,7 @@ interface EmbeddedVisualizeHandlerParams extends VisualizeLoaderParams {
|
|||
}
|
||||
|
||||
const RENDER_COMPLETE_EVENT = 'render_complete';
|
||||
const DATA_SHARED_ITEM = 'data-shared-item';
|
||||
const LOADING_ATTRIBUTE = 'data-loading';
|
||||
const RENDERING_COUNT_ATTRIBUTE = 'data-rendering-count';
|
||||
|
||||
|
@ -140,7 +141,9 @@ export class EmbeddedVisualizeHandler {
|
|||
});
|
||||
|
||||
element.setAttribute(LOADING_ATTRIBUTE, '');
|
||||
element.setAttribute(DATA_SHARED_ITEM, '');
|
||||
element.setAttribute(RENDERING_COUNT_ATTRIBUTE, '0');
|
||||
|
||||
element.addEventListener('renderComplete', this.onRenderCompleteListener);
|
||||
|
||||
this.autoFetch = autoFetch;
|
||||
|
|
|
@ -260,7 +260,9 @@ export function CommonPageProvider({ getService, getPageObjects }) {
|
|||
}
|
||||
|
||||
async getSharedItemTitleAndDescription() {
|
||||
const element = await find.byCssSelector('[data-shared-item]');
|
||||
const cssSelector = '[data-shared-item][data-title][data-description]';
|
||||
const element = await find.byCssSelector(cssSelector);
|
||||
|
||||
return {
|
||||
title: await element.getAttribute('data-title'),
|
||||
description: await element.getAttribute('data-description')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue