Commit version 24.12.13800
This commit is contained in:
@ -4,23 +4,25 @@
|
||||
*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
|
||||
$link_array = array('page' => 'device',
|
||||
'device' => $device['device_id'],
|
||||
'tab' => 'health');
|
||||
$link_array = ['page' => 'device',
|
||||
'device' => $device['device_id'],
|
||||
'tab' => 'health'];
|
||||
|
||||
//if (!$vars['metric']) { $vars['metric'] = "overview"; }
|
||||
|
||||
$navbar['brand'] = "SLAs";
|
||||
$navbar['class'] = "navbar-narrow";
|
||||
|
||||
if (!isset($vars['rtt_type'])) { $navbar['options']['all']['class'] = "active"; }
|
||||
$navbar['options']['all']['url'] = generate_url(array('page' => 'device', 'device' => $device['device_id'], 'tab' => 'slas', 'rtt_type' => NULL));
|
||||
if (!isset($vars['rtt_type'])) {
|
||||
$navbar['options']['all']['class'] = "active";
|
||||
}
|
||||
$navbar['options']['all']['url'] = generate_url(['page' => 'device', 'device' => $device['device_id'], 'tab' => 'slas', 'rtt_type' => NULL]);
|
||||
$navbar['options']['all']['text'] = "All SLAs";
|
||||
|
||||
$vars_type = $vars;
|
||||
@ -32,37 +34,37 @@ $slas = dbFetchRows($sql);
|
||||
|
||||
$rtt_types = [];
|
||||
foreach ($slas as $sla) {
|
||||
$rtt_type = $sla['rtt_type'];
|
||||
$rtt_type = $sla['rtt_type'];
|
||||
|
||||
if (!isset($rtt_types[$rtt_type])) {
|
||||
if (isset($config['sla_type_labels'][$rtt_type])) {
|
||||
$text = $config['sla_type_labels'][$rtt_type];
|
||||
} else {
|
||||
$text = nicecase($rtt_type);
|
||||
if (!isset($rtt_types[$rtt_type])) {
|
||||
if (isset($config['sla_type_labels'][$rtt_type])) {
|
||||
$text = $config['sla_type_labels'][$rtt_type];
|
||||
} else {
|
||||
$text = nicecase($rtt_type);
|
||||
}
|
||||
|
||||
$rtt_types[$rtt_type] = $text;
|
||||
}
|
||||
|
||||
$rtt_types[$rtt_type] = $text;
|
||||
}
|
||||
}
|
||||
asort($rtt_types);
|
||||
|
||||
foreach ($rtt_types as $type => $text)
|
||||
{
|
||||
if ($vars['rtt_type'] == $type) { $navbar['options'][$type]['class'] = "active"; }
|
||||
$navbar['options'][$type]['url'] = generate_url(array('page' => 'device', 'device' => $device['device_id'], 'tab' => 'slas', 'rtt_type' => $type));
|
||||
$navbar['options'][$type]['text'] = $text;
|
||||
foreach ($rtt_types as $type => $text) {
|
||||
if ($vars['rtt_type'] == $type) {
|
||||
$navbar['options'][$type]['class'] = "active";
|
||||
}
|
||||
$navbar['options'][$type]['url'] = generate_url(['page' => 'device', 'device' => $device['device_id'], 'tab' => 'slas', 'rtt_type' => $type]);
|
||||
$navbar['options'][$type]['text'] = $text;
|
||||
}
|
||||
|
||||
$navbar['options']['graphs']['text'] = 'Graphs';
|
||||
$navbar['options']['graphs']['icon'] = $config['icon']['graphs'];
|
||||
$navbar['options']['graphs']['right'] = TRUE;
|
||||
|
||||
if ($vars['view'] == "graphs")
|
||||
{
|
||||
$navbar['options']['graphs']['class'] = 'active';
|
||||
$navbar['options']['graphs']['url'] = generate_url($vars, array('view' => NULL));
|
||||
if ($vars['view'] == "graphs") {
|
||||
$navbar['options']['graphs']['class'] = 'active';
|
||||
$navbar['options']['graphs']['url'] = generate_url($vars, ['view' => NULL]);
|
||||
} else {
|
||||
$navbar['options']['graphs']['url'] = generate_url($vars, array('view' => "graphs"));
|
||||
$navbar['options']['graphs']['url'] = generate_url($vars, ['view' => "graphs"]);
|
||||
}
|
||||
|
||||
print_navbar($navbar);
|
||||
|
Reference in New Issue
Block a user