mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-14 18:03:38 +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,
|
pagingObject,
|
||||||
ROUTES,
|
ROUTES,
|
||||||
} from '../../constants/constants';
|
} from '../../constants/constants';
|
||||||
|
import { GlobalSettingsMenuCategory } from '../../constants/GlobalSettings.constants';
|
||||||
import {
|
import {
|
||||||
OPEN_METADATA,
|
OPEN_METADATA,
|
||||||
SERVICE_INGESTION_PIPELINE_TYPES,
|
SERVICE_INGESTION_PIPELINE_TYPES,
|
||||||
@ -113,11 +114,13 @@ import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
|||||||
import {
|
import {
|
||||||
getEditConnectionPath,
|
getEditConnectionPath,
|
||||||
getServiceVersionPath,
|
getServiceVersionPath,
|
||||||
|
getSettingPath,
|
||||||
} from '../../utils/RouterUtils';
|
} from '../../utils/RouterUtils';
|
||||||
import {
|
import {
|
||||||
getCountLabel,
|
getCountLabel,
|
||||||
getEntityTypeFromServiceCategory,
|
getEntityTypeFromServiceCategory,
|
||||||
getResourceEntityFromServiceCategory,
|
getResourceEntityFromServiceCategory,
|
||||||
|
getServiceRouteFromServiceType,
|
||||||
shouldTestConnection,
|
shouldTestConnection,
|
||||||
} from '../../utils/ServiceUtils';
|
} from '../../utils/ServiceUtils';
|
||||||
import {
|
import {
|
||||||
@ -791,8 +794,15 @@ const ServiceDetailsPage: FunctionComponent = () => {
|
|||||||
|
|
||||||
const afterDeleteAction = useCallback(
|
const afterDeleteAction = useCallback(
|
||||||
(isSoftDelete?: boolean, version?: number) =>
|
(isSoftDelete?: boolean, version?: number) =>
|
||||||
isSoftDelete ? handleToggleDelete(version) : history.goBack(),
|
isSoftDelete
|
||||||
[handleToggleDelete]
|
? handleToggleDelete(version)
|
||||||
|
: history.push(
|
||||||
|
getSettingPath(
|
||||||
|
GlobalSettingsMenuCategory.SERVICES,
|
||||||
|
getServiceRouteFromServiceType(serviceCategory)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
[handleToggleDelete, serviceCategory]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleRestoreService = useCallback(async () => {
|
const handleRestoreService = useCallback(async () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user