1
0
Fork 0
mirror of https://github.com/sileht/bird-lg.git synced 2024-11-21 14:34:43 +01:00
bird-lg/templates/layout.html
Baptiste Jonglez ef6b32c527 Fix XSS when handling query
Fixes #63
2021-05-10 23:03:14 +02:00

131 lines
4.9 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en">
<head>
<title>{{config.WEBSITE_TITLE|default("Bird-LG / Looking Glass") }}</title>
<meta charset="UTF-8">
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/bootstrap-responsive.min.css') }}">
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/docs.css') }}">
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/DT_bootstrap.css') }}">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="/">{{config.WEBSITE_TITLE|default("Bird-LG / Looking Glass") }}</a>
<div class="navbar nav-collapse">
<ul class="nav nav-pills">
<li class="navbar-text">Nodes:&nbsp;&nbsp;</li>
<li class="hosts"><a id="{{all_hosts}}" href="#">all</a></li>
{% for host in config.PROXY %}
<li class="hosts"><a id="{{host}}" href="#">{{host}}</a></li>
{% endfor %}
<li class="divider-vertical"></li>
<li class="navbar-text">Protocols:&nbsp;&nbsp;</li>
<li class="proto"><a id="ipv4" href="#">ipv4</a></li>
<li class="proto"><a id="ipv6" href="#">ipv6</a></li>
<li class="divider-vertical"></li>
<li class="dropdown request_type">
<a href="#"
class="dropdown-toggle"
data-toggle="dropdown">
Show protocols
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
{% for id, text in commands %}
<li><a id="{{id}}" href="#">{{text}}</a></li>
{% endfor %}
</ul>
</li>
<form class="navbar-search pull-left" action="javascript:;">
<input type="text" style="width:250px;" class="request_args search-query" placeholder="...">
</form>
<li class="navbar-text"></li>
</ul>
<p class="navbar-text pull-right"></p>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<div class="container-fluid">
<div class="row-fluid">
<div class="span8">
{% if warnings %}
<div class="alert alert-warning">
{% for warning in warnings %}{{warning}}<br />{% endfor %}
</div>
{% endif %}
{% if errors %}
<div class="alert alert-error">
{% for error in errors %}{{error}}<br />{% endfor %}
</div>
{% endif %}
{% block body %}{% endblock %}
</div>
<div class="span4">
<div class="well" style="padding: 8px 0;">
<ul class="nav nav-list history">
<li class="nav-header">Request history</li>
{% for hosts, proto, request_type, request_args in session.history %}
<li{% if loop.first %} class="active"{% endif %}>
<a href="/{{ [request_type, hosts, proto]|join("/") }}{% if request_args %}?q={{request_args|urlencode}}{% endif %}">
{{hosts}}/{{proto}}: {{ commands_dict[request_type]|replace("...", request_args) }}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
</div>
<div class="footer">
<p>bird looking glass, <a href="https://github.com/sileht/bird-lg/">source code</a> under GPL 3.0, powered by <a href="http://flask.pocoo.org">Flask</a>, <a href="http://jquery.com/">jQuery</a> and <a href="http://twitter.github.com/bootstrap/">Bootstrap</a></p>
</div>
<div class="progress progress-info progress-striped active" style="position:fixed;bottom:0px;right:10px;display:none;height:10px;width:200px;">
<div class="bar" style="width: 100%;"></div>
</div>
<div class="modal fade" style="display:none;">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>Modal header</h3>
</div>
<div class="modal-body" style="height: 300px; overflow: auto;">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-primary">Close</a>
</div>
</div>
</div>
<script type="text/javascript" src="{{url_for('static', filename='js/jquery.js') }}"></script>
<script type="text/javascript" src="{{url_for('static', filename='js/bootstrap.min.js') }}"></script>
<script type="text/javascript" src="{{url_for('static', filename='js/jquery.dataTables.js') }}"></script>
<script type="text/javascript" src="{{url_for('static', filename='js/DT_bootstrap.js') }}"></script>
<script type="text/javascript">
request_type = "{{session.request_type}}";
request_args = "{{session.request_args}}";
hosts = "{{session.hosts}}";
proto = "{{session.proto}}";
history_query = {{session.history|tojson|safe}};
</script>
<script type="text/javascript" src="{{url_for('static', filename='js/lg.js') }}"></script>
</body>
</html>