Skip to content

Commit 5917e15

Browse files
committed
fixup! feat: Vue
1 parent 3615f8b commit 5917e15

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

lib/LiveData.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@
99

1010
namespace OCA\ServerInfo;
1111

12-
/**
13-
* Builds the live, fast-changing server metrics polled by the admin settings
14-
* page via the /update endpoint. Static/slow-changing data is delivered
15-
* separately by {@see StaticData} as a one-time snapshot.
16-
*/
1712
class LiveData {
1813
public function __construct(
1914
private Os $os,

lib/StaticData.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@
99

1010
namespace OCA\ServerInfo;
1111

12-
use OCP\IConfig;
12+
use OCP\AppFramework\Services\IAppConfig;
1313
use OCP\IURLGenerator;
1414

15-
/**
16-
* Builds the one-time snapshot of static/slow-changing server data consumed by
17-
* the admin settings page on load. Live metrics (cpu/memory/servertime/uptime/
18-
* thermalzones) are delivered separately by {@see LiveData} via the polled
19-
* /update endpoint.
20-
*/
2115
class StaticData {
2216
public function __construct(
2317
private Os $os,
@@ -30,7 +24,7 @@ public function __construct(
3024
private SessionStatistics $sessionStatistics,
3125
private SystemStatistics $systemStatistics,
3226
private CronInfo $cronInfo,
33-
private IConfig $config,
27+
private IAppConfig $appConfig,
3428
) {
3529
}
3630

@@ -72,7 +66,7 @@ public function getData(): array {
7266
'freeSpace' => $this->systemStatistics->getFreeSpace(),
7367
'memTotal' => $memory->getMemTotal(),
7468
'cron' => $this->cronInfo->getCronInfo(),
75-
'phpinfo' => $this->config->getAppValue('serverinfo', 'phpinfo', 'no') === 'yes',
69+
'phpinfo' => $this->appConfig->getAppValueBool('phpinfo', false),
7670
'phpinfoUrl' => $this->urlGenerator->linkToRoute('serverinfo.page.phpinfo'),
7771
];
7872
}

0 commit comments

Comments
 (0)