Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing support for automated removal of downtimes and comments #1060

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions application/controllers/CommentController.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
<?php

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:acknowledgeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:addCommentAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:assertIsGrantedOnCommandTargets\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:checkNowAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:fetchCommandTargets\(\) return type has no value type specified in iterable type array\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:processCheckresultAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:removeAcknowledgementAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleCheckAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleDowntimeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:sendCustomNotificationAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.4 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:acknowledgeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.4 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:addCommentAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.4 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:assertIsGrantedOnCommandTargets\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.4 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:checkNowAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.4 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:fetchCommandTargets\(\) return type has no value type specified in iterable type array\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.4 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:processCheckresultAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.4 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:removeAcknowledgementAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.4 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleCheckAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.4 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleDowntimeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.4 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:sendCustomNotificationAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:acknowledgeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:addCommentAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:assertIsGrantedOnCommandTargets\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:checkNowAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:fetchCommandTargets\(\) return type has no value type specified in iterable type array\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:processCheckresultAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:removeAcknowledgementAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleCheckAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleDowntimeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:sendCustomNotificationAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:acknowledgeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:addCommentAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:assertIsGrantedOnCommandTargets\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:checkNowAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:fetchCommandTargets\(\) return type has no value type specified in iterable type array\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:processCheckresultAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:removeAcknowledgementAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleCheckAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleDowntimeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.3 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:sendCustomNotificationAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.1 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:acknowledgeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.1 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:addCommentAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.1 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:assertIsGrantedOnCommandTargets\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.1 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:checkNowAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.1 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:fetchCommandTargets\(\) return type has no value type specified in iterable type array\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.1 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:processCheckresultAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.1 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:removeAcknowledgementAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.1 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleCheckAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.1 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleDowntimeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.1 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:sendCustomNotificationAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:acknowledgeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:addCommentAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:assertIsGrantedOnCommandTargets\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:checkNowAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:fetchCommandTargets\(\) return type has no value type specified in iterable type array\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:processCheckresultAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:removeAcknowledgementAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleCheckAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleDowntimeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 7.2 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:sendCustomNotificationAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.0 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:acknowledgeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.0 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:addCommentAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.0 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:assertIsGrantedOnCommandTargets\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.0 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:checkNowAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.0 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:fetchCommandTargets\(\) return type has no value type specified in iterable type array\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.0 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:processCheckresultAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.0 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:removeAcknowledgementAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.0 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleCheckAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.0 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:scheduleDowntimeAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

Check failure on line 1 in application/controllers/CommentController.php

View workflow job for this annotation

GitHub Actions / phpstan / Static analysis with phpstan and php 8.0 on ubuntu-latest

Ignored error pattern #^Method Icinga\\Module\\Icingadb\\Controllers\\CommentController\:\:sendCustomNotificationAction\(\) has no return type specified\.$# in path /home/runner/work/icingadb-web/icingadb-web/application/controllers/CommentController.php was not matched in reported errors.

/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */

namespace Icinga\Module\Icingadb\Controllers;

use Icinga\Exception\NotFoundError;
use Icinga\Module\Icingadb\Common\CommandActions;
use Icinga\Module\Icingadb\Common\Links;
use Icinga\Module\Icingadb\Model\Comment;
use Icinga\Module\Icingadb\Web\Controller;
use Icinga\Module\Icingadb\Widget\Detail\CommentDetail;
use Icinga\Module\Icingadb\Widget\ItemList\CommentList;
use ipl\Stdlib\Filter;
use ipl\Web\Url;

class CommentController extends Controller
{
use CommandActions;

/** @var Comment The comment object */
protected $comment;

Expand Down Expand Up @@ -59,14 +54,4 @@

$this->setAutorefreshInterval(10);
}

protected function fetchCommandTargets(): array
{
return [$this->comment];
}

protected function getCommandTargetsUrl(): Url
{
return Links::comment($this->comment);
}
}
66 changes: 39 additions & 27 deletions application/controllers/CommentsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Icinga\Module\Icingadb\Controllers;

use GuzzleHttp\Psr7\ServerRequest;
use Icinga\Module\Icingadb\Common\CommandActions;
use Icinga\Module\Icingadb\Common\Links;
use Icinga\Module\Icingadb\Forms\Command\Object\DeleteCommentForm;
use Icinga\Module\Icingadb\Model\Comment;
Expand All @@ -13,12 +14,16 @@
use Icinga\Module\Icingadb\Widget\ItemList\CommentList;
use Icinga\Module\Icingadb\Web\Control\ViewModeSwitcher;
use Icinga\Module\Icingadb\Widget\ShowMore;
use ipl\Orm\Model;
use ipl\Stdlib\Filter;
use ipl\Web\Control\LimitControl;
use ipl\Web\Control\SortControl;
use ipl\Web\Url;

