Commit b49b553b authored by Kolbjørn Barmen's avatar Kolbjørn Barmen

Bort med latin1, inn med utf8, samt slette RCS som jeg gjetter var et uhell

parent c1bd357d
......@@ -25,7 +25,7 @@ You need a basic list of measurement points - create the file mp_list.json
You need a list of systems with https :
./mp_list_iperf.sh
S er det stilene, disse kan man legge de inn nr man installerer debian-pakken :
Så er det stilene, disse kan man legge de inn når man installerer debian-pakken :
git clone https://github.com/andreassolberg/uninett-bootstrap-theme.git /usr/share/mp-web/
......
......@@ -28,7 +28,7 @@ td.logo { padding: 5px 0 5px 0 }
.dekor2 { background: #be1527 url("/felles/c2b.png") no-repeat top center }
/* hvitt p rodt (Microsoft anerkjenner ikke eksistensen av "oslash") */
/* hvitt på rodt (Microsoft anerkjenner ikke eksistensen av "oslash") */
.invers { background-color: #be1527 ; color: #e0e0e0 }
th.invers { background-color: #be1527 ; color: #e0e0e0 ;
text-align: left ; padding: 2px 5px 2px 5px }
......@@ -55,7 +55,7 @@ td.input { background-color: #be1527 ; padding: 0 1em 0 0 }
.zebra { background-color: #e0e0e0 }
/* gr spalter */
/* grå spalter */
td.tab { background-color: #e0e0e0 ; text-align: center ; width: 50px ;
padding: 3px 0 0 0 ;
border: thin solid black ; border-bottom: none }
......@@ -65,7 +65,7 @@ td.boks { background-color: #e0e0e0 ; padding: 5px ;
border: thin solid black ; border-top: none }
td.boks > p { padding: 0 0 1ex 0 ; margin: 0 }
a.boks { color: black ; font-weight: bold }
a.boks:after { content: ' ' }
a.boks:after { content: ' ···' }
.boks h2 { font-size: 120% ; text-align: center ; padding-bottom: 1ex }
a.nav { color: #be1527 ; font-weight: bold }
.aktiv { background-color: white }
......
head 1.1;
access;
symbols;
locks
oak:1.1; strict;
comment @# @;
1.1
date 2013.07.10.08.28.20; author oak; state Exp;
branches;
next ;
desc
@@
1.1
log
@Initial revision
@
text
@<html>
<!--
This implements a web front end to a json traceroute service.
-->
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<script type="text/javascript" src="jquery-1.10.1.min.js"></script>
<script type="text/javascript" src="jquery-ui.js"></script>
<script type="text/javascript" src="jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="/mp-style.css" />
<style type="text/css" title="currentStyle">
@@import "jquery-ui.css";
@@import "demo_page.css";
@@import "jquery.dataTables_themeroller.css";
#tracetable, #tracetable_filter, #about { float: left }
#tracetable td { text-align: right}
div, span, input, button {font-size:normal;}
@@media (min-width:321px) { /* smartphones, iPhone, portrait 480x320 phones */
div, span, input, button {font-size:x-large;}
}
@@media (min-width:481px) { /* portrait e-readers (Nook/Kindle), smaller tablets @@ 600 or @@ 640 wide. */
div, span, input, button {font-size:x-large;}
}
@@media (min-width:641px) { /* portrait tablets, portrait iPad, landscape e-readers, landscape 800x480 or 854x480 phones */
div, span, input, button {font-size:large;}
}
@@media (min-width:961px) { /* tablet, landscape iPad, lo-res laptops ands desktops */
div, span, input, button {font-size:medium;}
}
@@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */
div, span, input, button {font-size:small;}
}
@@media (min-width:1281px) { /* hi-res laptops and desktops */
div, span, input, button {font-size:x-small;}
}
</style>
<script type="text/javascript">
var mp_url="https://kind.uninett.no/autoregister/utstyr_mp.json";
function traceroute(host, nobs, psize, interval){
if ( ! nobs ) nobs=10;
if ( ! host) host="";
var html='<table cellpadding="0" cellspacing="0" border="0" class="display" id="tracetable"><thead>';
var title=true;
$("#busy").show();
var url='/cgi-bin/traceroute.pl?host=' + host + '&nobs=' + nobs + '&psize=' + psize + '&interval=' + interval;
console.log(url);
$.getJSON( url,
function( mtr_rows){
$.each(mtr_rows, function(tr) {
if (tr == 1){ html+= '</thead><tbody>'};
html+='<tr>';
$.each(mtr_rows[tr], function(td) {
if (tr == 0){
html+='<th align=left>' + mtr_rows[tr][td];
} else {
var a='';
if ( td == 1 ){
html+='<td><a target=mping href="http://mping.uninett.no/cgi-bin/mping/loss_mam?host=' + mtr_rows[tr][td] + '&group=uninett&date=130628&lang=no">' + mtr_rows[tr][td] + '</a>';
} else {
html+='<td>' + mtr_rows[tr][td];
}
}
// console.log(mtr_rows[tr]);
});
});
html+= '</tbody></table>';
$("#traces").html(html);
$('#tracetable').dataTable( { "bPaginate": false, "bAutoWidth": false,
"oLanguage": { "sSearch": "Filter lines:" } });
$("#busy").hide();
});
}
function make_select_old( elm, url){
// 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='<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"</input> to ';
// html+= '<form name="traceroute_form" id="traceroute_form" action=>';
// html+= '<select name="tr_opt" id="tr_opt">';
// html+= '<option value="">My host</option>';
var items=[];
var request=$.ajax( {url: url, type: 'GET', dataType: 'json', crossDomain: true } );
request.done( function( mps){
// console.log(mps);
$.each(mps, function(mp) {
items.push( mps[mp].navn);
// html+='<option value="' + mps[mp].navn + '">' + mps[mp].navn + '</option>';
// + mps[mp].nettinstallasjon + ': '
});
// html+='</select>';
html+='<input id=tr_host value="" placeholder="My host"></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.';
// $(elm).html(html+'</select>');
html+='</form>';
$(elm).html(html);
$( "#tr_host" ).autocomplete({ source: items });
});
request.fail( function( jqXHR, status, error){
console.log(status+error+ url);
});
/* var rq=$.JSONget(url, function(data){console.log(data)});
rq.fail( function( jqXHR, error){
console.log(error+ url);
});
*/
}
function make_select( elm, url){
// var html='<button id=traceroute onclick="traceroute( $(\'#tr_host\').val(), $(\'#tr_times\').val(), $(\'#tr_size\').val(), $(\'#tr_interval\').val() )">Trace route</button> to ';
// commented code is to produce a select_menu rather than jquery ui autocomplete
// html+= '<form name="traceroute_form" id="traceroute_form">';
// html+= '<select name="tr_opt" id="tr_opt">';
// html+= '<option value="">My host</option>';
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"></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.';
html+='</form>';
$(elm).html(html);
var items=[];
var request=$.ajax( {url: url, type: 'GET', dataType: 'json', crossDomain: true } );
request.done( function( mps){
// console.log(mps);
$.each(mps, function(mp) {
items.push( mps[mp].navn);
// html+='<option value="' + mps[mp].navn + '">' + mps[mp].navn + '</option>';
// + mps[mp].nettinstallasjon + ': '
});
// html+='</select>';
// $(elm).html(html+'</select></form>');
$( "#tr_host" ).autocomplete({ source: items });
});
request.fail( function( jqXHR, status, error){
console.log(status+error+ url);
});
/* var rq=$.JSONget(url, function(data){console.log(data)});
rq.fail( function( jqXHR, error){
console.log(error+ url);
});
*/
}
$(document).ready( function(){
$("#busy").hide();
});
</script>
</head>
<body>
<ul id="menu">
<li><a href="/">Indeks</a></li>
<li><a href="/ndt">NDT</a></li>
<li><a href="http://fou1:8000/">Pathdiag</a></li>
<li><a href="/pathload">Pathload</a></li>
<li><a href="/mping">MPing</a></li>
<li><a href="/pathdiag">Pathdiag</a></li>
<li><a href="/matrix">Multicast beacon</a></li>
<li><a href="/ssmping-lg">SSMPing Looking Glass</a></li>
<li><a href="/appmon">AppMon</a></li>
<li><a href="/nemu">NEMU</a></li>
</ul>
<h2>Route analysis</h2>
<p> <span id=tr_button></span>
<script>make_select( '#tr_button', mp_url );</script>
<div id=busy><img src=ajax-loader.gif> Traceing route - please wait at least 'times*(1+every)' seconds.</div>
<div id=traces></div>
<div id=about>
<br><p><h2>About</h2>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>Most Uninett routers will have availability statistics - just try the link.
<li>Host names aligned right to see provider names clearly.
</ul>
<p>The service uses the <a href=http:"//en.wikipedia.org/wiki/MTR_(software)">mtr program</a> for the probing, please refer to that for technical details.
<p>It works by increasing the Time-To-Live from 1 until the target is reached and by that revealing the routers in between. This takes som time to do because of inherent timeouts - wating for no response.
</div>
<script> $('#about').append('Screen width is: ' + screen.width); </script>
</body>
</html>
@
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