diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2008-06-05 08:43:21 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2008-06-05 08:43:21 +0200 |
commit | 5c8d6da392323b37fd85a398b2a493034635c65e (patch) | |
tree | 2e6482b575424d4863b45cfd988d555189346051 /qooxdoo/source | |
parent | a26e2b5d5d5634e4653c7081dd3dd5a94fdcbb8f (diff) | |
download | smokeping-5c8d6da392323b37fd85a398b2a493034635c65e.tar.gz smokeping-5c8d6da392323b37fd85a398b2a493034635c65e.tar.xz |
let the webif sleep between runs (cut the comets tail)
replace {CLASS} too
Diffstat (limited to 'qooxdoo/source')
-rw-r--r-- | qooxdoo/source/class/Tr/ui/TraceTable.js | 8 | ||||
-rw-r--r-- | qooxdoo/source/perl/Qooxdoo/Services/Tr.pm | 8 | ||||
-rw-r--r-- | qooxdoo/source/translation/messages.pot | 2 |
3 files changed, 14 insertions, 4 deletions
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" |