Commit graph

93 commits

Author SHA1 Message Date
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
Sukhwinder Dhillon
279839d9da Align coding style to comply with latest PSR 2025-12-15 16:06:44 +01:00
jrauh01
3c7228686c
Print redis config file if saving failed (#1272)
If saving the Redis settings fails due to a write error, the desired
configuration file content is now displayed so that the user can deploy
it manually (Same behavior as with database configuration).

For that a catch block is introduced on the `NotWritableError` that is
added to `IniWriter::write()` in
https://github.com/Icinga/icingaweb2/pull/5404.

Refs https://github.com/Icinga/icingaweb2/pull/5404
Resolves #1269
2025-11-17 13:19:13 +01:00
Johannes Meyer
6af3c7e595 CommandTransport: Implement chunked transmission handling
Previously, command forms were responsible for this. But they
don't have any notion of fallback handling and are unable to
ensure proper re-submission of failed batches.
2025-11-12 15:15:10 +01:00
Johannes Meyer
c2543454b1 migrate: Drop backend selection 2025-11-06 09:04:46 +01:00
Johannes Meyer
3f1cdc0a85 forms/Command/Object: Show progress labels upon submit
fixes #1204
2025-06-10 15:24:22 +02:00
Johannes Meyer
2da207bedd commands: Send multiple commands while bulk processing
Reduces risk of timeouts in case Icinga takes its time to respond.
The timeout of 15 seconds introduced earlier has been kept.

Chunk sizes were chosen as follows:
- 1000: Cheap calculations (object features, check scheduling)
- 500: Expected disk writes (comments)
- 250: Process check result, Downtimes, Acks
2025-06-10 15:24:22 +02:00
Johannes Meyer
67b755b86d
RedisConfigForm: Catch write errors during save (#1208)
refs #1089
2025-06-10 15:23:52 +02:00
Sukhwinder Dhillon
8d67f55c30 Delete(Downtime|Comment)Form: Fix the incorrect success message 2025-05-21 16:47:35 +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
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
marianrh
c4a8f4748f
Support setting a default comment for acknowledgements (#1178)
I propose to add a new option for setting a default comment for
acknowledging problems (`acknowledge_comment_text`), similar to the
existing `hostdowntime_comment_text` and `servicedowntime_comment_text`
options.

This originally was a pull request for Icinga Web 2
(https://github.com/Icinga/icingaweb2/pull/5365). I was asked to
implement this in Icinga DB Web as well. *However, since I'm not using
Icinga DB Web myself, this is untested.*

Beside adding the new feature, I also fixed a copy-and-paste error for
the `servicedowntime_comment_text` option.
2025-05-08 14:24:15 +02:00
raviks789
d3d746f2ec RedisConfigForm: Use empty string as default path for unset client certificate and key 2025-04-30 13:40:26 +02:00
Johannes Meyer
0b06486147 ScheduleHostDowntimeForm: Don't yield command duplicates
fixes #1145
2025-03-24 14:24:23 +01:00
Johannes Meyer
464a440f0f Introduce new class ScheduleDowntimeCommand
Covers the full functionality of the schedule-downtime
endpoint of Icinga 2's api now.

fixes #1090
2024-12-09 12:51:12 +01:00
Johannes Meyer
d5b4087a50 CommandForm: Don't pass generators to commands 2024-04-08 09:17:04 +02:00
Johannes Meyer
bcdbda1e40 CommandForm: Expect Iterator in method getCommands() 2024-03-26 17:05:32 +01:00
Johannes Meyer
435a58b4f6 CommandForm: Ensure getCommands() is passed an Iterator 2024-03-26 17:05:32 +01:00
Johannes Meyer
3d0949edcb CommandForm: Don't add a submit button and CSRF token..
..if it's an API target
2023-09-08 16:37:44 +02:00
Sukhwinder Dhillon
b2a512dc1b Forms: Don't autocomplete password elements
- Setting `autocomplete` to `off` does not work, but `new-password` does.
2023-09-08 16:32:24 +02:00
Sukhwinder Dhillon
d3c891578e RedisConfigForm: Fix Variable '$pem' is probably undefined 2023-09-05 14:26:42 +02:00
Johannes Meyer
4714790b5d Use ipl\Stdlib\iterable_value_first to access the first item..
..a command has been transmitted for.
2023-09-05 09:16:56 +02:00
Alexander A. Klimov
bbf2739b6e DeleteDowntimeCommand: process multiple objects at once 2023-08-02 12:44:02 +02:00
Alexander A. Klimov
cd5f52c1bc DeleteCommentCommand: process multiple objects at once 2023-08-02 12:44:02 +02:00
Alexander A. Klimov
b92eeb69e7 Actually let ObjectsCommand derivates process multiple objects at once 2023-08-02 12:44:02 +02:00
Alexander A. Klimov
1a04927c8b Introduce CommandForm#filterGrantedOn() 2023-08-02 12:44:02 +02:00
Alexander A. Klimov
b4222228cc ObjectCommand and derivates: handle multiple objects 2023-08-02 12:44:02 +02:00
Alexander A. Klimov
051a391444 CommandForm#getCommand(): take (and process) multiple objects, not just one 2023-08-02 12:44:02 +02:00
Ravi Srinivasa
4f7b56ade1 Prevent downtime flexible duration being set to 0h0m 2023-06-02 12:19:15 +02:00
Sukhwinder Dhillon
d4958a4a6a (AddComment/AcknowledgeProblem)Form: Add validators to expire_time element 2023-06-02 09:35:45 +02:00
Sukhwinder Dhillon
f818356ec6 Ipl-html SelectElement: Use options attr instead of multiOptions 2023-05-26 15:06:13 +02:00
Sukhwinder Dhillon
8fa8f4baf0 AcknowledgeProblem|AddComment-Form: Don't show datepicker if expire checkbox is unchecked 2023-05-22 15:07:29 +02:00
Johannes Meyer
b3c5caf3d6 RedisConfigForm: Properly clear empty sections/options
fixes #672
2022-11-02 15:35:11 +01:00
Johannes Meyer
992eebba3b RedisConfigForm: Properly store password of 2nd redis
fixes #670
2022-11-02 14:48:27 +01:00
VerboEse
c5d842f156
Support for redis password (#496) 2022-03-31 15:33:58 +02:00
Johannes Meyer
ae1d3d1624 DeleteCommentForm: Make it just an inline form
It doesn't need any icinga form layout or style rules
2022-03-21 12:55:46 +01:00
Johannes Meyer
fb6eb88ddf SetAsBackendForm: Make it a ipl\Html\Form 2022-02-24 16:22:37 +01:00
Johannes Meyer
598d26f0f9 Drop class SetAsBackendConfigForm 2022-02-24 16:13:33 +01:00
Yonas Habteab
2ffd820a74 ApiTransportForm: Don't use text to create password elements 2021-12-09 08:44:27 +01:00
Yonas Habteab
19ac9c322f ApiTransportForm: Fix force creation of a transport doesn't work 2021-11-30 14:58:45 +01:00
raviks789
2a2ac29589 Fix dis/enabling of feature commands of multi-selected hosts or services.
In case of elements other than CheckboxElement $element->getValue() must be used instead of $element->isChecked().
2021-11-12 12:09:28 +01:00
raviks789
13669fd1ae Set default value of mixed type feature commands of multi-selected hosts or services to "noop". 2021-11-12 12:07:55 +01:00
Johannes Meyer
a098d7e6fc migrate.js: Enhance detection of modules with support for Icinga DB 2021-11-11 16:17:58 +01:00
Johannes Meyer
d6fbcb6e4e Move functions Icingadb class into the new hook 2021-11-11 16:14:51 +01:00
Sukhwinder Dhillon
f0d0989332 migrate popup: Add checkbox to set icingadb as backend
This checkbox is only displayed in modules that support icingadb.
2021-11-11 09:08:16 +01:00
Sukhwinder Dhillon
6f6042926d Introduce class SetAsBackendConfigForm.php 2021-11-11 09:08:16 +01:00
Yonas Habteab
342ceca676 Display a proper success message when toggling object passive checks 2021-11-05 08:54:57 +01:00
Yonas Habteab
aefd0e1f7d Add PHP 7 argument & return type declarations to all member methods 2021-11-03 16:06:59 +01:00