Commit graph

35 commits

Author SHA1 Message Date
Johannes Meyer
10895f94f8 CustomvarFlat: Do not ignore source paths with a zero
Some checks failed
L10n Update / update (push) Has been cancelled
CI / PHP (push) Has been cancelled
PHP evaluates `"0"` to false…
2026-05-27 17:10:40 +02:00
Sukhwinder Dhillon
75d4d13c73 CustomvarFlat: Fix path splitting for special chars and bracket notation
Two issues were fixed in the split regex:

1. Special characters before `.` were ignored:
The old regex only split on `.` when directly preceded by a word
character (\w), causing splits to be missed when `.` was preceded
by special characters like whitespace, / or $.
Result before: `foo /.bar.one` => `['foo /.bar', 'one']`
Result after: `foo /.bar.one` => `['foo /', 'bar', 'one']`

2. Brackets mid-word were incorrectly split:
The old regex split before any `[`, causing keys like `con[0]cat` to be
split incorrectly.
Resulti before: `con[0]cat` => `['con', '[0]cat']`
Now splits before `[` only when it's a standalone array index — meaning
`]` is followed by `.`, another `[`, or end of string.
Result after: `con[0]cat` => `['con', '[0]', 'cat']`
2026-05-21 15:52:42 +02:00
fsalomon
b1dabef96c
Preserve state labels in plugin output (#1366)
Some checks failed
L10n Update / update (push) Has been cancelled
CI / PHP (push) Has been cancelled
- Keep bracketed state labels as text inside plugin output (state-ball
replacements)
- Hide the text visually while preserving the existing state-ball
styling
  
Nice when copy&pasting plugin output to a code agent.

---------

Co-authored-by: Fabian Salomon <4098510+fsalomon@users.noreply.github.com>
2026-04-28 14:18:37 +02:00
Bastian Lederer
8622514fcd Change implicit nullable type declaration to explicit
Since PHP 8.4 implicitly nullable parameter types are deprecated.

Normalize scoped PHPDoc for nullable-parameter updates: use `?Type` instead of
`Type|null` and remove column alignment.

Co-authored-by: "Eric Lippmann <eric.lippmann@icinga.com>"
2026-03-19 22:08:30 +01:00
Eric Lippmann
272e791390 License source files as GPL-3.0-or-later
Add SPDX license headers and mark source files as GPL-3.0-or-later to
preserve the option to relicense under later GPL versions.
2026-03-11 14:03:05 +01:00
Johannes Meyer
20347acf82 Auth: Flatten semantically equal restrictions
This avoids several sub queries where just one is sufficient.
Before: `(a=b|c=d|e=f)|(g=h|i=j|k=l)|(m=n|o=p)`
After:  `(a=b|c=d|e=f|g=h|i=j|k=l|m=n|o=p)`

Whether this has a real advantage needs to be seen, but I
think it helps the query optimizers to better optimize :D
2026-03-02 14:49:05 +01:00
Sukhwinder Dhillon
279839d9da Align coding style to comply with latest PSR 2025-12-15 16:06:44 +01:00
Johannes Meyer
f2da48219c tests: Enhance command transport tests 2025-11-12 15:15:10 +01:00
Johannes Meyer
0148f4f510 db: Use an alias for *_customvar through tables
fixes #1162
2025-07-14 15:47:45 +02:00
Eric Lippmann
28beb292e9 Test IcingaHealth::normalizeVersion() 2025-06-20 10:13:00 +02:00
Johannes Meyer
e66661196b usergroups: Rename to contactgroups 2025-04-10 15:04:41 +02:00
Johannes Meyer
9ea5d70512 users: Rename to contacts 2025-04-10 15:04:41 +02:00
Johannes Meyer
c57298e776 test: Make sure a backend exists 2024-12-17 16:33:05 +01:00
raviks789
bfb4c511b6
StateBadgesTest: Account for change in visibility for createLink method 2024-10-31 09:46:52 +01:00
Sukhwinder Dhillon
929258c30f PluginOutputTest: Migrate tests from monitoring/PluginOutputTest 2024-07-24 10:41:23 +02:00
Sukhwinder Dhillon
2fefc75552 PluginOutput::render(): Shorten the output by characterLimit before processing it
If the shorten output contained (not properly closed) HTML element, it merged the next list-item into the same html tag, because the closing tag was missing.
So we therefor shorten the output by characterLimit before proccessing it
2024-07-24 10:24:27 +02:00
Johannes Meyer
a0bb146790 test: Command transmission fallback handling
refs #950
2024-03-26 17:05:32 +01:00
Johannes Meyer
83af168936 FlattenedObjectVars: Force processing to finish early
fixes #1001
2024-03-26 17:04:36 +01:00
Johannes Meyer
018d45f629 Transform custom variable filters as late as possible
fixes #865
2024-03-22 15:04:32 +01:00
Johannes Meyer
ce750587a0 migrate: Document the --no-backup switch for the filter subcommand 2023-11-13 15:03:12 +01:00
Johannes Meyer
4c7cbfa67d migrate: Also backup roles
Logging is useful, but a backup even more.
2023-11-13 15:03:12 +01:00
Johannes Meyer
98c43732f7 migrate: Don't crash just because a directory does not exist 2023-11-13 15:03:12 +01:00
Johannes Meyer
8a3407b33c migrate: Also transform/migrate menu items 2023-11-13 15:03:12 +01:00
Johannes Meyer
4372be956d test: Add case for the new migrate command 2023-11-13 15:03:12 +01:00
Johannes Meyer
4ff444340d Macros: Properly support CompatHost and CompatService
fixes #900
2023-10-13 09:03:03 +02:00
Yonas Habteab
0f380c8411 Don't use customvar values from customvar table other than for empty array & dictionary 2023-10-13 09:02:01 +02:00
Johannes Meyer
959f06cafd Utilize ipl\Web\Url::setFilter() where applicable 2023-09-12 09:52:19 +02:00
raviks789
81cf29884c Add unit tests for invalid performance data evaluation 2023-09-05 16:44:44 +02:00
Johannes Meyer
34ecf5d80f StateBadges: Require a real filter in method createLink 2023-07-21 10:24:10 +02:00
Johannes Meyer
4a0583f89d Add StateBadge(s) changes from ipl-web here 2023-07-20 10:20:09 +02:00
Johannes Meyer
ca57b19ec1 test: Add case for Icinga\Module\Icingadb\Model\CustomvarFlat 2023-07-05 14:05:53 +02:00
Johannes Meyer
8a57ca7850 Introduce monitoring's perfdata tests here 2023-01-19 11:04:17 +01:00
Johannes Meyer
3074e8861b MacrosTest: Drop Mockery usage 2023-01-18 12:13:15 +01:00
Johannes Meyer
1a73126938 Model: Implement createDefaults where applicable 2022-05-23 15:51:51 +02:00
Yonas Habteab
6748302a8e Test: Add Macros unit tests 2021-11-02 09:26:38 +01:00