From 5f57bc117ff110d21fe6c130816c208c35f0b987 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Fri, 29 Jul 2011 12:11:56 +0100 Subject: * Added initial logger * Acknowledgement time calculations now in JS * Updated logging to indicate where and update comes from --- lib/mauve/web_interface.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/mauve/web_interface.rb') diff --git a/lib/mauve/web_interface.rb b/lib/mauve/web_interface.rb index 4bb9517..bd1ceb9 100644 --- a/lib/mauve/web_interface.rb +++ b/lib/mauve/web_interface.rb @@ -267,7 +267,6 @@ EOF get '/ajax/time_to_s_human/:seconds' do content_type :text - secs = params[:seconds].to_i Time.at(secs).to_s_human end -- cgit v1.2.1 From b718175601c02b8a251931622e7b79f469645111 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Mon, 1 Aug 2011 15:35:05 +0100 Subject: Updated interface to auto-update nicely. --- lib/mauve/web_interface.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/mauve/web_interface.rb') diff --git a/lib/mauve/web_interface.rb b/lib/mauve/web_interface.rb index bd1ceb9..9369ee3 100644 --- a/lib/mauve/web_interface.rb +++ b/lib/mauve/web_interface.rb @@ -103,11 +103,12 @@ EOF # Uh-oh.. Intruder alert! # ok_urls = %w(/ /login /logout) + no_redirect_urls = %w(/ajax) unless ok_urls.include?(request.path_info) flash['error'] = "You must be logged in to access that page." status 403 - redirect "/login?next_page=#{request.path_info}" + redirect "/login?next_page=#{request.path_info}" unless no_redirect_urls.any?{|u| /^#{u}/ =~ request.path_info } end end end @@ -230,7 +231,7 @@ EOF end end - flash["errors"] = "Failed to acknowledge #{failed.length} alerts." if failed.length > 0 + flash["error"] = "Failed to acknowledge #{failed.length} alerts." if failed.length > 0 flash["notice"] = "Successfully acknowledged #{succeeded.length} alerts" if succeeded.length > 0 redirect "/alerts/raised" -- cgit v1.2.1