Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
M
mp-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maalepaaler
mp-web
Commits
f8a2441c
Commit
f8a2441c
authored
Oct 30, 2015
by
Olav Kvittem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
converting to utf-8
parent
c4a575a0
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
35 additions
and
27 deletions
+35
-27
head-bs.html
head-bs.html
+1
-1
iperf/iperf-bs.php
iperf/iperf-bs.php
+1
-1
iperf/iperf-json.js
iperf/iperf-json.js
+1
-1
iperf/iperf-json.pl
iperf/iperf-json.pl
+3
-3
iperf/iperf-x.pl
iperf/iperf-x.pl
+2
-2
js/mp-select.js
js/mp-select.js
+2
-2
meny-bs.html
meny-bs.html
+1
-1
meny.html
meny.html
+1
-1
mp-web-bs.html
mp-web-bs.html
+1
-1
mp-web-main-js.php
mp-web-main-js.php
+1
-1
rute/traceroute-bs.php
rute/traceroute-bs.php
+1
-1
rute/traceroute.html
rute/traceroute.html
+2
-2
rute/traceroute.js
rute/traceroute.js
+1
-1
rute/traceroute.pl
rute/traceroute.pl
+2
-2
rute/traceroute_uwap.html
rute/traceroute_uwap.html
+1
-1
yt/jsbandwidth-bs.php
yt/jsbandwidth-bs.php
+1
-1
yt/jsbandwidth.mer.js
yt/jsbandwidth.mer.js
+13
-5
No files found.
head-bs.html
View file @
f8a2441c
<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=
""
>
...
...
iperf/iperf-bs.php
View file @
f8a2441c
...
...
@@ -24,7 +24,7 @@
<body>
<?php
include
'../body-bs.html'
?>
<script>
$
(
"
#title-bs
"
).
html
(
'
<a href="https://www.uninett.no/malepale-detaljer">M
lep
le</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
){
...
...
iperf/iperf-json.js
View file @
f8a2441c
...
...
@@ -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 m
lep
lenavn"></input>';
// html+='<input id=tr_host value="" placeholder="my host" title="Automatisk utfylling av m
ålepå
lenavn"></input>';
var
html2
=
'
<td>
'
;
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>
'
;
...
...
iperf/iperf-json.pl
100755 → 100644
View file @
f8a2441c
...
...
@@ -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
;
...
...
iperf/iperf-x.pl
100755 → 100644
View file @
f8a2441c
...
...
@@ -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
;
...
...
js/mp-select.js
View file @
f8a2441c
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
}
);
...
...
meny-bs.html
View file @
f8a2441c
...
...
@@ -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>
-->
meny.html
View file @
f8a2441c
...
...
@@ -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>
-->
mp-web-bs.html
View file @
f8a2441c
...
...
@@ -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>
...
...
mp-web-main-js.php
View file @
f8a2441c
...
...
@@ -13,7 +13,7 @@
<body>
<?php
include
'body-bs.html'
?>
<script>
$
(
"
#title-bs
"
).
html
(
'
<a href="https://www.uninett.no/malepale-detaljer">M
lep
le</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>
...
...
rute/traceroute-bs.php
View file @
f8a2441c
...
...
@@ -32,7 +32,7 @@
<body>
<?php
include
'../body-bs.html'
?>
<script>
$
(
"
#title-bs
"
).
html
(
'
<a href="https://www.uninett.no/malepale-detaljer">M
lep
le</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
){
...
...
rute/traceroute.html
View file @
f8a2441c
...
...
@@ -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 m
lep
lenavn"></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 M
lep
ler.
<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
...
...
rute/traceroute.js
View file @
f8a2441c
...
...
@@ -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 m
lep
lenavn"></input>
'
;
html
+=
'
<input id=tr_host value="" placeholder="my host" title="Automatisk utfylling av m
ålepå
lenavn"></input>
'
;
var
html2
=
'
<td>
'
;
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>
'
;
...
...
rute/traceroute.pl
100755 → 100644
View file @
f8a2441c
...
...
@@ -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
;
...
...
rute/traceroute_uwap.html
View file @
f8a2441c
...
...
@@ -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 M
leple
r.
<li>
Host(to) field has autocompletion for M
ålepåle
r.
<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
...
...
yt/jsbandwidth-bs.php
View file @
f8a2441c
...
...
@@ -16,7 +16,7 @@
<body>
<?php
include
'../body-bs.html'
?>
<script>
$
(
"
#title-bs
"
).
html
(
'
<a href="https://www.uninett.no/malepale-detaljer">M
lep
le</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
){
...
...
yt/jsbandwidth.mer.js
View file @
f8a2441c
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment