Commit graph

29 commits

Author SHA1 Message Date
5e41aa5cc4 chore: add default filters for host and host group queries
- Introduced `HOST_TYPE_FILTER_DEFAULT` and `HOST_GROUP_FILTER_DEFAULT` constants in the `Config` class.
- Updated resolvers to use these defaults when `tag_hostType` or `search_name` arguments are not provided.
- Added corresponding tests to verify default behavior in host and host group queries.
- Added documentation on overriding 'HOST_GROUP_FILTER_DEFAULT' by explicitly setting the 'search_name' argument in the 'allHostGroups' query.
- Explained the usage of the '*' wildcard in 'search_name' with a concrete example for subgroup matching.
2026-01-27 18:46:48 +01:00
2a8ff989f3 chore: centralize configuration management using a new Config class
- Replaced all direct `process.env` references with `Config` class constants.
- Added `dotenv` package to manage environment variables.
- Updated affected files, including schema loader, Zabbix API, resolvers, logging system, and integration points.
- Improved maintainability and consistency in environment variable handling.
2026-01-27 17:28:22 +01:00
6312c3a2f7 chore: update base host group name from "Baustellen-Devices" to "Roadwork" in code, tests, and documentation 2026-01-27 15:55:09 +01:00
19cddd1ffb docs: add Virtual Control Room (VCR) sample application info to README.md
- Added a new section describing the Virtual Control Room (VCR) as a sample application.

- Explained how VCR utilizes key API features like hierarchical mapping, dynamic authorization, mass provisioning, and data visualization.

- Included a link to the technical product information PDF in the docs folder.

- Added VCR to the Key Features list.
2026-01-27 12:55:23 +01:00
dd9908221b chore: update Docker image path in workflows and README 2026-01-27 12:05:58 +01:00
e61b5f4f11 docs: enhance GraphQL schema documentation
- Added comprehensive descriptions to all types, interfaces, and fields in 'schema/api_commons.graphql'.

- Improved documentation for mutations and input/response types in 'schema/mutations.graphql'.

- Added detailed descriptions for all queries and their arguments in 'schema/queries.graphql'.

- Enhanced documentation for core Zabbix types and enums in 'schema/zabbix.graphql'.

- Updated extension schemas under 'schema/extensions/' with proper GraphQL descriptions.

- Verified schema validity via 'graphql-codegen' and ran all tests to ensure consistency.
2026-01-26 19:18:59 +01:00
59815636ea chore: synchronize repository state after template group sample split
- Staged deletion of 'docs/sample_import_template_groups_mutation.graphql'.

- Added untracked 'docs/sample_import_host_template_groups_mutation.graphql'.

- Committed updates to 'src/test/template_integration.test.ts'.
2026-01-26 19:06:25 +01:00
b3f84b9cd3 docs: remove Library permission groups from samples and documentation
- Removed 'Permissions/Library' and 'Permissions/Library/Item' from README.md hierarchy examples.

- Updated 'docs/sample_import_permissions_template_groups_mutation.graphql' to remove these groups from the sample import.

- Removed these groups from the 'TEMPLATEGROUP_EXPORT_DUMMY_TEMPLATE' in 'src/testdata/templates/zbx_default_templates_vcr.yaml'.

- Verified all 38 tests pass successfully.
2026-01-26 19:06:25 +01:00
538bffd0bf docs: add Docker and CI/CD documentation to README.md
- Added instructions for building and running the API with Docker.

- Added 'CI/CD Integration' to the key features list.

- Included 'docker pull' instructions for using pre-built images from the Forgejo registry.

(cherry picked from commit f6e790db6a)
2026-01-26 19:06:25 +01:00
d4cb9fecab docs: improve schema extensibility documentation and samples
- Added TSDoc for 'createHierarchicalValueFieldResolver'.

- Updated README with 'Extending the Schema' guide and Zabbix preconditions.

- Migrated all MQTT items to Agent 2 'mqtt.get' format across documentation and test data.

- Added 'docs/sample_import_distance_tracker_template.graphql' as a schema extension example.

- Verified all 38 tests pass.

