mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-01 11:09:14 +00:00
fix(ui): navigate to listing for deleting a service (#18428)
(cherry picked from commit 5c550e7bc315ba785c8687a5b939d38f3107a447)
This commit is contained in:
parent
f2c4aaced9
commit
b709c39cff
@ -48,6 +48,7 @@ import {
|
||||
pagingObject,
|
||||
ROUTES,
|
||||
} from '../../constants/constants';
|
||||
import { GlobalSettingsMenuCategory } from '../../constants/GlobalSettings.constants';
|
||||
import {
|
||||
OPEN_METADATA,
|
||||
SERVICE_INGESTION_PIPELINE_TYPES,
|
||||
@ -113,11 +114,13 @@ import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||
import {
|
||||
getEditConnectionPath,
|
||||
getServiceVersionPath,
|
||||
getSettingPath,
|
||||
} from '../../utils/RouterUtils';
|
||||
import {
|
||||
getCountLabel,
|
||||
getEntityTypeFromServiceCategory,
|
||||
getResourceEntityFromServiceCategory,
|
||||
getServiceRouteFromServiceType,
|
||||
shouldTestConnection,
|
||||
} from '../../utils/ServiceUtils';
|
||||
import {
|
||||
@ -791,8 +794,15 @@ const ServiceDetailsPage: FunctionComponent = () => {
|
||||
|
||||
const afterDeleteAction = useCallback(
|
||||
(isSoftDelete?: boolean, version?: number) =>
|
||||
isSoftDelete ? handleToggleDelete(version) : history.goBack(),
|
||||
[handleToggleDelete]
|
||||
isSoftDelete
|
||||
? handleToggleDelete(version)
|
||||
: history.push(
|
||||
getSettingPath(
|
||||
GlobalSettingsMenuCategory.SERVICES,
|
||||
getServiceRouteFromServiceType(serviceCategory)
|
||||
)
|
||||
),
|
||||
[handleToggleDelete, serviceCategory]
|
||||
);
|
||||
|
||||
const handleRestoreService = useCallback(async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user