summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/index.php b/index.php
index 714bed6..8f661ac 100644
--- a/index.php
+++ b/index.php
@@ -37,6 +37,7 @@ final class LookingGlass {
$this->contact = $config['contact'];
$this->misc = $config['misc'];
$this->routers = $config['routers'];
+ $this->doc = $config['doc'];
}
private function render_routers() {
@@ -69,11 +70,11 @@ final class LookingGlass {
print('<div class="form-group">');
print('<label for="query">Command to issue</label>');
print('<select size="5" class="form-control" name="query" id="query">');
- print('<option value="bgp" selected="selected">show route IP_ADDRESS</option>');
- print('<option value="as-path-regex">show route as-path-regex AS_PATH_REGEX</option>');
- print('<option value="as">show route AS</option>');
- print('<option value="ping">ping IP_ADDRESS|HOSTNAME</option>');
- print('<option value="traceroute">traceroute IP_ADDRESS|HOSTNAME</option>');
+ $selected = ' selected="selected"';
+ foreach (array_keys($this->doc) as $cmd) {
+ print('<option value="'.$cmd.'"'.$selected.'>'.$this->doc[$cmd]['command'].'</option>');
+ $selected = '';
+ }
print('</select>');
print('</div>');
}