Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Adding speedtest to webapp #95

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions webapp/config/servers_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,31 @@
"addr": "203.230.60.98",
"port": 40002
}
],
"speedtest": [
{
"name": "17-ffaa:0:1107 Attachment Point",
"isdas": "17-ffaa:0:1107",
"addr": "192.33.93.195",
"port": 40002
},
{
"name": "18-ffaa:0:1202 Attachment Point",
"isdas": "18-ffaa:0:1202",
"addr": "128.105.21.208",
"port": 40002
},
{
"name": "19-ffaa:0:1303 Attachment Point",
"isdas": "19-ffaa:0:1303",
"addr": "141.44.25.144",
"port": 40002
},
{
"name": "20-ffaa:0:1404 Attachment Point",
"isdas": "20-ffaa:0:1404",
"addr": "203.230.60.98",
"port": 40002
}
]
}
4 changes: 4 additions & 0 deletions webapp/static/css/style-viz.css
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,10 @@ ul.tree li.open>ul {
ul.tree li a {
color: black;
text-decoration: none;
}

.path-text {
color: white;
padding-left: 5px; /* background shape */
padding-right: 5px; /* background shape */
border-radius: 10px; /* background shape */
Expand Down
15 changes: 15 additions & 0 deletions webapp/static/js/asviz.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ function setupPathSelection() {
});
}

function openPath(path, open) {
var liPath = $("li[path='" + path + "']");
if (!liPath.hasClass("open")) {
liPath.addClass("open");
var type = liPath.attr("seg-type");
var idx = liPath.attr("seg-num");
setPaths(type, idx, open);
}
}

function getPathNum(path) {
var liPath = $("li[path='" + path + "']");
return liPath.attr("seg-num");
}

function setPaths(type, idx, open) {
if (open) {
console.log(type + idx + ' opened');
Expand Down
151 changes: 151 additions & 0 deletions webapp/static/js/highcharts-more.js

Large diffs are not rendered by default.

861 changes: 459 additions & 402 deletions webapp/static/js/highcharts.js

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions webapp/static/js/tab-paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,13 @@ function get_path_html(paths, csegs, usegs, dsegs, show_segs) {
if_ = ent.Path.Interfaces;
var hops = if_.length / 2;

var style = "style='background-color: "
+ getPathColor(formatPathJson(paths, parseInt(p))) + "; '";
html += "<li seg-type='PATH' seg-num=" + p + "><a " + style
+ " href='#'>PATH " + (parseInt(p) + 1)
+ "</a> <span class='badge'>" + hops + "</span>";
var pathStr = formatPathJson(paths, parseInt(p));
var style = "style='background-color: " + getPathColor(pathStr) + "; '";
html += "<li seg-type='PATH' seg-num=" + p + " path='" + pathStr
+ "'><a class='path-text' " + style
+ " href='#'><span style='color: white;'>PATH "
+ (parseInt(p) + 1) + "</span></a> <span class='badge'>" + hops
+ "</span>";
exp.setUTCSeconds(ent.Path.ExpTime);
html += "<ul>";
html += "<li><a href='#'>Mtu: " + ent.Path.Mtu + "</a>";
Expand All @@ -393,7 +395,7 @@ function get_path_html(paths, csegs, usegs, dsegs, show_segs) {
+ ipv6Raw2Read(ent.HostInfo.Addrs.Ipv6) + "</a>";
}
html += "<li><a href='#'>Port: " + ent.HostInfo.Port + "</a>";
html += "<li><a href='#'>Expiration: " + exp.toLocaleDateString() + " "
html += "<li><a href='#'>Expires: " + exp.toLocaleDateString() + " "
+ exp.toLocaleTimeString() + "</a>";
for (i in if_) {
html += "<li><a href='#'>" + iaRaw2Read(if_[i].RawIsdas) + " ("
Expand Down Expand Up @@ -435,7 +437,7 @@ function get_segment_info(segs, type) {
+ " href='#'>" + type + " SEGMENT " + (parseInt(s) + 1)
+ "</a> <span class='badge'>" + hops + "</span>";
html += "<ul>";
html += "<li><a href='#'>Expiration: " + exp.toLocaleDateString() + " "
html += "<li><a href='#'>Expires: " + exp.toLocaleDateString() + " "
+ exp.toLocaleTimeString() + "</a>";
for (i in if_) {
html += "<li><a href='#'>" + if_[i].ISD + "-" + if_[i].AS + " ("
Expand Down
Loading