diff options
author | Knut Auvor Grythe <knut@auvor.no> | 2015-04-01 01:21:15 +0200 |
---|---|---|
committer | root <root@einstein.tg15.gathering.org> | 2015-04-01 01:21:15 +0200 |
commit | 8ce0c22a42189aa9411d26d1c5a320da919e1286 (patch) | |
tree | 44773a028e2e704b433b84d95004b5750c1046b9 /web | |
parent | 2c44d754c0f7693e414bf57148772b4bc8cc023b (diff) |
Add support for #require-version and %SYSNAME% in smanagrun, UI fixes
Diffstat (limited to 'web')
-rwxr-xr-x | web/nms.gathering.org/sshow.pl | 18 |
1 files changed, 9 insertions, 9 deletions
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 "<pre>\n"; print "<a href=\"sshow.pl?action=noconnect\" />Kunne ikke koble til</a>\n\n\n"; print "<b>Ferdige:</b>\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 "<b>I kø:</b>\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 "</pre>\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"; |