Changeset 1557
- Timestamp:
- 04/23/08 09:12:43 (3 weeks ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
hive/trunk/data_webapp/app/controllers/data_controller.rb
r1501 r1557 5 5 # List the latest client data 6 6 def index 7 conditions = {:status => 'compromised'} 8 #@clients = Client.paginate(:conditions => {:status => @status},:order => 'compromise DESC,start DESC',:page => params[:page],:per_page => 10) 7 conditions = {:status => ['compromised','suspicious']} 9 8 @url_pages,@clients = paginate :clients, :conditions => conditions,:order => 'compromise DESC,start DESC',:per_page => 10 10 9 end 11 12 # Show details of the compromise data for a specific client13 def details14 @client = Client.find(params[:id])15 end16 17 # Todo: Move this functionality to each object classs (eg. :controller => process_files, :action => show)18 # Used to display a popup containing single compromise artifact details19 def artifact_details20 @sub_type = @sub_artifact = nil21 case params[:type]22 when 'ProcessFile'23 @artifact = ProcessFile.find(params[:id])24 @type = 'File'25 @sub_artifact = @artifact.file_content26 @sub_type = 'Content'27 when 'OsProcess'28 @artifact = OsProcess.find(params[:id])29 @type = 'Process'30 when 'Regkey'31 @artifact = Regkey.find(params[:id])32 @type = 'Regkey'33 else34 @artifact = @type = nil35 end36 render :layout => 'compromise'37 end38 10 end hive/trunk/data_webapp/app/views/data/index.html.erb
r1501 r1557 3 3 <table style="border: 1px solid #333; vertical-align: center; background-color: #bbeeff"> 4 4 <tr> <td/> 5 <td><h3> Links Visited/Compromised Hourly</h3></td>5 <td><h3>Compromised/Links Visited (Hourly)</h3></td> 6 6 <td/> 7 <td><h3>Recent Compromises</h3></td>7 <td><h3>Recently Suspended Clients</h3></td> 8 8 <td> </td> </tr> 9 9 <tr> <td/>
