Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
machadoum committed Nov 29, 2024
1 parent c96ee28 commit ea729b0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ export const useStopEntityEngineMutation = (options?: UseMutationOptions<{}>) =>
timestamp: new Date().toISOString(),
action: 'stop',
});
return Promise.all([stopEntityEngine('user'), stopEntityEngine('host')]);
return Promise.all([
stopEntityEngine('user'),
stopEntityEngine('host'),
stopEntityEngine('service'),
]);
},
{
mutationKey: STOP_ENTITY_ENGINE_STATUS_KEY,
Expand All @@ -115,7 +119,12 @@ export const useDeleteEntityEngineMutation = ({ onSuccess }: { onSuccess?: () =>
const { deleteEntityEngine } = useEntityStoreRoutes();

return useMutation<DeleteEntityEngineResponse[]>(
() => Promise.all([deleteEntityEngine('user', true), deleteEntityEngine('host', true)]),
() =>
Promise.all([
deleteEntityEngine('user', true),
deleteEntityEngine('host', true),
deleteEntityEngine('service', true),
]),
{
mutationKey: DELETE_ENTITY_ENGINE_STATUS_KEY,
onSuccess: () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const getServiceUnitedDefinition: UnitedDefinitionBuilder = (fieldHistory
collect({ field: 'service.environment' }),
collect({ field: 'service.ephemeral_id' }),
collect({ field: 'service.id' }),
collect({ field: 'service.name' }),
collect({ field: 'service.node.name' }),
collect({ field: 'service.node.roles' }),
collect({ field: 'service.state' }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import {
getCommonUnitedFieldDefinitions,
USER_DEFINITION_VERSION,
HOST_DEFINITION_VERSION,
getServiceUnitedDefinition,
} from './entity_types';
import type { UnitedDefinitionBuilder } from './types';
import { UnitedEntityDefinition } from './united_entity_definition';
const unitedDefinitionBuilders: Record<EntityType, UnitedDefinitionBuilder> = {
host: getHostUnitedDefinition,
user: getUserUnitedDefinition,
service: getUserUnitedDefinition,
service: getServiceUnitedDefinition,
};

interface Options {
Expand Down

0 comments on commit ea729b0

Please sign in to comment.