Houskeeping: allow to filter for pending tasks
This commit is contained in:
parent
12e849d2a4
commit
9bd54f6af5
|
@ -30,19 +30,25 @@ class Housekeeping
|
||||||
public function getTaskSummary()
|
public function getTaskSummary()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'oldUndeployedConfigs' => array(
|
'oldUndeployedConfigs' => (object) array(
|
||||||
'title' => N_('Undeployed configurations'),
|
'title' => N_('Undeployed configurations'),
|
||||||
'count' => $this->countOldUndeployedConfigs()
|
'count' => $this->countOldUndeployedConfigs()
|
||||||
),
|
),
|
||||||
'unusedFiles' => array(
|
'unusedFiles' => (object) array(
|
||||||
'title' => N_('Unused rendered files'),
|
'title' => N_('Unused rendered files'),
|
||||||
'count' => $this->countUnusedFiles()
|
'count' => $this->countUnusedFiles()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPendingTasks()
|
public function getPendingTaskSummary()
|
||||||
{
|
{
|
||||||
|
return array_filter(
|
||||||
|
$this->getTaskSummary(),
|
||||||
|
function($task) {
|
||||||
|
return $task->count > 0;
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function countOldUndeployedConfigs()
|
public function countOldUndeployedConfigs()
|
||||||
|
|
Loading…
Reference in New Issue