## This file is subject to the terms and conditions defined in ## file 'LICENSE', which is part of this source code package. ## Copyright (c) 2009 SKR Farms (P) LTD. <%namespace name="forms" file="/component/forms.html"/> <%! sel_charts = { 'chart1' : 'tagged-resource-pie', 'chart2' : 'uploaders', 'chart3' : 'files-downloaded', 'chart4' : 'tagged-files', 'chart5' : 'uploaded-timeline', 'chart6' : 'license-projects', 'chart7' : 'tagged-license', 'chart8' : 'user activity', 'chart9' : 'user-site-permissions', 'chart10' : 'project-administrators', 'chart11' : 'component-owners', 'chart12' : 'project-activities', 'chart13' : 'milestone-tickets', 'chart14' : 'project-activity', 'chart15' : 'roadmap', 'chart16' : 'wiki-edits', 'chart17' : 'wiki-votes', 'chart18' : 'wiki-authors', 'chart19' : 'wiki-commenters', 'chart20' : 'wiki-tags', 'chart21' : 'project-tickets', 'chart22' : 'ticket-owners', 'chart23' : 'ticket-components', 'chart24' : 'ticket-milestones', 'chart25' : 'ticket-versions', 'chart26' : 'ticket-commenters', 'chart27' : 'reviewers', } %> <%def name="selectcharts( options, default )"> <% options = [ [ opt, sel_charts[opt] ] for opt in options ] %>
Select chart : ${forms.select( id="selchart", options=options, opt_selected=default )}
## ---------------------------- Tag charts ---------------------------- <%def name="chart1( chart1_data, relatedtags )">

Related tags :

% for tagname, weight in relatedtags : ${tagname} % endfor
## ---------------------------- Attachment charts ---------------------------- <%def name="chart2( chart2_data, payload, fcount )"> <% topupld = sorted( chart2_data, key=lambda x : x[1], reverse=True ) toppyld = sorted( chart2_data, key=lambda x : x[2], reverse=True ) chartwidth = h.computechartwidth( len(chart2_data), 50, 100 ) %>
Number of files uploaded by registered users, and its payload
Around ${payload/(1024*1024)} MB in ${fcount} files
Top uploaders, by files
% for x in topupld[:10] : % endfor
${x[0]} ${x[1]} files
Top uploaders, by payload
% for x in toppyld[:10] : % endfor
${x[0]} ${x[2]} b
<%def name="chart3( chart3_data )"> <% topdwnd = sorted( chart3_data, key=lambda x : x[2], reverse=True ) %>
Top downloads :
% for x in topdwnd[:10] :
${x[1]}, ${x[2]}
% endfor
<%def name="chart4( chart4_data, tagnames )"> <% chartwidth = h.computechartwidth( len(chart4_data), 50, 100 ) %>
Tagnames :
${ ', '.join([ '%s' % ( h.url_fortag(tag), tag ) for tag in tagnames ]) | n}
<%def name="chart5( chart5_data, startdt )">
## ---------------------------- license charts ---------------------------- <%def name="chart6( chart6_data )">
% for lid, lic, projects in chart6_data : % endfor
${lic} ${ ', '.join([ '%s' % ( h.url_forproject(p), p ) for p in projects ]) | n}
<%def name="chart7( chart7_data, tagnames )">
Tagnames :
${ ', '.join([ '%s' % ( h.url_fortag(tag), tag ) for tag in tagnames ]) | n}
## ---------------------------- users charts ---------------------------- <%def name="chart8( chart8_data )"> <% chartwidth = h.computechartwidth( len(chart8_data), 50, 100 ) %>
<%def name="chart9( chart9_data )"> <% chartwidth = h.computechartwidth( len(chart9_data), 50, 95 ) %>
<%def name="chart10( chart10_data )">
<%def name="chart11( chart11_data, components_no )">
## ---------------------------- user charts ---------------------------- <%def name="chart12( chart12_data )">
## ---------------------------- milestone charts ---------------------------- <%def name="chart13( id, reslved, unreslved )"> <% total = reslved + unreslved res_width = total and int( (reslved/float(total)) * 60 ) unres_width = total and int( (unreslved/float(total)) * 60 ) %> % if total :
resolved, ${reslved}
unresolved, ${unreslved}
${int(reslved/float(total)*100)} % complete
% endif
## ---------------------------- project charts ---------------------------- <%def name="chart14( chart14_data )">
<%def name="chart15( chart15_data, startdt )"> <% chart_height = (len(chart15_data) * 50) + 50 chart_height = 400 if chart_height < 400 else chart_height %>
## ---------------------------- wiki charts ---------------------------- <%def name="chart16( chart16_data, wikis )"> <% chartwidth = h.computechartwidth( len(chart16_data), 40, 100 ) %>
% for w in wikis :
${w[1]}
% endfor
<%def name="chart17( chart17_data )">
<%def name="chart18( chart18_data, users )"> <% chartwidth = h.computechartwidth( len(chart18_data), 50, 100 ) %>
% for u in users :
${u[0]}
% endfor
<%def name="chart19( chart19_data, users )"> <% chartwidth = h.computechartwidth( len(chart19_data), 50, 100 ) %>
% for u in users :
${u[0]}
% endfor
<%def name="chart20( chart20_data, tagnames )"> <% chartwidth = h.computechartwidth( len(chart20_data), 50, 100 ) %>
Tagnames :
${ ', '.join([ '%s' % ( h.url_fortag(tag), tag ) for tag in tagnames ]) | n}
## ---------------------------- ticket charts ---------------------------- <%def name="chart21( chart21_data )">
<%def name="chart22( chart22_data, users )"> <% chartheight = (320 * len(users)) + 100 %>
% for u in users :
${u[0]}
% endfor
<%def name="chart23( chart23_data )"> <% chartheight = (320 * len(chart23_data)) + 100 %>
<%def name="chart24( chart24_data )"> <% chartheight = (320 * len(chart24_data)) + 100 %>
<%def name="chart25( chart25_data )"> <% chartheight = (320 * len(chart25_data)) + 100 %>
<%def name="chart26( chart26_data, users )">
% for u in users :
${u[0]}
% endfor
<%def name="chart27( chart27_data, users )">
% for u in users :
${u[0]}
% endfor