829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
|
# File 'lib/pqa.rb', line 829
def create(reports)
rpt = "<html><head>"
rpt =<<EOS
<style type="text/css">
body { background-color:white; }
h2 { text-align:center; }
h3 { color:blue }
p, td, th { font-family:Courier, Arial, Helvetica, sans-serif; font-size:14px; }
th { color:white; background-color:#7B8CBE; }
span.keyword { color:blue; }
</style>
EOS
rpt << "<title>SQL Query Analysis (generated #{Time.now})</title></head><body>\n"
rpt << "<h2>SQL Query Analysis (generated #{Time.now})</h2><br>\n"
rpt << "<hr><center>"
rpt << "<table><th>Reports</th>"
reports.each_index {|x|
next if !reports[x].applicable
link = "<a href=\"#report#{x}\">#{reports[x].title}</a>"
rpt << "<tr><td>#{link}</td></tr>"
}
rpt << "</table>"
rpt << "<hr></center>"
reports.each_index {|x|
next if !reports[x].applicable
rpt << "<a name=\"report#{x}\"> </a>"
rpt << reports[x].html
}
rpt << "</body></html>\n"
end
|