mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
* check whether vis type exists * check wether vis type exists for experimental check * only show object if vis type is valid
This commit is contained in:
parent
8557af8659
commit
3f6ad4882a
1 changed files with 10 additions and 4 deletions
|
@ -55,15 +55,21 @@ export class VisualizeEmbeddableFactory extends EmbeddableFactory<VisualizationA
|
|||
);
|
||||
},
|
||||
getTooltipForSavedObject: savedObject => {
|
||||
const visType = visTypes.byName[JSON.parse(savedObject.attributes.visState).type].title;
|
||||
return `${savedObject.attributes.title} (${visType})`;
|
||||
return `${savedObject.attributes.title} (${
|
||||
visTypes.byName[JSON.parse(savedObject.attributes.visState).type].title
|
||||
})`;
|
||||
},
|
||||
showSavedObject: savedObject => {
|
||||
const typeName: string = JSON.parse(savedObject.attributes.visState).type;
|
||||
const visType = visTypes.byName[typeName];
|
||||
if (!visType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (chrome.getUiSettingsClient().get('visualize:enableLabs')) {
|
||||
return true;
|
||||
}
|
||||
const typeName: string = JSON.parse(savedObject.attributes.visState).type;
|
||||
const visType = visTypes.byName[typeName];
|
||||
|
||||
return visType.stage !== 'experimental';
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue