From 0c9bcd009c33737f579a34de7538979c07091316 Mon Sep 17 00:00:00 2001 From: Eric Wasson <229096365+Eric-Wasson@users.noreply.github.com> Date: Wed, 18 Mar 2026 13:57:43 +0100 Subject: [PATCH 1/5] work in progress --- src/app/core/_datasources/tasks.datasource.ts | 1 + src/app/core/_models/request-params.model.ts | 2 ++ src/app/core/_services/buildparams.ts | 6 ++++++ .../_services/params/builder-implementation.service.ts | 10 ++++++++++ src/app/core/_services/params/builder-types.service.ts | 3 +++ 5 files changed, 22 insertions(+) diff --git a/src/app/core/_datasources/tasks.datasource.ts b/src/app/core/_datasources/tasks.datasource.ts index e1c4ce617..69da5db62 100644 --- a/src/app/core/_datasources/tasks.datasource.ts +++ b/src/app/core/_datasources/tasks.datasource.ts @@ -37,6 +37,7 @@ export class TasksDataSource extends BaseDataSource { .addInclude('tasks') .addInclude('hashlist') .addInclude('hashType') + .addAggregate('TESTVALUE') .addFilter({ field: 'isArchived', operator: FilterType.EQUAL, diff --git a/src/app/core/_models/request-params.model.ts b/src/app/core/_models/request-params.model.ts index f922f349c..b4ec49df8 100644 --- a/src/app/core/_models/request-params.model.ts +++ b/src/app/core/_models/request-params.model.ts @@ -46,6 +46,8 @@ interface IRequestParams { include?: Array; // Array of Filter objects that have to be performed filter?: Array; + //array of aggregated fields to include ex. [active agents for tasks] + aggregate?: Array; //array of attributes to sort on where '-' implies descending order on ex. [id, -name] sort?: Array; //Parameter for count endpoints to also include the count without filters diff --git a/src/app/core/_services/buildparams.ts b/src/app/core/_services/buildparams.ts index c70f6d9b8..a6fcfd20a 100644 --- a/src/app/core/_services/buildparams.ts +++ b/src/app/core/_services/buildparams.ts @@ -39,6 +39,12 @@ export function setParameter(params: RequestParams): HttpParams { }); } + // Handle aggregate array + const aggregate = params.aggregate; + if (Array.isArray(aggregate) && aggregate.length > 0) { + httpParams = httpParams.set('aggregate', aggregate.join(',')); + } + // Handle ordering parameter const sort = params.sort; if (Array.isArray(sort) && sort.length > 0) { diff --git a/src/app/core/_services/params/builder-implementation.service.ts b/src/app/core/_services/params/builder-implementation.service.ts index d22bc9dbe..f91d70e62 100644 --- a/src/app/core/_services/params/builder-implementation.service.ts +++ b/src/app/core/_services/params/builder-implementation.service.ts @@ -98,6 +98,16 @@ export class RequestParamBuilder implements IParamBuilder { return this; } + /** + * Adds a new value to the aggregate fieldsets array + * @param include new include value + * @returns object instance + */ + addAggregate(aggregate: string): IParamBuilder { + this.params.aggregate = this.addToArray(this.params.aggregate, aggregate); + return this; + } + /** * Adds a new value from the given column to the sort array * @param sortingColumn column to get sort values from diff --git a/src/app/core/_services/params/builder-types.service.ts b/src/app/core/_services/params/builder-types.service.ts index 08ae1acbc..0baf3efe3 100644 --- a/src/app/core/_services/params/builder-types.service.ts +++ b/src/app/core/_services/params/builder-types.service.ts @@ -20,6 +20,7 @@ export class RequestParamsIntermediate { public filters?: Array; public sortOrder?: Array; public includeTotal?: boolean; + public aggregate?: Array; } /** @@ -40,6 +41,8 @@ export interface IParamBuilder { addIncludeTotal(includeTotal: boolean): IParamBuilder; + addAggregate(aggregate: string): IParamBuilder; + addInitial(datasource: BaseDataSource): IParamBuilder; create(): RequestParams; From fa5eedabaa40bd3465e6dcbe3bf3026a26c18757 Mon Sep 17 00:00:00 2001 From: Eric Wasson <229096365+Eric-Wasson@users.noreply.github.com> Date: Tue, 24 Mar 2026 18:44:31 +0100 Subject: [PATCH 2/5] work in progress --- src/app/core/_datasources/tasks.datasource.ts | 4 +++- src/app/core/_models/request-params.model.ts | 2 +- src/app/core/_services/buildparams.ts | 4 +++- .../core/_services/params/builder-implementation.service.ts | 5 +++-- src/app/core/_services/params/builder-types.service.ts | 4 ++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/app/core/_datasources/tasks.datasource.ts b/src/app/core/_datasources/tasks.datasource.ts index 69da5db62..4ad56401e 100644 --- a/src/app/core/_datasources/tasks.datasource.ts +++ b/src/app/core/_datasources/tasks.datasource.ts @@ -37,7 +37,9 @@ export class TasksDataSource extends BaseDataSource { .addInclude('tasks') .addInclude('hashlist') .addInclude('hashType') - .addAggregate('TESTVALUE') + .addAggregate('task', 'searched') + .addAggregate('task', 'dispatched') + .addAggregate('task', 'status') .addFilter({ field: 'isArchived', operator: FilterType.EQUAL, diff --git a/src/app/core/_models/request-params.model.ts b/src/app/core/_models/request-params.model.ts index b4ec49df8..56c8fab5a 100644 --- a/src/app/core/_models/request-params.model.ts +++ b/src/app/core/_models/request-params.model.ts @@ -47,7 +47,7 @@ interface IRequestParams { // Array of Filter objects that have to be performed filter?: Array; //array of aggregated fields to include ex. [active agents for tasks] - aggregate?: Array; + aggregate?: Array>; //array of attributes to sort on where '-' implies descending order on ex. [id, -name] sort?: Array; //Parameter for count endpoints to also include the count without filters diff --git a/src/app/core/_services/buildparams.ts b/src/app/core/_services/buildparams.ts index a6fcfd20a..9f8a378c0 100644 --- a/src/app/core/_services/buildparams.ts +++ b/src/app/core/_services/buildparams.ts @@ -42,7 +42,9 @@ export function setParameter(params: RequestParams): HttpParams { // Handle aggregate array const aggregate = params.aggregate; if (Array.isArray(aggregate) && aggregate.length > 0) { - httpParams = httpParams.set('aggregate', aggregate.join(',')); + aggregate.forEach((aggregateCategory) => { + httpParams = httpParams.set(`aggregate[${aggregateCategory}]`, aggregateCategory.join(',')); + }); } // Handle ordering parameter diff --git a/src/app/core/_services/params/builder-implementation.service.ts b/src/app/core/_services/params/builder-implementation.service.ts index f91d70e62..b2936a456 100644 --- a/src/app/core/_services/params/builder-implementation.service.ts +++ b/src/app/core/_services/params/builder-implementation.service.ts @@ -103,8 +103,8 @@ export class RequestParamBuilder implements IParamBuilder { * @param include new include value * @returns object instance */ - addAggregate(aggregate: string): IParamBuilder { - this.params.aggregate = this.addToArray(this.params.aggregate, aggregate); + addAggregate(aggregateCategory: string, aggregateField: string): IParamBuilder { + this.params.aggregate[aggregateCategory] = this.addToArray(this.params.aggregate[aggregateCategory], aggregateField); return this; } @@ -141,6 +141,7 @@ export class RequestParamBuilder implements IParamBuilder { if (this.params.sortOrder) requestParams.sort = this.params.sortOrder; if (this.params.filters) requestParams.filter = this.params.filters; if (this.params.includeTotal !== undefined) requestParams.include_total = this.params.includeTotal; + if (this.params.aggregate !== undefined) requestParams.aggregate = this.params.aggregate; return requestParams; } diff --git a/src/app/core/_services/params/builder-types.service.ts b/src/app/core/_services/params/builder-types.service.ts index 0baf3efe3..5576b64dc 100644 --- a/src/app/core/_services/params/builder-types.service.ts +++ b/src/app/core/_services/params/builder-types.service.ts @@ -20,7 +20,7 @@ export class RequestParamsIntermediate { public filters?: Array; public sortOrder?: Array; public includeTotal?: boolean; - public aggregate?: Array; + public aggregate?: Array>; } /** @@ -41,7 +41,7 @@ export interface IParamBuilder { addIncludeTotal(includeTotal: boolean): IParamBuilder; - addAggregate(aggregate: string): IParamBuilder; + addAggregate(aggregateCategory: string, aggregateField: string): IParamBuilder; addInitial(datasource: BaseDataSource): IParamBuilder; From a702af7e2c5cfd93c2b54af6102d2b27188e9217 Mon Sep 17 00:00:00 2001 From: Eric Wasson <229096365+Eric-Wasson@users.noreply.github.com> Date: Fri, 17 Apr 2026 11:17:35 +0200 Subject: [PATCH 3/5] Use aggregation fieldsets by default --- .../_datasources/agent-error.datasource.ts | 9 +++++++- .../core/_datasources/agents.datasource.ts | 6 +++++- .../core/_datasources/chunks.datasource.ts | 10 ++++++++- src/app/core/_datasources/files.datasource.ts | 4 ++-- .../_datasources/tasks-chunks.datasource.ts | 21 +++++++++++++------ src/app/core/_datasources/tasks.datasource.ts | 7 ++++--- src/app/core/_models/request-params.model.ts | 12 ++++++++++- src/app/core/_services/buildparams.ts | 4 ++-- .../params/builder-implementation.service.ts | 6 +++--- .../_services/params/builder-types.service.ts | 6 +++--- 10 files changed, 62 insertions(+), 23 deletions(-) diff --git a/src/app/core/_datasources/agent-error.datasource.ts b/src/app/core/_datasources/agent-error.datasource.ts index 13ca04107..a1d8bd9f9 100644 --- a/src/app/core/_datasources/agent-error.datasource.ts +++ b/src/app/core/_datasources/agent-error.datasource.ts @@ -30,7 +30,14 @@ export class AgentErrorDatasource extends BaseDataSource { // Use stored filter if no new filter is provided const activeFilter = query || this._currentFilter; - let agentParams = new RequestParamBuilder().addInitial(this).addInclude('task'); + let agentParams = new RequestParamBuilder() + .addInitial(this) + .addInclude('task') + .addAggregate({ + field: 'task', + values: [] + }); + if (this._agentId) { agentParams.addFilter({ field: 'agentId', operator: FilterType.EQUAL, value: this._agentId }); } diff --git a/src/app/core/_datasources/agents.datasource.ts b/src/app/core/_datasources/agents.datasource.ts index 68ebd9b62..6bf06fffc 100644 --- a/src/app/core/_datasources/agents.datasource.ts +++ b/src/app/core/_datasources/agents.datasource.ts @@ -49,7 +49,11 @@ export class AgentsDataSource extends BaseDataSource { .addInclude('accessGroups') .addInclude('tasks') .addInclude('assignments') - .addInclude('user'); + .addInclude('user') + .addAggregate({ + field: 'task', + values: [] + }); if (this.agentStatsRequired) { agentParams = agentParams.addInclude('agentStats'); } diff --git a/src/app/core/_datasources/chunks.datasource.ts b/src/app/core/_datasources/chunks.datasource.ts index 342a3e222..7114428b0 100644 --- a/src/app/core/_datasources/chunks.datasource.ts +++ b/src/app/core/_datasources/chunks.datasource.ts @@ -30,7 +30,15 @@ export class ChunksDataSource extends BaseDataSource { // Use stored filter if no new filter is provided const activeFilter = query || this._currentFilter; - let params = new RequestParamBuilder().addInitial(this).addInclude('task').addInclude('agent'); + let params = new RequestParamBuilder() + .addInitial(this) + .addInclude('agent') + .addInclude('task') + .addAggregate({ + field: 'task', + values: [] + }); + if (this._agentId) { params.addFilter({ field: 'agentId', operator: FilterType.EQUAL, value: this._agentId }); } diff --git a/src/app/core/_datasources/files.datasource.ts b/src/app/core/_datasources/files.datasource.ts index 4dab4332f..27c3fda5f 100644 --- a/src/app/core/_datasources/files.datasource.ts +++ b/src/app/core/_datasources/files.datasource.ts @@ -62,12 +62,12 @@ export class FilesDataSource extends BaseDataSource { if (this.editIndex !== undefined) { if (this.editType === 0) { - files$ = this.service.get(SERV.TASKS, this.editIndex, paramsBuilder.addInclude('files').create(), httpOptions); + files$ = this.service.get(SERV.TASKS, this.editIndex, paramsBuilder.addInclude('files').addAggregate({field: 'task', values: []}).create(), httpOptions); } else if (this.editType === 1) { files$ = this.service.get( SERV.PRETASKS, this.editIndex, - paramsBuilder.addInclude('pretaskFiles').create(), + paramsBuilder.addInclude('pretaskFiles').addAggregate({field: 'pretask', values: []}).create(), httpOptions ); } diff --git a/src/app/core/_datasources/tasks-chunks.datasource.ts b/src/app/core/_datasources/tasks-chunks.datasource.ts index 8711bda53..db5c2a899 100644 --- a/src/app/core/_datasources/tasks-chunks.datasource.ts +++ b/src/app/core/_datasources/tasks-chunks.datasource.ts @@ -36,18 +36,27 @@ export class TasksChunksDataSource extends BaseDataSource { const activeFilter = query || this._currentFilter; - let chunkParams = new RequestParamBuilder().addInitial(this).addInclude('task').addInclude('agent').addFilter({ - field: 'taskId', - operator: FilterType.EQUAL, - value: this._taskId - }); + let chunkParams = new RequestParamBuilder() + .addInitial(this) + .addInclude('agent') + .addFilter({ + field: 'taskId', + operator: FilterType.EQUAL, + value: this._taskId + }); if (!this._isChunksLive) { if (this._taskId) { const httpOptions = { headers: new HttpHeaders({ 'X-Skip-Error-Dialog': 'true' }) }; try { + let taskParams = new RequestParamBuilder() + .addAggregate({ + field: 'task', + values: [] + }); + const response = await firstValueFrom( - this.service.get(SERV.TASKS, this._taskId, undefined, httpOptions).pipe( + this.service.get(SERV.TASKS, this._taskId, taskParams.create(), httpOptions).pipe( catchError((error) => { this.handleFilterError(error); throw error; diff --git a/src/app/core/_datasources/tasks.datasource.ts b/src/app/core/_datasources/tasks.datasource.ts index 4ad56401e..75a3854c5 100644 --- a/src/app/core/_datasources/tasks.datasource.ts +++ b/src/app/core/_datasources/tasks.datasource.ts @@ -37,9 +37,10 @@ export class TasksDataSource extends BaseDataSource { .addInclude('tasks') .addInclude('hashlist') .addInclude('hashType') - .addAggregate('task', 'searched') - .addAggregate('task', 'dispatched') - .addAggregate('task', 'status') + .addAggregate({ + field: 'task', + values: ['activeAgents', 'searched', 'dispatched', 'status'] + }) .addFilter({ field: 'isArchived', operator: FilterType.EQUAL, diff --git a/src/app/core/_models/request-params.model.ts b/src/app/core/_models/request-params.model.ts index 56c8fab5a..5057b9871 100644 --- a/src/app/core/_models/request-params.model.ts +++ b/src/app/core/_models/request-params.model.ts @@ -33,6 +33,16 @@ export interface Filter { parent?: string; } +/** + * Interface definition for aggregate fieldsets + * @prop field Aggregate field name + * @prop values Values to aggregate for the field + */ +export interface Aggregate { + field: string; + values: string[]; +} + /** * Interface definition for request params */ @@ -47,7 +57,7 @@ interface IRequestParams { // Array of Filter objects that have to be performed filter?: Array; //array of aggregated fields to include ex. [active agents for tasks] - aggregate?: Array>; + aggregate?: Array; //array of attributes to sort on where '-' implies descending order on ex. [id, -name] sort?: Array; //Parameter for count endpoints to also include the count without filters diff --git a/src/app/core/_services/buildparams.ts b/src/app/core/_services/buildparams.ts index 9f8a378c0..36f8ccf3c 100644 --- a/src/app/core/_services/buildparams.ts +++ b/src/app/core/_services/buildparams.ts @@ -42,8 +42,8 @@ export function setParameter(params: RequestParams): HttpParams { // Handle aggregate array const aggregate = params.aggregate; if (Array.isArray(aggregate) && aggregate.length > 0) { - aggregate.forEach((aggregateCategory) => { - httpParams = httpParams.set(`aggregate[${aggregateCategory}]`, aggregateCategory.join(',')); + aggregate.forEach((aggregate) => { + httpParams = httpParams.set(`aggregate[${aggregate.field}]`, aggregate.values.join(',')); }); } diff --git a/src/app/core/_services/params/builder-implementation.service.ts b/src/app/core/_services/params/builder-implementation.service.ts index b2936a456..4b151ec20 100644 --- a/src/app/core/_services/params/builder-implementation.service.ts +++ b/src/app/core/_services/params/builder-implementation.service.ts @@ -1,7 +1,7 @@ import { SortingColumn } from '@components/tables/ht-table/ht-table.models'; import { BaseDataSource } from '@src/app/core/_datasources/base.datasource'; -import { Filter, type RequestParams } from '@src/app/core/_models/request-params.model'; +import { Filter, Aggregate, type RequestParams } from '@src/app/core/_models/request-params.model'; import { IParamBuilder, RequestParamsIntermediate } from '@src/app/core/_services/params/builder-types.service'; /** @@ -103,8 +103,8 @@ export class RequestParamBuilder implements IParamBuilder { * @param include new include value * @returns object instance */ - addAggregate(aggregateCategory: string, aggregateField: string): IParamBuilder { - this.params.aggregate[aggregateCategory] = this.addToArray(this.params.aggregate[aggregateCategory], aggregateField); + addAggregate(aggregate: Aggregate): IParamBuilder { + this.params.aggregate = this.addToArray(this.params.aggregate, aggregate); return this; } diff --git a/src/app/core/_services/params/builder-types.service.ts b/src/app/core/_services/params/builder-types.service.ts index 5576b64dc..ffc6c5747 100644 --- a/src/app/core/_services/params/builder-types.service.ts +++ b/src/app/core/_services/params/builder-types.service.ts @@ -7,7 +7,7 @@ import { SortingColumn } from '@components/tables/ht-table/ht-table.models'; import { BaseDataSource } from '@datasources/base.datasource'; -import { Filter, type RequestParams } from '@src/app/core/_models/request-params.model'; +import { Filter, Aggregate, type RequestParams } from '@src/app/core/_models/request-params.model'; /** * Intermediate class to build RequestParams from using a builder interface implementation @@ -20,7 +20,7 @@ export class RequestParamsIntermediate { public filters?: Array; public sortOrder?: Array; public includeTotal?: boolean; - public aggregate?: Array>; + public aggregate?: Array; } /** @@ -41,7 +41,7 @@ export interface IParamBuilder { addIncludeTotal(includeTotal: boolean): IParamBuilder; - addAggregate(aggregateCategory: string, aggregateField: string): IParamBuilder; + addAggregate(aggregate: Aggregate): IParamBuilder; addInitial(datasource: BaseDataSource): IParamBuilder; From 2efe5a6c4718802f8ca360e5dbf95d3a653bba3c Mon Sep 17 00:00:00 2001 From: Eric Wasson <229096365+Eric-Wasson@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:42:35 +0200 Subject: [PATCH 4/5] fixed eslint errors --- .../_datasources/agent-error.datasource.ts | 12 +++++------ .../core/_datasources/chunks.datasource.ts | 13 +++++------- src/app/core/_datasources/files.datasource.ts | 9 ++++++-- .../_datasources/tasks-chunks.datasource.ts | 21 ++++++++----------- .../params/builder-implementation.service.ts | 2 +- .../_services/params/builder-types.service.ts | 2 +- 6 files changed, 28 insertions(+), 31 deletions(-) diff --git a/src/app/core/_datasources/agent-error.datasource.ts b/src/app/core/_datasources/agent-error.datasource.ts index a1d8bd9f9..75ddd08f2 100644 --- a/src/app/core/_datasources/agent-error.datasource.ts +++ b/src/app/core/_datasources/agent-error.datasource.ts @@ -30,14 +30,12 @@ export class AgentErrorDatasource extends BaseDataSource { // Use stored filter if no new filter is provided const activeFilter = query || this._currentFilter; - let agentParams = new RequestParamBuilder() - .addInitial(this) - .addInclude('task') + let agentParams = new RequestParamBuilder().addInitial(this).addInclude('task') .addAggregate({ - field: 'task', - values: [] - }); - + field: 'task', + values: [] + }); + if (this._agentId) { agentParams.addFilter({ field: 'agentId', operator: FilterType.EQUAL, value: this._agentId }); } diff --git a/src/app/core/_datasources/chunks.datasource.ts b/src/app/core/_datasources/chunks.datasource.ts index 7114428b0..bb10d28c0 100644 --- a/src/app/core/_datasources/chunks.datasource.ts +++ b/src/app/core/_datasources/chunks.datasource.ts @@ -30,15 +30,12 @@ export class ChunksDataSource extends BaseDataSource { // Use stored filter if no new filter is provided const activeFilter = query || this._currentFilter; - let params = new RequestParamBuilder() - .addInitial(this) - .addInclude('agent') - .addInclude('task') + let params = new RequestParamBuilder().addInitial(this).addInclude('agent').addInclude('task') .addAggregate({ - field: 'task', - values: [] - }); - + field: 'task', + values: [] + }); + if (this._agentId) { params.addFilter({ field: 'agentId', operator: FilterType.EQUAL, value: this._agentId }); } diff --git a/src/app/core/_datasources/files.datasource.ts b/src/app/core/_datasources/files.datasource.ts index 27c3fda5f..3ec6d564a 100644 --- a/src/app/core/_datasources/files.datasource.ts +++ b/src/app/core/_datasources/files.datasource.ts @@ -62,12 +62,17 @@ export class FilesDataSource extends BaseDataSource { if (this.editIndex !== undefined) { if (this.editType === 0) { - files$ = this.service.get(SERV.TASKS, this.editIndex, paramsBuilder.addInclude('files').addAggregate({field: 'task', values: []}).create(), httpOptions); + files$ = this.service.get( + SERV.TASKS, + this.editIndex, + paramsBuilder.addInclude('files').addAggregate({field: 'task', values: []}).create(), + httpOptions + ); } else if (this.editType === 1) { files$ = this.service.get( SERV.PRETASKS, this.editIndex, - paramsBuilder.addInclude('pretaskFiles').addAggregate({field: 'pretask', values: []}).create(), + paramsBuilder.addInclude('pretaskFiles').addAggregate({ field: 'pretask', values: [] }).create(), httpOptions ); } diff --git a/src/app/core/_datasources/tasks-chunks.datasource.ts b/src/app/core/_datasources/tasks-chunks.datasource.ts index db5c2a899..09c1e0b17 100644 --- a/src/app/core/_datasources/tasks-chunks.datasource.ts +++ b/src/app/core/_datasources/tasks-chunks.datasource.ts @@ -36,24 +36,21 @@ export class TasksChunksDataSource extends BaseDataSource { const activeFilter = query || this._currentFilter; - let chunkParams = new RequestParamBuilder() - .addInitial(this) - .addInclude('agent') + let chunkParams = new RequestParamBuilder().addInitial(this).addInclude('agent') .addFilter({ - field: 'taskId', - operator: FilterType.EQUAL, - value: this._taskId - }); + field: 'taskId', + operator: FilterType.EQUAL, + value: this._taskId + }); if (!this._isChunksLive) { if (this._taskId) { const httpOptions = { headers: new HttpHeaders({ 'X-Skip-Error-Dialog': 'true' }) }; try { - let taskParams = new RequestParamBuilder() - .addAggregate({ - field: 'task', - values: [] - }); + const taskParams = new RequestParamBuilder().addAggregate({ + field: 'task', + values: [] + }); const response = await firstValueFrom( this.service.get(SERV.TASKS, this._taskId, taskParams.create(), httpOptions).pipe( diff --git a/src/app/core/_services/params/builder-implementation.service.ts b/src/app/core/_services/params/builder-implementation.service.ts index 4b151ec20..4b76508c3 100644 --- a/src/app/core/_services/params/builder-implementation.service.ts +++ b/src/app/core/_services/params/builder-implementation.service.ts @@ -1,7 +1,7 @@ import { SortingColumn } from '@components/tables/ht-table/ht-table.models'; import { BaseDataSource } from '@src/app/core/_datasources/base.datasource'; -import { Filter, Aggregate, type RequestParams } from '@src/app/core/_models/request-params.model'; +import { Aggregate, Filter, type RequestParams } from '@src/app/core/_models/request-params.model'; import { IParamBuilder, RequestParamsIntermediate } from '@src/app/core/_services/params/builder-types.service'; /** diff --git a/src/app/core/_services/params/builder-types.service.ts b/src/app/core/_services/params/builder-types.service.ts index ffc6c5747..f4a2bed6d 100644 --- a/src/app/core/_services/params/builder-types.service.ts +++ b/src/app/core/_services/params/builder-types.service.ts @@ -7,7 +7,7 @@ import { SortingColumn } from '@components/tables/ht-table/ht-table.models'; import { BaseDataSource } from '@datasources/base.datasource'; -import { Filter, Aggregate, type RequestParams } from '@src/app/core/_models/request-params.model'; +import { Aggregate, Filter, type RequestParams } from '@src/app/core/_models/request-params.model'; /** * Intermediate class to build RequestParams from using a builder interface implementation From 06d178b0541d42ce3aec4efe97d784104a077c08 Mon Sep 17 00:00:00 2001 From: Eric Wasson <229096365+Eric-Wasson@users.noreply.github.com> Date: Fri, 17 Apr 2026 13:48:34 +0200 Subject: [PATCH 5/5] fixed eslint errors --- src/app/core/_datasources/agent-error.datasource.ts | 3 +-- src/app/core/_datasources/chunks.datasource.ts | 3 +-- src/app/core/_datasources/files.datasource.ts | 2 +- src/app/core/_datasources/tasks-chunks.datasource.ts | 5 ++--- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/app/core/_datasources/agent-error.datasource.ts b/src/app/core/_datasources/agent-error.datasource.ts index c01b5a23c..33f3308b5 100644 --- a/src/app/core/_datasources/agent-error.datasource.ts +++ b/src/app/core/_datasources/agent-error.datasource.ts @@ -30,8 +30,7 @@ export class AgentErrorDatasource extends BaseDataSource { // Use stored filter if no new filter is provided const activeFilter = query || this._currentFilter; - let agentParams = new RequestParamBuilder().addInitial(this).addInclude('task') - .addAggregate({ + let agentParams = new RequestParamBuilder().addInitial(this).addInclude('task').addAggregate({ field: 'task', values: [] }); diff --git a/src/app/core/_datasources/chunks.datasource.ts b/src/app/core/_datasources/chunks.datasource.ts index f760fbcb3..508b14e47 100644 --- a/src/app/core/_datasources/chunks.datasource.ts +++ b/src/app/core/_datasources/chunks.datasource.ts @@ -31,8 +31,7 @@ export class ChunksDataSource extends BaseDataSource { // Use stored filter if no new filter is provided const activeFilter = query || this._currentFilter; - let params = new RequestParamBuilder().addInitial(this).addInclude('agent').addInclude('task') - .addAggregate({ + let params = new RequestParamBuilder().addInitial(this).addInclude('agent').addInclude('task').addAggregate({ field: 'task', values: [] }); diff --git a/src/app/core/_datasources/files.datasource.ts b/src/app/core/_datasources/files.datasource.ts index ec38ad7f4..f05fe26ef 100644 --- a/src/app/core/_datasources/files.datasource.ts +++ b/src/app/core/_datasources/files.datasource.ts @@ -65,7 +65,7 @@ export class FilesDataSource extends BaseDataSource { files$ = this.service.get( SERV.TASKS, this.editIndex, - paramsBuilder.addInclude('files').addAggregate({field: 'task', values: []}).create(), + paramsBuilder.addInclude('files').addAggregate({ field: 'task', values: [] }).create(), httpOptions ); } else if (this.editType === 1) { diff --git a/src/app/core/_datasources/tasks-chunks.datasource.ts b/src/app/core/_datasources/tasks-chunks.datasource.ts index 923b88404..ecdd1ca6d 100644 --- a/src/app/core/_datasources/tasks-chunks.datasource.ts +++ b/src/app/core/_datasources/tasks-chunks.datasource.ts @@ -36,8 +36,7 @@ export class TasksChunksDataSource extends BaseDataSource { const activeFilter = query || this._currentFilter; - let chunkParams = new RequestParamBuilder().addInitial(this).addInclude('agent') - .addFilter({ + let chunkParams = new RequestParamBuilder().addInitial(this).addInclude('agent').addFilter({ field: 'taskId', operator: FilterType.EQUAL, value: this._taskId @@ -51,7 +50,7 @@ export class TasksChunksDataSource extends BaseDataSource { field: 'task', values: [] }); - + const response = await firstValueFrom( this.service.get(SERV.TASKS, this._taskId, taskParams.create(), httpOptions).pipe( catchError((error) => {