class CommentsController extends Controller
{
use CommandActions;

public function indexAction()
{
$this->addTitleTab(t('Comments'));
Expand Down Expand Up @@ -103,34 +108,9 @@ public function indexAction()

public function deleteAction()
{
$this->assertIsGrantedOnCommandTargets('icingadb/command/comment/delete');
$this->setTitle(t('Remove Comments'));

$db = $this->getDb();

$comments = Comment::on($db)->with([
'host',
'host.state',
'service',
'service.host',
'service.host.state',
'service.state'
]);

$this->filter($comments);

$form = (new DeleteCommentForm())
->setObjects($comments)
->setRedirectUrl(Links::comments()->getAbsoluteUrl())
->on(DeleteCommentForm::ON_SUCCESS, function ($form) {
// This forces the column to reload nearly instantly after the redirect
// and ensures the effect of the command is visible to the user asap
$this->getResponse()->setAutoRefreshInterval(1);

$this->redirectNow($form->getRedirectUrl());
})
->handleRequest(ServerRequest::fromGlobals());

$this->addContent($form);
$this->handleCommandForm(DeleteCommentForm::class);
}

public function detailsAction()
Expand Down Expand Up @@ -194,4 +174,36 @@ public function searchEditorAction()
$this->getDocument()->add($editor);
$this->setTitle(t('Adjust Filter'));
}

protected function getCommandTargetsUrl(): Url
{
return Url::fromPath('__CLOSE__');
}

protected function fetchCommandTargets()
{
$comments = Comment::on($this->getDb())->with([
'host',
'host.state',
'service',
'service.host',
'service.host.state',
'service.state'
]);

$this->filter($comments);

return $comments;
}

public function isGrantedOn(string $permission, Model $object): bool
{
return parent::isGrantedOn($permission, $object->{$object->object_type});
}

public function isGrantedOnType(string $permission, string $type, Filter\Rule $filter, bool $cache = true): bool
{
return parent::isGrantedOnType($permission, 'host', $filter, $cache)
|| parent::isGrantedOnType($permission, 'service', $filter, $cache);
}
}
15 changes: 0 additions & 15 deletions application/controllers/DowntimeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
namespace Icinga\Module\Icingadb\Controllers;

use Icinga\Exception\NotFoundError;
use Icinga\Module\Icingadb\Common\CommandActions;
use Icinga\Module\Icingadb\Common\Links;
use Icinga\Module\Icingadb\Model\Downtime;
use Icinga\Module\Icingadb\Web\Controller;
use Icinga\Module\Icingadb\Widget\Detail\DowntimeDetail;
use Icinga\Module\Icingadb\Widget\ItemList\DowntimeList;
use ipl\Stdlib\Filter;
use ipl\Web\Url;

class DowntimeController extends Controller
{
use CommandActions;

/** @var Downtime */
protected $downtime;

Expand Down Expand Up @@ -71,14 +66,4 @@ public function indexAction()

$this->setAutorefreshInterval(10);
}

protected function fetchCommandTargets(): array
{
return [$this->downtime];
}

protected function getCommandTargetsUrl(): Url
{
return Links::downtime($this->downtime);
}
}
70 changes: 43 additions & 27 deletions application/controllers/DowntimesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Icinga\Module\Icingadb\Controllers;

use GuzzleHttp\Psr7\ServerRequest;
use Icinga\Module\Icingadb\Common\CommandActions;
use Icinga\Module\Icingadb\Common\Links;
use Icinga\Module\Icingadb\Forms\Command\Object\DeleteDowntimeForm;
use Icinga\Module\Icingadb\Model\Downtime;
Expand All @@ -13,12 +14,16 @@
use Icinga\Module\Icingadb\Widget\ItemList\DowntimeList;
use Icinga\Module\Icingadb\Web\Control\ViewModeSwitcher;
use Icinga\Module\Icingadb\Widget\ShowMore;
use ipl\Orm\Model;
use ipl\Stdlib\Filter;
use ipl\Web\Control\LimitControl;
use ipl\Web\Control\SortControl;
use ipl\Web\Url;

