Commit f8a2441c authored by Olav Kvittem's avatar Olav Kvittem

converting to utf-8

parent c4a575a0
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
......
......@@ -24,7 +24,7 @@
<body>
<?php include '../body-bs.html'?>
<script>
$("#title-bs").html('<a href="https://www.uninett.no/malepale-detaljer">Mleple</a>'); // title
$("#title-bs").html('<a href="https://www.uninett.no/malepale-detaljer">Målepåle</a>'); // title
$('#top-menu-bs').load("/mp-web/top-menu-bs.html");
$('#body-bs').load("iperf-body.html", // main body content
function(responseText, textStatus, XMLHttpRequest){
......
......@@ -174,7 +174,7 @@ function make_select_ny( elm, url){
html+= 'action="javascript:traceroute( $(\'#tr_host\').val(), $(\'#tr_times\').val(), $(\'#tr_size\').val(), $(\'#tr_interval\').val() )">';
html+='<table><tr><td>';
html+='<input type="submit" value="Trace route" class="btn btn-primary btn-lg" /> to ';
// html+='<input id=tr_host value="" placeholder="my host" title="Automatisk utfylling av mleplenavn"></input>';
// html+='<input id=tr_host value="" placeholder="my host" title="Automatisk utfylling av målepålenavn"></input>';
var html2=' <td> &nbsp;';
html2='<input id=tr_times value=3 style="width:3em;text-align:right"> times</input>';
html2+=', using <input id=tr_size value=64 style="width:3em;text-align:right"> bytes packets</input>';
......
......@@ -31,19 +31,19 @@ if ( $q->http('HTTP_X_TOKEN') ne "virre-virre-vapp" ){
# print STDERR 'host', $q->param('host'), $q->param('nobs'), $q->param('psize');
my $host = $q->param('host'); # && ( $host =~ m/^[a-zA-Z0-9\.\/\-_\:]+$/);
my $host = $q->param('host'); # && ( $host =~ m/^[a-zA-ZæøåÆØÅ0-9\.\/\-_\:]+$/);
my $nobs = $q->param('nobs'); # && ( $nobs =~ m/^[0-9]+$/ );
my $psize = $q->param('psize'); # && ( psize =~ m/^[0-9]+$/ );
my $parallel = $q->param('parallel'); # && ( psize =~ m/^[0-9]+$/ );
my $port = $q->param('port'); # && ( psize =~ m/^[0-9]+$/ );
my $interval = $q->param('interval'); # && ( psize =~ m/^[0-9]+$/ );
my $direction = $q->param('direction');
$host =~ s/[^a-zA-Z0-9\.\/\-_\:]+/_/g; # protect
$host =~ s/[^a-zA-ZæøåÆØÅ0-9\.\/\-_\:]+/_/g; # protect
$nobs =~ s/[^0-9]+/_/g;
$psize =~ s/[^0-9]+/_/g;
$port =~ s/[^0-9]+/_/g;
$parallel =~ s/[^0-9]+/_/g;
$direction =~ s/[^a-zA-Z0-9\.\/\-_]+/_/g;
$direction =~ s/[^a-zA-ZæøåÆØÅ0-9\.\/\-_]+/_/g;
$host = $q->remote_host if $host eq "";
$nobs = 3 if $nobs < 1;
......
......@@ -28,11 +28,11 @@ if ( $q->http('HTTP_X_TOKEN') ne "virre-virre-vapp"){
# print STDERR 'host', $q->param('host'), $q->param('nobs'), $q->param('psize');
my $host = $q->param('host'); # && ( $host =~ m/^[a-zA-Z0-9\.\/\-_]+$/);
my $host = $q->param('host'); # && ( $host =~ m/^[a-zA-ZæøåÆØÅ0-9\.\/\-_]+$/);
my $nobs = $q->param('nobs'); # && ( $nobs =~ m/^[0-9]+$/ );
my $psize = $q->param('psize'); # && ( psize =~ m/^[0-9]+$/ );
my $interval = $q->param('interval'); # && ( psize =~ m/^[0-9]+$/ );
$host =~ s/[^a-zA-Z0-9\.\/\-_]+/_/g; # protect
$host =~ s/[^a-zA-ZæøåÆØÅ0-9\.\/\-_]+/_/g; # protect
$nobs =~ s/[^0-9]+/_/g;
$psize =~ s/[^0-9]+/_/g;
......
var mp_url='mp_list.json';
var mp_list=[];
function make_select( elm, url){
function make_select( elm, url, heading){
// var html='<button id=traceroute onclick="traceroute( $(\'#tr_host\').val(), $(\'#tr_times\').val(), $(\'#tr_size\').val(), $(\'#tr_interval\').val() )">Trace route</button> to ';
var html='';
// commented code is to produce a select_menu rather than jquery ui autocomplete
html+= '<form name="traceroute_form" id="traceroute_form">';
html+= '<select name="mp_opt" id="mp_opt" class="btn btn-basic btn-lg" onChange="top.location.href = this.form.mp_opt.options[this.form.mp_opt.selectedIndex].value;return false;">';
html+= '<option value="">Velg Mleple</option>';
html+= '<option value="">' + heading +'</option>';
var items=[];
var request=$.ajax( {url: url, type: 'GET', dataType: 'json', crossDomain: true } );
......
......@@ -30,6 +30,6 @@ a {
<div id=logo> <a href=http://uninett.no><img src="/images/UNINETT_logo_t.png" alt="uninettlogo" /></a></div>
-->
<!--
<div id="logo"><img src="images/UNINETT_logo_0613.jpg" alt="uninettlogo" /> Mletjenester</div>
<div id="logo"><img src="images/UNINETT_logo_0613.jpg" alt="uninettlogo" /> Måletjenester</div>
<span align=right><a href=http://uninett.no><img src="images/UNINETT_logo_menu.jpg" alt="uninettlogo" /></a></span>
-->
......@@ -16,6 +16,6 @@
<div id=logo> <a href=http://uninett.no><img src="/images/UNINETT_logo_t.png" alt="uninettlogo" /></a></div>
</table>
<!--
<div id="logo"><img src="images/UNINETT_logo_0613.jpg" alt="uninettlogo" /> Mletjenester</div>
<div id="logo"><img src="images/UNINETT_logo_0613.jpg" alt="uninettlogo" /> Måletjenester</div>
<span align=right><a href=http://uninett.no><img src="images/UNINETT_logo_menu.jpg" alt="uninettlogo" /></a></span>
-->
......@@ -40,7 +40,7 @@ Se mer om <a class="btn btn-default" href="http://www.uninett.no/malepale">mål
<p><table><tr><td><b><a class="btn btn-primary btn-lg" href=https://drift.uninett.no/kart/malepale>Se kart</a></b> over andre målepåler eller
<td><span id=tr_button><div id=busy><img src=images/ajax-loader.gif></span>
<script>make_select( 'tr_button', mp_url );$("#busy").hide();</script>
<script>make_select( 'tr_button', mp_url, 'Velg målepåle' );$("#busy").hide();</script>
<!--
<td> eller tast<td><form name="mp_form" id="mp_form" onsubmit="top.location.href = 'http://'+document.mp_form.mp_name.value;return false;">
<input id="mp_name" value="" placeholder="målepåle" title="Automatisk utfylling av målepålenavn"></input>
......
......@@ -13,7 +13,7 @@
<body>
<?php include 'body-bs.html'?>
<script>
$("#title-bs").html('<a href="https://www.uninett.no/malepale-detaljer">Mleple</a>'); // title
$("#title-bs").html('<a href="https://www.uninett.no/malepale-detaljer">Målepåle</a>'); // title
$('#top-menu-bs').load("/mp-web/top-menu-bs.html");
$('#body-bs').load("mp-web-bs.html"); // main body content
</script>
......
......@@ -32,7 +32,7 @@
<body>
<?php include '../body-bs.html'?>
<script>
$("#title-bs").html('<a href="https://www.uninett.no/malepale-detaljer">Mleple</a>'); // title
$("#title-bs").html('<a href="https://www.uninett.no/malepale-detaljer">Målepåle</a>'); // title
$('#top-menu-bs').load("/mp-web/top-menu-bs.html");
$('#body-bs').load("traceroute-body.html", // main body content
function(responseText, textStatus, XMLHttpRequest){
......
......@@ -153,7 +153,7 @@ function make_select( elm, url){
var html='<form name="traceroute_form" id="traceroute_form"';
html+= 'action="javascript:traceroute( $(\'#tr_host\').val(), $(\'#tr_times\').val(), $(\'#tr_size\').val(), $(\'#tr_interval\').val() )">';
html+='<input type="submit" value="Trace route" class=button/> to ';
html+='<input id=tr_host value="" placeholder="my host" title="Automatisk utfylling av mleplenavn"></input>';
html+='<input id=tr_host value="" placeholder="my host" title="Automatisk utfylling av målepålenavn"></input>';
html+='<input id=tr_times value=3 style="width:3em;text-align:right"> times</input>';
html+=', using <input id=tr_size value=64 style="width:3em;text-align:right"> bytes packets</input>';
html+=', every <input id=tr_interval value=0.1 style="width:3em;text-align:right"> seconds.';
......@@ -303,7 +303,7 @@ $(document).ready( function(){
<p>Route analysis sends probe packets towards the target host.
<ul>
<li>Press the 'Traceroute' button above to do the test.
<li>Host(to) field has autocompletion for Mlepler.
<li>Host(to) field has autocompletion for Målepåler.
<li>Most Uninett routers will have availability statistics - just try the link.
<li>Host names aligned right to see provider names clearly.
<li>Graphs have mouseover info, and click legend to remove curve
......
......@@ -129,7 +129,7 @@ function make_select( elm, url){
html+= 'action="javascript:traceroute( $(\'#tr_host\').val(), $(\'#tr_times\').val(), $(\'#tr_size\').val(), 1 /* $(\'#tr_interval\').val()*/ )">';
html+='<table><tr><td>';
html+='<input type="submit" value="Trace route" class="btn btn-primary btn-lg" /> to ';
html+='<input id=tr_host value="" placeholder="my host" title="Automatisk utfylling av mleplenavn"></input>';
html+='<input id=tr_host value="" placeholder="my host" title="Automatisk utfylling av målepålenavn"></input>';
var html2=' <td> &nbsp;';
html2='<input id=tr_times value=3 style="width:3em;text-align:right"> times</input>';
html2+=', using <input id=tr_size value=64 style="width:3em;text-align:right"> bytes packets.</input>';
......
......@@ -27,11 +27,11 @@ if ( $q->http('HTTP_X_TOKEN') ne "virre-virre-vapp"){
# print STDERR 'host', $q->param('host'), $q->param('nobs'), $q->param('psize');
my $host = $q->param('host'); # && ( $host =~ m/^[a-zA-Z0-9\.\/\-_]+$/);
my $host = $q->param('host'); # && ( $host =~ m/^[a-zA-ZæøåÆØÅ0-9\.\/\-_]+$/);
my $nobs = $q->param('nobs'); # && ( $nobs =~ m/^[0-9]+$/ );
my $psize = $q->param('psize'); # && ( psize =~ m/^[0-9]+$/ );
my $interval = $q->param('interval'); # && ( psize =~ m/^[0-9]+$/ );
$host =~ s/[^a-zA-Z0-9\.\/\-_\:]+/_/g; # protect
$host =~ s/[^a-zA-ZæøåÆØÅ0-9\.\/\-_\:]+/_/g; # protect
$nobs =~ s/[^0-9]+/_/g;
$psize =~ s/[^0-9]+/_/g;
......
......@@ -348,7 +348,7 @@ $(document).ready( function(){
<p>Route analysis sends probe packets towards the target host.
<ul>
<li>Press the 'Traceroute' button above to do the test.
<li>Host(to) field has autocompletion for Mlepler.
<li>Host(to) field has autocompletion for Målepåler.
<li>Most Uninett routers will have availability statistics - just try the link.
<li>Host names aligned right to see provider names clearly.
<li>Graphs have mouseover info, and click legend to remove curve
......
......@@ -16,7 +16,7 @@
<body>
<?php include '../body-bs.html'?>
<script>
$("#title-bs").html('<a href="https://www.uninett.no/malepale-detaljer">Mleple</a>'); // title
$("#title-bs").html('<a href="https://www.uninett.no/malepale-detaljer">Målepåle</a>'); // title
$('#top-menu-bs').load("/mp-web/top-menu-bs.html");
$('#body-bs').load("jsbandwidth-body.html", // main body content
function(responseText, textStatus, XMLHttpRequest){
......
......@@ -602,17 +602,25 @@ function sumup(probj){
function update_trend_chart( dir, begin, speed){
// trend_chart=chart;
//return 0;
console.log ("trend " + dir + " begin " + begin + " speed " + speed );
if ( !trend_data[dir]){ trend_data[dir]=[]; }
trend_data[dir].push([begin, speed]);
var d = new Date(begin); // timedate might be buggy
var h=d.getHours() + d.getMinutes()/60 + d.getSeconds()/3600;
var hh=d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds();
console.log ("trend " + dir + " begin " + begin + " hour " + h + " speed " + speed );
// trend_data[dir].push([begin, speed]);
trend_data[dir].push([hh, speed]);
if ( trend_data[dir].length > 1){
if ( !trend_chart ){
trend_chart=tegn_graf('trend', 'Bandwidth trend', 'With '+ document.location.hostname, [], '', 0 , 'datetime');
trend_chart=tegn_graf('trend', 'Bandwidth trend', 'With '+ document.location.hostname,
// [], '', 0 , 'datetime');
[], '', 0 , 'category');
}
if ( !trend_series[dir]){
if ( !trend_series[dir]){
trend_series[dir]=trend_chart.addSeries({name:trend_name[dir], data : trend_data[dir], color: colors[dir] }, true);
}
trend_series[dir].update({data:trend_data[dir]});
// trend_series[dir].addPoint([begin,speed]);
// trend_series[dir].addPoint([hh,speed]);
}
}
......@@ -688,7 +696,7 @@ function tegn_graf( div, tittel, subtittel, tider, leg_band, grafno, xtype ){
text: subtittel
},
xAxis: {
title : {text: 'Seconds'},
title : {text: 'Time'},
type : xtype,
minorTickInterval : 1
// plotBands: leg_band
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment