Skip to content

Commit

Permalink
Enable datasource link in saveObjectManagement (#2209)
Browse files Browse the repository at this point in the history
Signed-off-by: Kristen Tian <[email protected]>

Signed-off-by: Kristen Tian <[email protected]>
  • Loading branch information
kristenTian authored Aug 26, 2022
1 parent aff6595 commit c9a9a9b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/plugins/data_source/server/saved_objects/data_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ export const dataSource: SavedObjectsType = {
getTitle(obj) {
return obj.attributes.title;
},
// todo: update getEditUrl & getInAppUrl after #2021
getEditUrl(obj) {
return `/management/opensearch-dashboards/dataSources/${encodeURIComponent(obj.id)}`;
},
getInAppUrl(obj) {
return {
path: `/app/management/opensearch-dashboards/dataSources/${encodeURIComponent(obj.id)}`,
uiCapabilitiesPath: 'management.opensearchDashboards.dataSources',
};
},
},
mappings: {
dynamic: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
EuiSpacer,
EuiText,
EuiFlexItem,
EuiFormRow,
EuiButton,
EuiFlexGroup,
EuiSwitch,
Expand Down
1 change: 1 addition & 0 deletions src/plugins/management/server/capabilities_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const capabilitiesProvider = () => ({
settings: true,
indexPatterns: true,
objects: true,
dataSources: true,
},
},
});

0 comments on commit c9a9a9b

Please sign in to comment.