feat(deployment): Implement Deployment and DeploymentManager classes with CRUD operations and service integration

This commit is contained in:
2025-09-08 12:46:23 +00:00
parent 4e38d2ff43
commit ce047d1bb0
11 changed files with 462 additions and 41 deletions

View File

@@ -142,13 +142,21 @@ export const getAllDataAction = dataState.createAction(async (statePartArg) => {
'/typedrequest',
'getServices'
);
const responseServices = await trGetServices.fire({
identity: loginStatePart.getState().identity,
});
currentState = {
...currentState,
services: responseServices.services,
};
try {
const responseServices = await trGetServices.fire({
identity: loginStatePart.getState().identity,
});
currentState = {
...currentState,
services: responseServices?.services || [],
};
} catch (error) {
console.error('Failed to fetch services:', error);
currentState = {
...currentState,
services: [],
};
}
// Deployments
const trGetDeployments =
@@ -156,13 +164,21 @@ export const getAllDataAction = dataState.createAction(async (statePartArg) => {
'/typedrequest',
'getDeployments'
);
const responseDeployments = await trGetDeployments.fire({
identity: loginStatePart.getState().identity,
});
currentState = {
...currentState,
deployments: responseDeployments.deployments,
};
try {
const responseDeployments = await trGetDeployments.fire({
identity: loginStatePart.getState().identity,
});
currentState = {
...currentState,
deployments: responseDeployments?.deployments || [],
};
} catch (error) {
console.error('Failed to fetch deployments:', error);
currentState = {
...currentState,
deployments: [],
};
}
return currentState;
});