diff options
-rw-r--r-- | config.php.example | 4 | ||||
-rw-r--r-- | css/style.css | 8 | ||||
-rw-r--r-- | index.php | 2 | ||||
-rw-r--r-- | js/looking-glass.js | 2 | ||||
-rw-r--r-- | 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; @@ -144,7 +144,7 @@ final class LookingGlass { print '</div>'; print '</div>'; print '<div class="result">'; - print '<pre class="pre-scrollable" id="output"></pre>'; + print '<div id="output"></div>'; print '<div class="reset">'; print '<button class="btn btn-danger btn-block" id="backhome">Reset</button>'; print '</div>'; 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 .= '<span class="label label-primary">'.$selected.'</span>'; + $data .= '<pre class="pre-scrollable">'.$auth->send_command($selected). + '</pre>'; log_to_file('[client: '.$this->requester.'] '.$this->config['host']. '> '.$selected); } |