mirror of
https://github.com/sileht/bird-lg.git
synced 2024-11-25 16:24:43 +01:00
Fix adv show route
This commit is contained in:
parent
da0b3bc565
commit
0549b361a9
4
lg.py
4
lg.py
|
@ -161,7 +161,7 @@ def traceroute(hosts, proto):
|
||||||
|
|
||||||
@app.route("/adv/<hosts>/<proto>")
|
@app.route("/adv/<hosts>/<proto>")
|
||||||
def show_route_filter(hosts, proto):
|
def show_route_filter(hosts, proto):
|
||||||
return show_route("", hosts, proto)
|
return show_route("adv", hosts, proto)
|
||||||
|
|
||||||
@app.route("/where/<hosts>/<proto>")
|
@app.route("/where/<hosts>/<proto>")
|
||||||
def show_route_where(hosts, proto):
|
def show_route_where(hosts, proto):
|
||||||
|
@ -185,7 +185,7 @@ def show_route(req_type, hosts, proto):
|
||||||
|
|
||||||
all = (req_type.endswith("detail") and " all" or "" )
|
all = (req_type.endswith("detail") and " all" or "" )
|
||||||
|
|
||||||
if not req_type:
|
if req_type.startswith("adv"):
|
||||||
command = "show route " + expression
|
command = "show route " + expression
|
||||||
elif req_type.startswith("where"):
|
elif req_type.startswith("where"):
|
||||||
command = "show route where net ~ [ " + expression + " ]" + all
|
command = "show route where net ~ [ " + expression + " ]" + all
|
||||||
|
|
Loading…
Reference in a new issue