Update templates/looking_glass.html

This commit is contained in:
Blackwhitebear8 2025-08-14 17:53:17 +02:00
parent 601d0281e5
commit 498e0658f4

View file

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/static/img/favicon.png"> <link rel="icon" type="image/png" href="/static/img/favicon.png">
<script src="/static/js/bootstrap.bundle.min.js"></script> <script src="/static/js/bootstrap.bundle.min.js"></script>
<script src="/static/js/vis-network.min.js"></script> <script src="/static/js/vis-network.min.js"></script>
<link href="/static/css/bootstrap.min.css" rel="stylesheet"> <link href="/static/css/bootstrap.min.css" rel="stylesheet">
<title>AS215085 Looking Glass</title> <title>AS215085 Looking Glass</title>
<style> <style>
@ -17,72 +17,64 @@
white-space: pre-wrap; word-wrap: break-word; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; overflow-x: auto;
} }
#mynetwork { #mynetwork {
width: 100%; height: 600px; border: 1px solid #dee2e6; border-radius: .25rem; width: 100%; min-height: 400px;
border: 1px solid #dee2e6; border-radius: .25rem;
} }
.copy-btn { cursor: pointer; } .copy-btn { cursor: pointer; }
.speedtest-links a { margin-right: 10px; margin-bottom: 10px; }
.header-content {
position: relative;
z-index: 2;
}
header { header {
position: relative; position: relative; background: url('/static/img/background.webp') no-repeat center center;
background: url('/static/img/background.webp') no-repeat center center; background-size: cover; color: white; padding: 40px 20px; text-align: center;
background-size: cover;
color: white;
padding: 40px 20px;
text-align: center;
} }
header::after { header::after {
content: ""; content: ""; position: absolute; top: 0; left: 0;
position: absolute; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); z-index: 1;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1;
}
header h1, header p {
position: relative;
z-index: 2;
}
header h1 {
margin: 0;
font-size: 2.5em;
} }
header h1, header p, .header-content { position: relative; z-index: 2; }
footer { footer {
background-color: #2D2E43; background-color: #2D2E43; color: white; text-align: center;
color: white; padding: 10px 0; margin-top: 20px;
text-align: center;
padding: 10px 0;
margin-top: 20px;
} }
#form-error { #form-error { min-height: 1.5rem; }
min-height: 1.5rem; /* Reserve space to prevent layout shift */
}
/* Styles for BGP raw output highlighting */
.asn-highlight { color: #5DADE2; } .asn-highlight { color: #5DADE2; }
.asn215085-highlight { color: #F9E79F; font-weight: bold; }
.best-line { color: #58D68D; font-weight: bold; } .best-line { color: #58D68D; font-weight: bold; }
.btn-custom { background-color: #07AAF9; border-color: #07AAF9; color: white; }
.btn-custom:hover { background-color: #0698e0; border-color: #0698e0; }
/* --- Custom Styling for Buttons and Dropdowns --- */ .bgprtv-controls-wrapper {
.btn-custom { display: flex;
background-color: #07AAF9; flex-direction: column;
border-color: #07AAF9; align-items: center;
color: white; gap: 1rem;
padding: 0.75rem 1rem; margin-bottom: 1rem; border: 1px solid #dee2e6;
border-radius: .25rem; background-color: #f8f9fa;
} }
.btn-custom:hover { .bgprtv-legend-group, .bgprtv-filter-group {
background-color: #0698e0; /* Slightly darker blue for hover */ display: flex;
border-color: #0698e0; align-items: center;
color: white; flex-wrap: wrap;
gap: 1rem;
justify-content: center;
} }
.bgprtv-legend-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.bgprtv-legend-symbol { display: flex; align-items: center; width: 30px; }
.bgprtv-legend-line { width: 100%; height: 0; }
.bgprtv-legend-line.best-path { border-top: 3px solid #C0392B; }
.bgprtv-legend-line.multipath { border-top: 2px solid #F39C12; }
.bgprtv-legend-line.alt-path { border-top: 2px dashed #2C3E50; }
.bgprtv-legend-node { width: 15px; height: 15px; border: 1px solid #555; border-radius: 2px; }
.bgprtv-legend-node.best-path-node { background-color: #FADBD8; }
.bgprtv-legend-node.multipath-node { background-color: #FDEBD0; }
.bgprtv-legend-node.alt-path-node { background-color: #D6DBDF; }
.bgprtv-filter-title { font-weight: bold; margin: 0; font-size: 0.9rem; white-space: nowrap; }
#bgprtv-filter-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; font-size: 0.9rem; }
#bgprtv-filter-controls label { margin: 0; cursor: pointer; white-space: nowrap; }
.bgprtv-filter-separator { border-left: 1px solid #ccc; height: 1.2rem; }
</style> </style>
</head> </head>
<body> <body>
<header> <header>
<div class="header-content"> <div class="header-content">
<a href="/"> <img src="/static/img/as215085-logo.png" alt="AS215085 Logo" style="height: 120px; opacity: 1;!important"> </a> <a href="/"> <img src="/static/img/as215085-logo.png" alt="AS215085 Logo" style="height: 120px;"> </a>
<h2><b>AS215085 Looking Glass</b></h2> <h2><b>AS215085 Looking Glass</b></h2>
<p><b>Proudly delivering the backbone for PixelHosting's services</b></p> <p><b>Proudly delivering the backbone for PixelHosting's services</b></p>
</div> </div>
@ -117,7 +109,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="row mt-4 align-items-center"> <div class="row mt-4 align-items-center">
<div class="col-lg-2 col-md-6 mb-3 mb-lg-0"> <div class="col-lg-2 col-md-6 mb-3 mb-lg-0">
<label class="form-label">Looking Glass IPv4</label> <label class="form-label">Looking Glass IPv4</label>
@ -162,10 +153,13 @@
</div> </div>
<div class="col-md-4 mb-3"> <div class="col-md-4 mb-3">
<label for="method" class="form-label">Method</label> <label for="method" class="form-label">Method</label>
<select class="form-select form-select-custom" id="method"> <select class="form-select" id="method">
<option value="ping">Ping</option> <option value="ping">Ping</option>
<option value="ping6">Ping6</option>
<option value="mtr">MTR</option> <option value="mtr">MTR</option>
<option value="mtr6">MTR6</option>
<option value="traceroute">Traceroute</option> <option value="traceroute">Traceroute</option>
<option value="traceroute6">Traceroute6</option>
<option value="bgp_raw">BGP Raw Lookup</option> <option value="bgp_raw">BGP Raw Lookup</option>
<option value="visualize">BGP Route Visualizer</option> <option value="visualize">BGP Route Visualizer</option>
</select> </select>
@ -174,8 +168,8 @@
<button type="submit" id="execute-btn" class="btn btn-custom w-100">Execute</button> <button type="submit" id="execute-btn" class="btn btn-custom w-100">Execute</button>
</div> </div>
</div> </div>
<div id="form-error" class="text-danger fw-bold mt-2"></div>
</form> </form>
<div id="form-error" class="text-danger fw-bold mt-2"></div>
</div> </div>
</div> </div>
@ -184,6 +178,46 @@
<div class="card-body"> <div class="card-body">
<pre id="output-console" class="output-console">Output will appear here...</pre> <pre id="output-console" class="output-console">Output will appear here...</pre>
<div id="visualizer-container" style="display:none;"> <div id="visualizer-container" style="display:none;">
<div class="bgprtv-controls-wrapper">
<div class="bgprtv-legend-group">
<div class="bgprtv-legend-item">
<div class="bgprtv-legend-symbol"><div class="bgprtv-legend-line best-path"></div></div>
<span><b>Best path</b></span>
</div>
<div class="bgprtv-legend-item">
<div class="bgprtv-legend-symbol"><div class="bgprtv-legend-line multipath"></div></div>
<span><b>Multipath</b></span>
</div>
<div class="bgprtv-legend-item">
<div class="bgprtv-legend-symbol"><div class="bgprtv-legend-line alt-path"></div></div>
<span><b>Alternate path</b></span>
</div>
<div class="bgprtv-legend-item">
<div class="bgprtv-legend-symbol"><div class="bgprtv-legend-node best-path-node"></div></div>
<span>Best path node</span>
</div>
<div class="bgprtv-legend-item">
<div class="bgprtv-legend-symbol"><div class="bgprtv-legend-node multipath-node"></div></div>
<span>Multipath node</span>
</div>
<div class="bgprtv-legend-item">
<div class="bgprtv-legend-symbol"><div class="bgprtv-legend-node alt-path-node"></div></div>
<span>Alternate path node</span>
</div>
</div>
<div class="bgprtv-filter-group">
<h4 class="bgprtv-filter-title">Filter:</h4>
<div id="bgprtv-filter-controls">
<label><input type="checkbox" name="bgprtv-filter" value="active"> Active paths</label>
<span class="bgprtv-filter-separator"></span>
<label><input type="checkbox" name="bgprtv-filter" value="all" checked> All paths</label>
<label><input type="checkbox" name="bgprtv-filter" value="transit"> Transit</label>
<label><input type="checkbox" name="bgprtv-filter" value="ix"> IX</label>
<label><input type="checkbox" name="bgprtv-filter" value="customer"> Customer</label>
<label><input type="checkbox" name="bgprtv-filter" value="other"> Other</label>
</div>
</div>
</div>
<div id="mynetwork"></div> <div id="mynetwork"></div>
<div id="visualizer-loader" style="display:none; text-align: center; padding: 20px;">Loading visualization...</div> <div id="visualizer-loader" style="display:none; text-align: center; padding: 20px;">Loading visualization...</div>
</div> </div>
@ -211,8 +245,8 @@
</div> </div>
<div class="mt-3"> <div class="mt-3">
<h5>Download Test Files</h5> <h5>Download Test Files</h5>
<div id="speedtest-links" class="speedtest-links d-flex flex-wrap justify-content-between gap-2"> <div id="speedtest-links" class="speedtest-links d-flex flex-wrap justify-content-between gap-2"></div>
</div> <a id="web-speedtest-btn" href="#" target="_blank" class="btn btn-custom mt-3" style="display: none;">AS215085 web speedtest</a>
</div> </div>
</div> </div>
</div> </div>