From: Rogan Hamby Date: Fri, 6 Mar 2020 19:12:24 +0000 (-0500) Subject: add ability to specify div height and width from xml and donut chart type X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=3c89d454d68ad07ca9f743054483299148407379 add ability to specify div height and width from xml and donut chart type --- 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 "