IcingaConfig: object counts

This commit is contained in:
Thomas Gelf 2015-12-15 17:17:32 +01:00
parent 19420b8c9f
commit a421e5e608

View File

@ -290,6 +290,8 @@ throw $e;
'file_path' => 'cf.file_path', 'file_path' => 'cf.file_path',
'checksum' => 'f.checksum', 'checksum' => 'f.checksum',
'content' => 'f.content', 'content' => 'f.content',
'cnt_object' => 'f.cnt_object',
'cnt_template' => 'f.cnt_template',
) )
)->join( )->join(
array('f' => 'director_generated_file'), array('f' => 'director_generated_file'),
@ -299,7 +301,10 @@ throw $e;
foreach ($this->db->fetchAll($query) as $row) { foreach ($this->db->fetchAll($query) as $row) {
$file = new IcingaConfigFile(); $file = new IcingaConfigFile();
$this->files[$row->file_path] = $file->setContent($row->content); $this->files[$row->file_path] = $file
->setContent($row->content)
->setObjectCount($row->cnt_object)
->setTemplateCount($row->cnt_template);
} }
return $this; return $this;