Skip to content

Commit

Permalink
Adds saved objects to Management (elastic#64926) (elastic#65205)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
Corey Robertson and elasticmachine authored May 5, 2020
1 parent f519c83 commit 1d67e9c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
8 changes: 8 additions & 0 deletions x-pack/plugins/canvas/server/saved_objects/custom_element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,12 @@ export const customElementType: SavedObjectsType = {
},
},
migrations: {},
management: {
icon: 'canvasApp',
defaultSearchField: 'name',
importableAndExportable: true,
getTitle(obj) {
return obj.attributes.displayName;
},
},
};
14 changes: 14 additions & 0 deletions x-pack/plugins/canvas/server/saved_objects/workpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,18 @@ export const workpadType: SavedObjectsType = {
migrations: {
'7.0.0': removeAttributesId,
},
management: {
importableAndExportable: true,
icon: 'canvasApp',
defaultSearchField: 'name',
getTitle(obj) {
return obj.attributes.name;
},
getInAppUrl(obj) {
return {
path: `/app/canvas#/workpad/${encodeURIComponent(obj.id)}`,
uiCapabilitiesPath: 'canvas.show',
};
},
},
};

0 comments on commit 1d67e9c

Please sign in to comment.