fix(history): default exportHostValueHistory limit to undefined

When no limit is provided to exportHostValueHistory, return all available records instead of only one. This aligns GraphQL defaults with user expectations.

- Change: set ZabbixHistoryGetParams.limit default to undefined

- Type safety: widened limit type to number | null | undefined
This commit is contained in:
Andreas Hilbig 2026-02-11 13:32:39 +01:00
parent 0acef818c6
commit b894687bea

View file

@ -35,7 +35,7 @@ export class ZabbixHistoryGetParams extends ParsedArgs {
*/
constructor(public itemids: number[] | number | string | string[],
public output: string[] = ["value", "itemid", "clock", "ns"],
public limit: number | null = Array.isArray(itemids) ? itemids.length : 1,
public limit: number | null | undefined = undefined,
public history: StorageItemType | string = StorageItemType.Text,
time_from?: Date,
time_until?: Date,