From fe4dcd4ad1af602d63c6a24b891f79eb2e2538e8 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Mon, 4 Aug 2014 12:08:37 +0200 Subject: Split IPv4 and IPv6 results. Show the executed command for each output. --- config.php.example | 4 ++-- css/style.css | 8 ++++++++ index.php | 2 +- js/looking-glass.js | 2 +- routers/router.php | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/config.php.example b/config.php.example index e86b6f2..d5ac948 100644 --- a/config.php.example +++ b/config.php.example @@ -27,8 +27,8 @@ $config['misc']['logs'] = '/var/log/looking-glass.log'; $config['misc']['allow_private_asn'] = false; // Things to remove from the output (PHP compatible regex) -$config['filters'][0] = '/(client1|client2)/'; -$config['filters'][1] = '/^NotToShow/'; +$config['filters'][] = '/(client1|client2)/'; +$config['filters'][] = '/^NotToShow/'; // Routers definitions diff --git a/css/style.css b/css/style.css index 3e3f87b..8b7333e 100644 --- a/css/style.css +++ b/css/style.css @@ -43,6 +43,14 @@ body { margin-left: auto; margin-right: auto; } +.label { + font-size: 1.3em; + display: block; + width: 50%; + margin-bottom: 1em; + margin-left: auto; + margin-right: auto; +} .reset { width: 25%; margin-left: auto; diff --git a/index.php b/index.php index 78c837c..5eef817 100644 --- a/index.php +++ b/index.php @@ -144,7 +144,7 @@ final class LookingGlass { print ''; print ''; print '
'; - print '
';
+    print '
'; print '
'; print ''; print '
'; diff --git a/js/looking-glass.js b/js/looking-glass.js index 3a72f23..a58d114 100644 --- a/js/looking-glass.js +++ b/js/looking-glass.js @@ -44,7 +44,7 @@ $(document).ready(function() { $('#error-text').text(response.error); $('.alert').slideDown(); } else { - $('#output').text(response.result); + $('#output').html(response.result); $('.content').slideUp(); $('.result').slideDown(); } diff --git a/routers/router.php b/routers/router.php index d786f94..bf5c466 100644 --- a/routers/router.php +++ b/routers/router.php @@ -52,7 +52,9 @@ abstract class Router { $data = ''; foreach ($commands as $selected) { - $data .= $auth->send_command($selected); + $data .= ''.$selected.''; + $data .= '
'.$auth->send_command($selected).
+          '
'; log_to_file('[client: '.$this->requester.'] '.$this->config['host']. '> '.$selected); } -- cgit v1.2.3