Introduction
Introduction Statistics Contact Development Disclaimer Help
More churn,closer - warvox - VoIP based wardialing tool, forked from rapid7/war…
Log
Files
Refs
README
---
commit ed59b0769838af75c9fcde776c5092b329bc8b2b
parent 9974997874fab6f83540def599d2031acacbf5f1
Author: HD Moore <[email protected]>
Date: Wed, 2 Jan 2013 03:13:00 -0600
More churn,closer
Diffstat:
M app/controllers/analyze_controller… | 51 +++------------------------…
M app/controllers/jobs_controller.rb | 2 +-
M app/models/job.rb | 4 ++--
M app/views/analyze/view.html.erb | 2 +-
M app/views/analyze/view_matches.htm… | 55 ++++++++++-----------------…
M app/views/shared/_lightbox_freq.ht… | 7 ++-----
M app/views/shared/_lightbox_sig.htm… | 7 ++-----
M config/routes.rb | 2 +-
8 files changed, 31 insertions(+), 99 deletions(-)
---
diff --git a/app/controllers/analyze_controller.rb b/app/controllers/analyze_co…
@@ -10,7 +10,7 @@ class AnalyzeController < ApplicationController
def view
@job_id = params[:id]
- @job = Job.find(@job_id)
+ @job = Job.find(@job_id)
@shown = params[:show]
ltypes = Call.find( :all, :select => 'DISTINCT line_type', :conditions…
@@ -49,49 +49,13 @@ class AnalyzeController < ApplicationController
end
- def show
- @job_id = params[:id]
- @job = Job.find(@job_id)
- @shown = params[:show]
-
- ltypes = Call.find( :all, :select => 'DISTINCT line_type', :conditions…
- res_types = {}
-
- ltypes.each do |k|
- next if not k
- res_types[k.capitalize.to_sym] = Call.count(
- :conditions => ['job_id = ? and line_type = ?', @job_i…
- )
- end
-
- @lines_by_type = res_types
-
- if(@shown and @shown != 'all')
- @results = Job.where(:id => @job_id).paginate(
- :page => params[:page],
- :order => 'number ASC',
- :per_page => 20,
- :conditions => [ 'completed = ? and processed = ? and …
- )
- else
- @results = Job.where(:id => @job_id).paginate(
- :page => params[:page],
- :order => 'number ASC',
- :per_page => 20,
- :conditions => [ 'completed = ? and processed = ? and …
- )
- end
-
- @filters = []
- @filters << { :scope => "all", :label => "All" }
- res_types.keys.each do |t|
- @filters << { :scope => t.to_s.downcase, :label => t.to_s }
- end
+ def view_matches
+ @result = Call.find(params[:call_id])
+ @job_id = @result.job_id
+ @results = @result.matches.select{|x| x.matchscore.to_f > 10.0 }
end
-
- # GET /calls/1/resource?id=XXX&type=YYY
def resource
ctype = 'text/html'
cpath = nil
@@ -132,9 +96,4 @@ class AnalyzeController < ApplicationController
end
- def view_matches
- @result = Call.find(params[:call_id])
- @job_id = @result.job_id
- @results = @result.matches.select{|x| x.matchscore.to_f > 10.0 }
- end
end
diff --git a/app/controllers/jobs_controller.rb b/app/controllers/jobs_controll…
@@ -17,7 +17,7 @@ class JobsController < ApplicationController
def results
- @jobs = @project.jobs.where('task = ? AND completed_at IS NOT NULL', 'dial…
+ @jobs = @project.jobs.where('(task = ? OR task = ?) AND completed_at IS NO…
:page => params[:page],
:order => 'id DESC',
:per_page => 30
diff --git a/app/models/job.rb b/app/models/job.rb
@@ -26,10 +26,10 @@ class Job < ActiveRecord::Base
unless ['job', 'project', 'global'].include?(r…
record.errors[:scope] << "Scope must b…
end
- if record.scope == "job" and Job.where(:id => …
+ if record.scope == "job" and Job.where(:id => …
record.errors[:job_id] << "The job_id …
end
- if record.scope == "project" and Job.where(:id…
+ if record.scope == "project" and Project.where…
record.errors[:project_id] << "The pro…
end
when 'import'
diff --git a/app/views/analyze/view.html.erb b/app/views/analyze/view.html.erb
@@ -47,7 +47,7 @@
<%= render :partial => 'shared/lightbox_sig', :locals => { :ca…
<%= render :partial => 'shared/lightbox_freq', :locals => { :c…
<% if call.fprint and call.fprint.length > 0 %>
- <a href="<%=view_matches_path(@project, call.id)%>">Vi…
+ <a href="<%=view_matches_path(@project, call.job_id, c…
<% end %>
</td>
</tr>
diff --git a/app/views/analyze/view_matches.html.erb b/app/views/analyze/view_m…
@@ -1,6 +1,6 @@
<% call = @result %>
-<h1 class='title'><%= @result.number %> (<a href="<%=view_analyze_path(call.jo…
+<h1 class='title'><%= @result.number %> (<a href="<%=view_analyze_path(@projec…
<table class='table table-striped table-bordered' width='90%'>
<tr>
<th>Number</th>
@@ -12,33 +12,26 @@
<object
type="application/x-shockwave-flash"
- data="/assets/musicplayer.swf?song_url=<%=resource_ana…
+ data="/assets/musicplayer.swf?song_url=<%=resource_ana…
width="20"
height="17"
style="margin-bottom: -5px;"
>
- <param name="movie" value="/assets/musicplayer.swf?son…
+ <param name="movie" value="/assets/musicplayer.swf?son…
<param name="wmode" value="transparent"></param>
</object>
<b><%= call.number %></b>
<hr width='100%' size='1'/>
- CallerID: <%= call.cid%><br/>
- Provider: <%=h call.provider.name %><br/>
- Audio: <%=h call.seconds %> Seconds<br/>
- Ringer: <%=h call.ringtime %> Seconds<br/>
+ CallerID: <%= call.caller_id%><br/>
+ Provider: <%= call.provider.name %><br/>
+ Audio: <%= call.audio_length %> Seconds<br/>
+ Ringer: <%= call.ring_length %> Seconds<br/>
</td>
<td align='center'>
<b><%=h call.line_type.upcase %></b><br/>
- <a href="<%=resource_analyze_path(@job_id, call.id, "big_sig_d…
- <a href="<%=resource_analyze_path(@job_id, call.id, "big_freq"…
- <% (call.signatures||"").split("\n").each do |s|
- sid,mat,name = s.split(':', 3)
- str = [mat.to_i * 6.4, 255].min
- col = ("%.2x" % (255 - str)) * 3
- %>
- <div style="color: #<%= col%>;"><%=h name%> (<%=h sid …
- <% end %>
+ <%= render :partial => 'shared/lightbox_sig', :locals => { :ca…
+ <%= render :partial => 'shared/lightbox_freq', :locals => { :c…
</td>
</tr>
@@ -63,45 +56,31 @@
<object
type="application/x-shockwave-flash"
- data="/assets/musicplayer.swf?song_url=<%=resource_ana…
+ data="/assets/musicplayer.swf?song_url=<%=resource_ana…
width="20"
height="17"
style="margin-bottom: -5px;"
>
- <param name="movie" value="/assets/musicplayer.swf?son…
+ <param name="movie" value="/assets/musicplayer.swf?son…
<param name="wmode" value="transparent"></param>
</object>
<b><%= call.number %></b>
<hr width='100%' size='1'/>
- CallerID: <%= call.cid%><br/>
+ CallerID: <%= call.caller_id%><br/>
Provider: <%=h call.provider.name %><br/>
- Audio: <%=h call.seconds %> Seconds<br/>
- Ringer: <%=h call.ringtime %> Seconds<br/>
+ Audio: <%=h call.audio_length %> Seconds<br/>
+ Ringer: <%=h call.ring_length %> Seconds<br/>
</td>
<td align='center'>
<b><%=h call.line_type.upcase %></b><br/>
- <a href="<%=resource_analyze_path(@job_id, call.id, "big_sig_d…
- <a href="<%=resource_analyze_path(@job_id, call.id, "big_freq"…
- <% (call.signatures||"").split("\n").each do |s|
- sid,mat,name = s.split(':', 3)
- str = [mat.to_i * 6.4, 255].min
- col = ("%.2x" % (255 - str)) * 3
- %>
- <div style="color: #<%= col%>;"><%=h name%> (<%=h sid …
- <% end %>
+ <%= render :partial => 'shared/lightbox_sig', :locals => { :ca…
+ <%= render :partial => 'shared/lightbox_freq', :locals => { :c…
<% if call.fprint %>
- <a href="<%=view_matches_path(call.id)%>">View Matches…
+ <a href="<%=view_matches_path(call.project_id, call.jo…
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
-
-<script type="text/javascript">
-$(function() {
- // Use this example, or...
- $('a.lightbox').lightBox();
-});
-</script>
diff --git a/app/views/shared/_lightbox_freq.html.erb b/app/views/shared/_light…
@@ -2,12 +2,9 @@
lid = "call_#{call.id}_freq"
%>
<div id="<%= lid %>" class="lightbox hide fade" tabindex="-1" role="dialog" ar…
- <div class='lightbox-header'>
- <button type="button" class="close" data-dismiss="lightbox" ar…
- </div>
<div class='lightbox-content'>
- <img src="<%=resource_analyze_path(call.id, "big_freq")%>">
+ <a href="#" data-dismiss="lightbox"><img src="<%=resource_anal…
</div>
</div>
-<a data-toggle="lightbox" href="#<%= lid %>"><img src="<%=resource_analyze_pat…
+<a data-toggle="lightbox" href="#<%= lid %>"><img src="<%=resource_analyze_pat…
diff --git a/app/views/shared/_lightbox_sig.html.erb b/app/views/shared/_lightb…
@@ -2,12 +2,9 @@
lid = "call_#{call.id}_sig"
%>
<div id="<%= lid %>" class="lightbox hide fade" tabindex="-1" role="dialog" ar…
- <div class='lightbox-header'>
- <button type="button" class="close" data-dismiss="lightbox" ar…
- </div>
<div class='lightbox-content'>
- <img src="<%=resource_analyze_path(call.id, "big_sig_dots")%>">
+ <a href="#" data-dismiss="lightbox"><img src="<%=resource_anal…
</div>
</div>
-<a data-toggle="lightbox" href="#<%= lid %>"><img src="<%=resource_analyze_pat…
+<a data-toggle="lightbox" href="#<%= lid %>"><img src="<%=resource_analyze_pat…
diff --git a/config/routes.rb b/config/routes.rb
@@ -30,7 +30,7 @@ Web::Application.routes.draw do
match '/calls/:result_id/:type' => 'analyze#resource', :as…
match '/projects/:project_id/analyze/:id/view' => 'analyze#view', :as => …
- match '/projects/:project_id/analyze/:call_id/matches' => 'analyze#view_m…
+ match '/projects/:project_id/analyze/:job_id/:call_id/matches' => 'analyz…
resources :settings
resources :providers
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.