collector.dn42 customisations
This commit is contained in:
parent
7cdb5da22e
commit
64d8b79414
@ -1,6 +1,6 @@
|
||||
# Bird-lg-go
|
||||
|
||||
[](https://ci.burble.dn42/burble.dn42/bird-lg-go)
|
||||
[](https://ci.burble.dn42/burble.dn42/bird-lg-go)
|
||||
|
||||
An alternative implementation for [bird-lg](https://github.com/sileht/bird-lg) written in Go. Both frontend and backend (proxy) are implemented, and can work with either the original Python implementation or the Go implementation.
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
<h2 class="mb-3"><span class="badge badge-info mr-3">{{ html .ServerName }}</span>{{ html .Target }}</h2>
|
||||
<h2 class="mb-3">{{ html .Target }}</h2>
|
||||
{{ .Result }}
|
||||
|
@ -27,29 +27,7 @@
|
||||
{{ $server = .AllServersURL }}
|
||||
{{ $target = "" }}
|
||||
{{ end }}
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item">
|
||||
{{ if eq .AllServersURLCustom "all" }}
|
||||
<a class="nav-link{{ if .AllServersLinkActive }} active{{ end }}"
|
||||
href="/{{ $option }}/{{ .AllServersURL }}/{{ $target }}"> {{ .AllServerTitle }} </a>
|
||||
{{ else }}
|
||||
<a class="nav-link active"
|
||||
href="{{ .AllServersURLCustom }}"> {{ .AllServerTitle }} </a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ $length := len .Servers }}
|
||||
{{ range $k, $v := .Servers }}
|
||||
<li class="nav-item">
|
||||
{{ if gt $length 1 }}
|
||||
<a class="nav-link{{ if eq $server $v }} active{{ end }}"
|
||||
href="/{{ $option }}/{{ $v }}/{{ $target }}">{{ html (index $.ServersDisplay $k) }}</a>
|
||||
{{ else }}
|
||||
<a class="nav-link{{ if eq $server $v }} active{{ end }}"
|
||||
href="/">{{ html (index $.ServersDisplay $k) }}</a>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
<ul class="navbar-nav mr-auto navwrap px-3"></ul>
|
||||
{{ if .IsWhois }}
|
||||
{{ $target = .WhoisTarget }}
|
||||
{{ end }}
|
||||
|
@ -25,14 +25,11 @@ var optionsMap = map[string]string{
|
||||
"route_from_origin_all_primary": "show route where bgp_path.last = ... all primary",
|
||||
"route": "show route for ...",
|
||||
"route_all": "show route for ... all",
|
||||
"route_bgpmap": "show route for ... (bgpmap)",
|
||||
"route_where": "show route where net ~ [ ... ]",
|
||||
"route_where_all": "show route where net ~ [ ... ] all",
|
||||
"route_where_bgpmap": "show route where net ~ [ ... ] (bgpmap)",
|
||||
"route_generic": "show route ...",
|
||||
"generic": "show ...",
|
||||
"whois": "whois ...",
|
||||
"traceroute": "traceroute ...",
|
||||
}
|
||||
|
||||
// pre-compiled regexp and constant statemap for summary rendering
|
||||
|
@ -233,13 +233,13 @@ func webServerStart(l net.Listener) {
|
||||
http.HandleFunc("/route_from_origin_all_primary/", webBackendCommunicator("bird", "route_from_origin_all_primary"))
|
||||
http.HandleFunc("/route/", webBackendCommunicator("bird", "route"))
|
||||
http.HandleFunc("/route_all/", webBackendCommunicator("bird", "route_all"))
|
||||
http.HandleFunc("/route_bgpmap/", webHandlerBGPMap("bird", "route_bgpmap"))
|
||||
// http.HandleFunc("/route_bgpmap/", webHandlerBGPMap("bird", "route_bgpmap"))
|
||||
http.HandleFunc("/route_where/", webBackendCommunicator("bird", "route_where"))
|
||||
http.HandleFunc("/route_where_all/", webBackendCommunicator("bird", "route_where_all"))
|
||||
http.HandleFunc("/route_where_bgpmap/", webHandlerBGPMap("bird", "route_where_bgpmap"))
|
||||
// http.HandleFunc("/route_where_bgpmap/", webHandlerBGPMap("bird", "route_where_bgpmap"))
|
||||
http.HandleFunc("/route_generic/", webBackendCommunicator("bird", "route_generic"))
|
||||
http.HandleFunc("/generic/", webBackendCommunicator("bird", "generic"))
|
||||
http.HandleFunc("/traceroute/", webBackendCommunicator("traceroute", "traceroute"))
|
||||
// http.HandleFunc("/traceroute/", webBackendCommunicator("traceroute", "traceroute"))
|
||||
http.HandleFunc("/whois/", webHandlerWhois)
|
||||
// http.HandleFunc("/api/", apiHandler)
|
||||
// http.HandleFunc("/telegram/", webHandlerTelegramBot)
|
||||
|
Loading…
x
Reference in New Issue
Block a user