Introduction
Introduction Statistics Contact Development Disclaimer Help
Upsize buttons - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
Log
Files
Refs
README
---
commit 876a89b6d4cde9a8e6df003f1aa0c08565040afc
parent 68988e60dc7b735eefff34b15c68fbe2bc4c8195
Author: HD Moore <[email protected]>
Date: Sun, 6 Jan 2013 03:46:43 -0600
Upsize buttons
Diffstat:
M app/views/analyze/view.html.erb | 2 +-
M app/views/analyze/view_matches.htm… | 2 +-
M app/views/calls/index.html.erb | 10 +++++-----
M app/views/jobs/index.html.erb | 12 ++++++++----
M app/views/jobs/results.html.erb | 12 ++++++------
M app/views/projects/index.html.erb | 4 ++--
M app/views/providers/index.html.erb | 4 ++--
M lib/warvox/jobs/analysis.rb | 25 ++++++++++++++++++++-----
8 files changed, 45 insertions(+), 26 deletions(-)
---
diff --git a/app/views/analyze/view.html.erb b/app/views/analyze/view.html.erb
@@ -38,7 +38,7 @@
</td>
<td>
<% if call.fprint and call.fprint.length > 0 %>
- <a class="btn btn-mini" href="<%= view_matches_path(ca…
+ <a class="btn" href="<%= view_matches_path(call.projec…
<% end %>
</td>
</tr>
diff --git a/app/views/analyze/view_matches.html.erb b/app/views/analyze/view_m…
@@ -78,7 +78,7 @@
</td>
<td>
<% if call.fprint and call.fprint.length > 0 %>
- <a class="btn btn-mini" href="<%= view_matches_path(ca…
+ <a class="btn" href="<%= view_matches_path(call.projec…
<% end %>
</td>
</tr>
diff --git a/app/views/calls/index.html.erb b/app/views/calls/index.html.erb
@@ -28,16 +28,16 @@
<td><%= job.started_at.localtime.strftime("%Y-%m-%d %H:%M:%S") %></td>
<td>
- <a class="btn btn-mini" href="<%= view_call_path(@project,job) %>" rel…
+ <a class="btn" href="<%= view_call_path(@project,job) %>" rel="tooltip…
<% if job.calls.where("analysis_completed_at IS NOT NULL").cou…
- <a class="btn btn-mini" href="<%= analyze_call_path(@p…
- <a class="btn btn-mini" href="<%= reanalyze_call_path(…
+ <a class="btn" href="<%= analyze_call_path(@project,jo…
+ <a class="btn" href="<%= reanalyze_call_path(@project,…
<% else %>
- <a class="btn btn-mini" href="<%= analyze_call_path(@p…
+ <a class="btn" href="<%= analyze_call_path(@project,jo…
<% end %>
- <a class="btn btn-mini" href="<%= call_path(@project,job) %>" data…
+ <a class="btn" href="<%= call_path(@project,job) %>" data-confirm=…
</td>
</tr>
diff --git a/app/views/jobs/index.html.erb b/app/views/jobs/index.html.erb
@@ -9,6 +9,7 @@
<th>Status</th>
<th>Launched</th>
<th>Actions</th>
+ <th>Project</th>
</tr>
<% @submitted_jobs.each do |job| %>
@@ -19,8 +20,9 @@
<td><%= job.created_at.localtime.strftime("%Y-%m-%d %H:%M:%S %Z") %></td>
<td>
- <a class="btn btn-mini" href="<%= job_path(job) %>" data-confi…
+ <a class="btn" href="<%= job_path(job) %>" data-confirm="Remov…
</td>
+ <td><%= link_to( h(truncate(job.project.name, :length => 25)), project_pat…
</tr>
<% end %>
</table>
@@ -38,6 +40,7 @@
<th>Progress</th>
<th>Launched</th>
<th>Actions</th>
+ <th>Project</th>
</tr>
<% @active_jobs.each do |job| %>
@@ -54,13 +57,14 @@
<td><%= job.created_at.localtime.strftime("%Y-%m-%d %H:%M:%S %Z") %></td>
<td>
<% if job.task == "dialer" %>
- <a class="btn btn-mini" href="<%= view_results_path(job.pr…
+ <a class="btn" href="<%= view_results_path(job.project,job…
<% end %>
<% if job.task == "analysis" %>
- <a class="btn btn-mini" href="<%= view_analyze_path(job.pr…
+ <a class="btn" href="<%= view_analyze_path(job.project,job…
<% end %>
- <a class="btn btn-mini" href="<%= stop_job_path(job) %>" data-…
+ <a class="btn" href="<%= stop_job_path(job) %>" data-confirm="…
</td>
+ <td><%= link_to( h(truncate(job.project.name, :length => 25)), project_pat…
</tr>
<% end %>
</table>
diff --git a/app/views/jobs/results.html.erb b/app/views/jobs/results.html.erb
@@ -52,22 +52,22 @@
<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) %>" …
+ <a class="btn" href="<%= view_results_path(@project,job) %>" rel="tool…
<% if cnt_analyzed > 0 %>
- <a class="btn btn-mini" href="<%= view_analyze_path(@p…
+ <a class="btn" href="<%= view_analyze_path(@project,jo…
<% if pct_analyzed == 100 %>
- <a class="btn btn-mini" href="<%= reanalyze_jo…
+ <a class="btn" href="<%= reanalyze_job_path(@p…
<% else %>
- <a class="btn btn-mini" href="<%= analyze_job_…
+ <a class="btn" href="<%= analyze_job_path(@pro…
<% end %>
<% else %>
<% if cnt_answered > 0 %>
- <a class="btn btn-mini" href="<%= analyze_job_path(@pr…
+ <a class="btn" href="<%= analyze_job_path(@project,job…
<% end %>
<% end %>
- <a class="btn btn-mini" href="<%= job_path(job) %>" data-confirm="…
+ <a class="btn" href="<%= job_path(job) %>" data-confirm="Delete al…
</td>
</tr>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.…
@@ -25,8 +25,8 @@
<td><%= project.calls.where('analysis_completed_at IS NOT NULL').count %><…
<td><%= project.updated_at.localtime.strftime("%Y-%m-%d %H:%M:%S") %></td>
<td>
- <a class="btn btn-mini" href="<%= edit_project_path(project) %>"…
- <a class="btn btn-mini" href="<%= project_path(project) %>" data-c…
+ <a class="btn" href="<%= edit_project_path(project) %>"rel="tool…
+ <a class="btn" href="<%= project_path(project) %>" data-confirm="D…
</td>
</tr>
diff --git a/app/views/providers/index.html.erb b/app/views/providers/index.htm…
@@ -25,8 +25,8 @@
<td><%= provider.user %></td>
<td><%= provider.lines %></td>
<td>
- <a class="btn btn-mini" href="<%= edit_provider_path(provider) %>"…
- <a class="btn btn-mini" href="<%= provider_path(provider) %>" data…
+ <a class="btn" href="<%= edit_provider_path(provider) %>"rel="tool…
+ <a class="btn" href="<%= provider_path(provider) %>" data-confirm=…
</td>
</tr>
<% end %>
diff --git a/lib/warvox/jobs/analysis.rb b/lib/warvox/jobs/analysis.rb
@@ -65,6 +65,12 @@ class Analysis < Base
end
case @conf[:scope]
+ when 'call'
+ if @conf[:force]
+ query = {:id => @conf[:target_id], :answered =…
+ else
+ query = {:id => @conf[:target_id], :answered =…
+ end
when 'job'
if @conf[:force]
query = {:job_id => @conf[:target_id], :answer…
@@ -85,8 +91,6 @@ class Analysis < Base
end
end
-
-
# Build a list of call IDs, as find_each() gets confused if th…
calls = Call.where(query).map{|c| c.id }
@@ -152,7 +156,7 @@ class Analysis < Base
fd.write(mr.audio)
end
- pfd = IO.popen("#{bin} '#{tmp.path}' '#{ dr.number.gsub(/[^0-9…
+ pfd = IO.popen("nice #{bin} '#{tmp.path}' '#{ dr.number.gsub(/…
out = Marshal.load(pfd.read) rescue nil
pfd.close
@@ -315,6 +319,9 @@ class Analysis < Base
# Plot samples to a graph
plotter = Tempfile.new("gnuplot")
+
+ plotter.puts("set autoscale")
+ plotter.puts("set yrange [-15000:15000]")
plotter.puts("set ylabel \"Signal\"")
plotter.puts("set xlabel \"Seconds\"")
plotter.puts("set terminal png medium size 640,480 transparent…
@@ -323,6 +330,10 @@ class Analysis < Base
plotter.puts("set output \"#{png_big_dots.path}\"")
plotter.puts("plot \"#{datfile.path}\" using 1:2 title \"#{num…
+
+ plotter.puts("unset yrange")
+ plotter.puts("set autoscale")
+ plotter.puts("set xrange [0:4000]")
plotter.puts("set terminal png medium size 640,480 transparent…
plotter.puts("set ylabel \"Power\"")
plotter.puts("set xlabel \"Frequency\"")
@@ -330,6 +341,9 @@ class Analysis < Base
plotter.puts("plot \"#{frefile.path}\" using 1:2 title \"#{num…
+ plotter.puts("unset xrange")
+ plotter.puts("set autoscale")
+ plotter.puts("set yrange [-15000:15000]")
plotter.puts("unset border")
plotter.puts("unset xtics")
plotter.puts("unset ytics")
@@ -339,9 +353,11 @@ class Analysis < Base
plotter.puts("set format x ''")
plotter.puts("set format y ''")
plotter.puts("set output \"#{png_sig.path}\"")
- plotter.puts("set style line 1 lt 1 lw 3 pt 3 linecolor rgb \"…
plotter.puts("plot \"#{datfile.path}\" using 1:2 notitle with …
+ plotter.puts("unset yrange")
+ plotter.puts("set autoscale")
+ plotter.puts("set xrange [0:4000]")
plotter.puts("unset border")
plotter.puts("unset xtics")
plotter.puts("unset ytics")
@@ -351,7 +367,6 @@ class Analysis < Base
plotter.puts("set format x ''")
plotter.puts("set format y ''")
plotter.puts("set output \"#{png_sig_freq.path}\"")
- plotter.puts("set style line 1 lt 1 lw 3 pt 3 linecolor rgb \"…
plotter.puts("plot \"#{frefile.path}\" using 1:2 notitle with …
plotter.flush
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.