% percent_total_tasks = 100 / (j[:tasks_summary][:done] + j[:tasks_summary][:running] + j[:tasks_summary][:failed] + j[:tasks_summary][:todo]) rescue 0 %> <% if defined? scaleby %> <% percent_total_tasks *= scaleby %> <% end %> <% if not defined? scaleby %>