Skip to content

Commit

Permalink
Add savedObjectsManagement to DashboardApplicationService
Browse files Browse the repository at this point in the history
  • Loading branch information
nickpeihl committed Nov 28, 2023
1 parent e2dde7e commit b69c8b8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const defaultCapabilities = {
visualize: { save: true },
maps: { save: true },
navLinks: {},
savedObjectsManagement: {},
};

Object.defineProperty(pluginServices.getServices().application, 'capabilities', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const applicationServiceFactory: ApplicationServiceFactory = () => {
maps: pluginMock.capabilities.maps,
navLinks: pluginMock.capabilities.navLinks,
visualize: pluginMock.capabilities.visualize,
savedObjectsManagement: pluginMock.capabilities.savedObjectsManagement,
},
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const applicationServiceFactory: ApplicationServiceFactory = ({ coreStart
navigateToApp,
navigateToUrl,
getUrlForApp,
capabilities: { advancedSettings, maps, navLinks, visualize },
capabilities: { advancedSettings, maps, navLinks, visualize, savedObjectsManagement },
},
} = coreStart;

Expand All @@ -36,6 +36,7 @@ export const applicationServiceFactory: ApplicationServiceFactory = ({ coreStart
maps,
navLinks,
visualize,
savedObjectsManagement,
},
};
};
1 change: 1 addition & 0 deletions src/plugins/dashboard/public/services/application/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ export interface DashboardApplicationService {
maps: CoreStart['application']['capabilities']['maps']; // only used in `add_to_library_action`
navLinks: CoreStart['application']['capabilities']['navLinks'];
visualize: CoreStart['application']['capabilities']['visualize']; // only used in `add_to_library_action`
savedObjectsManagement: CoreStart['application']['capabilities']['savedObjectsManagement'];
};
}

0 comments on commit b69c8b8

Please sign in to comment.