(cherry picked from commit bff9ee6d2e)
2026-01-26 19:06:24 +01:00
023198d3fe docs: add README.md and LICENSE file
- Created README.md with project purpose, features, installation guide, and usage samples.

- Added LICENSE file with GNU Affero General Public License v3.0 to match Zabbix license.

- Added license field to package.json.
2026-01-26 19:05:50 +01:00
fdfd5f1e0e feat: add comprehensive tests and samples for host and user rights endpoints
- Added GraphQL sample queries and mutations for host and user rights endpoints in the 'docs' directory.

- Implemented unit tests for all remaining GraphQL endpoints, including hosts, devices, host groups, locations, and user permissions.

- Created dedicated integration tests for host and user rights workflows, utilizing the new sample files.

- Fixed a bug in 'HostImporter.getHostGroupHierarchyNames' to correctly process and sort nested host group hierarchies.

- Refined Zabbix API mocking in tests to improve reliability and support path-based routing.

- Verified all 38 tests across 11 suites pass successfully.
2026-01-26 16:55:23 +01:00
a3ed4886a3 feat: add template and template group management via GraphQL
- Implemented GraphQL endpoints for importing, querying, and deleting Zabbix templates and template groups. - Added support for full template data import, including items, preprocessing steps, tags, and linked templates. - Implemented dependent item support by deferred creation logic in the template importer. - Added ability to query templates and template groups with name pattern filtering (supporting Zabbix wildcards). - Implemented batch deletion for templates and template groups by ID or name pattern. - Improved error reporting by including detailed Zabbix API error data in GraphQL responses. - Added comprehensive unit and integration tests covering all new functionality. - Provided GraphQL sample queries and mutations in the 'docs' directory for all new endpoints.
2026-01-24 15:42:13 +01:00
e641f8e610 chore: Add allDevices query resolver, update Zabbix device query handling, and enhance schema with DeviceConfig and WidgetPreview types 2026-01-20 17:10:08 +01:00
c1035cd614 chore: Enhance schema with DeviceConfig tags resolver and update IntelliJ workspace adjustments 2026-01-16 20:37:49 +01:00
0c1f585909 chore: Update tags field schema to use DeviceConfig, enhance isDevice type check, and adjust IntelliJ workspace 2026-01-16 20:24:08 +01:00
8e5fbc3f57 chore: Update Dockerfile CMD for schema path, log schema loading path in schema.ts, and adjust IntelliJ workspace 2026-01-14 14:21:14 +01:00
437321ef6d chore: Add copy-schema script, update Dockerfile schema path, and adjust npm prod workflow 2026-01-14 12:06:16 +01:00
70e64448e5 chore: Move schema directory away from src; Migrate extensions to schema directory, update Dockerfile and configuration paths 2026-01-14 10:03:38 +01:00
c6314fbda0 chore: Replace copying of schema.graphql with extensions in Dockerfile 2026-01-13 15:03:44 +01:00
874a22f53a chore: Add test for Zabbix API arguments parsing 2026-01-13 15:01:06 +01:00
058ff42b4a chore: Add dry-run mode and configure logger for operation mode logging 2026-01-13 14:51:40 +01:00
fbe1e4ed05 chore: Update IntelliJ workspace and fix Docker image tag in workflow 2026-01-13 14:48:52 +01:00
98c612fc56 chore: Add missing ".js" extensions to imports and improve Node.js compatibility for dynamic schema loading 2026-01-13 14:42:11 +01:00
1c1aeb4519 chore: Update IntelliJ workspace settings and add GitHub Actions workflow for Docker deployment 2026-01-13 14:16:10 +01:00
da86c726db refactor!: Cleanup zabbix api access and remove unused classes 2026-01-07 18:11:47 +01:00
a89c3eeea7 refactor!: Restructure grapqhl-schema to better align with clean code and project structure principles 2026-01-06 15:58:38 +01:00
47640ff13e refactor!: Rename "devices" to "hosts" in "exportHistory" - operation. Prepare extraction of device specific types and alignment with integration layer 2026-01-06 12:42:43 +01:00
92ffe71684 Initial commit: Extract base Zabbix GraphQl - API functionality from VCR Project and add dynamic schema samples 2026-01-05 21:05:35 +01:00