From 41e4c4da1f08e44ad310e4045606e6195ffbcc9f Mon Sep 17 00:00:00 2001 From: Andreas Hilbig Date: Sun, 1 Feb 2026 16:23:35 +0100 Subject: [PATCH] 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. --- .idea/workspace.xml | 99 ++++++++++--------- docs/howtos/cookbook.md | 14 +-- ...ple_import_weather_sensor_template.graphql | 8 +- schema/mutations.graphql | 26 +++++ src/datasources/zabbix-hosts.ts | 7 +- src/execution/host_importer.ts | 3 +- src/execution/regression_test_executor.ts | 69 ++++++++++++- src/execution/template_importer.ts | 3 +- src/model/model_enum_values.ts | 4 +- src/schema/generated/graphql.ts | 16 +++ src/test/host_importer.test.ts | 34 +++++++ src/test/template_importer.test.ts | 28 ++++++ 12 files changed, 251 insertions(+), 60 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 4fc0c1d..40ef872 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -6,11 +6,17 @@ + + - - + + + + + + - @@ -69,51 +75,51 @@ - { - "keyToString": { - "NIXITCH_NIXPKGS_CONFIG": "", - "NIXITCH_NIX_CONF_DIR": "", - "NIXITCH_NIX_OTHER_STORES": "", - "NIXITCH_NIX_PATH": "", - "NIXITCH_NIX_PROFILES": "", - "NIXITCH_NIX_REMOTE": "", - "NIXITCH_NIX_USER_PROFILE_DIR": "", - "Node.js.index.ts.executor": "Run", - "RunOnceActivity.MCP Project settings loaded": "true", - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", - "RunOnceActivity.git.unshallow": "true", - "RunOnceActivity.typescript.service.memoryLimit.init": "true", - "com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true", - "git-widget-placeholder": "main", - "go.import.settings.migrated": "true", - "javascript.preferred.runtime.type.id": "node", - "junie.onboarding.icon.badge.shown": "true", - "last_opened_file_path": "//wsl.localhost/Ubuntu/home/ahilbig/git/vcr/zabbix-graphql-api/src", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_interpreter_path": "wsl://Ubuntu@/home/ahilbig/.nvm/versions/node/v24.12.0/bin/node", - "nodejs_package_manager_path": "npm", - "npm.codegen.executor": "Run", - "npm.compile.executor": "Run", - "npm.copy-schema.executor": "Run", - "npm.prod.executor": "Run", - "npm.test.executor": "Run", - "settings.editor.selected.configurable": "ml.llm.mcp", - "settings.editor.splitter.proportion": "0.28812414", - "to.speed.mode.migration.done": "true", - "ts.external.directory.path": "\\\\wsl.localhost\\Ubuntu\\home\\ahilbig\\git\\vcr\\zabbix-graphql-api\\node_modules\\typescript\\lib", - "vue.rearranger.settings.migration": "true" + +}]]> - - @@ -211,7 +217,8 @@ - + +