From 8ce0c22a42189aa9411d26d1c5a320da919e1286 Mon Sep 17 00:00:00 2001 From: Knut Auvor Grythe Date: Wed, 1 Apr 2015 01:21:15 +0200 Subject: Add support for #require-version and %SYSNAME% in smanagrun, UI fixes --- web/nms.gathering.org/sshow.pl | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'web') diff --git a/web/nms.gathering.org/sshow.pl b/web/nms.gathering.org/sshow.pl index 1b310af..64663a2 100755 --- a/web/nms.gathering.org/sshow.pl +++ b/web/nms.gathering.org/sshow.pl @@ -34,7 +34,8 @@ my $slistdonegid = $dbh->prepare( "SELECT DISTINCT gid, cmd, author, added FROM squeue WHERE processed = 't' -ORDER BY gid") +ORDER BY gid DESC +LIMIT ?::text::int") or die "Could not prepare slistdonegid"; my $slistprocgid = $dbh->prepare( @@ -42,7 +43,7 @@ my $slistprocgid = $dbh->prepare( FROM squeue WHERE processed = 'f' ORDER BY gid") - or die "Could not prepare slistdonegid"; + or die "Could not prepare slistprocgid"; my $sgetgid = $dbh->prepare( "SELECT * @@ -55,7 +56,7 @@ my $sgetprocessing = $dbh->prepare( FROM squeue WHERE processed = 'f' ORDER BY updated DESC, gid, sysname") - or die "Could not prepare sgetdone"; + or die "Could not prepare sgetprocessing"; my $sgetnoconnect = $dbh->prepare( "SELECT * @@ -134,7 +135,7 @@ if ($action eq 'listgid') { print "
\n";
 	print "Kunne ikke koble til\n\n\n";
 	print "Ferdige:\n";
-	$slistdonegid->execute();
+	$slistdonegid->execute($limit);
 	my ($gid, $author);
 	$gid = -1;
 	while ((my $row = $slistdonegid->fetchrow_hashref())) {
@@ -146,7 +147,7 @@ if ($action eq 'listgid') {
 			print "Added: ".$row->{added}."\n";
 		}
 		my $cmd = $row->{cmd};
-		print "\t$cmd\n";
+		print "$cmd\n\n";
 	}
 	print "\n\n";
 	print "I kø:\n";
@@ -161,7 +162,7 @@ if ($action eq 'listgid') {
 			print "Added: ".$row->{added}."\n";
 		}
 		my $cmd = $row->{cmd};
-		print "\t$cmd\n";
+		print "$cmd\n\n";
 	}
 	$dbh->commit();
 	print "
\n"; @@ -198,8 +199,7 @@ if ($action eq 'done') { my $gid = $cgi->param('gid'); $sgetdonegid->execute($gid); $squery = $sgetdonegid; - } - else { + } else { $sgetdone->execute($limit); $squery = $sgetdone; } @@ -212,7 +212,7 @@ if ($action eq 'done') { print " Author: ".$row->{author}."\n"; print " Cmd: ".$row->{cmd}."\n"; print " Added: ".$row->{added}." Updated: ".$row->{updated}."\n"; - print " gID: ".$row->{gid}."\n"; + print " GID: ".$row->{gid}."\n"; my @result = split(/[\n\r]+/, $row->{result}); foreach (@result) { print "\t", encode_entities($_), "\n"; -- cgit v1.2.3