public function getActionsForService(Service $service) { $db = $this->db(); if (!$db) { return array(); } if (IcingaHost::exists($service->host_name, $db)) { return array('Inspect' => Url::fromPath('director/inspect/object', array('type' => 'service', 'plural' => 'services', 'name' => sprintf('%s!%s', $service->host_name, $service->service_description)))); } else { return array(); } }
public function getActionsForHost(Host $host) { $db = $this->db(); if (!$db) { return array(); } if (IcingaHost::exists($host->host_name, $db)) { return array('Modify' => Url::fromPath('director/host/edit', array('name' => $host->host_name)), 'Inspect' => Url::fromPath('director/inspect/object', array('type' => 'host', 'plural' => 'hosts', 'name' => $host->host_name))); } else { return array(); } }