lib/controllers/dashboard.rb in wackamole-0.0.3 vs lib/controllers/dashboard.rb in wackamole-0.0.4

- old
+ new

@@ -6,11 +6,10 @@ # --------------------------------------------------------------------------- # Show application dashboard get '/dashboard/:app_name/:stage' do Wackamole::Control.switch_mole_db!( params[:app_name].downcase, params[:stage] ) - ensure_indexes! load_app_details # Reset app info load_app_info @@ -23,8 +22,21 @@ # --------------------------------------------------------------------------- # Refresh dashboard get '/dashboard/refresh' do load_app_details erb :'dashboard/refresh_js', :layout => false + end + + # --------------------------------------------------------------------------- + get '/dashboard/logs/:app_name/:stage/:type' do + Wackamole::Control.switch_mole_db!( params[:app_name].downcase, params[:stage] ) + load_app_details + load_app_info + + filter = Wackamole::SearchFilter.new + filter.mole_type( params[:type].to_i ) +puts "SETTING FILTER", filter.inspect + session[:filter] = filter + redirect '/logs/1' end end \ No newline at end of file