summaryrefslogtreecommitdiffstats
path: root/library/Icingadb/Common/ServiceLinks.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:36:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 12:36:40 +0000
commita0901c4b7f2db488cb4fb3be2dd921a0308f4659 (patch)
treefafb393cf330a60df129ff10d0059eb7b14052a7 /library/Icingadb/Common/ServiceLinks.php
parentInitial commit. (diff)
downloadicingadb-web-upstream.tar.xz
icingadb-web-upstream.zip
Adding upstream version 1.0.2.upstream/1.0.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'library/Icingadb/Common/ServiceLinks.php')
-rw-r--r--library/Icingadb/Common/ServiceLinks.php108
1 files changed, 108 insertions, 0 deletions
diff --git a/library/Icingadb/Common/ServiceLinks.php b/library/Icingadb/Common/ServiceLinks.php
new file mode 100644
index 0000000..368be48
--- /dev/null
+++ b/library/Icingadb/Common/ServiceLinks.php
@@ -0,0 +1,108 @@
+<?php
+
+/* Icinga DB Web | (c) 2020 Icinga GmbH | GPLv2 */
+
+namespace Icinga\Module\Icingadb\Common;
+
+use Icinga\Module\Icingadb\Model\Host;
+use Icinga\Module\Icingadb\Model\Service;
+use ipl\Web\Url;
+
+abstract class ServiceLinks
+{
+ public static function acknowledge(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/service/acknowledge',
+ ['name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function addComment(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/service/add-comment',
+ ['name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function checkNow(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/service/check-now',
+ ['name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function scheduleCheck(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/service/schedule-check',
+ ['name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function comments(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/comments',
+ ['service.name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function downtimes(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/downtimes',
+ ['service.name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function history(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/service/history',
+ ['name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function removeAcknowledgement(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/service/remove-acknowledgement',
+ ['name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function scheduleDowntime(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/service/schedule-downtime',
+ ['name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function sendCustomNotification(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/service/send-custom-notification',
+ ['name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function processCheckresult(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/service/process-checkresult',
+ ['name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+
+ public static function toggleFeatures(Service $service, Host $host): Url
+ {
+ return Url::fromPath(
+ 'icingadb/service/toggle-features',
+ ['name' => $service->name, 'host.name' => $host->name]
+ );
+ }
+}