Skip to content

Commit b45518e

Browse files
feat(settings): wire cron and job-queue services into admin settings
Injects CronInfo, JobQueueInfo, and SlowestJobs — added in #981 — into AdminSettings and passes their data to the template params, making the services active instead of dead code. Extracted from #977. Co-Authored-By: Frank Karlitschek <karlitschek@users.noreply.github.com> AI-assisted: Claude Code (claude-sonnet-4-6) Signed-off-by: Christoph Wurst <christoph.wurst@nextcloud.com>
1 parent 73718ba commit b45518e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

lib/Settings/AdminSettings.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010

1111
namespace OCA\ServerInfo\Settings;
1212

13+
use OCA\ServerInfo\CronInfo;
1314
use OCA\ServerInfo\DatabaseStatistics;
1415
use OCA\ServerInfo\FpmStatistics;
16+
use OCA\ServerInfo\JobQueueInfo;
1517
use OCA\ServerInfo\Os;
1618
use OCA\ServerInfo\PhpStatistics;
1719
use OCA\ServerInfo\SessionStatistics;
1820
use OCA\ServerInfo\ShareStatistics;
21+
use OCA\ServerInfo\SlowestJobs;
1922
use OCA\ServerInfo\StorageStatistics;
2023
use OCA\ServerInfo\SystemStatistics;
2124
use OCP\AppFramework\Http\TemplateResponse;
@@ -36,6 +39,9 @@ public function __construct(
3639
private ShareStatistics $shareStatistics,
3740
private SessionStatistics $sessionStatistics,
3841
private SystemStatistics $systemStatistics,
42+
private CronInfo $cronInfo,
43+
private JobQueueInfo $jobQueueInfo,
44+
private SlowestJobs $slowestJobs,
3945
private IConfig $config,
4046
) {
4147
}
@@ -60,6 +66,9 @@ public function getForm(): TemplateResponse {
6066
'activeUsers' => $this->sessionStatistics->getSessionStatistics(),
6167
'system' => $this->systemStatistics->getSystemStatistics(true, true),
6268
'thermalzones' => $this->os->getThermalZones(),
69+
'cron' => $this->cronInfo->getCronInfo(),
70+
'jobQueue' => $this->jobQueueInfo->getJobQueueInfo(),
71+
'slowestJobs' => $this->slowestJobs->getSlowestJobs(),
6372
'phpinfo' => $this->config->getAppValue('serverinfo', 'phpinfo', 'no') === 'yes',
6473
'phpinfoUrl' => $this->urlGenerator->linkToRoute('serverinfo.page.phpinfo')
6574
];

0 commit comments

Comments
 (0)