mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
Add page title changing infrastructure, do it for device tabs already
git-svn-id: http://www.observium.org/svn/observer/trunk@2690 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -312,7 +312,17 @@ $('INPUT.auto-hint, TEXTAREA.auto-hint').focus(function() {
|
||||
$(this).removeClass('auto-hint');
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
if (is_array($pagetitle))
|
||||
{
|
||||
array_unshift($pagetitle,$config['page_title']);
|
||||
$title = join(" - ",$pagetitle);
|
||||
echo("<script type=\"text/javascript\">\ndocument.title = '$title';\n</script>");
|
||||
}
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -22,6 +22,8 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
|
||||
$device = device_by_id_cache($vars['device']);
|
||||
$attribs = get_dev_attribs($device['device_id']);
|
||||
|
||||
$pagetitle[] = $device['hostname'];
|
||||
|
||||
if ($config['os'][$device['os']]['group']) { $device['os_group'] = $config['os'][$device['os']]['group']; }
|
||||
|
||||
echo('<table style="margin: 0px 7px 7px 7px;" cellspacing="0" class="devicetable" width="99%">');
|
||||
|
||||
@@ -37,4 +37,6 @@ if (is_file("pages/device/apps/".mres($vars['app']).".inc.php"))
|
||||
include("pages/device/apps/".mres($vars['app']).".inc.php");
|
||||
}
|
||||
|
||||
$pagetitle[] = "Apps";
|
||||
|
||||
?>
|
||||
|
||||
@@ -108,4 +108,5 @@ print_optionbar_end();
|
||||
|
||||
}
|
||||
|
||||
$pagetitle[] = "CollectD";
|
||||
?>
|
||||
|
||||
@@ -53,4 +53,6 @@ if ($_SESSION['userlevel'] < '7')
|
||||
}
|
||||
}
|
||||
|
||||
$pagetitle[] = "Settings";
|
||||
|
||||
?>
|
||||
|
||||
@@ -13,7 +13,7 @@ if ($_POST['editing'])
|
||||
#FIXME needs more sanity checking! and better feedback
|
||||
$update = array('community' => $_POST['community'], 'snmpver' => $_POST['snmpver'], 'port' => $_POST['port']);
|
||||
if ($_POST['timeout']) { $update['timeout'] = $_POST['timeout']; } else { $update['timeout'] = array('NULL'); }
|
||||
if ($_POST['retries']) { $update['retries'] = $_POST['retries']; } else { $update['retries'] = array('NULL'); }
|
||||
if ($_POST['retries']) { $update['retries'] = $_POST['retries']; } else { $update['retries'] = array('NULL'); }
|
||||
|
||||
$rows_updated = dbUpdate($update, 'devices', '`device_id` = ?',array($device['device_id']));
|
||||
|
||||
|
||||
@@ -87,4 +87,6 @@ $ent['entPhysicalIndex'] = "0";
|
||||
printEntPhysical($ent['entPhysicalIndex'], $level, "liOpen");
|
||||
echo("</ul></div>");
|
||||
|
||||
$pagetitle = "Inventory";
|
||||
|
||||
?>
|
||||
|
||||
@@ -10,4 +10,6 @@ foreach ($entries as $entry)
|
||||
|
||||
echo('</table>');
|
||||
|
||||
$pagetitle[] = "Events";
|
||||
|
||||
?>
|
||||
|
||||
@@ -60,4 +60,6 @@ foreach ($config['graph_types']['device'] as $graph => $entry)
|
||||
}
|
||||
}
|
||||
|
||||
$pagetitle[] = "Graphs";
|
||||
|
||||
?>
|
||||
|
||||
@@ -79,4 +79,6 @@ if (is_file("pages/device/health/".mres($vars['metric']).".inc.php"))
|
||||
}
|
||||
}
|
||||
|
||||
$pagetitle[] = "Health";
|
||||
|
||||
?>
|
||||
|
||||
@@ -63,4 +63,6 @@ foreach (dbFetchRows("SELECT * FROM `hrDevice` WHERE `device_id` = ? ORDER BY `h
|
||||
|
||||
echo('</table>');
|
||||
|
||||
$pagetitle[] = "Inventory";
|
||||
|
||||
?>
|
||||
|
||||
@@ -56,4 +56,6 @@ if($vars['view'] == "incoming")
|
||||
|
||||
}
|
||||
|
||||
$pagetitle[] = "Latency";
|
||||
|
||||
?>
|
||||
|
||||
@@ -2,3 +2,7 @@
|
||||
<object data="map.php?device=<?php echo($device['device_id']); ?>&format=svg" type="image/svg+xml" style="width: 100%; height:100%">
|
||||
</object>
|
||||
</center>
|
||||
|
||||
<?php
|
||||
$pagetitle[] = "Map";
|
||||
?>
|
||||
@@ -13,4 +13,6 @@ foreach ($datas as $name=>$type)
|
||||
include("includes/print-device-graph.php");
|
||||
}
|
||||
|
||||
$pagetitle[] = "Netflow";
|
||||
|
||||
?>
|
||||
|
||||
@@ -113,4 +113,6 @@ if ($vars['view'] == 'minigraphs')
|
||||
echo("</table></div>");
|
||||
}
|
||||
|
||||
$pagetitle[] = "Ports";
|
||||
|
||||
?>
|
||||
|
||||
@@ -13,6 +13,8 @@ $type_text['vrf'] = "VRFs";
|
||||
|
||||
print_optionbar_start();
|
||||
|
||||
$pagetitle[] = "Routing";
|
||||
|
||||
echo("<span style='font-weight: bold;'>Routing</span> » ");
|
||||
|
||||
unset($sep);
|
||||
|
||||
@@ -62,4 +62,6 @@ else
|
||||
echo("No Services");
|
||||
}
|
||||
|
||||
$pagetitle[] = "Services";
|
||||
|
||||
?>
|
||||
|
||||
@@ -86,4 +86,7 @@ if ($_SESSION['userlevel'] >= "7")
|
||||
#$geshi->set_line_style('color: #999999');
|
||||
echo($geshi->parse_code());
|
||||
}
|
||||
|
||||
$pagetitle[] = "Config";
|
||||
|
||||
?>
|
||||
|
||||
@@ -49,4 +49,6 @@ echo("<table cellspacing=0 cellpadding=2 width=100%>");
|
||||
foreach (dbFetchRows($sql, $param) as $entry) { include("includes/print-syslog.inc.php"); }
|
||||
echo("</table>");
|
||||
|
||||
$pagetitle[] = "Syslog";
|
||||
|
||||
?>
|
||||
|
||||
@@ -4,5 +4,7 @@ $graph_title = "Toner";
|
||||
$graph_type = "device_toner";
|
||||
include("includes/print-device-graph.php");
|
||||
|
||||
$pagetitle[] = "Toner";
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -68,4 +68,6 @@ foreach (dbFetchRows("SELECT * FROM `vlans` WHERE `device_id` = ? ORDER BY 'vlan
|
||||
|
||||
echo("</table>");
|
||||
|
||||
$pagetitle[] = "VLANs";
|
||||
|
||||
?>
|
||||
|
||||
@@ -12,4 +12,6 @@ foreach (dbFetchRows("SELECT * FROM vminfo WHERE device_id = ? ORDER BY vmwVmDis
|
||||
|
||||
echo("</table>");
|
||||
|
||||
$pagetitle[] = "Virtual Machines";
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user