IcingaServiceTable: link templates by id

This commit is contained in:
Thomas Gelf 2016-03-06 14:28:12 +01:00
parent ad415e4fa6
commit 2f40de10ec
1 changed files with 8 additions and 3 deletions

View File

@ -24,10 +24,15 @@ class IcingaServiceTable extends IcingaObjectTable
protected function getActionUrl($row)
{
$params = array('name' => $row->service);
if ($row->host !== null) {
$params['host'] = $row->host;
if ($row->object_type === 'apply') {
$params['id'] = $row->id;
} else {
$params = array('name' => $row->service);
if ($row->host !== null) {
$params['host'] = $row->host;
}
}
return $this->url('director/service', $params);
}