Commit version 24.12.13800

This commit is contained in:
2025-01-06 17:35:06 -05:00
parent b7f6a79c2c
commit 55d9218816
6133 changed files with 4239740 additions and 1374287 deletions

View File

@ -5,15 +5,15 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage webui
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2019 Observium Limited
* @package observium
* @subpackage webui
* @copyright (C) Adam Armstrong
*
*/
$div_class = ""; // Class for each block in status summary
include($config['html_dir']."/includes/status-summary.inc.php");
include($config['html_dir'] . "/includes/status-summary.inc.php");
print_alert_table(array('status' => 'failed', 'pagination' => FALSE, 'format' => 'condensed', 'short' => TRUE));
print_alert_table(['status' => 'failed', 'pagination' => FALSE, 'format' => 'condensed', 'short' => TRUE]);
// EOF

View File

@ -4,15 +4,15 @@
*
* This file is part of Observium.
*
* @package observium
* @subpackage web
* @copyright (C) 2006-2013 Adam Armstrong, (C) 2013-2021 Observium Limited
* @package observium
* @subpackage web
* @copyright (C) Adam Armstrong
*
*/
// Start device panel
print_device_header($device, [ 'no_graphs' => TRUE ]);
print_device_header($device, ['no_graphs' => TRUE]);
include($config['html_dir'] . "/pages/device/overview/information_extended.inc.php");
@ -21,15 +21,15 @@ echo generate_box_open();
// Only show graphs for device_permitted(), don't show device graphs to users who can only see a single entity.
if (isset($config['os'][$device['os']]['graphs'])) {
$graphs = $config['os'][$device['os']]['graphs'];
$graphs = $config['os'][$device['os']]['graphs'];
} elseif (isset($device['os_group'], $config['os'][$device['os_group']]['graphs'])) {
$graphs = $config['os'][$device['os_group']]['graphs'];
$graphs = $config['os'][$device['os_group']]['graphs'];
} else {
// Default group
$graphs = $config['os_group']['default']['graphs'];
// Default group
$graphs = $config['os_group']['default']['graphs'];
}
$graph_array = [];
$graph_array = [];
$graph_array['height'] = "100";
$graph_array['width'] = "213";
$graph_array['to'] = get_time();
@ -42,9 +42,9 @@ $graph_array['bg'] = "FFFFFF00";
// Preprocess device graphs array
$graphs_enabled = [];
foreach ($device['graphs'] as $graph) {
if ($graph['enabled']) {
$graphs_enabled[] = $graph['graph'];
}
if ($graph['enabled']) {
$graphs_enabled[] = $graph['graph'];
}
}
//r($graphs);
//r($graphs_enabled);
@ -52,23 +52,23 @@ foreach ($device['graphs'] as $graph) {
echo '<div class="row">';
foreach ($graphs as $entry) {
if ($entry && in_array(str_replace('device_', '', $entry), $graphs_enabled, TRUE)) {
$graph_array['type'] = $entry;
if ($entry && in_array(str_replace('device_', '', $entry), $graphs_enabled, TRUE)) {
$graph_array['type'] = $entry;
if (preg_match(OBS_PATTERN_GRAPH_TYPE, $entry, $graphtype)) {
$type = $graphtype['type'];
$subtype = $graphtype['subtype'];
if (preg_match(OBS_PATTERN_GRAPH_TYPE, $entry, $graphtype)) {
$type = $graphtype['type'];
$subtype = $graphtype['subtype'];
$text = $config['graph_types'][$type][$subtype]['descr'];
} else {
$text = nicecase($entry); // Fallback to the type itself as a string, should not happen!
$text = $config['graph_types'][$type][$subtype]['descr'];
} else {
$text = nicecase($entry); // Fallback to the type itself as a string, should not happen!
}
echo('<div class="col-xl-6">');
echo("<div style='padding: 0px; text-align: center;'><h4>$text</h4></div>");
print_graph_popup($graph_array);
echo("</div>");
}
echo('<div class="col-xl-6">');
echo("<div style='padding: 0px; text-align: center;'><h4>$text</h4></div>");
print_graph_popup($graph_array);
echo("</div>");
}
}
echo '</div>';