1 from __future__
import print_function
2 from __future__
import absolute_import
14 from builtins
import range
15 from os
import chdir,getcwd,listdir,makedirs
16 from os.path
import basename,join,exists
22 from ROOT
import TCanvas,gStyle,TH1F,TGaxis,gPad,kRed
26 if "RELMON_SA" in os.environ:
27 from .dirstructure
import Comparison,Directory
28 from .definitions
import *
29 from .utils
import unpickler
31 from Utilities.RelMon.dirstructure
import Comparison,Directory
33 from Utilities.RelMon.utils
import unpickler
39 for old,new
in url_encode_dict.items():
40 url=url.replace(old,new)
44 return "w=%s;h=%s" %(h,w)
48 obj_url=
"archive/%s/%s/%s/%s/" %(run,sample,version,tier)
50 while obj_url.endswith(slash):
52 while slash*2
in obj_url:
53 obj_url=obj_url.replace(slash*2,slash)
57 obj_url=
"obj=%s;" %
build_obj_addr(run,sample,version,plot_path,tier)
60 def fairy_url(run1,run2,sample1,sample2,version1,version2,plot_path,tier1,tier2,draw_opts="",h=250,w=200):
61 fairy_url =
"%s/%s/plotfairy/overlay?" %(server,base_url)
62 fairy_url+=
build_obj(run1,sample1,version1,plot_path,tier1)
63 fairy_url+=
build_obj(run2,sample2,version2,plot_path,tier2)
65 fairy_url+=
"drawopts=%s;" %draw_opts
67 fairy_url +=
";ref=ratiooverlay"
71 fairy_url =
"%s/%s/plotfairy/" %(server,base_url)
75 fairy_url+=
"drawopts=%s;" %draw_opts
79 style_location=
"/cms-service-reldqm"
81 style_location=
"/cms-service-reldqm"
83 style_location =
"http://cms-service-reldqm.web.cern.ch/" + style_location +
"/"
86 if directory!=
None and len(directory.comparisons)>0:
88 style=
'img.fail {border:1px solid #ff0000;}\n'+\
89 'img.succes {border:1px solid #00ff00;}\n'+\
90 'img.null {border:1px solid #ffff00;}\n'+\
91 'img.skiped {border:1px solid #7a7a7a;}\n'+\
92 'a.black_link:link {color: #333333}\n'+\
93 'a.black_link:hover {color: #737373}\n'+\
94 'a.black_link:visited {color: #333333}\n'+\
95 'a.black_link:active {color: #333333}\n'
101 '<title>RelMon Summary</title>'+\
102 '<link rel="stylesheet" href="%s/style/blueprint/screen.css" type="text/css" media="screen, projection">'%style_location+\
103 '<link rel="stylesheet" href="%s/style/blueprint/print.css" type="text/css" media="print">'%style_location+\
104 '<link rel="stylesheet" href="%s/style/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">'%style_location+\
105 '<style type="text/css">'+\
106 '.rotation {display: block;-webkit-transform: rotate(-90deg);-moz-transform: rotate(-90deg); }'+\
110 '%s'%additional_header+\
113 '<div class="container">'
120 return '</div></body></html>'
126 cms_logo_url =
"http://cms-service-reldqm.web.cern.ch/cms-service-reldqm/style/CMS.gif"
128 cms_logo_url =
"cms-service-reldqm/style/CMS.gif"
129 mother_name=basename(directory.mother_dir)
132 mother_file_name=
"../RelMonSummary.html"
134 mother_file_name=
"%s.html" %(
hash_name(mother_name, hashing_flag))
136 mother_file_name=
"RelMonSummary.html"
139 mother_file_name=
"%s.html" %(
hash_name(mother_name, hashing_flag))
142 files = directory.mother_dir.split(
"/")
144 dir_name = files[-2]+files[-1]
147 dir_name = directory.mother_dir
148 mother_file_name=
"%s.html" %(
hash_name(dir_name, hashing_flag))
150 mother_file_name=
"%s.html" %directory.mother_dir.replace(
"/",
"_")
151 mother_file_name=mother_file_name.strip(
"_")
153 link_to_mother=
'<a href="%s">..</a>' %mother_file_name
154 html=
'<div class="span-20">'+\
155 '<h1>%s</h1>'%directory.name+\
157 '<div class="span-1">'+\
158 '<h1>%s</h1>'%link_to_mother+\
160 '<div class="span-3 last">'+\
161 '<img src="%s" class="top right" width="54" hight="54">'%cms_logo_url+\
164 if len(mother_name)>0:
165 html+=
'<h2 class="alt">%s</h2>'% directory.mother_dir+\
171 html=
'<p><span class="caps alt">%s comparisons:</span></p>'%directory.weight
173 if directory.n_successes>0:
174 html+=
'<li><span class="caps">Success: %.1f%% (%s)</span></li>'%(directory.get_success_rate(),directory.n_successes)
175 if directory.n_nulls>0:
176 html+=
'<li><span class="caps">Null: %.1f%% (%s)</span></li>'%(directory.get_null_rate(),directory.n_nulls)
177 if directory.n_fails>0:
178 html+=
'<li><span class="caps">Fail: %.1f%% (%s)</span></li>'%(directory.get_fail_rate(),directory.n_fails)
179 if directory.n_skiped>0:
180 html+=
'<li><span class="caps">Skipped: %.1f%% (%s)</span></li>'%(directory.get_skiped_rate(),directory.n_skiped)
181 if directory.n_missing_objs>0:
182 html+=
'<li><span class="caps">Unpaired: %s</span></li>'%(directory.n_missing_objs)
189 if len(directory.subdirs)==0:
191 html=
'<div class="span-20 colborder">'
192 html+=
'<h2 class="alt">Sub-Directories</h2>'
195 sorted_subdirs= sorted(directory.subdirs, key=
lambda subdir: subdir.name)
196 sorted_subdirs= sorted(sorted_subdirs, key=
lambda subdir: subdir.n_nulls, reverse=
True)
197 sorted_subdirs= sorted(sorted_subdirs, key=
lambda subdir: subdir.n_fails, reverse=
True)
198 for subdir
in sorted_subdirs:
201 link =
"%s.html" %(
hash_name(
join(directory.full_path,name), hashing_flag))
203 link=
"%s_%s_%s.html" %(directory.mother_dir.replace(
"/",
"_"),directory.name.replace(
"/",
"_"),name)
205 html+=
'<div class="span-4 prepend-2 colborder">'
206 html+=
'<h3>%s</h3>'%name
209 html+=
'<div class="span-7">'
213 html+=
'<div class="span-6 last">'
214 html+=
'<a href="%s"><img src="%s" class="top right"></a>'%(link,subdir.get_summary_chart_ajax(150,100))
229 for comparison
in directory.comparisons:
230 test_name=comparison.test_name
231 test_threshold=comparison.test_thr
233 if len(test_name)==0:
234 for subdir
in directory.subdirs:
235 for comparison
in subdir.comparisons:
236 test_name=comparison.test_name
237 test_threshold=comparison.test_thr
239 if len(test_name)!=0:
break
240 if len(test_name)==0:
241 for subsubdir
in subdir.subdirs:
242 for comparison
in subsubdir.comparisons:
243 test_name=comparison.test_name
244 test_threshold=comparison.test_thr
246 if len(test_name)!=0:
break
247 if len(test_name)==0:
248 for subsubsubdir
in subsubdir.subdirs:
249 for comparison
in subsubsubdir.comparisons:
250 test_name=comparison.test_name
251 test_threshold=comparison.test_thr
253 if len(test_name)!=0:
break
258 html=
'<div class="span-6">'+\
261 html+=
'<a href="%s/%s/start?runnr=%s;dataset=/%s/%s/DQMIO;sampletype=offline_data;filter=all;referencepos=on-side;referenceshow=all;referencenorm=True;referenceobj1=other:%s:/%s/%s/DQMIO:;referenceobj2=none;referenceobj3=none;referenceobj4=none;search=;striptype=object;stripruns=;stripaxis=run;stripomit=none;workspace=Everything;size=M;focus=;zoom=no;">To the DQM GUI...</a>' %(server,base_url,meta.run1,meta.sample1,meta.release1,meta.run2,meta.sample2,meta.release2)
264 html+=
'<div class="span-7 colborder">'+\
265 '<img src="%s" class="top right">'%directory.get_summary_chart_ajax(200,200)+\
267 '<div class="span-9 last">'
269 html+=
'<h3>Sample:</h3>'+\
270 '<p class="caps">%s</p>'%meta.sample1+\
271 '<h3>Run1 and Run2:</h3>'+\
272 '<p class="caps">%s - %s</p>'%(meta.run1,meta.run2)
273 html+=
'<h3>Releases:</h3>'+\
274 '<ul><li><p>%s</p></li><li><p>%s</p></li></ul>'%(meta.release1,meta.release2)+\
275 '<h3>Statistical Test (Pvalue threshold):</h3>'+\
276 '<ul><li><p class="caps">%s (%s)</p></li></ul>'%(test_name,test_threshold)+\
284 """Prepare the comparisons between histograms and organise them in the page.
285 Moreover create separate pages with the overlay and the single plots.
291 comparisons= [comp
for comp
in directory.comparisons
if comp.status == cat_states[category]]
292 n_comparisons=len(comparisons)
297 comparisons=sorted(comparisons, key=
lambda comp:comp.rank, reverse=is_reverse)
300 dir_abs_path=
"%s/%s/" %(directory.mother_dir,directory.name)
302 for comparison
in comparisons:
303 plot_name=comparison.img_name
304 if "http://" not in plot_name:
305 plot_name= basename(comparison.img_name)
306 class_type=
"colborder"
307 if counter==3
or tot_counter==n_comparisons:
308 class_type=
" colborder last"
309 comp_abs_path=
"%s/%s" %(dir_abs_path,comparison.name)
312 if directory.do_pngs:
313 png_link=comparison.img_name
314 html_comparisons+=
'<div class="span-6 %s"><p>%s</p>' %(class_type,comparison.name)+\
315 '<p class="alt">%s: %.2E</p>' %(comparison.test_name,comparison.rank)+\
316 '<a href="%s"><img src="%s" width="250" height="200" class="top center %s"></a></div>'%(png_link,png_link,cat_classes[category])
320 directory.meta.sample1,
321 directory.meta.sample2,
322 directory.meta.release1,
323 directory.meta.release2,
325 directory.meta.tier1,
326 directory.meta.tier2,
328 small_fairy=
fairy_url(directory.meta.run1,
330 directory.meta.sample1,
331 directory.meta.sample2,
332 directory.meta.release1,
333 directory.meta.release2,
335 directory.meta.tier1,
336 directory.meta.tier2)
339 directory.meta.sample1,
340 directory.meta.release1,
342 directory.meta.tier1,
345 directory.meta.sample2,
346 directory.meta.release2,
348 directory.meta.tier2,
351 html_comparisons+=
'<div class="span-6 %s"><p>%s</p>' %(class_type,comparison.name)+\
352 '<p class="alt">%s: %.2E</p>' %(comparison.test_name,comparison.rank)+\
353 '<div><a class="black_link" href="%s">%s</a></div>'%(single_fairy1,directory.meta.release1)+\
354 '<div><a href="%s">%s</a></div>'%(single_fairy2,directory.meta.release2)+\
355 '<a href="%s"><img src="%s" class="top center %s"></a></div>'%(big_fairy,small_fairy,cat_classes[category])
358 html_comparisons+=
"<hr>"
363 if len(html_comparisons)!=0:
364 html=
'<div class="span-20"><h2 class="alt">%s Comparisons</h2></div>' %cat_names[category]
365 html+=html_comparisons
374 imgname=
"RankSummary.png"
375 gStyle.SetPadTickY(0)
376 c=TCanvas(
"ranks",
"ranks",500,400)
380 h=directory.rank_histo
381 rank_histof=TH1F(h.GetName(),
"",h.GetNbinsX(),h.GetXaxis().GetXmin(),h.GetXaxis().GetXmax())
382 rank_histof.SetLineWidth(2)
383 for i
in range(0,h.GetNbinsX()+1):
384 rank_histof.SetBinContent(i,h.GetBinContent(i))
385 h.SetTitle(
"Ranks Summary;Rank;Frequency")
388 rank_histof.ComputeIntegral()
389 integral = rank_histof.GetIntegral()
390 rank_histof.SetContent(integral)
392 rightmax = 1.1*rank_histof.GetMaximum()
393 scale = gPad.GetUymax()/rightmax
394 rank_histof.SetLineColor(kRed)
395 rank_histof.Scale(scale)
396 rank_histof.Draw(
"same")
399 axis = TGaxis(gPad.GetUxmax(),gPad.GetUymin(),gPad.GetUxmax(), gPad.GetUymax(),0,rightmax,510,
"+L")
400 axis.SetTitle(
"Cumulative")
401 axis.SetTitleColor(kRed)
402 axis.SetLineColor(kRed)
403 axis.SetLabelColor(kRed)
406 rank_histof.Draw(
"Same");
411 page_html=
'<div class="span-20"><h2 class="alt"><a name="rank_summary">Ranks Summary</a></h2>'
412 page_html+=
'<div class="span-19"><img src="%s"></div>' %imgname
413 page_html+=
'</div> <a href="#top">Top...</a><hr>'
421 """Method to get missing objects from directory: in case histogram/directory was in one ROOT file but not in other
423 page_html =
"Unpaired in %s</br>"%(directory.filename1)
424 for elem
in directory.different_histograms[
'file1']:
425 page_html +=
"name: %s type:%s </br>"%(elem,directory.different_histograms[
'file1'][elem])
427 page_html +=
"Unpaired in %s</br>"%(directory.filename2)
428 for elem
in directory.different_histograms[
'file2']:
429 page_html +=
"name: %s type:%s </br>"%(elem,directory.different_histograms[
'file2'][elem])
434 """Converts a directory tree into html pages, very nice ones.
445 for subdir
in directory.subdirs:
453 for do_cat,cat
in ((directory.n_comp_fails >0,FAIL ),
454 (directory.n_comp_nulls >0,NULL ),
456 (directory.n_comp_successes >0
and directory.draw_success,SUCCESS ),
457 (directory.n_comp_skiped >0,SKIPED)):
461 if (len(directory.different_histograms[
'file1']) >0)
or (len(directory.different_histograms[
'file2']) >0):
472 page_name=directory.name
474 if len(page_name)==0:
475 page_name=
"RelMonSummary"
477 if page_name !=
"RelMonSummary":
480 ofilename =
"%s.html" %(
hash_name(
join(directory.full_path), hashing))
482 ofilename =
"RelMonSummary.html"
484 ofilename=
"%s_%s.html" %(directory.mother_dir.replace(
"/",
"_"),page_name)
485 ofilename=ofilename.strip(
"_")
487 ofile=open(ofilename,
"w")
488 ofile.write(page_html)
495 def build_gauge(total_success_rate,minrate=.80,small=False,escaped=False):
496 total_success_rate_scaled=(total_success_rate-minrate)
497 total_success_rate_scaled_repr=total_success_rate_scaled/(1-minrate)
498 if total_success_rate_scaled_repr<0:
499 total_success_rate_scaled_repr=0
504 gauge_link =
"https://chart.googleapis.com/chart?chs=%s&cht=gom"%size_s
505 gauge_link+=
"&chd=t:%2.1f"%(total_success_rate_scaled_repr*100.)
507 gauge_link+=
"&chxt=x,y&chxl=0:|%2.1f%%|1:|%i%%|%i%%|100%%"%(total_success_rate*100,minrate*100.,(1+minrate)*50)
508 gauge_link+=
"&chma=10,10,10,0"
509 img_tag=
'<img src="%s">'%gauge_link
511 img_tag=html.escape(img_tag)
521 if the_aggr_pairs==[]:
522 for samplename,sampledir
in dir_dict.items():
523 for subsysdirname
in sorted(sampledir.get_subdirs_dict().
keys()):
524 if not subsysdirname
in list_of_names:
525 list_of_names.append(subsysdirname)
526 the_aggr_pairs.append((subsysdirname,[subsysdirname]))
529 for cat_name, subdir_list
in the_aggr_pairs:
531 total_directory_successes=0
536 for dirname, sampledir
in dir_dict.items():
538 for subdirname,subdir
in sampledir.get_subdirs_dict().
items():
539 if subdirname
in subdir_list:
540 nsucc=subdir.n_successes
541 total_successes+=nsucc
546 total_directory_successes+= float(nsucc)/weight
547 if subdirname
in present_subdirs:
548 this_dir_dict=present_subdirs[subdirname]
549 this_dir_dict[
"nsucc"]+=nsucc
550 this_dir_dict[
"weight"]+=weight
552 present_subdirs[subdirname]={
"nsucc":nsucc,
"weight":weight}
554 for subsubdirname,subsubdir
in subdir.get_subdirs_dict().
items():
555 for pathname
in [name
for name
in subdir_list
if "/" in name]:
556 selected_subdirname,selected_subsubdirname = pathname.split(
"/")
557 if selected_subdirname == subdirname
and selected_subsubdirname==subsubdirname:
559 nsucc=subsubdir.n_successes
560 total_successes+=nsucc
561 weight=subsubdir.weight
564 total_directory_successes+= float(nsucc)/weight
566 if subsubdirname
in present_subdirs:
567 this_dir_dict=present_subdirs[subsubdirname]
568 this_dir_dict[
"nsucc"]+=nsucc
569 this_dir_dict[
"weight"]+=weight
571 present_subdirs[subsubdirname]={
"nsucc":nsucc,
"weight":weight}
574 print(
"No directory of the category %s is present in the samples: skipping." %cat_name)
577 average_success_rate=total_directory_successes/(total_ndirs)
578 aggr_pairs_info.append((cat_name,present_subdirs,total_weight,average_success_rate))
580 return aggr_pairs_info
592 html=
'<div class="span-20 colborder">'
593 html+=
'<h2 class="alt"><a name="categories">Categories:</a></h2>'
595 for cat_name,present_subdirs,total_weight,average_success_rate
in aggr_pairs_info:
597 html+=
'<div class="span-3 prepend-0 colborder">'
598 html+=
'<h3>%s</h3>'%cat_name
599 html+=
'<div><span class="alt">Avg. Success rate:</span></div>'
600 html+=
'<div><span class="alt">%2.1f%%</span></div>'%(average_success_rate*100)
602 html+=
'<div class="span-9">'
604 html+=
'<div><p><span class="caps alt">DQM Directories (%i comparisons):</span></p></div>' %total_weight
605 html+=
'<div><p><span class="alt">name: succ. rate - rel. weight</span></p></div>'
607 for subdirname
in sorted(present_subdirs.keys()):
608 this_dir_dict=present_subdirs[subdirname]
609 nsucc=this_dir_dict[
"nsucc"]
610 weight=this_dir_dict[
"weight"]
611 html+=
'<li><span class="caps">%s: %2.1f%% - %2.1f%%</span></li>'%(subdirname,100*float(nsucc)/weight,100*float(weight)/total_weight)
615 html+=
'<div class="span-6 last">'
620 return html+
'<br><a href="#top">Top...</a> </div><hr>'
627 meta= list(dir_dict.items())[0][1].meta
628 releases=sorted([meta.release1,meta.release2])
629 latest_release=releases[1].
split(
"-")[0]
636 html=
'<div class="span-20 colborder">'
637 html+=
'<h2 class="alt"><a name="twiki_table">Twiki snipppet for release managers</a></h2>'
638 html+=
'<div>| Release | Comparison |'
639 for cat_name,present_subdirs,total_weight,average_success_rate
in aggr_pairs_info:
644 html+=
'<div>| %s | %%ICON{arrowdot}%% | '%latest_release
648 for cat_name,present_subdirs,total_weight,average_success_rate
in aggr_pairs_info:
650 html+=
build_gauge(average_success_rate,small=
True,escaped=
True)
653 html+=
'</div> <a href="#top">Top...</a>'
660 tooltip=
"%s\nS:%2.1f%% N:%2.1f%% F:%2.1f%% Sk:%2.1f%%" %(directory.name,directory.get_success_rate(),directory.get_null_rate(),directory.get_fail_rate(),directory.get_skiped_rate())
670 <script type="text/javascript" src="https://www.google.com/jsapi"></script>
671 <script type="text/javascript">
672 google.load("visualization", "1", {packages:["corechart"]});
673 google.setOnLoadCallback(drawChart);
674 function drawChart() {
675 var data = new google.visualization.DataTable();
676 data.addColumn('string', 'DQM Directory');
677 data.addColumn('number', 'Success Rate');
679 script+=
"data.addRows(%i);\n"%len(aggr_pairs_info)
681 for subsystname,present_directories,weight,success_rate
in aggr_pairs_info:
683 script+=
"data.setValue(%i, 0, '%s');\n"%(counter,subsystname)
684 script+=
"data.setValue(%i, 1, %2.2f);\n"%(counter,success_rate)
687 var chart = new google.visualization.BarChart(document.getElementById('%s'));
688 chart.draw(data, {width: 1024, height: %i, title: 'Success Rate',
689 vAxis: {title: '%s', titleTextStyle: {color: 'red'},textStyle: {fontSize: 14}}
693 """%(name,40*counter,title)
699 def make_summary_table(indir,aggregation_rules,aggregation_rules_twiki, hashing_flag, standalone_flag):
700 """Create a table, with as rows the directories and as columns the samples.
701 Each box in the table will contain a pie chart linking to the directory.
707 if os.path.isabs(indir):
708 title = basename(indir)
711 title=title.strip(
".")
712 title=title.strip(
"/")
716 sample_pkls=[name
for name
in listdir(
"./")
if name.endswith(
".pkl")]
721 for sample_pkl
in sample_pkls:
722 dir_unpickler=unpickler(sample_pkl)
723 dir_unpickler.start()
725 dir_unpicklers.append(dir_unpickler)
728 for dir_unpickler
in dir_unpicklers:
734 global_dir=Directory(
"global",
"")
735 for dir_unpickler
in dir_unpicklers:
737 directory=dir_unpickler.directory
740 global_dir.meta=directory.meta
741 dir_dict[dir_unpickler.filename.replace(
".pkl",
"")]=directory
742 global_dir.subdirs.append(directory)
744 global_dir.calcStats()
749 page_html =
get_page_header(standalone=standalone_flag, additional_header=directories_barchart+categories_barchart)
753 rel1,rel2=title.split(
"VS")
755 rel1=global_dir.meta.release1.split(
"-")[0]
756 rel2=global_dir.meta.release2.split(
"-")[0]
757 global_dir.meta.release1=rel1
758 global_dir.meta.release2=rel2
762 for directory
in dir_dict.values():
763 for subdir_name
in directory.get_subdirs_names():
764 all_subdirs.append(subdir_name)
765 all_subdirs=sorted(list(set(all_subdirs)))
770 page_html+=
'<div class="span-20">'+\
771 '<h2><a name="top" href="https://twiki.cern.ch/twiki/bin/view/CMSPublic/RelMon">RelMon</a> Global Report: %s</h2>'%title+\
773 '<div class="span-1">'+\
774 '<h2><a href="%s">main...</a></h2>' %relmon_mainpage+\
777 page_html+=
'<div class="span-24"><p></p></div>\n'*3
783 page_html+=
'<div class="span-24">'
784 page_html+=
'<div class="span-20 colborder"><h2 class="alt">Sections:</h2>'+\
786 '<li><a href="#summary_barchart">Summary Barchart</a></li>'+\
787 '<li><a href="#categories">Categories</a></li>'+\
788 '<li><a href="#detailed_barchart">Detailed Barchart</a></li>'+\
789 '<li><a href="#summary_table">Summary Table</a></li>'+\
790 '<li><a href="#rank_summary">Ranks Summary</a></li>'+\
791 '<li><a href="#twiki_table">Twiki Table</a></li>'+\
797 page_html+=
'<div class="span-24"><h2 class="alt"><a name="summary_barchart">Summary Barchart</a></h2></div>'
798 page_html+=
'<div id="cat_chart"></div> <a href="#top">Top...</a><hr>'
804 page_html+=
'<div class="span-24"><h2 class="alt"><a name="detailed_barchart">Detailed Barchart</a></h2></div>'
805 page_html+=
'<div id="dir_chart"></div> <a href="#top">Top...</a><hr>'
809 page_html+=
'<div class="span-24"><p></p></div>\n'
813 page_html+=
'<div class="span-24"><h2 class="alt"><a name="summary_table">Summary Table</a></h2></div>'
816 page_html+=
'<div class="span-24"><p></p></div>\n'
826 <td><div class="span-1"><p class="rotation" style="alt"><b>Summary</b></p></div></td>"""
828 sorted_samples=sorted(dir_dict.keys())
829 for sample
in sorted_samples:
839 <td><div class="span-1"><p class="rotation" style="">%s</p></div></td>"""%sample_nick
840 page_html+=
" </tr>\n"
846 page_html+=
'<td style="background-color:white;"><div class="span-1">'
848 page_html+=
'<b>Summary</b></div></td>'
849 page_html+=
'<td style="background-color:white;" class = "colborder" ><div class="span-1"><img src="%s" alt="%s"></div></td>'%(global_dir.get_summary_chart_ajax(55,55),
get_pie_tooltip(global_dir))
850 for sample
in sorted_samples:
853 summary_page_name=
"RelMonSummary.html"
855 summary_page_name=
hash_name(col.name, hashing_flag)+
".html"
856 img_link=col.get_summary_chart_ajax(55,55)
857 page_html+=
'<td style="background-color:white;"><div class="span-1">'
858 page_html+=
'<a href="%s/%s"><img src="%s" title="%s"></a></div></td>' %(sample,summary_page_name,img_link,
get_pie_tooltip(col))
862 for subdir_name
in all_subdirs:
865 page_html+=
' <td style="background-color:white;">%s</td>\n' %subdir_name
867 row_summary=Directory(
"row_summary",
"")
869 n_samples=len(sorted_samples)
871 for sample
in sorted_samples:
872 subdirs_dict=directory.get_subdirs_dict()
873 directory=dir_dict[sample]
874 dir_is_there=subdir_name
in subdirs_dict
876 row_summary.subdirs.append(subdirs_dict[subdir_name])
879 row_summary.calcStats()
880 img_link=row_summary.get_summary_chart_ajax(55,55)
881 page_html+=
'<td style="background-color:white;"><div class="span-1">'
882 page_html+=
'<img src="%s" title="%s"></div></td>' %(img_link,
get_pie_tooltip(row_summary))
884 for sample
in sorted_samples:
887 directory=dir_dict[sample]
888 subdirs_dict=directory.get_subdirs_dict()
891 if directory.name!=
"":
896 summary_page=
join(sample,
"%s.html"%(
hash_name(directory.name+
"/"+subdir_name,hashing_flag)))
898 summary_page=
join(sample,
"%s.html"%(
hash_name(directory.name+
"_"+subdir_name,hashing_flag)))
902 summary_page=
join(sample,
"%s.html"%(
hash_name(directory.name+subdir_name,hashing_flag)))
903 dir_is_there=subdir_name
in subdirs_dict
905 img_link=
"https://chart.googleapis.com/chart?cht=p3&chco=C0C0C0&chs=50x50&chd=t:1"
909 img_link=subdirs_dict[subdir_name].get_summary_chart_ajax(50,50)
912 page_html+=
'<td style="background-color:white;"><div class="span-1">'
914 page_html+=
'<a href="%s">'%(summary_page)
915 page_html+=
'<img src="%s" title="%s" height=50 width=50>' %(img_link,img_tooltip)
918 page_html+=
'</div></td>'
920 page_html+=
" </tr>\n"
924 page_html+=
'</table> <a href="#top">Top...</a><hr>'
938 return hashlib.md5(file_name).hexdigest()[:10]
def make_barchart_summary
def make_categories_summary
const uint16_t range(const Frame &aFrame)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
static std::string join(char **cmd)
def get_missing_objs_section