parent
06452dc78e
commit
f1c787fa0c
|
@ -10,6 +10,8 @@ class IcingaEndpointTable extends IcingaObjectTable
|
|||
'endpoint',
|
||||
);
|
||||
|
||||
protected $deploymentEndpoint;
|
||||
|
||||
public function getColumns()
|
||||
{
|
||||
return array(
|
||||
|
@ -22,6 +24,20 @@ class IcingaEndpointTable extends IcingaObjectTable
|
|||
);
|
||||
}
|
||||
|
||||
protected function listTableClasses()
|
||||
{
|
||||
return array_merge(array('endpoints'), parent::listTableClasses());
|
||||
}
|
||||
|
||||
protected function getRowClasses($row)
|
||||
{
|
||||
if ($row->endpoint === $this->deploymentEndpoint) {
|
||||
return array('deployment-endpoint', parent::getRowClasses($row));
|
||||
}
|
||||
|
||||
return parent::getRowClasses($row);
|
||||
}
|
||||
|
||||
protected function getActionUrl($row)
|
||||
{
|
||||
return $this->url('director/endpoint', array('name' => $row->endpoint));
|
||||
|
@ -40,6 +56,14 @@ class IcingaEndpointTable extends IcingaObjectTable
|
|||
public function getBaseQuery()
|
||||
{
|
||||
$db = $this->connection()->getConnection();
|
||||
|
||||
if ($this->deploymentEndpoint === null) {
|
||||
$c = $this->connection();
|
||||
if ($c->hasDeploymentEndpoint()) {
|
||||
$this->deploymentEndpoint = $c->getDeploymentEndpointName();
|
||||
}
|
||||
}
|
||||
|
||||
$query = $db->select()->from(
|
||||
array('e' => 'icinga_endpoint'),
|
||||
array()
|
||||
|
|
|
@ -562,6 +562,12 @@ table.deployment-log {
|
|||
}
|
||||
}
|
||||
|
||||
table.endpoints {
|
||||
tr.deployment-endpoint td:first-child::before {
|
||||
color: @color-ok;
|
||||
}
|
||||
}
|
||||
|
||||
table.activity-log {
|
||||
|
||||
tr th:first-child {
|
||||
|
|
Loading…
Reference in New Issue