Move to manual navbar, fix font-awesome, styles - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit d4f3b5ba934fb80d39696488e4a98df186d19422
DIR parent 24fce918407bce8c43734e120a1f4aa4e1343656
HTML Author: HD Moore <hd_moore@rapid7.com>
Date: Sat, 25 Oct 2014 16:42:29 -0500
Move to manual navbar, fix font-awesome, styles
Diffstat:
M Gemfile | 10 +++-------
M Gemfile.lock | 114 ++++++++++++-------------------
M app/assets/javascripts/application… | 2 +-
M app/assets/javascripts/bootstrap.j… | 1 +
D app/assets/stylesheets/application… | 8 --------
M app/assets/stylesheets/application… | 516 ++++++++++++++++++++++++++++++-
M app/assets/stylesheets/bootstrap_a… | 8 --------
M app/assets/stylesheets/bootstrap_a… | 100 +++++++++++++++++++++++++++----
M app/controllers/analyze_controller… | 278 +++++++++++++++----------------
M app/views/analyze/index.html.erb | 4 ++--
M app/views/analyze/view.html.erb | 4 ++--
M app/views/calls/index.html.erb | 31 ++++++++++++++++---------------
M app/views/home/about.html.erb | 2 +-
M app/views/home/index.html.erb | 8 ++++----
M app/views/jobs/index.html.erb | 10 +++++-----
M app/views/jobs/new_analyze.html.erb | 2 +-
M app/views/jobs/new_dialer.html.erb | 2 +-
M app/views/jobs/results.html.erb | 74 ++++++++++++++++----------------
M app/views/jobs/view_results.html.e… | 6 +++---
M app/views/layouts/application.html… | 48 ++-----------------------------
M app/views/projects/edit.html.erb | 2 +-
M app/views/projects/index.html.erb | 6 +++---
M app/views/projects/new.html.erb | 2 +-
M app/views/projects/show.html.erb | 28 ++++++++++++++--------------
M app/views/providers/edit.html.erb | 2 +-
M app/views/providers/index.html.erb | 8 ++++----
M app/views/providers/new.html.erb | 2 +-
M app/views/shared/_call_signal.html… | 4 ++--
M config/routes.rb | 2 +-
29 files changed, 889 insertions(+), 395 deletions(-)
---
DIR diff --git a/Gemfile b/Gemfile
@@ -7,10 +7,6 @@ gem 'pg', '>=0.17'
gem 'jquery-rails', '>= 3.1.2'
gem 'jquery-datatables-rails', '>= 2.2.3'
-# Integer array support (until Rails 4.0 is released)
-# Git version required to work around this bug: https://github.com/dockyard/postgres_ext/issues/5
-# gem 'postgres_ext', :git => 'git://github.com/dockyard/postgres_ext.git'
-
gem 'kissfft'
gem 'rex', '~> 2.0.3'
@@ -23,14 +19,14 @@ gem 'autoprefixer-rails'
gem 'authlogic', '>= 3.4.0'
gem 'rails-settings-cached', '>= 0.4.1'
+gem "breadcrumbs_on_rails"
-gem "twitter-bootstrap-rails", :git => 'https://github.com/seyhunak/twitter-bootstrap-rails.git'
gem 'formtastic', '>= 3.0.0'
gem 'formtastic-bootstrap', '>= 3.0.0'
-gem 'rails_bootstrap_navbar', '>= 2.0.1'
-gem 'less-rails-bootstrap'
gem 'therubyracer'
+gem 'font-awesome-rails'
+
gem 'reportable', :git => 'git://github.com/hmoore-r7/reportable.git', :require => 'saulabs/reportable'
gem 'will_paginate', '~> 3.0'
DIR diff --git a/Gemfile.lock b/Gemfile.lock
@@ -6,56 +6,46 @@ GIT
activerecord (>= 3.0)
activesupport (>= 3.0.0)
-GIT
- remote: https://github.com/seyhunak/twitter-bootstrap-rails.git
- revision: 6ae6c669402ec3d85ced21cf8ce4c7c4b8a985c1
- specs:
- twitter-bootstrap-rails (3.2.0)
- actionpack (>= 3.1)
- execjs
- rails (>= 3.1)
- railties (>= 3.1)
-
GEM
remote: http://rubygems.org/
specs:
- actionmailer (4.1.5)
- actionpack (= 4.1.5)
- actionview (= 4.1.5)
- mail (~> 2.5.4)
- actionpack (4.1.5)
- actionview (= 4.1.5)
- activesupport (= 4.1.5)
+ actionmailer (4.1.6)
+ actionpack (= 4.1.6)
+ actionview (= 4.1.6)
+ mail (~> 2.5, >= 2.5.4)
+ actionpack (4.1.6)
+ actionview (= 4.1.6)
+ activesupport (= 4.1.6)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
- actionview (4.1.5)
- activesupport (= 4.1.5)
+ actionview (4.1.6)
+ activesupport (= 4.1.6)
builder (~> 3.1)
erubis (~> 2.7.0)
- activemodel (4.1.5)
- activesupport (= 4.1.5)
+ activemodel (4.1.6)
+ activesupport (= 4.1.6)
builder (~> 3.1)
- activerecord (4.1.5)
- activemodel (= 4.1.5)
- activesupport (= 4.1.5)
+ activerecord (4.1.6)
+ activemodel (= 4.1.6)
+ activesupport (= 4.1.6)
arel (~> 5.0.0)
- activesupport (4.1.5)
+ activesupport (4.1.6)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
- authlogic (3.4.2)
+ authlogic (3.4.3)
activerecord (>= 3.2)
activesupport (>= 3.2)
request_store (~> 1.0)
- autoprefixer-rails (3.0.1.20140826)
+ scrypt (~> 1.2)
+ autoprefixer-rails (3.1.2.20141016)
execjs
- bootstrap-navbar (2.2.0)
- gem_config (~> 0.3)
bootstrap-sass (3.2.0.2)
sass (~> 3.2)
+ breadcrumbs_on_rails (2.3.0)
builder (3.2.2)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
@@ -64,19 +54,19 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.8.0)
- commonjs (0.2.7)
dynamic_form (1.1.4)
erubis (2.7.0)
- execjs (2.2.1)
- ffi (1.9.3)
+ execjs (2.2.2)
+ ffi (1.9.6)
ffi-compiler (0.1.3)
ffi (>= 1.0.0)
rake
+ font-awesome-rails (4.2.0.0)
+ railties (>= 3.2, < 5.0)
formtastic (3.0.0)
actionpack (>= 3.2.13)
formtastic-bootstrap (3.0.0)
formtastic (>= 2.2)
- gem_config (0.3.1)
hike (1.2.3)
i18n (0.6.11)
jquery-datatables-rails (2.2.3)
@@ -88,53 +78,41 @@ GEM
json (1.8.1)
kgio (2.9.2)
kissfft (0.0.2)
- less (2.5.1)
- commonjs (~> 0.2.7)
- less-rails (2.5.0)
- actionpack (>= 3.1)
- less (~> 2.5.0)
- less-rails-bootstrap (3.2.0)
- less-rails (~> 2.5.0)
- libv8 (3.16.14.3)
- mail (2.5.4)
- mime-types (~> 1.16)
- treetop (~> 1.4.8)
- mime-types (1.25.1)
- minitest (5.4.1)
+ libv8 (3.16.14.7)
+ mail (2.6.1)
+ mime-types (>= 1.16, < 3)
+ mime-types (2.4.3)
+ minitest (5.4.2)
multi_json (1.10.1)
pg (0.17.1)
- polyglot (0.3.5)
protected_attributes (1.0.8)
activemodel (>= 4.0.1, < 5.0)
psych_shield (0.0.4)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
- rails (4.1.5)
- actionmailer (= 4.1.5)
- actionpack (= 4.1.5)
- actionview (= 4.1.5)
- activemodel (= 4.1.5)
- activerecord (= 4.1.5)
- activesupport (= 4.1.5)
+ rails (4.1.6)
+ actionmailer (= 4.1.6)
+ actionpack (= 4.1.6)
+ actionview (= 4.1.6)
+ activemodel (= 4.1.6)
+ activerecord (= 4.1.6)
+ activesupport (= 4.1.6)
bundler (>= 1.3.0, < 2.0)
- railties (= 4.1.5)
+ railties (= 4.1.6)
sprockets-rails (~> 2.0)
rails-settings-cached (0.4.1)
rails (>= 4.0.0)
- rails_bootstrap_navbar (2.0.1)
- bootstrap-navbar (~> 2.0)
- rails (>= 3.0.0)
- railties (4.1.5)
- actionpack (= 4.1.5)
- activesupport (= 4.1.5)
+ railties (4.1.6)
+ actionpack (= 4.1.6)
+ activesupport (= 4.1.6)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
rake (10.3.2)
ref (1.0.5)
request_store (1.1.0)
- rex (2.0.3)
+ rex (2.0.4)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
@@ -149,19 +127,16 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sprockets-rails (2.1.4)
+ sprockets-rails (2.2.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
- sprockets (~> 2.8)
+ sprockets (>= 2.8, < 4.0)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
- treetop (1.4.15)
- polyglot
- polyglot (>= 0.3.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.5.3)
@@ -182,26 +157,25 @@ DEPENDENCIES
authlogic (>= 3.4.0)
autoprefixer-rails
bootstrap-sass (>= 3.2.0)
+ breadcrumbs_on_rails
coffee-rails (~> 4.0.1)
dynamic_form (>= 1.1.4)
+ font-awesome-rails
formtastic (>= 3.0.0)
formtastic-bootstrap (>= 3.0.0)
jquery-datatables-rails (>= 2.2.3)
jquery-rails (>= 3.1.2)
kissfft
- less-rails-bootstrap
pg (>= 0.17)
protected_attributes (~> 1.0.7)
psych_shield
rails (>= 4.1.5, < 5.0.0)
rails-settings-cached (>= 0.4.1)
- rails_bootstrap_navbar (>= 2.0.1)
reportable!
rex (~> 2.0.3)
sass-rails (~> 4.0.2)
scrypt
therubyracer
- twitter-bootstrap-rails!
uglifier (>= 1.0.3)
unicorn
will_paginate (~> 3.0)
DIR diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
@@ -1,8 +1,8 @@
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
//= require jquery
+//= require bootstrap-sprockets
//= require jquery_ujs
-//= require twitter/bootstrap
//= require bootstrap-lightbox
//= require dataTables/jquery.dataTables
//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
DIR diff --git a/app/assets/javascripts/bootstrap.js.coffee b/app/assets/javascripts/bootstrap.js.coffee
@@ -1,3 +1,4 @@
jQuery ->
$("a[rel~=popover], .has-popover").popover()
$("a[rel~=tooltip], .has-tooltip").tooltip()
+ $('.btn').button()
DIR diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
@@ -1,8 +0,0 @@
-/*
- * This is a manifest file that'll automatically include all the stylesheets available in this directory
- * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
- * the top of the compiled file, but it's generally better to create a new file per style scope.
- *= require formtastic-bootstrap
- *= require_self
- *= require_tree .
-*/
DIR diff --git a/app/assets/stylesheets/application.css.scss.erb b/app/assets/stylesheets/application.css.scss.erb
@@ -1,19 +1,17 @@
/*
- *= require bootstrap_and_overrides
-*/
-
-/*
*= require_self
*= require formtastic
*= require formtastic-bootstrap
*= require formtastic-overrides
*= require bootstrap-lightbox
*= require jquery.dataTables
+ *= require font-awesome
*/
@import "bootstrap-sprockets";
@import "bootstrap";
+
table.list {
td.actions {
vertical-align: middle;
@@ -78,3 +76,513 @@ table.list {
margin-left: auto;
margin-right: auto;
}
+
+
+#main {
+ margin-top: 50px;
+}
+
+// Overrides
+
+/* navbar */
+
+.navbar-default {
+ background-color: #ea5709;
+ border-color: red;
+}
+/* title */
+.navbar-default .navbar-brand {
+ color: #ffffff;
+}
+.navbar-default .navbar-brand:hover,
+.navbar-default .navbar-brand:focus {
+ color: yellow;
+ background-color: #ea5709;
+}
+/* link */
+.navbar-default .navbar-nav > li > a {
+ color: white;
+ background-color: #ea5709;
+}
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
+ color: yellow;
+ background-color: #ea5709;
+}
+.navbar-default .navbar-nav > .active > a,
+.navbar-default .navbar-nav > .active > a:hover,
+.navbar-default .navbar-nav > .active > a:focus {
+ color: yellow;
+ background-color: #ea5709;
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .open > a:hover,
+.navbar-default .navbar-nav > .open > a:focus {
+ color: yellow;
+ background-color: #ea5709;
+}
+/* caret */
+.navbar-default .navbar-nav > .dropdown > a .caret {
+ border-top-color: white;
+ border-bottom-color: white;
+}
+.navbar-default .navbar-nav > .dropdown > a:hover .caret,
+.navbar-default .navbar-nav > .dropdown > a:focus .caret {
+ border-top-color: #333;
+ border-bottom-color: #333;
+}
+.navbar-default .navbar-nav > .open > a .caret,
+.navbar-default .navbar-nav > .open > a:hover .caret,
+.navbar-default .navbar-nav > .open > a:focus .caret {
+ border-top-color: #555;
+ border-bottom-color: #555;
+}
+/* mobile version */
+.navbar-default .navbar-toggle {
+ border-color: #DDD;
+}
+.navbar-default .navbar-toggle:hover,
+.navbar-default .navbar-toggle:focus {
+
+}
+.navbar-default .navbar-toggle .icon-bar {
+ background-color: #ea5709;
+}
+@media (max-width: 767px) {
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+ color: white;
+ background-color: #ea5709;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: yellow;
+ }
+}
+
+//
+
+a .project-title, a:visited .project-title {
+ color: white;
+ font-weight: bold;
+}
+
+
+// Datatables
+
+.paginate_disabled_previous {
+ display: none;
+}
+
+.paginate_disabled_next {
+ display: none;
+}
+
+.paginate_enabled_previous {
+ color: red;
+ margin-right: 20px;
+}
+
+.paginate_enabled_next {
+ color: green;
+}
+
+// End of DataTables
+
+
+.sparkline {
+ width: 100%;
+ height: 30px;
+}
+
+.sparkline-title {
+ text-align: center;
+ font-size: 11px;
+}
+
+.call-detail {
+ font-size: 10px;
+}
+
+.project-header {
+ margin-bottom: 30px;
+ border-bottom: 1px solid #eeeeee;
+}
+
+.zoom {
+ background-color: yellow;
+ height: 40px;
+}
+
+
+.stat-box {
+ padding: 10px;
+ background-color: white;
+ border: 2px solid #29383f;
+ font-size: 16px;
+ font-weight: bold;
+ color: #29383f;
+ width: 55px;
+ margin: auto auto;
+ text-align: center;
+
+ border-top-left-radius: 20px;
+ border-top-right-radius: 20px;
+ border-bottom-right-radius: 20px;
+ border-bottom-left-radius: 20px;
+}
+
+.stat-modem {
+ background-color: white;
+ border: 2px solid red;
+ color: red;
+}
+
+
+.stat-nodata {
+ background-color: #f4f4f4;
+ border: 2px solid #29383f;
+ color: #29383f;
+ font-size: 24px;
+}
+
+.stat-completed {
+ background-color: white;
+ border: 2px solid #ea5709;
+ color: #29383f;
+}
+
+.stat-voice {
+ background-color: white;
+ border: 2px solid green;
+ color: #29383f;
+}
+
+.stat-voicemail {
+ background-color: white;
+ border: 2px solid blue;
+ color: #29383f;
+}
+
+.stat-fax {
+ background-color: white;
+ border: 2px solid #29383f;
+ color: #29383f;
+}
+
+.stat-modem {
+ background-color: white;
+ border: 2px solid red;
+ color: #29383f;
+}
+
+
+.arrow-down {
+ font-size: 18px;
+ text-align: center;
+ margin: auto auto;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ color: #ea5709;
+}
+
+.arrow-right {
+ font-size: 22px;
+ text-align: center;
+ margin: auto auto;
+ padding-top: 10px;
+ padding-bottom: 10px;
+}
+
+.stat-subtitle {
+ text-align: center;
+ font-size: 12px;
+ margin-top: 1px;
+}
+
+.fwd_match_span {
+ width: 100px;
+ padding-left: 20px;
+ padding-right: 20px;
+ padding-bottom: 5px;
+ padding-top: 5px;
+ font-weight: bold;
+ color: white;
+ text-align: center;
+}
+
+.filter-label {
+ line-height: 16px;
+ font-size: 16px;
+ margin-right: 5px;
+ padding-top: 5px;
+ font-weight: bold;
+}
+
+.filter-select {
+ line-height: 14px;
+ font-size: 14px;
+ width: 120px;
+ font-weight: bold;
+}
+
+.popover-title {
+ line-height: 12px;
+ font-size: 12px;
+ text-align: center;
+ font-weight: bold;
+}
+
+.popover-content {
+
+}
+
+.xtooltip {
+ border-bottom: 1px dotted blue;
+ cursor: help;
+}
+
+.xpopover {
+ border-bottom: 1px dotted blue;
+ cursor: help;
+}
+
+.progress-bar {
+ margin-bottom: -2px;
+}
+
+.progress_pct {
+ color: #29383f;
+ margin-left: 10px;
+ font-weight: bold;
+}
+
+.task_args_formatted {
+ padding:10px;
+}
+
+.task_args_var {
+ font-size: 12px;
+ float: left;
+ font-weight: bold;
+ text-align: right;
+}
+.task_args_val {
+ font-size: 14px;
+ text-align: left;
+ padding-left: 5px;
+ float: auto;
+}
+.check-item {
+ font-size: 18px;
+ margin-bottom: 10px;
+}
+.check-result {
+ margin-left: 40px;
+ width: 500px;
+ font-size: 16px;
+}
+
+
+// Hacks to override active drop-down item background color and hover
+.dropdown-menu .active > a {
+ background-color: white;
+ background-image: none;
+ color: #29383f;
+}
+
+// Do not make active icons white
+.dropdown-menu > .active > a > [class^="icon-"], .dropdown-menu > .active > a > [class*="icon-"] {
+ color: #29383f;
+ background-image: url("/assets/twitter/bootstrap/glyphicons-halflings.png");
+}
+
+.dropdown-menu .active > a:hover {
+ background-color: #ea5709;
+ background-image: none;
+ color: white;
+}
+
+.fconstrained {
+ width: 400px;
+}
+
+
+.project_description {
+ height: 100px;
+ padding: 5px;
+}
+.project_includes {
+ height: 100px;
+ padding: 5px;
+}
+
+body#login {
+
+background-color: black;
+padding: 0;
+margin: 0;
+
+}
+
+#login-panel {
+
+margin: 0px;
+width: 100%;
+padding: 0;
+height: 300px;
+
+position: fixed;
+z-index: 1;
+
+/* IE10 Consumer Preview */
+background-image: -ms-linear-gradient(top, #EA5709 0%, #000000 100%);
+
+/* Mozilla Firefox */
+background-image: -moz-linear-gradient(top, #EA5709 0%, #000000 100%);
+
+/* Opera */
+background-image: -o-linear-gradient(top, #EA5709 0%, #000000 100%);
+
+/* Webkit (Safari/Chrome 10) */
+background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #EA5709), color-stop(1, #000000));
+
+/* Webkit (Chrome 11+) */
+background-image: -webkit-linear-gradient(top, #EA5709 0%, #000000 100%);
+
+/* W3C Markup, IE10 Release Preview */
+background-image: linear-gradient(to bottom, #EA5709 0%, #000000 100%);
+
+}
+
+#login-logo {
+ margin-left: auto;
+ margin-right: auto;
+ width: 222px;
+ height: 68px;
+ margin-top: 60px;
+}
+
+#box {
+ margin-left: auto;
+ margin-right: auto;
+ width: 350px;
+ background: white;
+ padding: 25px;
+ margin-top: 20px;
+ border: 1px solid #4A1C04;
+ margin-bottom: 30px;
+}
+
+.login-label {
+ width: 120px;
+ margin-right: 10px;
+ margin-bottom: 5px;
+ text-align: right;
+ font-weight: bold;
+ float: left;
+}
+
+.btn-login {
+ margin-left: 130px;
+}
+
+.nav {
+ a {
+ font-size: 15px;
+ }
+}
+
+.content {
+ margin-top: 80px;
+}
+
+.accordion-toggle:hover {
+ text-decoration: none;
+}
+
+h1 {
+ font-size: 24px;
+ line-height: 30px;
+}
+
+h2 {
+ font-size: 20px;
+ line-height: 24px;
+}
+
+h3 {
+ font-size: 16px;
+ line-height: 18px;
+}
+
+.header {
+ border-top: solid 4px #ea5709;
+ padding-top: 20px;
+}
+
+.header a {
+ color: #ccc;
+}
+
+.header a:hover {
+ text-decoration: none;
+ color: #ea5709;
+}
+
+.footer {
+ text-align: center;
+ font-size: 12px;
+ margin-top: 50px;
+ color: #aaa;
+}
+
+.no-space {
+ margin-left: 0;
+ margin-right: 0;
+}
+
+.right {
+ text-align: right;
+}
+
+.tabs-left {
+ text-align: left;
+}
+
+.text-large {
+ font-size: 18px;
+}
+
+h3.toc {
+ border-bottom: 1px solid #ccc;
+}
+
+.carousel .item {
+ height: 50px;
+ text-align: center;
+}
+
+.carousel .item > img {
+ display: inline;
+}
+
+.lead-box h3 {
+ text-align: center;
+}
+
+.lead-box p {
+ height: 80px;
+}
+
+.table td {
+ vertical-align: middle;
+}
+table.dataTable tr td.sorting_1 {
+ background-color: #fff !important;
+}
+.tab-content {
+ overflow: hidden;
+}
+.carousel-control {
+ background: #fff;
+}
DIR diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css b/app/assets/stylesheets/bootstrap_and_overrides.css
@@ -1,7 +0,0 @@
-/*
- =require twitter-bootstrap-static/bootstrap
-
- Use Font Awesome icons (default)
- To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites"
- =require twitter-bootstrap-static/fontawesome
- */
-\ No newline at end of file
DIR diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less
@@ -1,15 +1,15 @@
@import "twitter/bootstrap/bootstrap";
// Set the correct sprite paths
-@iconSpritePath: image-url("twitter/bootstrap/glyphicons-halflings.png");
-@iconWhiteSpritePath: image-url("twitter/bootstrap/glyphicons-halflings-white.png");
+@iconSpritePath: image-url("/assets/glyphicons-halflings.png");
+@iconWhiteSpritePath: image-url("/assets/glyphicons-halflings-white.png");
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
-@fontAwesomeEotPath: font-url("fontawesome-webfont.eot");
-@fontAwesomeEotPath_iefix: font-url("fontawesome-webfont.eot?#iefix");
-@fontAwesomeWoffPath: font-url("fontawesome-webfont.woff");
-@fontAwesomeTtfPath: font-url("fontawesome-webfont.ttf");
-@fontAwesomeSvgPath: font-url("fontawesome-webfont.svg#fontawesomeregular");
+@fontAwesomeEotPath: font-url("/assets/fontawesome-webfont.eot");
+@fontAwesomeEotPath_iefix: font-url("/assets/fontawesome-webfont.eot?#iefix");
+@fontAwesomeWoffPath: font-url("/assets/fontawesome-webfont.woff");
+@fontAwesomeTtfPath: font-url("/assets/fontawesome-webfont.ttf");
+@fontAwesomeSvgPath: font-url("/assets/fontawesome-webfont.svg#fontawesomeregular");
// Font Awesome
@import "fontawesome/font-awesome";
@@ -19,7 +19,6 @@
// Your custom LESS stylesheets goes here
-
@sansFontFamily: "Trebuchet MS", Arial, Helvetica, sans-serif;
@green: #90d552;
@orange: #ea5709;
@@ -51,8 +50,88 @@
@headingsColor: @darkGray;
@navbarBackground: #ea5709;
+@navbarBorderColor: red;
@navbarBackgroundHighlight: #4A1C04;
+// Overrides
+
+/* navbar */
+.navbar-default {
+ background-color: @navbarBackground;
+ border-color: @navbarBorderColor;
+}
+/* title */
+.navbar-default .navbar-brand {
+ color: #ffffff;
+}
+.navbar-default .navbar-brand:hover,
+.navbar-default .navbar-brand:focus {
+ color: #5E5E5E;
+}
+/* link */
+.navbar-default .navbar-nav > li > a {
+ color: #777;
+}
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
+ color: #333;
+}
+.navbar-default .navbar-nav > .active > a,
+.navbar-default .navbar-nav > .active > a:hover,
+.navbar-default .navbar-nav > .active > a:focus {
+ color: #555;
+ background-color: @navbarBackground;
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .open > a:hover,
+.navbar-default .navbar-nav > .open > a:focus {
+ color: #555;
+ background-color: #D5D5D5;
+}
+/* caret */
+.navbar-default .navbar-nav > .dropdown > a .caret {
+ border-top-color: #777;
+ border-bottom-color: #777;
+}
+.navbar-default .navbar-nav > .dropdown > a:hover .caret,
+.navbar-default .navbar-nav > .dropdown > a:focus .caret {
+ border-top-color: #333;
+ border-bottom-color: #333;
+}
+.navbar-default .navbar-nav > .open > a .caret,
+.navbar-default .navbar-nav > .open > a:hover .caret,
+.navbar-default .navbar-nav > .open > a:focus .caret {
+ border-top-color: #555;
+ border-bottom-color: #555;
+}
+/* mobile version */
+.navbar-default .navbar-toggle {
+ border-color: #DDD;
+}
+.navbar-default .navbar-toggle:hover,
+.navbar-default .navbar-toggle:focus {
+ background-color: #DDD;
+}
+.navbar-default .navbar-toggle .icon-bar {
+ background-color: @navbarBackground;
+}
+@media (max-width: 767px) {
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+ color: white;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: @yellow;
+ }
+}
+
+//
+
+a .project-title, a:visited .project-title {
+ color: white;
+ font-weight: bold;
+}
+
// Datatables
@@ -380,7 +459,7 @@ background-image: linear-gradient(to bottom, #EA5709 0%, #000000 100%);
}
.content {
- margin-top: 40px;
+ margin-top: 80px;
}
.accordion-toggle:hover {
@@ -472,4 +551,4 @@ table.dataTable tr td.sorting_1 {
}
.carousel-control {
background: #fff;
-}
-\ No newline at end of file
+}
DIR diff --git a/app/controllers/analyze_controller.rb b/app/controllers/analyze_controller.rb
@@ -1,28 +1,28 @@
class AnalyzeController < ApplicationController
def index
- @jobs = Job.order('id DESC').paginate(
- :page => params[:page],
- :per_page => 30
- )
+ @jobs = Job.order('id DESC').paginate(
+ :page => params[:page],
+ :per_page => 30
+ )
end
def view
- @job_id = params[:id]
- @job = Job.find(@job_id)
- @shown = params[:show]
+ @job_id = params[:id]
+ @job = Job.find(@job_id)
+ @shown = params[:show]
- if request.format.html?
- ltypes = Call.select('DISTINCT line_type').where(:job_id => @job_id).map{|r| r.line_type}
- res_types = {}
+ if request.format.html?
+ ltypes = Call.select('DISTINCT line_type').where(:job_id => @job_id).map{|r| r.line_type}
+ res_types = {}
- ltypes.each do |k|
- next if not k
- res_types[k.capitalize.to_sym] = Call.where(:job_id => @job_id, :line_type => k).count
- end
+ ltypes.each do |k|
+ next if not k
+ res_types[k.capitalize.to_sym] = Call.where(:job_id => @job_id, :line_type => k).count
+ end
- @lines_by_type = res_types
- end
+ @lines_by_type = res_types
+ end
sort_by = params[:sort_by] || 'number'
sort_dir = params[:sort_dir] || 'asc'
@@ -41,57 +41,53 @@ class AnalyzeController < ApplicationController
end
@results_offset = (params[:iDisplayStart] || 0).to_i
- calls_search
+ calls_search
- @results_total_display_count = Call.where(@search_conditions).count()
+ @results_total_display_count = Call.where(@search_conditions).count()
@results = Call.where(@search_conditions).includes(:provider).limit(@results_per_page).offset(@results_offset).order(calls_sort_option)
end
- respond_to do |format|
+ respond_to do |format|
format.html
format.json {
- render :content_type => 'application/json', :json => render_to_string(:partial => 'view', :results => @results, :lines_by_type => @lines_by_type )
+ render :content_type => 'application/json', :json => render_to_string(:partial => 'view', :results => @results, :lines_by_type => @lines_by_type )
}
end
end
def view_matches
- @result = Call.find(params[:call_id])
- @match_scopes = [
- { :scope => 'job', :label => 'This Job' },
- { :scope => 'project', :label => 'This Project' },
- { :scope => 'global', :label => 'All Projects' }
- ]
-
- @job_id = params[:job_id]
-
- if @job_id
- @match_scope = params[:match_scope] || "job"
- else
- @match_scope = params[:match_scope] || "project"
- end
-
- @results = @result.paginate_matches(@match_scope, 30.0, params[:page], 30)
- end
-
+ @result = Call.find(params[:call_id])
+ @match_scopes = [
+ { :scope => 'job', :label => 'This Job' },
+ { :scope => 'project', :label => 'This Project' },
+ { :scope => 'global', :label => 'All Projects' }
+ ]
+
+ @job_id = params[:job_id]
+
+ if @job_id
+ @match_scope = params[:match_scope] || "job"
+ else
+ @match_scope = params[:match_scope] || "project"
+ end
+ @results = @result.paginate_matches(@match_scope, 30.0, params[:page], 30)
+ end
def index
- @shown = params[:show]
+ @shown = params[:show]
- ltypes = Line.select('DISTINCT line_type', :conditions => ["project_id = ?", @project.id] ).map{|r| r.line_type}
- res_types = {}
+ ltypes = Line.select('DISTINCT line_type').where(project_id: @project.id).map{|r| r.line_type}
+ res_types = {}
- ltypes.each do |k|
- next if not k
- res_types[k.capitalize.to_sym] = Line.count(
- :conditions => ['project_id = ? and line_type = ?', @project.id, k]
- )
- end
+ ltypes.each do |k|
+ next if not k
+ res_types[k.capitalize.to_sym] = Line.where(project_id: @project.id, line_type: k).count()
+ end
- @lines_by_type = res_types
+ @lines_by_type = res_types
sort_by = params[:sort_by] || 'number'
sort_dir = params[:sort_dir] || 'asc'
@@ -107,129 +103,127 @@ class AnalyzeController < ApplicationController
end
@results_offset = (params[:iDisplayStart] || 0).to_i
- project_search
+ project_search
@results = Call.where(@search_conditions).includes(:provider).limit(@results_per_page).offset(@results_offset).order(calls_sort_option)
@results_total_display_count = Call.where(@search_conditions).includes(:provider).count()
end
- respond_to do |format|
+ respond_to do |format|
format.html
format.json {
- render :content_type => 'application/json', :json => render_to_string(:partial => 'index', :results => @results, :lines_by_type => @lines_by_type )
+ render :content_type => 'application/json', :json => render_to_string(:partial => 'index', :results => @results, :lines_by_type => @lines_by_type )
}
end
end
def resource
- ctype = 'text/html'
- cpath = nil
- cdata = "File not found"
-
- res = CallMedium.where(:call_id => params[:result_id].to_i).first
-
- if res
- case params[:type]
- when 'big_sig'
- ctype = 'image/png'
- cdata = res.png_sig_freq
- when 'big_sig_dots'
- ctype = 'image/png'
- cdata = res.png_big_dots
- when 'small_sig'
- ctype = 'image/png'
- cdata = res.png_sig
- when 'big_freq'
- ctype = 'image/png'
- cdata = res.png_big_freq
- when 'small_freq'
- ctype = 'image/png'
- cdata = res.png_sig_freq
- when 'mp3'
- ctype = 'audio/mpeg'
- cdata = res.mp3
- when 'sig'
- ctype = 'text/plain'
- cdata = res.fprint
- when 'raw'
- ctype = 'octet/binary-stream'
- cdata = res.audio
- end
- end
+ ctype = 'text/html'
+ cpath = nil
+ cdata = "File not found"
+
+ res = CallMedium.where(:call_id => params[:result_id].to_i).first
+
+ if res
+ case params[:rtype]
+ when 'big_sig'
+ ctype = 'image/png'
+ cdata = res.png_sig_freq
+ when 'big_sig_dots'
+ ctype = 'image/png'
+ cdata = res.png_big_dots
+ when 'small_sig'
+ ctype = 'image/png'
+ cdata = res.png_sig
+ when 'big_freq'
+ ctype = 'image/png'
+ cdata = res.png_big_freq
+ when 'small_freq'
+ ctype = 'image/png'
+ cdata = res.png_sig_freq
+ when 'mp3'
+ ctype = 'audio/mpeg'
+ cdata = res.mp3
+ when 'sig'
+ ctype = 'text/plain'
+ cdata = res.fprint
+ when 'raw'
+ ctype = 'octet/binary-stream'
+ cdata = res.audio
+ end
+ end
send_data(cdata, :type => ctype, :disposition => 'inline')
end
-
-
+ #
# Generate a SQL sort by option based on the incoming DataTables paramater.
#
# Returns the SQL String.
def calls_sort_option
column = case params[:iSortCol_0].to_s
- when '1'
- 'number'
- when '2'
- 'line_type'
- when '3'
- 'peak_freq'
- end
+ when '1'
+ 'number'
+ when '2'
+ 'line_type'
+ when '3'
+ 'peak_freq'
+ end
column + ' ' + (params[:sSortDir_0] =~ /^A/i ? 'asc' : 'desc') if column
end
def calls_search
- @search_conditions = []
- terms = params[:sSearch].to_s
- terms = Shellword.shellwords(terms) rescue terms.split(/\s+/)
- where = "job_id = ? AND analysis_completed_at IS NOT NULL "
- 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
- freq = $1.to_i
- where << "( peak_freq > ? AND peak_freq < ? ) "
- param << freq - 5.0
- param << freq + 5.0
- else
- where << "( number ILIKE ? OR caller_id ILIKE ? OR line_type ILIKE ? ) "
- param << "%#{w}%"
- param << "%#{w}%"
- param << "%#{w}%"
- end
- glue = "AND " if glue.empty?
- end
+ @search_conditions = []
+ terms = params[:sSearch].to_s
+ terms = Shellword.shellwords(terms) rescue terms.split(/\s+/)
+ where = "job_id = ? AND analysis_completed_at IS NOT NULL "
+ 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
+ freq = $1.to_i
+ where << "( peak_freq > ? AND peak_freq < ? ) "
+ param << freq - 5.0
+ param << freq + 5.0
+ else
+ where << "( number ILIKE ? OR caller_id ILIKE ? OR line_type ILIKE ? ) "
+ param << "%#{w}%"
+ param << "%#{w}%"
+ param << "%#{w}%"
+ end
+ glue = "AND " if glue.empty?
+ end
@search_conditions = [ where, *param ]
end
def project_search
- @search_conditions = []
- terms = params[:sSearch].to_s
- terms = Shellword.shellwords(terms) rescue terms.split(/\s+/)
- where = "project_id = ? AND analysis_completed_at IS NOT NULL "
- param = [ @project.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
- freq = $1.to_i
- where << "( peak_freq > ? AND peak_freq < ? ) "
- param << freq - 5.0
- param << freq + 5.0
- else
- where << "( number ILIKE ? OR caller_id ILIKE ? OR line_type ILIKE ? ) "
- param << "%#{w}%"
- param << "%#{w}%"
- param << "%#{w}%"
- end
- glue = "AND " if glue.empty?
- end
- @search_conditions = [ where, *param ]
+ @search_conditions = []
+ terms = params[:sSearch].to_s
+ terms = Shellword.shellwords(terms) rescue terms.split(/\s+/)
+ where = "project_id = ? AND analysis_completed_at IS NOT NULL "
+ param = [ @project.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
+ freq = $1.to_i
+ where << "( peak_freq > ? AND peak_freq < ? ) "
+ param << freq - 5.0
+ param << freq + 5.0
+ else
+ where << "( number ILIKE ? OR caller_id ILIKE ? OR line_type ILIKE ? ) "
+ param << "%#{w}%"
+ param << "%#{w}%"
+ param << "%#{w}%"
+ end
+ glue = "AND " if glue.empty?
+ end
+ @search_conditions = [ where, *param ]
end
-
end
DIR diff --git a/app/views/analyze/index.html.erb b/app/views/analyze/index.html.erb
@@ -17,10 +17,10 @@
<table width='100%' border=0 cellpadding=6>
<tbody><tr>
<td>
- <%= submit_checkboxes_to(raw('<i class="icon-refresh"></i> ReDial'), new_dialer_project_job_path(@project), { :class => "btn any" }) %>
+ <%= submit_checkboxes_to(raw('<i class="fa fa-refresh"></i> ReDial'), new_dialer_project_job_path(@project), { :class => "btn any" }) %>
</td>
<td>
- <%= submit_checkboxes_to(raw('<i class="icon-trash"></i> Delete'), purge_calls_project_job_path, { :class => "btn any ", :confirm => 'Delete selected calls?' }) %>
+ <%= submit_checkboxes_to(raw('<i class="fa fa-trash"></i> Delete'), purge_calls_project_job_path, { :class => "btn any ", :confirm => 'Delete selected calls?' }) %>
</td>
</tr></tbody></table>
DIR diff --git a/app/views/analyze/view.html.erb b/app/views/analyze/view.html.erb
@@ -17,10 +17,10 @@
<table width='100%' border=0 cellpadding=6>
<tbody><tr>
<td>
- <%= submit_checkboxes_to(raw('<i class="icon-refresh"></i> Scan'), new_dialer_job_path, { :class => "btn any" }) %>
+ <%= submit_checkboxes_to(raw('<i class="fa fa-refresh"></i> Scan'), new_dialer_job_path, { :class => "btn any" }) %>
</td>
<td>
- <%= submit_checkboxes_to(raw('<i class="icon-trash"></i> Delete'), purge_calls_job_path, { :class => "btn any ", :confirm => 'Purge selected calls?' }) %>
+ <%= submit_checkboxes_to(raw('<i class="fa fa-trash"></i> Delete'), purge_calls_job_path, { :class => "btn any ", :confirm => 'Purge selected calls?' }) %>
</td>
</tr></tbody></table>
DIR diff --git a/app/views/calls/index.html.erb b/app/views/calls/index.html.erb
@@ -7,7 +7,7 @@
<tr>
<th>ID</th>
<th>Range</th>
- <th>CallerID</th>
+ <th>CallerID</th>
<th>Connected</th>
<th>Date</th>
<th>Actions</th>
@@ -21,24 +21,25 @@
<td><%= job.range %></td>
<td><%= job.cid_mask %></td>
<td><%= (
- job.calls.where("analysis_completed_at IS NOT NULL").count.to_s +
- "/" +
- job.calls.count.to_s
- )%></td>
+ job.calls.where("analysis_completed_at IS NOT NULL").count.to_s +
+ "/" +
+ job.calls.count.to_s
+ )%></td>
<td><%= job.started_at.localtime.strftime("%Y-%m-%d %H:%M:%S") %></td>
<td>
- <a class="btn" href="<%= view_call_path(@project,job) %>" rel="tooltip" title="View Call Connections" ><i class="icon-bar-chart"></i></a>
- <% if job.calls.where("analysis_completed_at IS NOT NULL").count > 0 %>
- <a class="btn" href="<%= analyze_call_path(@project,job) %>" rel="tooltip" title="View Call Analysis"><i class="icon-eye-open"></i></a>
- <a class="btn" href="<%= reanalyze_call_path(@project,job) %>" data-confirm="Reprocess this job?" rel="nofollow tooltip" title="Rerun Call Analysis"><i class="icon-refresh"></i></a>
- <% else %>
- <a class="btn" href="<%= analyze_call_path(@project,job) %>" data-confirm="Analyze this job?" rel="nofollow tooltip" title="Run Call Analysis"><i class="icon-bolt"></i></a>
- <% end %>
+ <a role="button" class="btn" href="<%= view_call_path(@project,job) %>" rel="tooltip" title="View Call Connections"><i class="fa fa-bar-chart"></i></a>
- <a class="btn" href="<%= call_path(@project,job) %>" data-confirm="Delete all data for this job?" data-method="delete" rel="nofollow tooltip" title="Delete Call Data"><i class="icon-trash"></i></a>
- </td>
+ <% if job.calls.where("analysis_completed_at IS NOT NULL").count > 0 %>
+ <a role="button" class="btn" href="<%= analyze_call_path(@project,job) %>" rel="tooltip" title="View Call Analysis"><i class="fa fa-pie-chart"></i></a>
+ <a role="button" class="btn" href="<%= reanalyze_call_path(@project,job) %>" data-confirm="Reprocess this job?" rel="nofollow tooltip" title="Rerun Call Analysis"><i class="fa fa-refresh"></i></a>
+ <% else %>
+ <a role="button" class="btn" href="<%= analyze_call_path(@project,job) %>" data-confirm="Analyze this job?" rel="nofollow tooltip" title="Run Call Analysis"><i class="fa fa-bolt"></i></a>
+ <% end %>
+
+ <a role="button" class="btn" href="<%= call_path(@project,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>
+ </td>
</tr>
<% end %>
@@ -54,4 +55,4 @@
<% end %>
-<a class="btn" href="<%= new_dialer_job_path %>"><i class="icon-plus"></i> Start Job </a>
+<a role="button" class="btn" href="<%= new_dialer_job_path %>"><i class="fa fa-plus"></i> Start Job </a>
DIR diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb
@@ -6,7 +6,7 @@
<b>WarVOX</b> is a product of <a href="http://www.rapid7.com/">Rapid7</a> and is provided as
free software. WarVOX is intended for legal security assessment, asset inventory,
-and research purposes only. The latest version of WarVOX can be found in <i class="icon-github"></i> GitHub at the following url
+and research purposes only. The latest version of WarVOX can be found in <i class="fa fa-github"></i> GitHub at the following url
<a href="https://github.com/rapid7/warvox/"> https://github.com/rapid7/warvox/</a>. The primary developer of WarVOX is <a href="mailto:hdm@rapid7.com">HD Moore</a>.
</div>
DIR diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
@@ -2,10 +2,10 @@
<div class="span3">
<div class="sidebar">
<ul class="nav nav-list">
- <li class="active"><a href="#"><i class="icon-play"></i> Getting Started</a></li>
- <li><a href="#"><i class="icon-book"></i> Library</a></li>
- <li><a href="#"><i class="icon-pencil"></i> Applications</a></li>
- <li><a href="#"><i class="icon-cogs"></i> Settings</a></li>
+ <li class="active"><a href="#"><i class="fa fa-play"></i> Getting Started</a></li>
+ <li><a href="#"><i class="fa fa-book"></i> Library</a></li>
+ <li><a href="#"><i class="fa fa-pencil"></i> Applications</a></li>
+ <li><a href="#"><i class="fa fa-cogs"></i> Settings</a></li>
</ul>
</div>
</div>
DIR diff --git a/app/views/jobs/index.html.erb b/app/views/jobs/index.html.erb
@@ -20,7 +20,7 @@
<td><%= time_ago_in_words(job.created_at) %> ago</td>
<td>
- <a class="btn" href="<%= job_path(job) %>" data-confirm="Remove this job?" data-method="delete" rel="nofollow tooltip" title="Remove Job"><i class="icon-remove"></i></a>
+ <a class="btn" href="<%= job_path(job) %>" data-confirm="Remove this job?" data-method="delete" rel="nofollow tooltip" title="Remove Job"><i class="fa fa-remove"></i></a>
</td>
<td><%= link_to( h(truncate(job.project.name, :length => 25)), project_path(job.project)) %></td>
</tr>
@@ -59,12 +59,12 @@
<td><%= time_ago_in_words(job.created_at) %> ago</td>
<td>
<% if job.task == "dialer" %>
- <a class="btn" href="<%= view_results_path(job.project,job) %>" rel="tooltip" title="View Current Stats" ><i class="icon-zoom-in"></i></a>
+ <a class="btn" href="<%= view_results_path(job.project,job) %>" rel="tooltip" title="View Current Stats" ><i class="fa fa-eye"></i></a>
<% end %>
<% if job.task == "analysis" and job.details[:scope].to_s != "calls" %>
- <a class="btn" href="<%= view_analyze_path(job.project,job.details[:target_id]) %>" rel="tooltip" title="View Call Analysis"><i class="icon-eye-open"></i></a>
+ <a class="btn" href="<%= view_analyze_path(job.project,job.details[:target_id]) %>" rel="tooltip" title="View Call Analysis"><i class="fa fa-pie-chart"></i></a>
<% end %>
- <a class="btn" href="<%= stop_job_path(job) %>" data-confirm="Terminate this job?" rel="nofollow tooltip" title="Terminate Job"><i class="icon-stop"></i></a>
+ <a class="btn" href="<%= stop_job_path(job) %>" data-confirm="Terminate this job?" rel="nofollow tooltip" title="Terminate Job"><i class="fa fa-stop"></i></a>
</td>
<td><%= link_to( h(truncate(job.project.name, :length => 25)), project_path(job.project)) %></td>
</tr>
@@ -78,7 +78,7 @@
<h1 class='title'>No Active Jobs</h1>
<% end %>
-<a class="btn" href="<%= new_dialer_job_path %>"><i class="icon-phone"></i> <strong>Wardial</strong></a>
+<a class="btn" href="<%= new_dialer_job_path %>"><i class="fa fa-phone"></i> <strong>Wardial</strong></a>
<% if(@inactive_jobs.length > 0) %>
<br/><br/>
DIR diff --git a/app/views/jobs/new_analyze.html.erb b/app/views/jobs/new_analyze.html.erb
@@ -11,7 +11,7 @@
<%= f.input :force, :as => :boolean, :label => 'Process previously analyzed calls?', :input_html => { :value => 0 } %>
<%= f.action :submit, :label => 'Analyze', :button_html => { :class => 'btn btn-large fbtn' } %>
- <a class="btn btn-link" href="<%= project_path(@project) %>" rel="tooltip" title="Return to project"><i class="icon-return"></i>Cancel</a>
+ <a class="btn btn-link" href="<%= project_path(@project) %>" rel="tooltip" title="Return to project"><i class="fa fa-return"></i>Cancel</a>
<% end %>
<%= set_focus('job_submit') %>
DIR diff --git a/app/views/jobs/new_dialer.html.erb b/app/views/jobs/new_dialer.html.erb
@@ -20,7 +20,7 @@
<%= f.action :submit, :label => 'Dial', :button_html => { :class => 'btn btn-large fbtn' } %>
- <a class="btn btn-link" href="<%= jobs_path %>" rel="tooltip" title="Return to jobs"><i class="icon-return"></i>Cancel</a>
+ <a class="btn btn-link" href="<%= jobs_path %>" rel="tooltip" title="Return to jobs"><i class="fa fa-return"></i>Cancel</a>
<% end %>
<%= set_focus('job_range') %>
DIR diff --git a/app/views/jobs/results.html.erb b/app/views/jobs/results.html.erb
@@ -19,56 +19,56 @@
<% @jobs.each do |job|
- cnt_dialed = job.calls.count.to_i
- cnt_answered = job.calls.where("answered = ? and busy = ?", true, false).count.to_i
- cnt_analyzed = job.calls.where("analysis_completed_at IS NOT NULL").count.to_i
- pct_answered = 0
- pct_analyzed = 0
- unless cnt_dialed == 0
- pct_answered = ((cnt_answered.to_f / cnt_dialed.to_f) * 100).to_i
- end
- unless cnt_answered == 0
- pct_analyzed = ((cnt_analyzed.to_f / cnt_answered.to_f) * 100).to_i
- end
+ cnt_dialed = job.calls.count.to_i
+ cnt_answered = job.calls.where("answered = ? and busy = ?", true, false).count.to_i
+ cnt_analyzed = job.calls.where("analysis_completed_at IS NOT NULL").count.to_i
+ pct_answered = 0
+ pct_analyzed = 0
+ unless cnt_dialed == 0
+ pct_answered = ((cnt_answered.to_f / cnt_dialed.to_f) * 100).to_i
+ end
+ unless cnt_answered == 0
+ pct_analyzed = ((cnt_analyzed.to_f / cnt_answered.to_f) * 100).to_i
+ end
%>
<tr>
<td><%= job.id %></td>
<td><%= format_job_details(job) %></td>
<td>
- <% if job.task == "dialer" %>
- <%= truncate(job.details[:range].to_s, :length => 15) %> /
- <%= job.details[:cid_mask].to_s %>
- <% end %>
- <span rel="tooltip" class="xtooltip" title="<%= job.details[:directory].to_s %>">
- <%= truncate(job.details[:directory].to_s, :length => 15) %>
- <% if job.task == "importer" %>
+ <% if job.task == "dialer" %>
+ <%= truncate(job.details[:range].to_s, :length => 15) %> /
+ <%= job.details[:cid_mask].to_s %>
+ <% end %>
+ <span rel="tooltip" class="xtooltip" title="<%= job.details[:directory].to_s %>">
+ <%= truncate(job.details[:directory].to_s, :length => 15) %>
+ <% if job.task == "importer" %>
- <% end %>
+ <% end %>
</td>
<td><span rel="tooltip" class="xtooltip" title="<%= pct_answered %>% answered"><%= number_with_delimiter(cnt_answered) %> / <%= number_with_delimiter(cnt_dialed) %></span></td>
<td><span rel="tooltip" class="xtooltip" title="<%= pct_analyzed %>% analyzed"><%= number_with_delimiter(cnt_analyzed) %></span></td>
- <td><%= time_ago_in_words(job.created_at) %> ago</td>
- <td><%= job.created_by %></td>
+ <td><%= time_ago_in_words(job.created_at) %> ago</td>
+ <td><%= job.created_by %></td>
<td>
- <a class="btn" href="<%= view_results_path(@project,job) %>" rel="tooltip" title="View Call Connections" ><i class="icon-zoom-in"></i></a>
+ <a role="button" class="btn" href="<%= view_results_path(@project,job) %>" rel="tooltip" title="View Call Connections" ><i class="fa fa-eye"></i></a>
- <% if cnt_analyzed > 0 %>
- <a class="btn" href="<%= view_analyze_path(@project,job) %>" rel="tooltip" title="View Call Analysis"><i class="icon-eye-open"></i></a>
- <% if pct_analyzed == 100 %>
- <a class="btn" href="<%= reanalyze_job_path(@project,job) %>" data-confirm="Reprocess this job?" rel="nofollow tooltip" title="Rerun Call Analysis"><i class="icon-refresh"></i></a>
- <% else %>
- <a class="btn" href="<%= analyze_job_path(@project,job) %>" data-confirm="Continue to process this job?" rel="nofollow tooltip" title="Finish Call Analysis"><i class="icon-cogs"></i></a>
- <% end %>
- <% else %>
- <% if cnt_answered > 0 %>
- <a class="btn" href="<%= analyze_job_path(@project,job) %>" data-confirm="Analyze this job?" rel="nofollow tooltip" title="Run Call Analysis"><i class="icon-cogs"></i></a>
- <% end %>
- <% end %>
+ <% if cnt_analyzed > 0 %>
+ <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>
+ <% if pct_analyzed == 100 %>
+ <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>
+ <% else %>
+ <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>
+ <% end %>
+ <% else %>
+ <% if cnt_answered > 0 %>
+ <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>
+ <% end %>
+ <% end %>
- <a 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="icon-trash"></i></a>
- </td>
+ <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>
+ </td>
</tr>
<% end %>
@@ -84,4 +84,4 @@
<% end %>
-<a class="btn" href="<%= new_dialer_project_job_path(@project) %>"><i class="icon-phone"></i> <strong>Wardial</strong></a>
+<a role="button" class="btn" href="<%= new_dialer_project_job_path(@project) %>"><i class="fa fa-phone"></i> <strong>Wardial</strong></a>
DIR diff --git a/app/views/jobs/view_results.html.erb b/app/views/jobs/view_results.html.erb
@@ -16,11 +16,11 @@
<table width='100%' border=0 cellpadding=6>
<tbody><tr>
<td>
- <%= submit_checkboxes_to(raw('<i class="icon-refresh"></i> Scan'), new_dialer_job_path, { :class => "btn btn any" }) %>
+ <%= submit_checkboxes_to(raw('<i class="fa fa-refresh"></i> Scan'), new_dialer_job_path, { :class => "btn btn any" }) %>
</td><td>
- <%= submit_checkboxes_to(raw('<i class="icon-cog"></i> Analyze'), analyze_job_path, { :class => "btn btn any" }) %>
+ <%= submit_checkboxes_to(raw('<i class="fa fa-cog"></i> Analyze'), analyze_job_path, { :class => "btn btn any" }) %>
</td><td>
- <%= submit_checkboxes_to(raw('<i class="icon-trash"></i> Delete'), purge_calls_job_path, { :class => "btn any", :confirm => 'Purge selected calls?' }) %>
+ <%= submit_checkboxes_to(raw('<i class="fa fa-trash"></i> Delete'), purge_calls_job_path, { :class => "btn any", :confirm => 'Purge selected calls?' }) %>
</td>
</tr></tbody></table>
DIR diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
@@ -32,50 +32,8 @@
<% end %>
</head>
<body>
- <div class="container">
- <%= nav_bar :fixed => :top, :brand => raw('<img src="/assets/logo_light.png" border=0 alt="WarVOX">'), :responsive => true do %>
-
- <%= menu_group :pull => :right do %>
- <% if @project and @project.id %>
- <li>
- <%= link_to(
- raw(
- '<i class="icon-chevron-left icon-white"></i> ' +
- h(truncate(@project.name, :length => 20)) +
- ' <i class="icon-chevron-right icon-white"></i>'), project_path(@project), :class => 'project-title') %>
- </li>
- <%= menu_item "Scans", results_path(@project) %>
- <%= menu_item "Analysis", analyze_path(@project)%>
- <% end %>
-
- <%= menu_item "Jobs", jobs_path %>
- <%= drop_down "Projects" do %>
- <% if Project.count > 0 %>
- <%= menu_item raw('<i class="icon-list"></i> Browse Projects'),projects_path %>
- <% end %>
- <%= menu_item raw('<i class="icon-plus"></i> Create Project'), new_project_path %>
- <% if Project.count > 0 %>
- <%= drop_down_divider %>
- <%= drop_down_header "Recent Projects" %>
- <% Project.order('ID DESC').limit(5).each do |project| %>
- <%= menu_item raw('<i class="icon-chevron-right"></i> ' + h(truncate(project.name, :length => 15))),project_path(project) %>
- <% end %>
- <% end %>
- <% end %>
-
- <%= drop_down "Admin" do %>
- <%= menu_item raw('<i class="icon-user"></i> My Account'), user_path(current_user) %>
- <%= menu_item raw('<i class="icon-globe"></i> Providers'), providers_path %>
- <%= menu_item raw('<i class="icon-wrench"></i> Config'), settings_path %>
- <%= menu_item raw('<i class="icon-info-sign"></i> About'), about_path %>
- <% end %>
-
- <%= menu_item raw('<div class="help-icon"><i class="icon-signout icon-white" rel="tooltip" title="Logout"></i></div>'), logout_path %>
-
- <%= menu_item raw('<div class="help-icon"><i class="icon-question-sign icon-white" rel="tooltip" title="Help!"></i></div>'), check_path %>
- <% end %>
- <% end %>
-
+ <%= render 'nav' %>
+ <div class="container" id="main">
<div class="row">
<div class="span12">
<div class="content">
@@ -85,7 +43,7 @@
</div>
<footer class="footer">
- <p>WarVOX v<%=WarVOX::VERSION %> © 2009-<%= Time.now.year%> Rapid7, Inc</p>
+ <p>WarVOX v<%=WarVOX::VERSION %> © 2009-<%= Time.now.year %> Rapid7, Inc</p>
</footer>
</div>
DIR diff --git a/app/views/projects/edit.html.erb b/app/views/projects/edit.html.erb
@@ -4,7 +4,7 @@
<%= f.input :name, :as => :string, :label => 'Name' %>
<%= f.input :description, :as => :text, :input_html => { :class => 'project_description' } %>
<%= f.action :submit, :label => 'Update', :button_html => { :class => 'btn btn-large fbtn' } %>
- <a class="btn btn-link" href="<%= projects_path %>"rel="tooltip" title="Return to projects"><i class="icon-return"></i>Cancel</a>
+ <a class="btn btn-link" href="<%= projects_path %>"rel="tooltip" title="Return to projects"><i class="fa fa-return"></i>Cancel</a>
<% end %>
<%= set_focus('project_name') %>
DIR diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
@@ -25,8 +25,8 @@
<td><%= number_with_delimiter(project.calls.where('analysis_completed_at IS NOT NULL').count) %></td>
<td><%= time_ago_in_words(project.created_at) %> ago</td>
<td>
- <a class="btn" href="<%= edit_project_path(project) %>"rel="tooltip" title="Update Project Information"><i class="icon-pencil"></i></a>
- <a class="btn" href="<%= project_path(project) %>" data-confirm="Delete this project?" data-method="delete" rel="nofollow tooltip" title="Delete Project"><i class="icon-trash"></i></a>
+ <a class="btn" href="<%= edit_project_path(project) %>"rel="tooltip" title="Update Project Information"><i class="fa fa-pencil"></i></a>
+ <a class="btn" href="<%= project_path(project) %>" data-confirm="Delete this project?" data-method="delete" rel="nofollow tooltip" title="Delete Project"><i class="fa fa-trash"></i></a>
</td>
</tr>
@@ -43,4 +43,4 @@
<% end %>
-<a class="btn" href="<%= new_project_path %>"><i class="icon-plus"></i> Create Project </a>
+<a class="btn" href="<%= new_project_path %>"><i class="fa fa-plus"></i> Create Project </a>
DIR diff --git a/app/views/projects/new.html.erb b/app/views/projects/new.html.erb
@@ -4,7 +4,7 @@
<%= f.input :name, :as => :string, :label => 'Name', :input_html => { :autofocus => true } %>
<%= f.input :description, :as => :text, :input_html => { :class => 'project_description' } %>
<%= f.action :submit, :label => 'Create', :button_html => { :class => 'btn btn-large fbtn' } %>
- <a class="btn btn-link" href="<%= projects_path %>"rel="tooltip" title="Return to projects"><i class="icon-return"></i>Cancel</a>
+ <a class="btn btn-link" href="<%= projects_path %>"rel="tooltip" title="Return to projects"><i class="fa fa-return"></i>Cancel</a>
<% end %>
<%= set_focus('project_name') %>
DIR diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
@@ -1,6 +1,6 @@
<div class="row-fluid">
<div class="span12">
- <a class="btn btn-small pull-right" href="<%= edit_project_path(@project) %>" rel="tooltip" title="Update project settings"><i class="icon-wrench"></i> Settings</a>
+ <a class="btn btn-small pull-right" href="<%= edit_project_path(@project) %>" rel="tooltip" title="Update project settings"><i class="fa fa-wrench"></i> Settings</a>
<h1 class='title'>Project <%= @project.name %></h1>
<p class='project-header'><%=h @project.description %></p>
</div>
@@ -16,15 +16,15 @@
<div class="span9">
<div class="row-fluid">
<div class="span2"> </div>
- <div class="span2"><a href="<%= new_dialer_project_job_path(@project) %>" class="btn" rel="tooltip" title="Gather data by dialing a range of numbers"><i class="icon-phone"></i> <strong>Wardial</strong></a></div>
+ <div class="span2"><a href="<%= new_dialer_project_job_path(@project) %>" class="btn" rel="tooltip" title="Gather data by dialing a range of numbers"><i class="fa fa-phone"></i> <strong>Wardial</strong></a></div>
<% if @boxes[:answered][:cnt] > 0 %>
- <div class="span2"><a href="<%= new_analyze_project_job_path(@project) %>" class="btn" rel="tooltip" title="Analyze call data to determine line types and frequencies"><i class="icon-cogs"></i> <strong>Analyze</strong></a></div>
- <div class="span2"><a href="#" class="btn" rel="tooltip" title="Look up meta-information about specific lines"><i class="icon-user"></i> <strong>Identify</strong></a></div>
- <div class="span2"><a href="#" class="btn" rel="tooltip" title="Signal analysis and other research tools"><i class="icon-star"></i> <strong>Research</strong></a></div>
+ <div class="span2"><a href="<%= new_analyze_project_job_path(@project) %>" class="btn" rel="tooltip" title="Analyze call data to determine line types and frequencies"><i class="fa fa-cogs"></i> <strong>Analyze</strong></a></div>
+ <div class="span2"><a href="#" class="btn" rel="tooltip" title="Look up meta-information about specific lines"><i class="fa fa-user"></i> <strong>Identify</strong></a></div>
+ <div class="span2"><a href="#" class="btn" rel="tooltip" title="Signal analysis and other research tools"><i class="fa fa-star"></i> <strong>Research</strong></a></div>
<% else %>
- <div class="span2"><a href="#" class="btn disabled" rel="tooltip" title="No call data is available to analyze"><i class="icon-cogs"></i> <strong>Analyze</strong></a></div>
- <div class="span2"><a href="#" class="btn" rel="tooltip" title="Look up meta-information about specific lines"><i class="icon-user"></i> <strong>Identify</strong></a></div>
- <div class="span2"><a href="#" class="btn disabled" rel="tooltip" title="No call data is available to research"><i class="icon-star"></i> <strong>Research</strong></a></div>
+ <div class="span2"><a href="#" class="btn disabled" rel="tooltip" title="No call data is available to analyze"><i class="fa fa-cogs"></i> <strong>Analyze</strong></a></div>
+ <div class="span2"><a href="#" class="btn" rel="tooltip" title="Look up meta-information about specific lines"><i class="fa fa-user"></i> <strong>Identify</strong></a></div>
+ <div class="span2"><a href="#" class="btn disabled" rel="tooltip" title="No call data is available to research"><i class="fa fa-star"></i> <strong>Research</strong></a></div>
<% end %>
<div class="span2"> </div>
</div>
@@ -32,7 +32,7 @@
</div>
<div class="row-fluid">
- <div class="span3 arrow-down"><i class="icon-arrow-down"></i></div>
+ <div class="span3 arrow-down"><i class="fa fa-arrow-down"></i></div>
<div class="span9"> </div>
</div>
@@ -47,7 +47,7 @@
</div>
<div class="row-fluid">
- <div class="span3 arrow-down"><i class="icon-arrow-down"></i></div>
+ <div class="span3 arrow-down"><i class="fa fa-arrow-down"></i></div>
<div class="span9"> </div>
</div>
@@ -62,7 +62,7 @@
</div>
<div class="row-fluid">
- <div class="span3 arrow-down"><i class="icon-arrow-down"></i></div>
+ <div class="span3 arrow-down"><i class="fa fa-arrow-down"></i></div>
<div class="span9"> </div>
</div>
@@ -169,12 +169,12 @@
<td><%= time_ago_in_words(job.created_at) %> ago</td>
<td>
<% if job.task == "dialer" %>
- <a class="btn" href="<%= view_results_path(job.project,job) %>" rel="tooltip" title="View Current Stats" ><i class="icon-zoom-in"></i></a>
+ <a class="btn" href="<%= view_results_path(job.project,job) %>" rel="tooltip" title="View Current Stats" ><i class="fa fa-eye"></i></a>
<% end %>
<% if job.task == "analysis" and job.details[:scope].to_s != "calls" %>
- <a class="btn" href="<%= view_analyze_path(job.project,job.details[:target_id]||job.id) %>" rel="tooltip" title="View Call Analysis"><i class="icon-eye-open"></i></a>
+ <a class="btn" href="<%= view_analyze_path(job.project,job.details[:target_id]||job.id) %>" rel="tooltip" title="View Call Analysis"><i class="fa fa-pie-chart"></i></a>
<% end %>
- <a class="btn" href="<%= stop_job_path(job) %>" data-confirm="Terminate this job?" rel="nofollow tooltip" title="Terminate Job"><i class="icon-stop"></i></a>
+ <a class="btn" href="<%= stop_job_path(job) %>" data-confirm="Terminate this job?" rel="nofollow tooltip" title="Terminate Job"><i class="fa fa-stop"></i></a>
</td>
</tr>
<% end %>
DIR diff --git a/app/views/providers/edit.html.erb b/app/views/providers/edit.html.erb
@@ -10,5 +10,5 @@
<%= f.input :lines, :as => :number, :label => 'Maximum Lines', :hint => 'Maximum concurrent outbound lines' %>
<%= f.action :submit, :label => 'Update', :button_html => { :class => 'btn btn-large fbtn' } %>
- <a class="btn btn-link" href="<%= providers_path %>" rel="tooltip" title="Return to providers"><i class="icon-return"></i>Cancel</a>
+ <a class="btn btn-link" href="<%= providers_path %>" rel="tooltip" title="Return to providers"><i class="fa fa-return"></i>Cancel</a>
<% end %>
DIR diff --git a/app/views/providers/index.html.erb b/app/views/providers/index.html.erb
@@ -17,7 +17,7 @@
<% @providers.each do |provider| %>
<tr>
<td>
- <i class="icon-<%= provider.enabled ? "ok" : "remove" %>"></i>
+ <i class="fa fa-<%= provider.enabled ? "ok" : "remove" %>"></i>
</td>
<td><%= provider.name %></td>
<td><%= provider.host %></td>
@@ -25,8 +25,8 @@
<td><%= provider.user %></td>
<td><%= provider.lines %></td>
<td>
- <a class="btn" href="<%= edit_provider_path(provider) %>"rel="tooltip" title="Update Provider Information"><i class="icon-pencil"></i></a>
- <a class="btn" href="<%= provider_path(provider) %>" data-confirm="Remove this provider?" data-method="delete" rel="nofollow tooltip" title="Remove Provider"><i class="icon-trash"></i></a>
+ <a class="btn" href="<%= edit_provider_path(provider) %>"rel="tooltip" title="Update Provider Information"><i class="fa fa-pencil"></i></a>
+ <a class="btn" href="<%= provider_path(provider) %>" data-confirm="Remove this provider?" data-method="delete" rel="nofollow tooltip" title="Remove Provider"><i class="fa fa-trash"></i></a>
</td>
</tr>
<% end %>
@@ -37,4 +37,4 @@
<% end %>
<br/>
-<a class="btn" href="<%= new_provider_path %>"><i class="icon-plus"></i> Add Provider </a>
+<a class="btn" href="<%= new_provider_path %>"><i class="fa fa-plus"></i> Add Provider </a>
DIR diff --git a/app/views/providers/new.html.erb b/app/views/providers/new.html.erb
@@ -9,5 +9,5 @@
<%= f.input :lines, :as => :number, :label => 'Maximum Lines', :hint => 'Maximum concurrent outbound lines' %>
<%= f.action :submit, :label => 'Create', :button_html => { :class => 'btn btn-large fbtn' } %>
- <a class="btn btn-link" href="<%= providers_path %>" rel="tooltip" title="Return to providers"><i class="icon-return"></i>Cancel</a>
+ <a class="btn btn-link" href="<%= providers_path %>" rel="tooltip" title="Return to providers"><i class="fa fa-return"></i>Cancel</a>
<% end %>
DIR diff --git a/app/views/shared/_call_signal.html.erb b/app/views/shared/_call_signal.html.erb
@@ -3,8 +3,8 @@
<% if call.fprint and call.fprint.length > 0 and call != @result %>
<% if @job_id %>
- <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>
+ <a class="btn" href="<%= view_matches_path(call.project_id, call.job_id, call.id) %>" rel="tooltip" title="Search for Matches"><i class="fa fa-search"></i></a>
<% else %>
- <a class="btn" href="<%= view_matches_project_path(call.project_id, call.id) %>" rel="tooltip" title="Search for Matches"><i class="icon-search"></i></a>
+ <a class="btn" href="<%= view_matches_project_path(call.project_id, call.id) %>" rel="tooltip" title="Search for Matches"><i class="fa fa-search"></i></a>
<% end%>
<% end %>
DIR diff --git a/config/routes.rb b/config/routes.rb
@@ -34,7 +34,7 @@ Web::Application.routes.draw do
get '/projects/:project_id/analyze' => 'analyze#index', :as => :analyze
- get '/call/:result_id.:type' => 'analyze#resource', :as => :resource_analyze
+ get '/call/:result_id/:rtype' => 'analyze#resource', :as => :resource_analyze
get '/projects/:project_id/analyze/:id/view' => 'analyze#view', :as => :view_analyze
get '/projects/:project_id/analyze/:job_id/:call_id/matches' => 'analyze#view_matches', :as => :view_matches