mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 16:24:05 +02:00
DirectorDeploymentLog: remove legacy table
This commit is contained in:
parent
416cf848ab
commit
088efd25a6
@ -1,60 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Icinga\Module\Director\Tables;
|
|
||||||
|
|
||||||
use Icinga\Module\Director\Web\Table\QuickTable;
|
|
||||||
|
|
||||||
class DirectorDeploymentLogTable extends QuickTable
|
|
||||||
{
|
|
||||||
public function getColumns()
|
|
||||||
{
|
|
||||||
$columns = array(
|
|
||||||
'id' => 'l.id',
|
|
||||||
'peer_identity' => 'l.peer_identity',
|
|
||||||
'start_time' => 'l.start_time',
|
|
||||||
'stage_collected' => 'l.stage_collected',
|
|
||||||
'dump_succeeded' => 'l.dump_succeeded',
|
|
||||||
'startup_succeeded' => 'l.startup_succeeded',
|
|
||||||
'checksum' => 'LOWER(HEX(c.checksum))',
|
|
||||||
'duration' => "l.duration_dump || 'ms'",
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($this->connection->getDbType() === 'pgsql') {
|
|
||||||
$columns['checksum'] = "LOWER(ENCODE(c.checksum, 'hex'))";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $columns;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getActionUrl($row)
|
|
||||||
{
|
|
||||||
return $this->url('director/deployment/show', array('id' => $row->id));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTitles()
|
|
||||||
{
|
|
||||||
$view = $this->view();
|
|
||||||
return array(
|
|
||||||
'peer_identity' => $view->translate('Peer'),
|
|
||||||
'checksum' => $view->translate('Checksum'),
|
|
||||||
'dump_succeeded' => $view->translate('Sent'),
|
|
||||||
'startup_succeeded' => $view->translate('Loaded'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getBaseQuery()
|
|
||||||
{
|
|
||||||
$db = $this->connection()->getConnection();
|
|
||||||
|
|
||||||
$query = $db->select()->from(
|
|
||||||
array('l' => 'director_deployment_log'),
|
|
||||||
array()
|
|
||||||
)->joinLeft(
|
|
||||||
array('c' => 'director_generated_config'),
|
|
||||||
'c.id = l.config_id',
|
|
||||||
array()
|
|
||||||
)->order('l.start_time DESC');
|
|
||||||
|
|
||||||
return $query;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user