<%= render :partial => 'chart', :locals => {:width => @pie_width, :height => @pie_height, :data => url_for(:action => 'context_total_actions_data')} -%>

<%= render :partial => 'chart', :locals => {:width => @pie_width, :height => @pie_height, :data => url_for(:action => 'context_running_actions_data')} -%>

<div class="stats_module">
<h3>Top 5 Contexts</h3>
<%
    1.upto 5 do |i|
      %><%=i-%> - 
      <%= i <= @actions_per_context.size ? @actions_per_context[i-1]['name'] : "n/a"%> 
      (
      <%= i <= @actions_per_context.size ? @actions_per_context[i-1]['total'] : "n/a"%>
      )
      <br/><%
    end
-%>    
</div>

<div class="stats_module">
<h3>Top 5 Visible Contexts with uncomplete actions</h3>
<%
    1.upto 5 do |i|
      %><%=i-%> -
      <%= i <= @running_actions_per_context.size ? @running_actions_per_context[i-1]['name'] : "n/a"-%>
      (
      <%= i <= @running_actions_per_context.size ? @running_actions_per_context[i-1]['total'] : "n/a"-%>
      )
      <br/><%
    end
-%>    
</div>