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
|
|
@ -258,6 +258,10 @@ input CreateTemplate {
|
|||
Tags to assign to the template.
|
||||
"""
|
||||
tags: [CreateTag!]
|
||||
"""
|
||||
User macros to assign to the template.
|
||||
"""
|
||||
macros: [CreateMacro!]
|
||||
}
|
||||
|
||||
"""
|
||||
|
|
@ -277,6 +281,10 @@ input CreateTemplateItem {
|
|||
"""
|
||||
type: Int
|
||||
"""
|
||||
Zabbix item status (0 for Enabled, 1 for Disabled).
|
||||
"""
|
||||
status: Int
|
||||
"""
|
||||
Technical key of the item.
|
||||
"""
|
||||
key: String!
|
||||
|
|
@ -374,6 +382,20 @@ input CreateTag {
|
|||
value: String
|
||||
}
|
||||
|
||||
"""
|
||||
Input for creating a user macro.
|
||||
"""
|
||||
input CreateMacro {
|
||||
"""
|
||||
Macro name (e.g. '{$LAT}').
|
||||
"""
|
||||
macro: String!
|
||||
"""
|
||||
Macro value.
|
||||
"""
|
||||
value: String!
|
||||
}
|
||||
|
||||
"""
|
||||
Response for a template import operation.
|
||||
"""
|
||||
|
|
@ -512,6 +534,10 @@ input CreateHost {
|
|||
Location information for the host.
|
||||
"""
|
||||
location: LocationInput
|
||||
"""
|
||||
User macros to assign to the host.
|
||||
"""
|
||||
macros: [CreateMacro!]
|
||||
}
|
||||
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue