mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-30 16:14:21 +02:00
basics of customisable ifAlias parser. fixed "Processorss" to "Processors" in top menu
git-svn-id: http://www.observium.org/svn/observer/trunk@1088 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
|
||||
$ifclass = ifclass($interface['ifOperStatus'], $interface['ifAdminStatus']);
|
||||
|
||||
list(,$customer) = preg_split("/[\:\[\]\{\}\(\)]/", $interface['ifAlias']);
|
||||
list($type,$customer) = preg_split("/[\:\[\]\{\}\(\)]/", $interface['ifAlias']);
|
||||
list(,$circuit) = preg_split("/[\{\}]/", $interface['ifAlias']);
|
||||
list(,$notes) = preg_split("/[\(\)]/", $interface['ifAlias']);
|
||||
list(,$speed) = preg_split("/[\[\]]/", $interface['ifAlias']);
|
||||
|
||||
+33
-3
@@ -1,4 +1,13 @@
|
||||
<?php
|
||||
<?php print_optionbar_start();
|
||||
|
||||
if(!$_GET['opta']) { $_GET['opta'] = "basic"; }
|
||||
|
||||
echo("<a href='".$config['base_url']."/services/basic/'>Basic</a> | ");
|
||||
echo("<a href='".$config['base_url']."/services/details/'>Details</a>");
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
print_r($_GET);
|
||||
|
||||
if($_GET['status'] == '0') { $where = " AND service_status = '0'"; } else { unset ($where); }
|
||||
|
||||
@@ -15,9 +24,30 @@ if ($_SESSION['userlevel'] >= '5') {
|
||||
$device_id = $host_data['device_id'];
|
||||
$device_hostname = $host_data['hostname'];
|
||||
$service_query = mysql_query("SELECT * FROM `services` WHERE `device_id` = '" . $host_data['device_id'] . "' $where");
|
||||
while($service = mysql_fetch_array($service_query)) {
|
||||
while($service = mysql_fetch_array($service_query))
|
||||
{
|
||||
include("includes/print-service.inc");
|
||||
$samehost = 1;
|
||||
# $samehost = 1;
|
||||
if($_GET['opta'] == "details")
|
||||
{
|
||||
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "215";
|
||||
$graph_array['to'] = $now;
|
||||
$graph_array['id'] = $service['service_id'];
|
||||
$graph_array['type'] = "service";
|
||||
|
||||
$periods = array('day', 'week', 'month', 'year');
|
||||
|
||||
echo('<tr style="background-color: $bg; padding: 5px;"><td colspan=6>');
|
||||
|
||||
foreach($periods as $period) {
|
||||
$graph_array['from'] = $$period;
|
||||
$graph_array_zoom = $graph_array; $graph_array_zoom['height'] = "150"; $graph_array_zoom['width'] = "400";
|
||||
echo(overlib_link($_SERVER['REQUEST_URI'], generate_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL));
|
||||
}
|
||||
echo("</td></tr>");
|
||||
}
|
||||
}
|
||||
unset ($samehost);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user