1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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]
);
}
}
|