summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Smokeping.pm22
-rw-r--r--qooxdoo/source/class/Tr/ui/TraceTable.js8
-rw-r--r--qooxdoo/source/perl/Qooxdoo/Services/Tr.pm8
-rw-r--r--qooxdoo/source/translation/messages.pot2
4 files changed, 27 insertions, 13 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 6690953..98ad8d1 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -650,11 +650,6 @@ sub target_menu($$$$;$){
if (not $host or $host =~ m|^/|){
$menuextra = undef;
}
- if ($menuextra){
- $menuextra =~ s/{HOST}/#$host/g;
- } else {
- $menuextra = '';
- }
my $class = 'menuitem';
if ($key eq $current ){
if ( @$open ) {
@@ -663,6 +658,13 @@ sub target_menu($$$$;$){
$class = 'menuactive';
}
};
+ if ($menuextra){
+ $menuextra =~ s/{HOST}/$host/g;
+ $menuextra =~ s/{CLASS}/$class/g;
+ $menuextra = ' '.$menuextra;
+ } else {
+ $menuextra = '';
+ }
if ($filter){
if (($menu and $menu =~ /$filter/i) or ($title and $title =~ /$filter/i)){
@@ -2223,8 +2225,9 @@ The slave names must match the slaves you have setup in the slaves section.
DOC
menuextra => {
_doc => <<DOC },
-A bit of html to append after the menu entry. You can embedd the name of the current host into it using C<{HOST}>.
-This entry does get inherited. Use this for example to add a link to your mtr service.
+HTML String to be added to the end of each menu entry. The C<{HOST}> entry will be replaced by the
+host property of the relevant section. The C<{CLASS}> entry will be replaced by the same
+class as the other tags in the manu line.
DOC
probe => {
_sub => sub {
@@ -3519,8 +3522,9 @@ DOC
List of slave servers. It gets inherited by all targets.
DOC
menuextra => { _doc => <<DOC },
-HTML String to be added to the end of each menu entry. The C<{HOST}> entry will be replaces by the
-host of the relevant section if there is one.
+HTML String to be added to the end of each menu entry. The C<{HOST}> entry will be replaced by the
+host property of the relevant section. The C<{CLASS}> entry will be replaced by the same
+class as the other tags in the manu line.
DOC
}
diff --git a/qooxdoo/source/class/Tr/ui/TraceTable.js b/qooxdoo/source/class/Tr/ui/TraceTable.js
index ace538f..5141884 100644
--- a/qooxdoo/source/class/Tr/ui/TraceTable.js
+++ b/qooxdoo/source/class/Tr/ui/TraceTable.js
@@ -88,8 +88,14 @@ qx.Class.define('Tr.ui.TraceTable',
var tableModel = self.__tableModel;
var lines = retval['output'].length;
var data = self.__data;
+ var sleep = 0;
for(var i=0;i<lines;i++){
+ sleep = 0;
var hop = retval['output'][i][0];
+ if (hop == 'SLEEP'){
+ sleep = self.__delay * 1000;
+ continue;
+ }
var host = retval['output'][i][1];
var ip = retval['output'][i][2];
var value = retval['output'][i][3];
@@ -147,7 +153,7 @@ qx.Class.define('Tr.ui.TraceTable',
var next_round = function (){Tr.Server.getInstance().callAsync(
fill_table,'run_tr',{ handle: retval['handle'],
point: retval['point']})};
- qx.client.Timer.once(next_round,self,0);
+ qx.client.Timer.once(next_round,self,sleep);
} else
{
for (var i=0;i<10;i++){
diff --git a/qooxdoo/source/perl/Qooxdoo/Services/Tr.pm b/qooxdoo/source/perl/Qooxdoo/Services/Tr.pm
index 58195eb..357b020 100644
--- a/qooxdoo/source/perl/Qooxdoo/Services/Tr.pm
+++ b/qooxdoo/source/perl/Qooxdoo/Services/Tr.pm
@@ -28,7 +28,8 @@ sub launch {
setsid or die "Can't start a new session: $!";
open STDERR, '>&STDOUT' or die "Can't dup stdout: $!";
for (my $i = 0; $i<$rounds;$i++){
- system "traceroute","-I","-q","1",$host;
+ system "traceroute","-I","-q","1",$host;
+ print "SLEEPING\n";
sleep $delay;
}
}
@@ -109,6 +110,9 @@ sub method_run_tr
push @array, [$1,undef,undef,undef];
$point = tell($fh);
}
+ elsif (/^SLEEPING/){
+ push @array, ['SLEEPING'];
+ $point = tell($fh);
else {
$error->set_error(107,"ERROR: $_. See $data for more information.");
return $error;
@@ -120,7 +124,7 @@ sub method_run_tr
handle=>$handle,
point=>$point,
output=>\@array,
- again=> $again,
+ again=> $again,
}
}
else {
diff --git a/qooxdoo/source/translation/messages.pot b/qooxdoo/source/translation/messages.pot
index db97ffa..3937747 100644
--- a/qooxdoo/source/translation/messages.pot
+++ b/qooxdoo/source/translation/messages.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-06-05 01:21+0200\n"
+"POT-Creation-Date: 2008-06-05 08:36+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"