X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=blobdiff_plain;f=mig-bin%2Fmig-reporter;fp=mig-bin%2Fmig-reporter;h=1bc3d5614562dbc649793483290fabab9e86de95;hp=0bed9bf4ca0613973b90939181405cbfcbb9a61c;hb=3c89d454d68ad07ca9f743054483299148407379;hpb=7852d04ccea3532693de5406e7bb53dda29474b4 diff --git a/mig-bin/mig-reporter b/mig-bin/mig-reporter index 0bed9bf..1bc3d56 100755 --- a/mig-bin/mig-reporter +++ b/mig-bin/mig-reporter @@ -264,6 +264,8 @@ sub find_report { note => $node->findvalue('./note'), display => $node->findvalue('./display'), chart_labels => $node->findvalue('./chart_labels'), + divwidth => $node->findvalue('./divwidth'), + divheight => $node->findvalue('./divheight'), ); return %report; } @@ -396,6 +398,8 @@ sub print_query { my %report = @_; my $display = $report{display}; + my $height = $report{divheight}; + my $width = $report{divwidth}; if (!defined $display) { $display = 'table'; } my $rname = $report{name}; my $query = $report{query}; @@ -403,6 +407,8 @@ sub print_query { my $sth = $dbh->prepare($query); $sth->execute(); + if ($height) { $height = $height . 'px'; } + if ($width) { $width = $width . 'px'; } my $header_flag = 0; #print asciidoc @@ -440,12 +446,13 @@ sub print_query { } #print pie chart - if ($display eq 'pie_chart') { + if ($display eq 'pie_chart' or $display eq 'donut_chart') { my @h = split(/\./,$report{heading}); my @l = split(/\./,$report{chart_labels}); print $fh "++++\n"; - print $fh "
\n"; + if (defined $height and defined $width) { print $fh "
\n"; } + else { print $fh "
\n"; } print $fh "