From 9e12148dd34b98bc6a2c1570483ee7a7187975d4 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Mon, 3 Oct 2011 15:03:35 +0000 Subject: [PATCH] save some more sql queries, remove automatic syslog refresh git-svn-id: http://www.observium.org/svn/observer/trunk@2641 61d68cd4-352d-0410-923a-c4978735b2b8 --- html/includes/topnav.inc.php | 4 +++- html/pages/syslog.inc.php | 13 +++++-------- includes/common.php | 7 +++++++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/html/includes/topnav.inc.php b/html/includes/topnav.inc.php index 9c6a0a788f..3064a0d742 100644 --- a/html/includes/topnav.inc.php +++ b/html/includes/topnav.inc.php @@ -1,6 +1,8 @@ - = '10') { dbFetchCell("TRUNCATE TABLE `syslog`"); } ?> @@ -14,7 +12,7 @@ - diff --git a/includes/common.php b/includes/common.php index ac8c33836d..731f4448d1 100644 --- a/includes/common.php +++ b/includes/common.php @@ -120,6 +120,13 @@ function get_port_by_ifIndex($device_id, $ifIndex) return dbFetchRow("SELECT * FROM `ports` WHERE `device_id` = ? AND `ifIndex` = ?", array($device_id, $ifIndex)); } +function get_all_devices($device, $type = "") +{ + global $cache; + + # FIXME respect $type (server, network, etc) -- needs an array fill in topnav. + return array_keys($cache['devices']['hostname']); +} function port_by_id_cache($port_id) {