Changeset 1557

Show
Ignore:
Timestamp:
04/23/08 09:12:43 (3 weeks ago)
Author:
mbriggs
Message:

Clean up data controller and show recent suspicious on dashboard

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • hive/trunk/data_webapp/app/controllers/data_controller.rb

    r1501 r1557  
    55  # List the latest client data 
    66  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']} 
    98  @url_pages,@clients = paginate :clients, :conditions => conditions,:order => 'compromise DESC,start DESC',:per_page => 10 
    109  end 
    11    
    12   # Show details of the compromise data for a specific client 
    13   def details 
    14     @client = Client.find(params[:id]) 
    15   end 
    16  
    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 details 
    19   def artifact_details 
    20     @sub_type = @sub_artifact = nil 
    21     case params[:type] 
    22       when 'ProcessFile' 
    23         @artifact = ProcessFile.find(params[:id]) 
    24         @type = 'File' 
    25         @sub_artifact = @artifact.file_content 
    26         @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       else 
    34         @artifact = @type = nil 
    35       end 
    36     render :layout => 'compromise' 
    37   end 
    3810end 
  • hive/trunk/data_webapp/app/views/data/index.html.erb

    r1501 r1557  
    33  <table style="border: 1px solid #333; vertical-align: center; background-color: #bbeeff"> 
    44    <tr> <td/> 
    5       <td><h3>Links Visited/Compromised Hourly</h3></td> 
     5      <td><h3>Compromised/Links Visited (Hourly)</h3></td> 
    66      <td/> 
    7       <td><h3>Recent Compromises</h3></td> 
     7      <td><h3>Recently Suspended Clients</h3></td> 
    88    <td>&nbsp;</td> </tr> 
    99    <tr> <td/>