X-Git-Url: http://git.rot13.org/?p=safeq;a=blobdiff_plain;f=xwc-jobs.pl;h=3fd0f9564fc47b21fc90eb9e472b40b8e4694436;hp=05653eb99a13819d61e7d56ff935405f2447abdd;hb=bc96bbea0c2b99d8b74e157a4c56a362e209735c;hpb=fa33c8f56e7dda5e8d19f822f5e590b0fdb18c02 diff --git a/xwc-jobs.pl b/xwc-jobs.pl index 05653eb..3fd0f95 100755 --- a/xwc-jobs.pl +++ b/xwc-jobs.pl @@ -22,6 +22,9 @@ if ( $op =~ m/^l/i ) { # list } elsif ( $op =~ m/^s/i ) { # status $url = 'stgen.htm'; $var_re = '(lbls|spcs|adrslbl)'; +} elsif ( $op =~ m/^t/i ) { # tray + $url = 'sttray.htm'; + $var_re = '(hdrIn|infoIn|hdrOut|infoOut|stsIn)'; } elsif ( $op =~ m/^e/i ) { # error $url = 'sperr.htm'; $var_re = '(lHdr|errLog)'; @@ -69,13 +72,28 @@ if ( exists $info->{spcs} ) { exit 0; } elsif ( exists $info->{errLog} ) { - print join($sep, @{ $info->{lHdr} }),"\n"; + print join($sep, 'IP', @{ $info->{lHdr} }),"\n"; foreach my $error ( @{ $info->{errLog} } ) { - print join($sep, @{ $error }),"\n"; + print join($sep, $ip, @{ $error }),"\n"; } exit 0; -} +} elsif ( exists $info->{infoIn} ) { + print join($sep, 'IP', @{ $info->{hdrIn} }),"\n"; + foreach my $row ( @{ $info->{infoIn} } ) { + $row->[1] .= ':' . $info->{stsIn}->[$row->[1]]; + print join($sep, $ip, @$row),"\n"; + } + + print join($sep, 'IP', @{ $info->{hdrOut} }),"\n"; + foreach my $row ( @{ $info->{infoOut} } ) { + $row->[1] .= ':' . $info->{stsIn}->[$row->[1]]; + print join($sep, $ip, @$row),"\n"; + } + exit 0; +} + +exit 1 if ! defined $info->{hdrs}; # we didn't get expected output my @headers = @{ $info->{hdrs} }; unshift @headers, 'id' if $op eq 'list';