class DowntimesController extends Controller
{
use CommandActions;

public function indexAction()
{
$this->addTitleTab(t('Downtimes'));
Expand Down Expand Up @@ -109,34 +114,9 @@ public function indexAction()

public function deleteAction()
{
$this->assertIsGrantedOnCommandTargets('icingadb/command/downtime/delete');
$this->setTitle(t('Cancel Downtimes'));

$db = $this->getDb();

$downtimes = Downtime::on($db)->with([
'host',
'host.state',
'service',
'service.host',
'service.host.state',
'service.state'
]);

$this->filter($downtimes);

$form = (new DeleteDowntimeForm())
->setObjects($downtimes)
->setRedirectUrl(Links::downtimes()->getAbsoluteUrl())
->on(DeleteDowntimeForm::ON_SUCCESS, function ($form) {
// This forces the column to reload nearly instantly after the redirect
// and ensures the effect of the command is visible to the user asap
$this->getResponse()->setAutoRefreshInterval(1);

$this->redirectNow($form->getRedirectUrl());
})
->handleRequest(ServerRequest::fromGlobals());

$this->addContent($form);
$this->handleCommandForm(DeleteDowntimeForm::class);
}

public function detailsAction()
Expand Down Expand Up @@ -200,4 +180,40 @@ public function searchEditorAction()
$this->getDocument()->add($editor);
$this->setTitle(t('Adjust Filter'));
}

protected function getCommandTargetsUrl(): Url
{
return Url::fromPath('__CLOSE__');
}

protected function fetchCommandTargets()
{
$downtimes = Downtime::on($this->getDb())->with([
'host',
'host.state',
'service',
'service.host',
'service.host.state',
'service.state'
]);

$this->filter($downtimes);

return $downtimes;
}

public function isGrantedOn(string $permission, Model $object): bool
{
if ($object->scheduled_by !== null) {
return false;
}

return parent::isGrantedOn($permission, $object->{$object->object_type});
}

public function isGrantedOnType(string $permission, string $type, Filter\Rule $filter, bool $cache = true): bool
{
return parent::isGrantedOnType($permission, 'host', $filter, $cache)
|| parent::isGrantedOnType($permission, 'service', $filter, $cache);
}
}
4 changes: 0 additions & 4 deletions application/forms/Command/Object/DeleteCommentForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@
use Icinga\Module\Icingadb\Forms\Command\CommandForm;
use Icinga\Web\Notification;
use ipl\Orm\Model;
use ipl\Web\Common\RedirectOption;
use ipl\Web\Widget\Icon;
use Iterator;
use Traversable;

class DeleteCommentForm extends CommandForm
{
use RedirectOption;

protected $defaultAttributes = ['class' => 'inline'];

public function __construct()
Expand All @@ -38,7 +35,6 @@ public function __construct()

protected function assembleElements()
{
$this->addElement($this->createRedirectOption());
}

protected function assembleSubmitButton()
Expand Down
4 changes: 0 additions & 4 deletions application/forms/Command/Object/DeleteDowntimeForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@
use Icinga\Module\Icingadb\Forms\Command\CommandForm;
use Icinga\Web\Notification;
use ipl\Orm\Model;
use ipl\Web\Common\RedirectOption;
use ipl\Web\Widget\Icon;
use Iterator;
use Traversable;

class DeleteDowntimeForm extends CommandForm
{
use RedirectOption;

protected $defaultAttributes = ['class' => 'inline'];

public function __construct()
Expand All @@ -38,7 +35,6 @@ public function __construct()

protected function assembleElements()
{
$this->addElement($this->createRedirectOption());
}

protected function assembleSubmitButton()
Expand Down
20 changes: 20 additions & 0 deletions doc/09-Automation.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ Please have a look at the [Monitoring Plugins Development Guidelines](https://ww
| expire | n | BoolEnum | - |
| expire_time | y | DateTime | expire |

### Delete Comments

#### Routes

* icingadb/comments/delete

#### Options

None.

### Check Now

#### Routes
Expand Down Expand Up @@ -218,6 +228,16 @@ None.
| hours | y | Number | flexible |
| minutes | y | Number | flexible |

### Delete Downtimes

#### Routes

* icingadb/downtimes/delete

#### Options

None.

### Send Custom Notification

#### Routes
Expand Down
1 change: 1 addition & 0 deletions library/Icingadb/Common/CommandActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ protected function handleApiRequest(CommandForm $form)
});

$form->handleRequest($this->getServerRequest());
$this->assertHttpMethod($form->getMethod());

$errors = [];
foreach ($form->getElements() as $element) {
Expand Down
1 change: 0 additions & 1 deletion library/Icingadb/Widget/Detail/CommentDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ protected function createRemoveCommentForm()

return (new DeleteCommentForm())
->setObjects([$this->comment])
->populate(['redirect' => '__BACK__'])
->setAction($action->getAbsoluteUrl());
}

Expand Down
1 change: 0 additions & 1 deletion library/Icingadb/Widget/Detail/DowntimeDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ protected function createCancelDowntimeForm()

return (new DeleteDowntimeForm())
->setObjects([$this->downtime])
->populate(['redirect' => '__BACK__'])
->setAction($action->getAbsoluteUrl());
}

Expand Down