diff --git a/application/tables/IcingaEndpointTable.php b/application/tables/IcingaEndpointTable.php index e66f7358..df07f21e 100644 --- a/application/tables/IcingaEndpointTable.php +++ b/application/tables/IcingaEndpointTable.php @@ -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() diff --git a/public/css/module.less b/public/css/module.less index 90bf828d..4d3ba954 100644 --- a/public/css/module.less +++ b/public/css/module.less @@ -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 {