.htaccess
5 months ago
AbortQueueItem.php
5 months ago
AddToQueue.php
5 months ago
ClearAlerts.php
5 months ago
ClearCompletedQueueItems.php
5 months ago
CreateSupportUser.php
5 months ago
DeleteBackupJob.php
5 months ago
DeleteDestination.php
5 months ago
DeleteDownload.php
5 months ago
DeleteSchedule.php
5 months ago
DeleteSnapshot.php
5 months ago
DestinationSetExportConfig.php
5 months ago
DuplicateBackupJob.php
5 months ago
EditBackupNotes.php
5 months ago
EnableBackupJob.php
5 months ago
EnableDestination.php
5 months ago
ExecuteCron.php
5 months ago
FileManager.php
5 months ago
GetBackup.php
5 months ago
GetBackupJob.php
5 months ago
GetDashboard.php
5 months ago
GetDatabaseTables.php
5 months ago
GetDestination.php
5 months ago
GetLog.php
5 months ago
GetQRCode.php
5 months ago
GetQueueItem.php
5 months ago
GetSchedule.php
5 months ago
GetSettingsAutomation.php
5 months ago
GetSettingsGeneral.php
5 months ago
GetSettingsIntegrations.php
5 months ago
GetSettingsLogging.php
5 months ago
GetSettingsMaintenance.php
5 months ago
GetSettingsNotifications.php
5 months ago
GetSettingsPerformance.php
5 months ago
GetSettingsRestore.php
5 months ago
GetSettingsSecurity.php
5 months ago
GetSettingsUpdates.php
5 months ago
GetSystemInfo.php
5 months ago
ListAlerts.php
5 months ago
ListBackupJobs.php
5 months ago
ListBackups.php
5 months ago
ListDatabaseTables.php
5 months ago
ListDestinations.php
5 months ago
ListDownloads.php
5 months ago
ListQueueItems.php
5 months ago
ListSchedules.php
5 months ago
LockSnapshot.php
5 months ago
ManageBackupJob.php
5 months ago
ManageDestination.php
5 months ago
ManageSchedule.php
5 months ago
ManageSettingsAutomation.php
5 months ago
ManageSettingsGeneral.php
5 months ago
ManageSettingsIntegrations.php
5 months ago
ManageSettingsLogging.php
5 months ago
ManageSettingsMaintenance.php
5 months ago
ManageSettingsNotifications.php
5 months ago
ManageSettingsPerformance.php
5 months ago
ManageSettingsRestore.php
5 months ago
ManageSettingsSecurity.php
5 months ago
ManageSettingsUpdates.php
5 months ago
ManageShowcase.php
5 months ago
PanelPreload.php
5 months ago
SendTestEmail.php
5 months ago
StartOverQueueItem.php
5 months ago
ValidateDestination.php
5 months ago
ValidateMFA.php
5 months ago
index.html
5 months ago
web.config
5 months ago
GetSystemInfo.php
44 lines
| 1 | <?php |
| 2 | |
| 3 | namespace JetBackup\Ajax\Calls; |
| 4 | |
| 5 | if (!defined( '__JETBACKUP__')) die('Direct access is not allowed'); |
| 6 | |
| 7 | use JetBackup\Ajax\aAjax; |
| 8 | use JetBackup\Config\System; |
| 9 | use JetBackup\Entities\Util; |
| 10 | use JetBackup\Exception\IOException; |
| 11 | use JetBackup\Factory; |
| 12 | use JetBackup\JetBackupLinux\JetBackupLinux; |
| 13 | |
| 14 | class GetSystemInfo extends aAjax { |
| 15 | |
| 16 | /** |
| 17 | * @return void |
| 18 | * @throws IOException |
| 19 | */ |
| 20 | public function execute(): void { |
| 21 | |
| 22 | $this->setResponseData([ |
| 23 | 'system_checks' => [ |
| 24 | 'data_dir_secured' => System::isDataDirSecured(), |
| 25 | 'post_max_size' => ini_get('post_max_size') !== false && Util::humanReadableToBytes(ini_get('post_max_size')) < System::PHP_MIN_POST_MAX_SIZE, |
| 26 | 'php_compatible' => System::isPHPVersionCompatible(), |
| 27 | 'cron_run' => System::getLastCron() > 600, |
| 28 | 'heartbeat' => Factory::getSettingsAutomation()->isHeartbeatEnabled(), |
| 29 | 'cron' => Factory::getSettingsAutomation()->isCronsEnabled(), |
| 30 | 'jb_linux_status' => JetBackupLinux::isInstalled() && !Factory::getSettingsGeneral()->isJBIntegrationEnabled(), |
| 31 | 'isWindows' => System::isWindowsOS(), |
| 32 | 'pdo_mysql_buffered_query_available' => defined('PDO::MYSQL_ATTR_USE_BUFFERED_QUERY'), |
| 33 | ], |
| 34 | 'data' => [ |
| 35 | 'secured_dir' => System::getRecommendSecurePath(), |
| 36 | 'data_dir' => Factory::getLocations()->getDataDir(), |
| 37 | 'post_max_size' => ini_get('post_max_size'), |
| 38 | 'recommended_post_max_size' => Util::bytesToHumanReadable(System::PHP_MIN_POST_MAX_SIZE), |
| 39 | ], |
| 40 | 'info' => System::getSystemInfo(), |
| 41 | 'alerts' => System::getTotalAlerts(), |
| 42 | ]); |
| 43 | } |
| 44 | } |