mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
parent
c7a94f2c39
commit
505912135d
@ -52,11 +52,15 @@ class IcingaHostAppliedServicesTable extends SimpleQueryBasedTable
|
|||||||
|
|
||||||
public function renderRow($row)
|
public function renderRow($row)
|
||||||
{
|
{
|
||||||
|
$classes = [];
|
||||||
if ($row->blacklisted === 'y') {
|
if ($row->blacklisted === 'y') {
|
||||||
$attributes = ['class' => 'strike-links'];
|
$classes[] = 'strike-links';
|
||||||
} else {
|
|
||||||
$attributes = null;
|
|
||||||
}
|
}
|
||||||
|
if ($row->disabled === 'y') {
|
||||||
|
$classes[] = 'disabled';
|
||||||
|
}
|
||||||
|
|
||||||
|
$attributes = empty($classes) ? null : ['class' => $classes];
|
||||||
|
|
||||||
return $this::row([
|
return $this::row([
|
||||||
Link::create(
|
Link::create(
|
||||||
@ -92,6 +96,7 @@ class IcingaHostAppliedServicesTable extends SimpleQueryBasedTable
|
|||||||
'id' => 'id',
|
'id' => 'id',
|
||||||
'name' => 'name',
|
'name' => 'name',
|
||||||
'filter' => 'filter',
|
'filter' => 'filter',
|
||||||
|
'disabled' => 'disabled',
|
||||||
'blacklisted' => 'blacklisted',
|
'blacklisted' => 'blacklisted',
|
||||||
'assign_filter' => 'assign_filter',
|
'assign_filter' => 'assign_filter',
|
||||||
]);
|
]);
|
||||||
@ -124,6 +129,7 @@ class IcingaHostAppliedServicesTable extends SimpleQueryBasedTable
|
|||||||
'id' => 's.id',
|
'id' => 's.id',
|
||||||
'name' => 's.object_name',
|
'name' => 's.object_name',
|
||||||
'assign_filter' => 's.assign_filter',
|
'assign_filter' => 's.assign_filter',
|
||||||
|
'disabled' => 's.disabled',
|
||||||
'blacklisted' => "CASE WHEN hsb.service_id IS NULL THEN 'n' ELSE 'y' END",
|
'blacklisted' => "CASE WHEN hsb.service_id IS NULL THEN 'n' ELSE 'y' END",
|
||||||
]
|
]
|
||||||
)->joinLeft(
|
)->joinLeft(
|
||||||
|
@ -52,11 +52,15 @@ class IcingaHostServiceTable extends ZfQueryBasedTable
|
|||||||
|
|
||||||
public function renderRow($row)
|
public function renderRow($row)
|
||||||
{
|
{
|
||||||
|
$classes = [];
|
||||||
if ($row->blacklisted === 'y') {
|
if ($row->blacklisted === 'y') {
|
||||||
$attributes = ['class' => 'strike-links'];
|
$classes[] = 'strike-links';
|
||||||
} else {
|
|
||||||
$attributes = null;
|
|
||||||
}
|
}
|
||||||
|
if ($row->disabled === 'y') {
|
||||||
|
$classes[] = 'disabled';
|
||||||
|
}
|
||||||
|
|
||||||
|
$attributes = empty($classes) ? null : ['class' => $classes];
|
||||||
|
|
||||||
return $this::row([
|
return $this::row([
|
||||||
$this->getServiceLink($row)
|
$this->getServiceLink($row)
|
||||||
@ -116,6 +120,7 @@ class IcingaHostServiceTable extends ZfQueryBasedTable
|
|||||||
'host_id' => 's.host_id',
|
'host_id' => 's.host_id',
|
||||||
'host' => 'h.object_name',
|
'host' => 'h.object_name',
|
||||||
'service' => 's.object_name',
|
'service' => 's.object_name',
|
||||||
|
'disabled' => 's.disabled',
|
||||||
'object_type' => 's.object_type',
|
'object_type' => 's.object_type',
|
||||||
'blacklisted' => "CASE WHEN hsb.service_id IS NULL THEN 'n' ELSE 'y' END"
|
'blacklisted' => "CASE WHEN hsb.service_id IS NULL THEN 'n' ELSE 'y' END"
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user