feat: add weather sensor support and fix device status mapping

This commit introduces support for provisioning weather sensors with geo-coordinates
via user macros and fixes a critical mapping bug in device status.

Changes:
- fix: Corrected DeviceStatus enum mapping (0=ENABLED, 1=DISABLED).
- feat: Added 'status' field to CreateTemplateItem input in GraphQL schema.
- feat: Enabled user macro assignment during host and template creation/import.
- feat: Added regression tests for user macro assignment and HTTP agent URL support.
- docs: Updated cookbook and sample queries to use {$LAT} and {$LON} macros.
- test: Added unit tests for macro assignment in HostImporter and TemplateImporter.
- chore: Regenerated GraphQL types.
This commit is contained in:
Andreas Hilbig 2026-02-01 16:23:35 +01:00
parent 5da4a17e36
commit 41e4c4da1f
12 changed files with 251 additions and 60 deletions

View file

@ -131,7 +131,8 @@ export class TemplateImporter {
groups: groupids.map(id => ({ groupid: id })),
uuid: template.uuid,
templates: linkedTemplates,
tags: template.tags?.map(t => ({ tag: t.tag, value: t.value || "" }))
tags: template.tags?.map(t => ({ tag: t.tag, value: t.value || "" })),
macros: template.macros
}
let templateImportResult = await new ZabbixCreateTemplateRequest(zabbixAuthToken, cookie)