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:
parent
5da4a17e36
commit
41e4c4da1f
12 changed files with 251 additions and 60 deletions
|
|
@ -173,7 +173,8 @@ export interface ZabbixCreateHostInputParams extends ZabbixParams {
|
|||
}
|
||||
templateids?: [number];
|
||||
hostgroupids?: [number];
|
||||
additionalParams?: [number];
|
||||
macros?: { macro: string, value: string }[];
|
||||
additionalParams?: any;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -200,6 +201,9 @@ class ZabbixCreateHostParams implements ZabbixParams {
|
|||
return {groupid: groupid}
|
||||
});
|
||||
}
|
||||
if (inputParams.macros) {
|
||||
this.macros = inputParams.macros;
|
||||
}
|
||||
}
|
||||
|
||||
host: string
|
||||
|
|
@ -214,6 +218,7 @@ class ZabbixCreateHostParams implements ZabbixParams {
|
|||
}
|
||||
templates?: any
|
||||
groups?: any
|
||||
macros?: { macro: string, value: string }[]
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue