From 7fdef7955109e4ec2e49ee28938ede09595d1179 Mon Sep 17 00:00:00 2001 From: Brian Flowers Date: Thu, 22 Sep 2016 13:01:10 -0400 Subject: [PATCH] Configuration page outline --- configure.php | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/configure.php b/configure.php index ba8c86d..aad32ee 100755 --- a/configure.php +++ b/configure.php @@ -52,11 +52,34 @@ Graph Range (values) Graph Duration (seconds) - www.slightlycyberpunk.com - - CPU-US - - +query("SELECT DISTINCT host FROM MEASUREMENTS"); + +$hosts = Array(); +while($host = $result->fetchArray(SQLITE3_ASSOC)) + if ( $host['host'] ) + array_push($hosts, $host['host']); + +foreach ($hosts as $host) +{ + echo " $host"; + $result = $db_handle->query("SELECT DISTINCT attribute FROM MEASUREMENTS WHERE host='$host'"); + $attributes = Array(); + while($attribute = $result->fetchArray(SQLITE3_ASSOC)) + if ( $attribute['attribute'] ) + array_push($attributes, $attribute['attribute']); + + echo " "; + echo " $attribute"; + echo " "; + echo " "; + echo " ". + .""; + echo " "; + echo " "; +} +?> -- 1.8.3.1