Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Factor out plot header and footer into separate routines
  • Loading branch information
Geoffrey Broadwell committed Aug 1, 2014
1 parent 2f84e2d commit 412f134
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions analyze
Expand Up @@ -747,10 +747,8 @@ sub summarize_results_html_history {
print $out_fh $html;
}
sub summarize_results_html_plot {
my ($data, $opt, $out_fh) = @_;
my $html = <<'PLOT_HEADER';
sub plot_header {
return <<'PLOT_HEADER';
<!DOCTYPE html>
<html>
<head>
Expand Down Expand Up @@ -1024,6 +1022,19 @@ sub summarize_results_html_plot {
<body>
PLOT_HEADER
}
sub plot_footer {
return <<'PLOT_FOOTER';
</body>
</html>
PLOT_FOOTER
}
sub summarize_results_html_plot {
my ($data, $opt, $out_fh) = @_;
my $html = plot_header();
my $s = Analyze::Summary->new(data => $data, opt => $opt);
Expand Down Expand Up @@ -1143,10 +1154,7 @@ CHART_TOP
CHART_BOTTOM
}
$html .= <<'PLOT_FOOTER';
</body>
</html>
PLOT_FOOTER
$html .= plot_footer();
print $out_fh $html;
}
Expand Down

0 comments on commit 412f134

Please sign in to comment.