Db: implement getUncollectedDeployments()
This commit is contained in:
parent
c0043c26b0
commit
f92689efd7
|
@ -3,6 +3,7 @@
|
|||
namespace Icinga\Module\Director;
|
||||
|
||||
use Icinga\Data\Db\DbConnection;
|
||||
use Icinga\Module\Director\Objects\DirectorDeploymentLog;
|
||||
use Zend_Db_Expr;
|
||||
|
||||
class Db extends DbConnection
|
||||
|
@ -380,4 +381,17 @@ class Db extends DbConnection
|
|||
$filters = array('object_type = ?' => 'template') + $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…
Reference in New Issue