mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
Db: implement getUncollectedDeployments()
This commit is contained in:
parent
c0043c26b0
commit
f92689efd7
@ -3,6 +3,7 @@
|
|||||||
namespace Icinga\Module\Director;
|
namespace Icinga\Module\Director;
|
||||||
|
|
||||||
use Icinga\Data\Db\DbConnection;
|
use Icinga\Data\Db\DbConnection;
|
||||||
|
use Icinga\Module\Director\Objects\DirectorDeploymentLog;
|
||||||
use Zend_Db_Expr;
|
use Zend_Db_Expr;
|
||||||
|
|
||||||
class Db extends DbConnection
|
class Db extends DbConnection
|
||||||
@ -380,4 +381,17 @@ class Db extends DbConnection
|
|||||||
$filters = array('object_type = ?' => 'template') + $filters;
|
$filters = array('object_type = ?' => 'template') + $filters;
|
||||||
return $this->enum('icinga_' . $type, null, $filters);
|
return $this->enum('icinga_' . $type, null, $filters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getUncollectedDeployments()
|
||||||
|
{
|
||||||
|
$db = $this->db();
|
||||||
|
|
||||||
|
$query = $db->select()
|
||||||
|
->from('director_deployment_log')
|
||||||
|
->where('stage_name IS NOT NULL')
|
||||||
|
->where('stage_collected IS NULL')
|
||||||
|
->order('stage_name');
|
||||||
|
|
||||||
|
return DirectorDeploymentLog::loadAll($this, $query, 'stage_name');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user