Make url saved object in SO app clickable (#106646)

This commit is contained in:
Vadim Kibana 2021-08-03 12:03:42 +02:00 committed by GitHub
parent 8f16ad3657
commit 0df0255bbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -106,7 +106,9 @@ const SavedObjectsTablePage = ({
}}
canGoInApp={(savedObject) => {
const { inAppUrl } = savedObject.meta;
return inAppUrl ? Boolean(get(capabilities, inAppUrl.uiCapabilitiesPath)) : false;
if (!inAppUrl) return false;
if (!inAppUrl.uiCapabilitiesPath) return true;
return Boolean(get(capabilities, inAppUrl.uiCapabilitiesPath));
}}
/>
</ContextWrapper>

View file

@ -19,6 +19,12 @@ export const url: SavedObjectsType = {
getTitle(obj) {
return `/goto/${encodeURIComponent(obj.id)}`;
},
getInAppUrl(obj) {
return {
path: '/goto/' + encodeURIComponent(obj.id),
uiCapabilitiesPath: '',
};
},
},
mappings: {
properties: {