URI: 
       results.html.erb - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
  HTML git clone git://jay.scot/warvox
   DIR Log
   DIR Files
   DIR Refs
   DIR README
       ---
       results.html.erb (3399B)
       ---
            1 <% if @jobs.length > 0 %>
            2 <h1 class='title'>Scan Results</h1>
            3 
            4 <%= will_paginate @jobs, :renderer => BootstrapPagination::Rails %>
            5 <table class='table table-striped table-condensed' width='90%'>
            6   <thead>
            7   <tr>
            8     <th>ID</th>
            9     <th>Type</th>
           10     <th>Details</th>
           11     <th>Answered</th>
           12     <th>Analyzed</th>
           13     <th>Launched</th>
           14     <th>User</th>
           15     <th>Actions</th>
           16   </tr>
           17   </thead>
           18   <tbody>
           19 
           20 <% @jobs.each do |job|
           21 
           22   cnt_dialed   = job.calls.count.to_i
           23   cnt_answered = job.calls.where("answered = ? and busy = ?", true, false).count.to_i
           24   cnt_analyzed = job.calls.where("analysis_completed_at IS NOT NULL").count.to_i
           25   pct_answered = 0
           26   pct_analyzed = 0
           27   unless cnt_dialed == 0
           28     pct_answered = ((cnt_answered.to_f / cnt_dialed.to_f) * 100).to_i
           29   end
           30   unless cnt_answered == 0
           31     pct_analyzed = ((cnt_analyzed.to_f / cnt_answered.to_f) * 100).to_i
           32   end
           33 %>
           34   <tr>
           35     <td><%= job.id %></td>
           36     <td><%= format_job_details(job) %></td>
           37     <td>
           38       <% if job.task == "dialer" %>
           39       <%= truncate(job.details[:range].to_s, :length => 15)  %> /
           40       <%= job.details[:cid_mask].to_s  %>
           41       <% end %>
           42         <span rel="tooltip" class="xtooltip" title="<%= job.details[:directory].to_s %>">
           43       <%= truncate(job.details[:directory].to_s, :length => 15) %>
           44       <% if job.task == "importer" %>
           45 
           46       <% end %>
           47     </td>
           48     <td><span rel="tooltip" class="xtooltip" title="<%= pct_answered %>% answered"><%= number_with_delimiter(cnt_answered) %> / <%= number_with_delimiter(cnt_dialed) %></span></td>
           49     <td><span rel="tooltip" class="xtooltip" title="<%= pct_analyzed %>% analyzed"><%= number_with_delimiter(cnt_analyzed) %></span></td>
           50 
           51 
           52   <td><%= time_ago_in_words(job.created_at) %> ago</td>
           53   <td><%= job.created_by %></td>
           54     <td>
           55         <a role="button" class="btn" href="<%= view_results_path(@project,job) %>" rel="tooltip" title="View Call Connections" ><i class="fa fa-eye"></i></a>
           56 
           57     <% if cnt_analyzed > 0 %>
           58       <a role="button" class="btn" href="<%= view_analyze_path(@project,job) %>" rel="tooltip" title="View Call Analysis"><i class="fa fa-pie-chart"></i></a>
           59       <% if pct_analyzed == 100 %>
           60         <a role="button" class="btn" href="<%= reanalyze_job_path(@project,job) %>" data-confirm="Reprocess this job?" rel="nofollow tooltip" title="Rerun Call Analysis"><i class="fa fa-refresh"></i></a>
           61       <% else %>
           62         <a role="button" class="btn" href="<%= analyze_job_path(@project,job) %>" data-confirm="Continue to process this job?" rel="nofollow tooltip" title="Finish Call Analysis"><i class="fa fa-cogs"></i></a>
           63       <% end %>
           64     <% else %>
           65       <% if cnt_answered > 0 %>
           66       <a role="button" class="btn" href="<%= analyze_job_path(@project,job) %>" data-confirm="Analyze this job?" rel="nofollow tooltip" title="Run Call Analysis"><i class="fa fa-cogs"></i></a>
           67       <% end %>
           68     <% end %>
           69 
           70       <a role="button" class="btn" href="<%= job_path(job) %>" data-confirm="Delete all data for this job?" data-method="delete" rel="nofollow tooltip" title="Delete Call Data"><i class="fa fa-trash"></i></a>
           71   </td>
           72   </tr>
           73 
           74 <% end %>
           75 </tbody>
           76 </table>
           77 
           78 <%= will_paginate @jobs, :renderer => BootstrapPagination::Rails %>
           79 
           80 <% else %>
           81 
           82 <h1 class='title'>No Completed Jobs</h1>
           83 <br/>
           84 
           85 <% end %>
           86 
           87 <a role="button" class="btn" href="<%= new_dialer_project_job_path(@project) %>"><i class="fa fa-phone"></i> <strong>Wardial</strong></a>