feat(tasks): Enhance task management with identity handling and initial data loading
This commit is contained in:
@@ -53,6 +53,8 @@ export interface IDataState {
|
||||
deployments?: plugins.interfaces.data.IDeployment[];
|
||||
domains?: plugins.interfaces.data.IDomain[];
|
||||
dnsEntries?: plugins.interfaces.data.IDnsEntry[];
|
||||
tasks?: any[];
|
||||
taskExecutions?: plugins.interfaces.data.ITaskExecution[];
|
||||
mails?: any[];
|
||||
logs?: any[];
|
||||
s3?: any[];
|
||||
@@ -71,6 +73,8 @@ export const dataState = await appstate.getStatePart<IDataState>(
|
||||
deployments: [],
|
||||
domains: [],
|
||||
dnsEntries: [],
|
||||
tasks: [],
|
||||
taskExecutions: [],
|
||||
mails: [],
|
||||
logs: [],
|
||||
s3: [],
|
||||
@@ -676,7 +680,10 @@ export const taskActions = {
|
||||
const response = await trGetTasks.fire({
|
||||
identity: loginStatePart.getState().identity,
|
||||
});
|
||||
return response as any;
|
||||
return {
|
||||
...currentState,
|
||||
tasks: response.tasks,
|
||||
};
|
||||
}
|
||||
),
|
||||
|
||||
@@ -692,7 +699,10 @@ export const taskActions = {
|
||||
identity: loginStatePart.getState().identity,
|
||||
filter: payloadArg.filter,
|
||||
});
|
||||
return response as any;
|
||||
return {
|
||||
...currentState,
|
||||
taskExecutions: response.executions,
|
||||
};
|
||||
}
|
||||
),
|
||||
|
||||
@@ -708,7 +718,7 @@ export const taskActions = {
|
||||
identity: loginStatePart.getState().identity,
|
||||
executionId: payloadArg.executionId,
|
||||
});
|
||||
return response as any;
|
||||
return currentState;
|
||||
}
|
||||
),
|
||||
|
||||
|
Reference in New Issue
Block a user