ispman/ispman-web/cgi-bin/tmpl/processes manageProcesses.tmpl,1.7,1.8

Joerg Delker <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/processes
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv16917/ispman-web/cgi-bin/tmpl/processes

Modified Files:
	manageProcesses.tmpl 
Log Message:
added page refresh
optimized ldap search
display enhancements

Index: manageProcesses.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/processes/manageProcesses.tmpl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- manageProcesses.tmpl	29 May 2006 22:23:56 -0000	1.7
+++ manageProcesses.tmpl	31 May 2006 22:05:00 -0000	1.8
@@ -1,8 +1,16 @@
-
-<BODY>
+<BODY onLoad="doLoad();">
 
 <script type="text/javascript">
-  var cgiurl="<perl>$ENV{'SCRIPT_NAME'}</perl>"
+  var cgiurl=window.location.pathname
+  var hrefurl=window.location.href
+  
+  function doLoad(){
+    setTimeout( "refresh()", 10*1000 );
+  }
+
+  function refresh(){
+      window.location.href = hrefurl;
+  }
   
   function showSession(sess){
       location=cgiurl+"?mode=manageProcesses&ispmanSession="+sess;
@@ -24,7 +32,7 @@
     <td>Pending sessions:</td>
 	<td><perl>
       $session = $r->param("ispmanSession") || $ispman->{'sessID'};
-      my $processes = $ispman->getProcesses();
+      $processes = $ispman->getProcesses();
       my %sessions;
       my @out = ();
       
@@ -43,7 +51,7 @@
            $text = "<a class=new";
         }
         $text .= " href='javascript:showSession(\"$_\")'>";
-        if ($_ eq $ispman->{sessID}) {
+        if ($_ eq $session) {
           $text .= "<u>$_($sessions{$_}{'count'})</u>";
         } else {
           $text .= "$_($sessions{$_}{'count'})";
@@ -51,13 +59,13 @@
         $text .= "</a>";
         push @out,$text;
       }
-      join ", ",@out;
+	  scalar(@out)==0?"(none)":join(", ",@out);
       </perl>
 	</td>
   </tr>
   <tr>
     <td></td>
-	<td><a href='javascript:showSession("All")'>Show All</a></td>
+	<td><a href='javascript:showSession("<perl>$ispman->{'sessID'}</perl>")'>Current</a>, <a href='javascript:showSession("All")'>Show All</a></td>
   </tr>
 </table>
 <br><hr noshade>
@@ -76,8 +84,6 @@
 
 <perl>
 my $text="";
-my $filter="ispmanSession=".(($session eq "All")?"*":$session);
-my $processes=$ispman->getProcesses($filter);
 
 $bgcolors->{'error'}="#ef7373";
 $bgcolors->{'new'}="lightgreen";
@@ -85,7 +91,8 @@
 
 
 for (sort {$processes->{$a}{'ispmanPid'} <=> $processes->{$b}{'ispmanPid'} } keys %$processes){
-    $dn=CGI::escape($_);
+    next if ($processes->{$_}{'ispmanSession'} ne $session) && ($session ne "All");
+	
     $status=$processes->{$_}{'ispmanStatus'}||"unknown";
     
     $text.="<tr class=$status align=left>\n";



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.