Search
j0ke.net Open Build Service
>
Projects
>
ha
:
firewall
:
Snorby
>
Snorby
> 29af37a09cbb037dfb1fd24257bdcef024c15c3e.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 29af37a09cbb037dfb1fd24257bdcef024c15c3e.patch of Package Snorby (Revision 32)
Currently displaying revision
32
,
show latest
commit 29af37a09cbb037dfb1fd24257bdcef024c15c3e Author: Dustin Willis Webber <dustin.webber@gmail.com> Date: Thu Jan 10 16:01:33 2013 -0600 fix @axis null error diff --git a/ChangeLog.md b/ChangeLog.md index c4036e2..dc949eb 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,4 +1,4 @@ -# Snorby 2.5.4 +# Snorby 2.5.4/5 * Patch Multiple vulnerabilities in parameter parsing in Action Pack (CVE-2013-0156) * Fix json parsing issue with new SearchRule() diff --git a/app/controllers/page_controller.rb b/app/controllers/page_controller.rb index 628ef8b..365264d 100644 --- a/app/controllers/page_controller.rb +++ b/app/controllers/page_controller.rb @@ -27,8 +27,10 @@ class PageController < ApplicationController @event_count = @cache.all.map(&:event_count).sum - if @sensor_metrics.last - @axis = @sensor_metrics.last[:range].join(',') + @axis = if @sensor_metrics.last + @sensor_metrics.last[:range].join(',') + else + "" end @classifications = Classification.all(:order => [:events_count.desc]) diff --git a/app/views/page/_graph_event.html.erb b/app/views/page/_graph_event.html.erb index 5548829..3c426c6 100644 --- a/app/views/page/_graph_event.html.erb +++ b/app/views/page/_graph_event.html.erb @@ -19,7 +19,7 @@ x: -20 //center }, xAxis: { - categories: [<%= @axis.html_safe %>], + categories: [<%= @axis.try(:html_safe) %>], title: { margin: 10, <% if (@range == 'year' || @range == 'quarter') %> diff --git a/app/views/page/_graph_protocol.html.erb b/app/views/page/_graph_protocol.html.erb index 93b1e23..8cce0af 100644 --- a/app/views/page/_graph_protocol.html.erb +++ b/app/views/page/_graph_protocol.html.erb @@ -19,7 +19,7 @@ x: -20 //center }, xAxis: { - categories: [<%= @axis.html_safe %>], + categories: [<%= @axis.try(:html_safe) %>], title: { margin: 10, <% if (@range == 'year' || @range == 'quarter') %> diff --git a/app/views/page/_graph_severity.html.erb b/app/views/page/_graph_severity.html.erb index 3c40ed6..ad14444 100644 --- a/app/views/page/_graph_severity.html.erb +++ b/app/views/page/_graph_severity.html.erb @@ -19,7 +19,7 @@ x: -20 //center }, xAxis: { - categories: [<%= @axis.html_safe %>], + categories: [<%= @axis.try(:html_safe) %>], title: { margin: 10, <% if (@range == 'year' || @range == 'quarter') %>