Commit 4f3240e8 authored by Mac Newbold's avatar Mac Newbold

Added support for displaying fields without choosing a value.

parent a7a0199d
......@@ -25,15 +25,13 @@ print "Got ARGS = ",join(" ",@ARGV),"\n" if $d;
my %args = ();
while ($#ARGV >= 0) {
$_ = shift;
if ( ! grep '=' ) {
$args{$_}='=';
if ( ! /=/ ) { $args{$_}='='; } else {
@_ = split('=',$_);
my ($opt,$val) = @_ if ($#_ >= 0);
if (!defined($val)) { $val=""; }
$args{$opt}=$val if (defined($opt));
}
@_ = split('=',$_);
my ($opt,$val) = @_ if ($#_ >= 0);
if (!defined($val)) { $val=""; }
$args{$opt}=$val if (defined($opt));
}
if ( $d ) {
print "Parsed args to:\n";
foreach my $opt (keys %args) {
......@@ -46,21 +44,23 @@ my $cols= "a.node_id,a.type";
my $cond= "b.node_id is null and a.type!='switch'";
my $img = 0;
if (defined($args{"type"})) { $cond .= " and a.type='".$args{"type"}."'"; }
if (defined($args{"type"})) {
$cond .= " and a.type='".$args{"type"}."'" if $args{"type"} ne '=';
}
if (defined($args{"OS"})) {
$img = 1;
$cols .= ",d.OS";
$cond .= " and d.OS='".$args{"OS"}."'";
$cond .= " and d.OS='".$args{"OS"}."'" if $args{"OS"} ne '=';
}
if (defined($args{"ver"})) {
$img = 1;
$cols .= ",d.ver";
$cond .= " and d.ver='".$args{"ver"}."'";
$cond .= " and d.ver='".$args{"ver"}."'" if $args{"ver"} ne '=';
}
if (defined($args{"extras"})) {
$img = 1;
$cols .= ",d.extras";
$cond .= " and d.extras='".$args{"extras"}."'";
$cond .= " and d.extras='".$args{"extras"}."'" if $args{"extras"} ne '=';
}
#if (defined($args{"fixes"})) {
# $join .= "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment