From 19d30190e20f1c0b2848ea4043aaf9c31e48e386 Mon Sep 17 00:00:00 2001 From: Guillaume Mazoyer Date: Tue, 5 Aug 2014 16:34:22 +0200 Subject: Add config.defaults.php to set default configuration options. The defaults can be overriden in the config.php file but some of them are fine as defaults. This will help in having a config.php file as short as we can. Also move utils.php to the includes directory. --- includes/config.defaults.php | 56 +++++++++++++++++++++++++ includes/utils.php | 99 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 155 insertions(+) create mode 100644 includes/config.defaults.php create mode 100644 includes/utils.php (limited to 'includes') diff --git a/includes/config.defaults.php b/includes/config.defaults.php new file mode 100644 index 0000000..895810b --- /dev/null +++ b/includes/config.defaults.php @@ -0,0 +1,56 @@ + array ( + // CSS to use + 'css' => 'css/style.css', + // Title of the page + 'title' => 'Looking Glass', + 'show_title' => true, + // Show visitor IP address + 'show_visitor_ip' => true, + // Frontpage order you can use: routers, commands, parameters, buttons + 'order' => array('routers', 'commands', 'parameters', 'buttons') + ), + + // Misc + 'misc' => array( + // Logs file when commands will be written + 'logs' => '/var/log/looking-glass.log', + // Allow private ASN + 'allow_private_asn' => false + ), + + // Documentation (must be HTML) + 'doc' => array ( + // Documentation for the 'show route' query + 'bgp' => array( + 'query' => 'Show the best routes to a given destination.', + 'parameter' => 'The parameter must be a valid destination. Destination means an IPv4/IPv6 address or a subnet. Masks are also accepted as part of a valid IPv4/IPv6 address.
Please note that some routers always need a mask to be given when looking for an IPv6 address.

Example of valid arguments: