[Timelion] Allow import/export of timelion-sheet saved object (#95048)

* [Timelion] Allow import/export of timelion-sheet saved  object

Closes: #9107

* visualize.show -> timelion.show

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Alexey Antonov 2021-03-26 11:50:21 +03:00 committed by GitHub
parent 32212644da
commit 02a8f11ec8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -47,6 +47,7 @@ export class TimelionPlugin implements Plugin {
core.capabilities.registerProvider(() => ({
timelion: {
save: true,
show: true,
},
}));
core.savedObjects.registerType(timelionSheetSavedObjectType);

View file

@ -12,6 +12,20 @@ export const timelionSheetSavedObjectType: SavedObjectsType = {
name: 'timelion-sheet',
hidden: false,
namespaceType: 'single',
management: {
icon: 'visTimelion',
defaultSearchField: 'title',
importableAndExportable: true,
getTitle(obj) {
return obj.attributes.title;
},
getInAppUrl(obj) {
return {
path: `/app/timelion#/${encodeURIComponent(obj.id)}`,
uiCapabilitiesPath: 'timelion.show',
};
},
},
mappings: {
properties: {
description: { type: 'text' },