lookingglass/hyperglass/render/templates/index.html.j2
Matt Love 2f2c32422e 🚀🎨💄
2019-08-06 01:09:55 -07:00

72 lines
No EOL
3.3 KiB
Django/Jinja

{% extends "templates/base.html.j2" %}
{# {% include "templates/ratelimit-query.html.j2" %} #}
{% block content %}
<div id="hg-parent" class="mx-auto">
<div class="container animsition" data-animsition-out-class="fade-out-right" data-animsition-in-class="fade-in-left"
id="hg-form">
{% import "templates/title.html.j2" as title %}
{{ title.title(branding, primary_asn, size_title="h1", size_subtitle="h4", align="center") }}
<form onsubmit="return false" name="queryform" id="lgForm" action="?" method="POST">
<div class="form-row mb-3">
<div class="col">
<select multiple class="form-control form-control-lg hg-select" id="location" data-live-search="true"
title="{{ branding.text.location }}">
{% for (netname, loc_params) in networks.items() %}
<optgroup label="{{ netname }}">
{% for param in loc_params %}
<option data-tokens='{{ netname }} {{param["hostname"]}}' value='{{param["hostname"]}}'
data-display-name='{{param["display_name"]}}' data-netname="{{ netname }}" id='{{param["hostname"]}}'>
{{ param["display_name"] }}</option>
{% endfor %}
</optgroup>
{% endfor %}
</select>
</div>
<div class="col">
<select class="form-control form-control-lg hg-select" id="query_type"
title="{{ branding.text.query_type }}" data-live-search="true">
{% if features.bgp_route.enable %}
<option id="bgp_route" value="bgp_route" data-display-name="{{ branding.text.bgp_route }}">
{{ branding.text.bgp_route }}</option>
{% endif %}
{% if features.bgp_community.enable %}
<option id="bgp_community" value="bgp_community" data-display-name="{{ branding.text.bgp_community }}">
{{ branding.text.bgp_community }}</option>
{% endif %}
{% if features.bgp_aspath.enable %}
<option id="bgp_aspath" value="bgp_aspath" data-display-name="{{ branding.text.bgp_aspath }}">
{{ branding.text.bgp_aspath }}</option>
{% endif %}
{% if features.ping.enable %}
<option id="ping" value="ping" data-display-name="{{ branding.text.ping }}">{{ branding.text.ping }}
</option>
{% endif %}
{% if features.traceroute.enable %}
<option id="type_traceroute" value="traceroute" data-display-name="{{ branding.text.traceroute }}">
{{ branding.text.traceroute }}</option>
{% endif %}
</select>
</div>
</div>
<div class="form-row mb-3">
<div class="col">
<div class="input-group input-group-lg">
<input class="form-control" type="text" placeholder="{{ branding.text.query_placeholder }}"
aria-label="{{ branding.text.query_placeholder }}" aria-describedby="target" id="target">
<div class="input-group-append">
<button class="btn btn-primary" id="hg-submit-button" type="submit">
<div id="hg-submit-icon">
<i class="remixicon-search-line"></i>
</div>
</button>
</div>
</div>
</div>
</div>
</form>
</div>
{% include "templates/results.html.j2" %}
</div>
{% endblock %}