mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
ScheduledDowntime, Form, activity: tweak links
This commit is contained in:
parent
69c8018f8d
commit
8106a6ab6e
@ -105,4 +105,12 @@ class IcingaScheduledDowntimeForm extends DirectorObjectForm
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function setObjectSuccessUrl()
|
||||||
|
{
|
||||||
|
$this->setSuccessUrl(
|
||||||
|
'director/scheduled-downtime',
|
||||||
|
$this->object()->getUrlParams()
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,17 @@ class IcingaScheduledDowntime extends IcingaObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getOnDeleteUrl()
|
||||||
|
{
|
||||||
|
if ($this->isApplyRule()) {
|
||||||
|
return 'director/scheduled-downtimes/applyrules';
|
||||||
|
} elseif ($this->isTemplate()) {
|
||||||
|
return 'director/scheduled-downtimes/templates';
|
||||||
|
} else {
|
||||||
|
return 'director/scheduled-downtimes';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function isActive($now = null)
|
public function isActive($now = null)
|
||||||
{
|
{
|
||||||
if ($now === null) {
|
if ($now === null) {
|
||||||
|
@ -504,12 +504,15 @@ class ActivityLogInfo extends HtmlDocument
|
|||||||
|
|
||||||
protected function getLinkToObject()
|
protected function getLinkToObject()
|
||||||
{
|
{
|
||||||
|
// TODO: This logic is redundant and should be centralized
|
||||||
$entry = $this->entry;
|
$entry = $this->entry;
|
||||||
$name = $entry->object_name;
|
$name = $entry->object_name;
|
||||||
$controller = preg_replace('/^icinga_/', '', $entry->object_type);
|
$controller = preg_replace('/^icinga_/', '', $entry->object_type);
|
||||||
|
|
||||||
if ($controller === 'service_set') {
|
if ($controller === 'service_set') {
|
||||||
$controller = 'serviceset';
|
$controller = 'serviceset';
|
||||||
|
} elseif ($controller === 'scheduled_downtime') {
|
||||||
|
$controller = 'scheduled-downtime';
|
||||||
}
|
}
|
||||||
|
|
||||||
return Link::create(
|
return Link::create(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user