Commit graph

1529 commits

Author SHA1 Message Date
Eric Lippmann
7bb09036fc Fix const visibility 2025-10-21 14:56:41 +02:00
Eric Lippmann
7fa28b9c9f Fix missing space after NOT operator 2025-10-21 14:56:41 +02:00
Copilot
54702e1271
Fix multiple downtime deletion permission issue (#1257) 2025-07-15 16:00:33 +02:00
Johannes Meyer
93869319b3 Auth: Apply filter/hosts and filter/services to dependency queries
refs #1242
2025-07-14 15:49:14 +02:00
Johannes Meyer
0148f4f510 db: Use an alias for *_customvar through tables
fixes #1162
2025-07-14 15:47:45 +02:00
Johannes Meyer
67baaf528c Comment|DowntimeDetail: Use correct filter for removal
Since #1060, comments/delete and downtimes/delete try to use
`ObjectAuthorization`'s cache properly and override `CommandAction`'s
`isGrantedOnType()`. Though, the filter is applied to the host
and service model as a result, and not to the downtime model. This
way, downtime filters MUST be absolute, just like filters provided
by the search bar. Otherwise `name=downtime-name` will be translated
to e.g. `host.name=downtime-name` which obviously cannot match.

fixes #1245
2025-07-14 09:39:17 +02:00
Sukhwinder Dhillon
24fceca424 DependencyNode: Use static call to avoid unnecessary columns in case of summary query 2025-07-10 13:12:37 +02:00
Sukhwinder Dhillon
eed9a3bc04 Move the HostController::joinFix() method to DependecyNode
- Centerlize the method
2025-07-10 09:17:50 +02:00
Sukhwinder Dhillon
844a54a418 Host|Service: Add missing relation unreachable_parent
- Remove obsolete property php-doc
2025-07-07 11:59:27 +02:00
Sukhwinder Dhillon
32b31f3e44 RedundancyGroupDetail: Eliminate duplicate nodes
This change was missing in: e5b499bbdb
2025-07-07 10:02:04 +02:00
Alvar Penning
3e0bd96ec6 IcingaHealth: Fix version comparison
There are multiple possible outputs for an Icinga DB version. The
package version contain the git tag, with a leading "v". The development
version mimics git-describe(1), including a commit hash separated by a
dash after the semantic version.

The current version comparison uses PHP's builtin version_compare().

This results in leading "v"s to return invalid results. Furthermore, it
treats everything behind the version as an "any string"[^0], which is
smaller than dev, alpha, beta, and so on. Thus, any git-describe(1)
version of Icinga DB 1.4.0 would be considered smaller as 1.4.0.

Fixes #1230.

[^0]: https://www.php.net/manual/en/function.version-compare.php
2025-06-20 10:13:00 +02:00
Johannes Meyer
3a583811a3 IcingaHealth: Switch to critical in case Icinga DB is too old
The old redis schema is incompatible with v1.2.0 hence the
health check should report a critical incident instead.

Also updates the health view to show a proper message.
2025-06-18 11:12:19 +02:00
Sukhwinder Dhillon
d5682944ab RedundancyGroupSummary: Add missing @property phpDoc annotation 2025-06-17 15:08:48 +02:00
Sukhwinder Dhillon
eb7179ffd8 RedundancyGroupSummary: Use DepenedecyNode as base to apply restrictions correctly
* RedundancyGroupSummary:
  - Columns are same as in DependencyNodeSummary. Column `redundancy_group.state.failed` excluded because not required here.
  - Don't sort by default. Sorting the summary is not necessary and even fails for PostgreSQL as it would require adding the column to the GROUP BY clause.
  - Introduce new method for(), to easily get the summary query for given group id. Adjust filter. The summary is always for parent (member).
2025-06-17 15:08:48 +02:00
Sukhwinder Dhillon
0e7c4fcc2d
Change column defination labels of user and usergroup (#1224) 2025-06-17 15:05:39 +02:00
Sukhwinder Dhillon
34f584f2d2 DependencyEdgeState: Remove column defination
This defination is (1) showing technical relation path (2) not usefull.
2025-06-16 17:28:59 +02:00
Ravi Kumar Kempapura Srinivasa
d0ffba3d91
ObjectSuggestions: Prioritze Column suggestions and best suggestions (#1215)
Show custom variable suggestions only if the column suggestions have not
consumed all the slots (50).

fixes #1206
2025-06-13 13:23:48 +02:00
Sukhwinder Dhillon
b5040b2fae EventRenderer: Fix soft_state event visual
- Only the CheckAttempt visual must be skipped in case $layout is minimal|header, not the whole condition body.
2025-06-13 08:13:12 +02:00
Sukhwinder Dhillon
223de33df3 ObjectList: Don't add multiselect url to member/childen list items of RedundancyGroup
- These lists do not support multiselect
2025-06-13 08:07:43 +02:00
Sukhwinder Dhillon
5655f095f8 IcingaRedis: Remove now obsolete code 2025-06-11 14:25:58 +02:00
Sukhwinder Dhillon
e26db03e19 Deprecate Icingadb\Model\Behavior\BoolCast and use \ipl\Orm\Behavior\BoolCast instead 2025-06-11 14:25:56 +02:00
Sukhwinder Dhillon
2459655739 IcingaRedis: state_type is now a string 2025-06-11 14:24:36 +02:00
Sukhwinder Dhillon
9283135144 Support new column is_sticky_acknowledgement 2025-06-11 14:24:36 +02:00
Johannes Meyer
de86ca168a RedisHealth: Serve Server infos as metrics 2025-06-11 12:13:51 +02:00
Johannes Meyer
6bf94ada9d RedisHealth: Include version in message 2025-06-11 12:13:51 +02:00
Johannes Meyer
ccb9756bc3 IcingaHealth: Show icingadb version in message…
…and show a warning if <1.4
2025-06-11 12:13:51 +02:00
Johannes Meyer
2a3531033e health: Show icingadb version 2025-06-11 12:13:51 +02:00
Johannes Meyer
eaa60a37fb IcingaHealth: Include icingadb version in metrics 2025-06-11 12:13:51 +02:00
Johannes Meyer
54b3d3ad7a Instance: Add new column icingadb_version 2025-06-11 12:13:51 +02:00
Sukhwinder Dhillon
0b5a34b4e1 Models: Register the to 1 relations first to display them first in the search suggestions 2025-06-11 11:34:37 +02:00
Johannes Meyer
455c3b6cd4 ApiCommandTransport: Introduce constant SEND_TIMEOUT 2025-06-10 17:21:18 +02:00
Johannes Meyer
d28787a7d9 ApiCommandTransport: Ensure timed out commands are not retried
This fundamentally changes the expectation in #1138. But since
we cannot guarantee that Icinga 2 did not actually perform the
action, we also should not retry the command. Otherwise there
may be duplicated downtimes, comments, etc.
2025-06-10 15:24:22 +02:00
Johannes Meyer
3082353eac CommandActions: Raise time and memory limit 2025-06-10 15:24:22 +02:00
Johannes Meyer
3f305fe540 StateBadges: Actually render links for single badges
fixes #1160
2025-06-05 16:13:56 +02:00
Johannes Meyer
af3fa8a112 Introduce model SlaHistoryDowntime 2025-06-05 13:16:38 +02:00
Johannes Meyer
de160ebd12 Introduce model SlaHistoryState 2025-06-05 13:16:38 +02:00
Johannes Meyer
568c037b70 CustomVarTable: Let the user fully collapse subgroups
resolves #1053
2025-06-05 12:36:42 +02:00
Sukhwinder Dhillon
7866063974 ObjectInspectionDetail: Show host/service templates 2025-06-05 12:33:49 +02:00
Sukhwinder Dhillon
a7afaf71f2 IcingaApiCommandRenderer: Don't set empty array, if no attr is set
- Use the returned value instead, either array or null.

- With https://github.com/Icinga/icinga2/issues/8167 attrs=[] means that no attrs are
  fetched at all, and attrs=null means that all available attrs are fetched
2025-06-03 09:11:33 +02:00
Johannes Meyer
30658ef116 hosts/services: Fix that overdue items do not appear as such
fixes #1193
2025-05-26 10:31:51 +02:00
Johannes Meyer
0f81a7c3fb DependencyEdgeState: Add relation edge 2025-05-21 17:14:30 +02:00
Sukhwinder Dhillon
2b34f4f63f ObjectGrid: Add missing property $emptyStateMessage and getter/setter 2025-05-15 14:22:37 +02:00
Will_i_code
56371be50c
Add support for redis acl/username and database selection (#1165)
resolves #1044
2025-05-14 09:53:32 +02:00
Johannes Meyer
a91f6cf6ef CommandActions: Force a form's HTTP method for api requests 2025-05-12 16:59:07 +02:00
Johannes Meyer
08bbf39048 downtimes: Support automated removal 2025-05-12 16:59:07 +02:00
Johannes Meyer
c78d664f79 comments: Support automated removal 2025-05-12 16:59:07 +02:00
Ravi Kumar Kempapura Srinivasa
cdfa388d16
ObjectSuggestion: Dynamically adjust columns and custom var suggestion limits (#1173)
Currently, the limit is globally set to 50, hence the short custom
variable names which overlaps with most of the column names will not be
suggested and instead only column names will be suggested. To prevent
this the default limit is split in half and adjusted dynamically based
on available suggestions.

resolves #1094
2025-05-12 14:11:23 +02:00
Sukhwinder Dhillon
4b2274ab15 Macros: Explicitely cast return value to string 2025-05-12 13:56:56 +02:00
Sukhwinder Dhillon
418eca0379 Macros: Add missing support for bool type macro 2025-05-12 13:56:56 +02:00
Sukhwinder Dhillon
a176054de9 Macros: Add missing support for DateTime type macro 2025-05-12 13:56:55 +02:00