Skip to content

Commit

Permalink
Fix after isEntityOfType was renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
crespocarlos committed Nov 11, 2024
1 parent f087c7d commit 38c7370
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { useCallback } from 'react';
import type { DashboardLocatorParams } from '@kbn/dashboard-plugin/public';
import { DASHBOARD_APP_LOCATOR } from '@kbn/deeplinks-analytics';
import { castArray } from 'lodash';
import { isEntityOfType } from '../../common/utils/entity_type_guards';
import { isBuiltinEntityOfType } from '../../common/utils/entity_type_guards';
import type { InventoryEntity } from '../../common/entities';
import { useKibana } from './use_kibana';

Expand Down Expand Up @@ -51,14 +51,14 @@ export const useDetailViewRedirect = () => {
});
const identityFields = castArray(entity.entityIdentityFields);

if (isEntityOfType('host', entity) || isEntityOfType('container', entity)) {
if (isBuiltinEntityOfType('host', entity) || isBuiltinEntityOfType('container', entity)) {
return assetDetailsLocator?.getRedirectUrl({
assetId: identityFieldsValue[identityFields[0]],
assetType: entity.entityType,
});
}

if (isEntityOfType('service', entity)) {
if (isBuiltinEntityOfType('service', entity)) {
return serviceOverviewLocator?.getRedirectUrl({
serviceName: identityFieldsValue[identityFields[0]],
environment: entity.service?.environment,
Expand Down

0 comments on commit 38c7370

Please sign in to comment.