Introduction
Introduction Statistics Contact Development Disclaimer Help
More updates - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
Log
Files
Refs
README
---
commit 4128340993deb6db8c6af78b4e26d68a89b4349c
parent d673045b330dc7019a2345aaa7677f1a63d8d4cc
Author: HD Moore <[email protected]>
Date: Thu, 3 Jan 2013 00:50:11 -0600
More updates
Diffstat:
M app/assets/stylesheets/bootstrap_a… | 4 ++++
M app/controllers/jobs_controller.rb | 13 ++++++++++---
M app/helpers/application_helper.rb | 4 ++--
M app/views/analyze/index.html.erb | 54 +----------------------------…
D app/views/calls/view.html.erb | 58 ------------------------------
M app/views/jobs/index.html.erb | 8 ++++----
M app/views/jobs/results.html.erb | 47 ++++++++++++++++++++++-------…
7 files changed, 55 insertions(+), 133 deletions(-)
---
diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/asse…
@@ -39,6 +39,10 @@ body {
@navbarBackgroundHighlight: #4A1C04;
+.stooltip {
+ border-bottom: 1px dotted @blue;
+}
+
.progress_pct {
color: @darkGray;
margin-left: 10px;
diff --git a/app/controllers/jobs_controller.rb b/app/controllers/jobs_controll…
@@ -30,12 +30,19 @@ class JobsController < ApplicationController
end
def view_results
- @job = Job.find(params[:id])
- @calls = @job.calls.paginate(
+ @job = Job.find(params[:id])
+ @results = @job.calls.paginate(
:page => params[:page],
- :order => 'id DESC',
+ :order => 'number ASC',
:per_page => 30
)
+
+ @call_results = {
+ :Timeout => @job.calls.count(:conditions => { :answered => fa…
+ :Busy => @job.calls.count(:conditions => { :busy => tr…
+ :Answered => @job.calls.count(:conditions => { :answered => tr…
+ }
+
end
def new_dialer
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper…
@@ -32,7 +32,7 @@ module ApplicationHelper
ttip << raw("<div class='task_args_val'>") + h…
end
ttip << raw("</div>\n")
- outp = raw("<a href='#' rel='tooltip' title=\"#{ttip}\…
+ outp = raw("<span rel='tooltip' title=\"#{ttip}\" data…
outp
rescue ::Exception => e
job.status.to_s.capitalize
@@ -43,7 +43,7 @@ module ApplicationHelper
case job.status
when 'error'
ttip = h(job.error.to_s)
- outp = raw("<a href='#' rel='tooltip' title=\"#{ttip}\…
+ outp = raw("<span rel='tooltip' title=\"#{ttip}\" data…
outp
else
job.status.to_s.capitalize
diff --git a/app/views/analyze/index.html.erb b/app/views/analyze/index.html.erb
@@ -1,53 +1 @@
-<% if @jobs.length > 0 %>
-<h1 class='title'>Analyzed Jobs</h1>
-
-<%= raw(will_paginate @jobs) %>
-<table class='table table-striped table-bordered' width='90%'>
- <thead>
- <tr>
- <th>ID</th>
- <th>Range</th>
- <th>CallerID</th>
- <th>Connected</th>
- <th>Date</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
-
-<% @jobs.sort{|a,b| b.id <=> a.id}.each do |job| %>
- <tr>
- <td><%=h job.id %></td>
- <td><%=h job.range %></td>
- <td><%=h job.cid_mask %></td>
- <td><%=h (
- job.calls.where("analysis_completed_at IS NOT NULL").count.to_…
- "/" +
- job.calls.count.to_s
- )%></td>
- <td><%=h job.started_at.localtime.strftime("%Y-%m-%d %H:%M:%S") %></td>
-
- <td>
-
- <% if job.calls.where("analysis_completed_at IS NOT NULL").cou…
- <a class="btn btn-mini" href="<%= analyze_call_path(jo…
- <a class="btn btn-mini" href="<%= reanalyze_call_path(…
- <% else %>
- <a class="btn btn-mini" href="<%= analyze_call_path(jo…
- <% end %>
-
- <a class="btn btn-mini" href="<%= call_path(job) %>" data-confirm=…
- </td>
- </tr>
-
-<% end %>
-</tbody>
-</table>
-
-<%= raw(will_paginate @jobs) %>
-
-<% else %>
-
-<h1 class='title'>No Analyzed Jobs</h1>
-
-<% end %>
+<h1 class='title'>Analysis</h1>
diff --git a/app/views/calls/view.html.erb b/app/views/calls/view.html.erb
@@ -1,58 +0,0 @@
-<% if @calls %>
-
-
-<h1 class='title'>Dial Results for Job <%=@calls[0].job_id%></h1>
-
-<%= raw(will_paginate @calls) %>
-<table width='100%' align='center' border=0 cellspacing=0 cellpadding=6>
-<tr>
- <td align='center'>
- <%= render :partial => 'shared/graphs/call_results' %>
- </td>
-</tr>
-</table>
-
-<br/>
-
-<table class='table table-striped table-bordered' width='90%' id='results'>
- <thead>
- <tr>
- <th>Number</th>
- <th>CallerID</th>
- <th>Provider</th>
- <th>Completed</th>
- <th>Busy</th>
- <th>Seconds</th>
- <th>Ring Time</th>
- </tr>
- </thead>
- <tbody>
-<% for call in @calls.sort{|a,b| a.number <=> b.number } %>
- <tr>
- <td><%= call.number %></td>
- <td><%= call.cid %></td>
- <td><%= call.provider.name %></td>
- <td><%= call.completed %></td>
- <td><%= call.busy %></td>
- <td><%= call.seconds %></td>
- <td><%= call.ringtime.to_i %></td>
- </tr>
-<% end %>
- </tbody>
-</table>
-<%= raw(will_paginate @calls) %>
-
-<% else %>
-
-<h1 class='title'>No Dial Results</h1>
-
-<% end %>
-<br />
-
-<%= javascript_tag do %>
-// For fixed width containers
-$('#results').dataTable({
- "sDom": "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>",
- "sPaginationType": "bootstrap"
-});
-<% end %>
diff --git a/app/views/jobs/index.html.erb b/app/views/jobs/index.html.erb
@@ -2,7 +2,7 @@
<h1 class='title'>Submitted Jobs</h1>
-<table class='table table-striped table-bordered' width='90%'>
+<table class='table table-striped table-condensed' width='90%'>
<tr>
<th>ID</th>
<th>Task</th>
@@ -31,7 +31,7 @@
<h1 class='title'>Active Jobs</h1>
-<table class='table table-striped table-bordered' width='90%'>
+<table class='table table-striped table-condensed' width='90%'>
<tr>
<th>ID</th>
<th>Task</th>
@@ -66,14 +66,14 @@
<h1 class='title'>No Active Jobs</h1>
<% end %>
-<a class="btn" href="<%= new_dialer_job_path %>"><i class="icon-plus"></i> Sta…
+<a class="btn" href="<%= new_dialer_job_path %>"><i class="icon-plus"></i> New…
<% if(@inactive_jobs.length > 0) %>
<br/><br/>
<h1 class='title'>Inactive Jobs</h1>
<%= raw(will_paginate @inactive_jobs) %>
-<table class='table table-striped table-bordered' width='90%'>
+<table class='table table-striped table-condensed' width='90%'>
<tr>
<th>ID</th>
<th>Task</th>
diff --git a/app/views/jobs/results.html.erb b/app/views/jobs/results.html.erb
@@ -1,15 +1,16 @@
<% if @jobs.length > 0 %>
-<h1 class='title'>Completed Jobs</h1>
+<h1 class='title'>Scan Results</h1>
<%= will_paginate @jobs, :renderer => BootstrapPagination::Rails %>
-<table class='table table-striped table-bordered' width='90%'>
+<table class='table table-striped table-condensed' width='90%'>
<thead>
<tr>
<th>ID</th>
- <th>Range</th>
- <th>CallerID</th>
- <th>Connected</th>
- <th>Date</th>
+ <th>Type</th>
+ <th>Details</th>
+ <th>Answered</th>
+ <th>Analyzed</th>
+ <th>Launched</th>
<th>User</th>
<th>Actions</th>
</tr>
@@ -20,26 +21,46 @@
cnt_dialed = job.calls.count.to_i
cnt_answered = job.calls.where("answered = ? and busy = ?", true, fals…
+ cnt_analyzed = job.calls.where("analysis_completed_at IS NOT NULL").co…
pct_answered = 0
+ pct_analyzed = 0
unless cnt_dialed == 0
pct_answered = ((cnt_answered.to_f / cnt_dialed.to_f) * 100).t…
end
+ unless cnt_answered == 0
+ pct_analyzed = ((cnt_analyzed.to_f / cnt_answered.to_f) * 100)…
+ end
%>
<tr>
<td><%= job.id %></td>
- <td><%= job.details[:range].to_s %></td>
- <td><%= job.details[:cid_mask].to_s %></td>
- <td><span rel="tooltip" title="<%= pct_answered %>% answered"><%= cnt_answ…
+ <td><%= format_job_details(job) %></td>
+ <td>
+ <% if job.task == "dialer" %>
+ <%= job.details[:range].to_s %> /
+ <%= job.details[:cid_mask].to_s %>
+ <% end %>
+ <span rel="tooltip" class="stooltip" title="<%= job.detail…
+ <%= truncate(job.details[:directory].to_s, :length => …
+ <% if job.task == "importer" %>
+
+ <% end %>
+ </td>
+ <td><span rel="tooltip" class="stooltip" title="<%= pct_answered %>% answe…
+ <td><span rel="tooltip" class="stooltip" title="<%= pct_analyzed %>% analy…
- <td><%= job.created_at.strftime("%Y-%m-%d %H:%M:%s") %></td>
+ <td><%= job.created_at.strftime("%Y-%m-%d %H:%M:%S") %></td>
<td><%= job.created_by %></td>
<td>
<a class="btn btn-mini" href="<%= view_results_path(@project,job) %>" …
- <% if job.calls.where("analysis_completed_at IS NOT NULL").cou…
+ <% if cnt_analyzed > 0 %>
<a class="btn btn-mini" href="<%= view_analyze_path(@p…
- <a class="btn btn-mini" href="<%= reanalyze_job_path(@…
+ <% if pct_analyzed == 100 %>
+ <a class="btn btn-mini" href="<%= reanalyze_jo…
+ <% else %>
+ <a class="btn btn-mini" href="<%= analyze_job_…
+ <% end %>
<% else %>
<a class="btn btn-mini" href="<%= analyze_job_path(@pr…
<% end %>
@@ -61,4 +82,4 @@
<% end %>
-<a class="btn" href="<%= new_dialer_job_path %>"><i class="icon-plus"></i> Sta…
+<a class="btn" href="<%= new_dialer_job_path %>"><i class="icon-plus"></i> New…
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.