mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
Add log files collection
This commit is contained in:
parent
23214529f1
commit
fab69d7c0e
@ -131,13 +131,22 @@ class ConfigController extends ActionController
|
||||
if ($this->sendNotFoundUnlessRestApi()) {
|
||||
return;
|
||||
}
|
||||
$db = $this->db();
|
||||
$api = $this->api();
|
||||
try {
|
||||
if (DirectorDeploymentLog::hasUncollected($db)) {
|
||||
$api->collectLogFiles($db);
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
// Ignore eventual issues while talking to Icinga
|
||||
}
|
||||
|
||||
$activeConfiguration = null;
|
||||
$lastActivityLogChecksum = null;
|
||||
$configChecksum = null;
|
||||
$api = $this->api();
|
||||
$status = new DeploymentStatus($this->db(), $api);
|
||||
$status = new DeploymentStatus($db, $api);
|
||||
if ($stageName = $api->getActiveStageName()) {
|
||||
$activityLogChecksum = DirectorDeploymentLog::getRelatedToActiveStage($api, $this->db());
|
||||
$activityLogChecksum = DirectorDeploymentLog::getRelatedToActiveStage($api, $db);
|
||||
$lastActivityLogChecksum = bin2hex($activityLogChecksum->last_activity_checksum);
|
||||
$configChecksum = $status->getConfigChecksumForStageName($stageName);
|
||||
$activeConfiguration = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user