Skip to content

Commit 43782d5

Browse files
authored
fix(ui): route driveService activity feed links to service page (#29450) (#29452)
* fix(ui): route driveService activity feed links to service page (#29450) getEntityLink() omitted EntityType.DRIVE_SERVICE from the service-routing switch, so Drive Service links from the Activity Feed fell through to the default TABLE case and errored with 'Table instance ... not found'. Add the missing case so it resolves to the drive service details page. * fix(ui): route securityService activity feed links to service page Same latent gap as driveService: getEntityLink() omitted EntityType.SECURITY_SERVICE from the service-routing switch, so security service links fell through to the default TABLE case. Add the missing case and a companion unit test.
1 parent 330b3c8 commit 43782d5

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

openmetadata-ui/src/main/resources/ui/src/utils/EntityUtilClassBase.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { EntityUtilClassBase } from './EntityUtilClassBase';
1717
import {
1818
getEntityDetailsPath,
1919
getGlossaryTermDetailsPath,
20+
getServiceDetailsPath,
2021
} from './RouterUtils';
2122
import { getTestSuiteDetailsPath } from './TestSuiteUtils';
2223

@@ -226,6 +227,20 @@ describe('EntityUtilClassBase', () => {
226227
);
227228
});
228229

230+
it('should return service details path for driveService entity type', () => {
231+
const fqn = 'test.driveService';
232+
entityUtil.getEntityLink(EntityType.DRIVE_SERVICE, fqn);
233+
234+
expect(getServiceDetailsPath).toHaveBeenCalledWith(fqn, 'driveServices');
235+
});
236+
237+
it('should return service details path for securityService entity type', () => {
238+
const fqn = 'test.securityService';
239+
entityUtil.getEntityLink(EntityType.SECURITY_SERVICE, fqn);
240+
241+
expect(getServiceDetailsPath).toHaveBeenCalledWith(fqn, 'securityServices');
242+
});
243+
229244
describe('getFqnParts', () => {
230245
it('should return undefined columnFqn if type is NOT provided', () => {
231246
const fqn = 'service.database.schema.table';

openmetadata-ui/src/main/resources/ui/src/utils/EntityUtilClassBase.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ class EntityUtilClassBase {
268268
case EntityType.STORAGE_SERVICE:
269269
case EntityType.SEARCH_SERVICE:
270270
case EntityType.API_SERVICE:
271+
case EntityType.DRIVE_SERVICE:
272+
case EntityType.SECURITY_SERVICE:
271273
return getServiceDetailsPath(fullyQualifiedName, `${indexType}s`);
272274

273275
case EntityType.WEBHOOK:

0 commit comments

Comments
 (0)