diff --git a/Theme/Backend/monitoring-dashboard.tpl.php b/Theme/Backend/monitoring-dashboard.tpl.php index 736cd4e..d578507 100644 --- a/Theme/Backend/monitoring-dashboard.tpl.php +++ b/Theme/Backend/monitoring-dashboard.tpl.php @@ -20,17 +20,17 @@ echo $this->getData('nav')->render(); ?>
| = $this->getText('OS') ?> | = php_uname('s'); ?> - |
| = $this->getText('Version') ?> | = php_uname('v'); ?> - |
| = $this->getText('Release') ?> | = php_uname('r'); ?> - |
| = $this->getText('RAMUsage') ?> | = memory_get_usage(true)/(1024*1024); ?> MB - |
| = $this->getText('MemoryLimit') ?> | = ini_get('memory_limit'); ?> - |
| = $this->getText('SystemRAM') ?> | = \phpOMS\System\SystemUtils::getRAM()/(1024); ?> MB - |
| = $this->getText('CPUUsage') ?> | = \phpOMS\System\SystemUtils::getCpuUsage(); ?>% + |
| = $this->getHtml('OS'); ?> | = htmlspecialchars(php_uname('s'), ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('Version'); ?> | = htmlspecialchars(php_uname('v'), ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('Release'); ?> | = htmlspecialchars(php_uname('r'), ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('RAMUsage'); ?> | = htmlspecialchars(memory_get_usage(true)/(1024*1024), ENT_COMPAT, 'utf-8'); ?> MB + |
| = $this->getHtml('MemoryLimit'); ?> | = htmlspecialchars(ini_get('memory_limit'), ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('SystemRAM'); ?> | = htmlspecialchars(\phpOMS\System\SystemUtils::getRAM()/(1024), ENT_COMPAT, 'utf-8'); ?> MB + |
| = $this->getHtml('CPUUsage'); ?> | = htmlspecialchars(\phpOMS\System\SystemUtils::getCpuUsage(), ENT_COMPAT, 'utf-8'); ?>% |
| = $this->getText('Emergencies') ?> | = $logs['emergency'] ?? 0; ?> - |
| = $this->getText('Criticals') ?> | = $logs['critical'] ?? 0; ?> - |
| = $this->getText('Errors') ?> | = $logs['error'] ?? 0; ?> - |
| = $this->getText('Warnings') ?> | = $logs['warning'] ?? 0; ?> - |
| = $this->getText('Alerts') ?> | = $logs['alert'] ?? 0; ?> - |
| = $this->getText('Notices') ?> | = $logs['notice'] ?? 0; ?> - |
| = $this->getText('Info') ?> | = $logs['info'] ?? 0; ?> - |
| = $this->getText('Debug') ?> | = $logs['debug'] ?? 0; ?> - |
| = $this->getText('Total') ?> | = array_sum($logs); ?> + |
| = $this->getHtml('Emergencies'); ?> | = htmlspecialchars($logs['emergency'] ?? 0, ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('Criticals'); ?> | = htmlspecialchars($logs['critical'] ?? 0, ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('Errors'); ?> | = htmlspecialchars($logs['error'] ?? 0, ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('Warnings'); ?> | = htmlspecialchars($logs['warning'] ?? 0, ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('Alerts'); ?> | = htmlspecialchars($logs['alert'] ?? 0, ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('Notices'); ?> | = htmlspecialchars($logs['notice'] ?? 0, ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('Info'); ?> | = htmlspecialchars($logs['info'] ?? 0, ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('Debug'); ?> | = htmlspecialchars($logs['debug'] ?? 0, ENT_COMPAT, 'utf-8'); ?> + |
| = $this->getHtml('Total'); ?> | = htmlspecialchars(array_sum($logs), ENT_COMPAT, 'utf-8'); ?> |
| = $ip; ?> | = $count; ?> + |
| = htmlspecialchars($ip, ENT_COMPAT, 'utf-8'); ?> | = htmlspecialchars($count, ENT_COMPAT, 'utf-8'); ?> |
| = $this->getText('ID', 0, 0); ?> + | = $this->getHtml('ID', 0, 0); ?> | - | = (int) $this->request->getData('id') ?? 0; ?> + | = htmlspecialchars((int) $this->request->getData('id') ?? 0, ENT_COMPAT, 'utf-8'); ?> | |
| = $this->getText('Time'); ?> + | = $this->getHtml('Time') ?> | - | = $log['datetime']; ?> + | = htmlspecialchars($log['datetime'], ENT_COMPAT, 'utf-8'); ?> | |
| = $this->getText('Uri'); ?> + | = $this->getHtml('Uri') ?> | - | = $log['path']; ?> + | = htmlspecialchars($log['path'], ENT_COMPAT, 'utf-8'); ?> | |
| = $this->getText('Source'); ?> + | = $this->getHtml('Source') ?> | - | = $log['ip']; ?> + | = htmlspecialchars($log['ip'], ENT_COMPAT, 'utf-8'); ?> | |
| = $this->getText('Level'); ?> + | = $this->getHtml('Level') ?> | - - | = $log['level']; ?> + + | = htmlspecialchars($log['level'], ENT_COMPAT, 'utf-8'); ?> | |
| = $this->getText('Message'); ?> + | = $this->getHtml('Message') ?> | - | = $log['message']; ?> + | = htmlspecialchars($log['message'], ENT_COMPAT, 'utf-8'); ?> | |
| = $this->getText('File'); ?> + | = $this->getHtml('File') ?> | - | = $log['file']; ?> + | = htmlspecialchars($log['file'], ENT_COMPAT, 'utf-8'); ?> | |
| = $this->getText('Line'); ?> + | = $this->getHtml('Line') ?> | - | = $log['line']; ?> + | = htmlspecialchars($log['line'], ENT_COMPAT, 'utf-8'); ?> | |
| = $this->getText('Version'); ?> + | = $this->getHtml('Version') ?> | - | = $log['version']; ?> + | = htmlspecialchars($log['version'], ENT_COMPAT, 'utf-8'); ?> | |
| = $this->getText('OS'); ?> + | = $this->getHtml('OS') ?> | - | = $log['os']; ?> + | = htmlspecialchars($log['os'], ENT_COMPAT, 'utf-8'); ?> | |
| = $this->getText('Backtrace'); ?> + | = $this->getHtml('Backtrace') ?> | ||||
- = json_encode($log['backtrace'], JSON_PRETTY_PRINT); ?>+ = htmlspecialchars(json_encode($log['backtrace'], JSON_PRETTY_PRINT), ENT_COMPAT, 'utf-8'); ?> | |||||
| = $this->getText('Report'); ?> + href="https://gitreports.com/issue/Orange-Management/Orange-Management/?name=Guest&issue_title== htmlspecialchars(urlencode($log['message']), ENT_COMPAT, 'utf-8'); ?>&details== htmlspecialchars(urlencode($details), ENT_COMPAT, 'utf-8'); ?>">= $this->getHtml('Report') ?> | |||||
| = $this->getText('Timestamp'); ?> - | = $this->getText('Level'); ?> - | = $this->getText('Source'); ?> - | = $this->getText('Message'); ?> + | = $this->getHtml('Timestamp') ?> + | = $this->getHtml('Level') ?> + | = $this->getHtml('Source') ?> + | = $this->getHtml('Message') ?> | ||
| = $footerView->render(); ?> + | = htmlspecialchars($footerView->render(), ENT_COMPAT, 'utf-8'); ?> | ||||||||
| > = $value[0] ?? ''; ?> - | > = $value[1] ?? ''; ?> - | > = $value[2] ?? ''; ?> - | > = $value[7] ?? ''; ?> + | > = htmlspecialchars($value[0] ?? '', ENT_COMPAT, 'utf-8'); ?> + | > = htmlspecialchars($value[1] ?? '', ENT_COMPAT, 'utf-8'); ?> + | > = htmlspecialchars($value[2] ?? '', ENT_COMPAT, 'utf-8'); ?> + | > = htmlspecialchars($value[7] ?? '', ENT_COMPAT, 'utf-8'); ?> | ||