ispman/ispman-web/cgi-bin/tmpl/processes manageProcesses.tmpl,1.5,1.6
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-serv28761/ispman-web/cgi-bin/tmpl/processes
Modified Files:
manageProcesses.tmpl
Log Message:
redesign of process page
Index: manageProcesses.tmpl
===================================================================
RCS file: /cvsroot/ispman/ispman/ispman-web/cgi-bin/tmpl/processes/manageProcesses.tmpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- manageProcesses.tmpl 28 Apr 2003 14:47:25 -0000 1.5
+++ manageProcesses.tmpl 28 May 2006 23:56:22 -0000 1.6
@@ -1,33 +1,83 @@
-<HTML>
-<HEAD>
-<TITLE>ISPMan summary</TITLE>
-<LINK HREF="<perl>$ispman->getConfig('ispmanUrlPrefix')</perl>/ispman.css" REL="stylesheet" TYPE="text/css">
-
-
-</HEAD>
-
<BODY>
-<FONT FACE="Helvetica, Arial" size=2>
+<script type="text/javascript">
+ var cgiurl="<perl>$ENV{'SCRIPT_NAME'}</perl>"
+
+ function showSession(sess){
+ location=cgiurl+"?mode=manageProcesses&ispmanSession="+sess;
+ }
+
+ function editProcess(sess,pid){
+ location=cgiurl+"?mode=editProcess&ispmanSession="+sess+"&ispmanPid="+pid;
+ }
+
+ function deleteProcess(sess,pid){
+ location=cgiurl+"?mode=deleteProcess_web&ispmanSession="+sess+"&ispmanPid="+pid;
+ }
+
+</script>
+
+<table border=0>
+ <tr>
+ <td>Pending sessions:</td>
+ <td><perl>
+ $session = $r->param("ispmanSession") || $ispman->{'sessID'};
+ my $processes = $ispman->getProcesses();
+ my %sessions;
+ my @out = ();
+
+ foreach (keys %$processes){
+ $sessions{$processes->{$_}{'ispmanSession'}}->{'count'}++;
+ $sessions{$processes->{$_}{'ispmanSession'}}->{ $processes->{$_}{'ispmanStatus'}}++;
+ }
+
+ foreach (keys %sessions) {
+ my $text;
+ if (defined($sessions{$_}{'error'})) {
+ $text = "<a class=error";
+ } elsif (defined($sessions{$_}{'insession'})) {
+ $text = "<a class=insession";
+ } else {
+ $text = "<a class=new";
+ }
+ $text .= " href='javascript:showSession(\"$_\")'>";
+ if ($_ eq $ispman->{sessID}) {
+ $text .= "<u>$_ ($sessions{$_}{'count'})</u>";
+ } else {
+ $text .= "$_ ($sessions{$_}{'count'})";
+ }
+ $text .= "</a>";
+ push @out,$text;
+ }
+ join ", ",@out;
+ </perl>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td><a href='javascript:showSession("All")'>Show All</a></td>
+ </tr>
+</table>
+<br><hr noshade>
<TABLE border=0 class=table>
-<TR>
-<TH>session</th>
-<TH>pid</th>
-<TH>host</th>
-<TH>domain</th>
-<TH>process</th>
-<TH>status</th>
+<tr>
+<th>session</th>
+<th>pid</th>
+<th>host</th>
+<th>domain</th>
+<th>process</th>
+<th>status</th>
<th>Created by</th>
-<TH>Delete</th>
-<TH>Edit</th>
+<th> </th>
</tr>
<perl>
my $text="";
-my $processes=$ispman->getProcesses();
+my $filter="ispmanSession=".(($session eq "All")?"*":$session);
+my $processes=$ispman->getProcesses($filter);
$bgcolors->{'error'}="#ef7373";
$bgcolors->{'new'}="lightgreen";
@@ -38,19 +88,43 @@
$dn=CGI::escape($_);
$status=$processes->{$_}{'ispmanStatus'}||"unknown";
- $text.="<TR class=$status>\n";
- $text.="<TD align=left>$processes->{$_}{'ispmanSession'} </td>\n";
- $text.="<TD align=left>$processes->{$_}{'ispmanPid'} </td>\n";
- $text.="<TD align=left>$processes->{$_}{'ispmanHostName'} </td>\n";
- $text.="<TD align=left>$processes->{$_}{'ispmanDomain'} </td>\n";
- $text.="<TD align=left>$processes->{$_}{'ispmanProcess'} </td>\n";
- $text.="<TD align=left>$status </td>\n";
- $text.="<TD align=left>$processes->{$_}{'ispmanUser'} </td>\n";
- $text.="<TD align=center> <A HREF='$ENV{'SCRIPT_NAME'}?mode=deleteProcess&dn=$dn'>D</a> </td>\n";
- $text.="<TD align=center> <A HREF='$ENV{'SCRIPT_NAME'}?mode=editProcess&dn=$dn'>E</a> </td>\n";
- $text.="</TR>\n";
+ $text.="<tr class=$status align=left>\n";
+ $text.="<td>$processes->{$_}{'ispmanSession'} </td>\n";
+ $text.="<td>$processes->{$_}{'ispmanPid'} </td>\n";
+ $text.="<td>$processes->{$_}{'ispmanHostName'} </td>\n";
+ $text.="<td>$processes->{$_}{'ispmanDomain'} </td>\n";
+ $text.="<td>$processes->{$_}{'ispmanProcess'} </td>\n";
+ $text.="<td>$status </td>\n";
+ $text.="<td>$processes->{$_}{'ispmanUser'} </td>\n";
+ $text.="<td>";
+ $text.="<a href='javascript:editProcess(".
+ $processes->{$_}{'ispmanSession'}.",".
+ $processes->{$_}{'ispmanPid'}.")'>".
+ "<img src='".$ispman->getConfig("ispmanUrlPrefix")."/gfx/apply.gif' border=0>".
+ "</a>";
+ $text.="<a href='javascript:deleteProcess(".
+ $processes->{$_}{'ispmanSession'}.",".
+ $processes->{$_}{'ispmanPid'}.")'>".
+ "<img src='".$ispman->getConfig('ispmanUrlPrefix')."/gfx/delete.gif' border=0>".
+ "</a>";
+ $text.="</td>\n";
+ $text.="</tr>\n";
}
$text
</perl>
- </table>
-
+</table>
+<br><hr noshade>
+<perl>
+ my $text="";
+ if (($session ne "All") && ($session ne $ispman->{'sessID'})){
+ $text="<form>";
+ $text.="<input type=hidden name='mode' value='releaseSession_web'>";
+ $text.="<input type=hidden name='nextPage' value='".$ENV{'SCRIPT_NAME'}."?mode=manageProcesses&ispmanSession=".$session."'>";
+ $text.="<input type=hidden name='session' value='".$session."'>";
+ $text.="<input class='statusbutton' type=submit value='"._("Commit complete session")."'>";
+ $text.="</form>";
+ }
+ $text;
+</perl>
+
+
-------------------------------------------------------
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