A little more cleanup - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit 998186ba0c645f43c40f405c476b0747bba24f3f
DIR parent a1aa3fbbc918a8fca82cce9016edd571a0a87c73
HTML Author: HD Moore <hd_moore@rapid7.com>
Date: Mon, 7 Jan 2013 03:50:04 -0600
A little more cleanup
Diffstat:
M app/assets/javascripts/analyze/vie… | 2 +-
M app/assets/javascripts/jobs/view_r… | 10 ++++++++++
M app/controllers/analyze_controller… | 1 +
M app/views/analyze/view.html.erb | 4 ----
M app/views/analyze/view_matches.htm… | 20 +++++++-------------
M app/views/shared/_call_info.html.e… | 6 +++---
M app/views/shared/_call_signal.html… | 4 ++++
7 files changed, 26 insertions(+), 21 deletions(-)
---
DIR diff --git a/app/assets/javascripts/analyze/view.coffee b/app/assets/javascripts/analyze/view.coffee
@@ -17,7 +17,7 @@ jQuery ($) ->
"sAjaxSource": resultsPath
"aaSorting": [[1, 'asc']]
"aoColumns": [
- {"mDataProp": "checkbox", "bSortable": false}
+ {"mDataProp": "checkbox", "bSortable": false, "sWidth": "22px"}
{"mDataProp": "number"}
{"mDataProp": "line_type"}
{"mDataProp": "signal"}
DIR diff --git a/app/assets/javascripts/jobs/view_results.coffee b/app/assets/javascripts/jobs/view_results.coffee
@@ -26,6 +26,16 @@ jQuery ($) ->
{"mDataProp": "audio_length"}
{"mDataProp": "ring_length"}
]
+ "fnServerData": ( sSource, aoData, fnCallback ) ->
+ $.getJSON sSource, aoData, (json) ->
+ fnCallback(json)
+ $(".xtooltip").tooltip('fixTitle')
+ $(".xpopover").popover
+ html: true
+ placement: 'right'
+ trigger: 'hover'
+ delay: { show: 300, hide: 300 }
+ animation: false
# Gray out the table during loads.
$("#results-table_processing").watch 'visibility', ->
DIR diff --git a/app/controllers/analyze_controller.rb b/app/controllers/analyze_controller.rb
@@ -131,6 +131,7 @@ class AnalyzeController < ApplicationController
param = [ @job_id ]
glue = "AND "
terms.each do |w|
+ next if w == "undefined"
where << glue
case w
when /^F(\d+)$/i # F2100 = peak frequency between 2095hz and 2105hz
DIR diff --git a/app/views/analyze/view.html.erb b/app/views/analyze/view.html.erb
@@ -45,7 +45,3 @@
</table>
<% end %>
-
-<% if false %>
- <a class="btn" href="<%= view_matches_path(call.project_id, call.job_id, call.id) %>" rel="tooltip" title="Search for Matches"><i class="icon-search"></i></a>
-<% end %>
DIR diff --git a/app/views/analyze/view_matches.html.erb b/app/views/analyze/view_matches.html.erb
@@ -1,4 +1,6 @@
-<% call = @result %>
+<% include_view_javascript %>
+
+<% call = @result %>
<h1 class='title'><%= @result.number %> (<a href="<%=view_analyze_path(@project.id, call.job_id)%>">Back to Job Analysis</a>)</h1>
<table class='table table-striped table-condensed'>
@@ -15,11 +17,10 @@
<%= render :partial => 'shared/call_info', :locals => { :call => call } %>
</td>
<td align='center'>
- <%= format_call_type_details(call) %>
+ <%= render :partial => 'shared/call_type', :locals => { :call => call } %>
</td>
<td align='center'>
- <span class='pull-left'><%= render :partial => 'shared/lightbox_sig', :locals => { :call => call } %></span>
- <%= render :partial => 'shared/lightbox_freq', :locals => { :call => call } %>
+ <%= render :partial => 'shared/call_signal', :locals => { :call => call } %>
</td>
</tr>
</tbody>
@@ -51,7 +52,6 @@
<% end %>
<th>Type</th>
<th>Signal</th>
- <th>Actions</th>
</tr>
</thead>
<tbody>
@@ -70,16 +70,10 @@
<td align='center'><%= link_to h(call.project.name), project_path(call.project) %></td>
<% end %>
<td align='center'>
- <%= format_call_type_details(call) %>
+ <%= render :partial => 'shared/call_type', :locals => { :call => call } %>
</td>
<td align='center'>
- <span class='pull-left'><%= render :partial => 'shared/lightbox_sig', :locals => { :call => call } %></span>
- <%= render :partial => 'shared/lightbox_freq', :locals => { :call => call } %>
- </td>
- <td>
- <% if call.fprint and call.fprint.length > 0 %>
- <a class="btn" href="<%= view_matches_path(call.project_id, call.job_id, call.id) %>" rel="tooltip" title="Search for Matches"><i class="icon-search"></i></a>
- <% end %>
+ <%= render :partial => 'shared/call_signal', :locals => { :call => call } %>
</td>
</tr>
<% end %>
DIR diff --git a/app/views/shared/_call_info.html.erb b/app/views/shared/_call_info.html.erb
@@ -1,6 +1,6 @@
-<h2>
+
<object type="application/x-shockwave-flash" data="/assets/musicplayer.swf?song_url=<%=resource_analyze_path(call.id, "mp3") %>" width="17" height="17">
<param name="movie" value="/assets/musicplayer.swf?song_url=<%=resource_analyze_path(call.id, "mp3") %>" />
</object>
-<%= call.number %>
-</h2>
+
+<strong><%= call.number %></strong>
DIR diff --git a/app/views/shared/_call_signal.html.erb b/app/views/shared/_call_signal.html.erb
@@ -1,2 +1,6 @@
<span class='pull-left'><%= render :partial => 'shared/lightbox_sig', :locals => { :call => call } %></span>
<%= render :partial => 'shared/lightbox_freq', :locals => { :call => call } %>
+
+<% if call.fprint and call.fprint.length > 0 and call != @result %>
+ <a class="btn" href="<%= view_matches_path(call.project_id, call.job_id, call.id) %>" rel="tooltip" title="Search for Matches"><i class="icon-search"></i></a>
+<% end %>