Method: WebTools::Support::AppModel#session_report
- Defined in:
- lib/web_tools/support/app_model.rb
#session_report ⇒ Object
Returns a hash of configuration parameters for the stone and the gem. The has has three keys:
+ :timestamp => when the report was generated
+ :headers => array of [name, description] pairs for the fields
+ :report => An array of data. Each entry is an array of the field data.
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/web_tools/support/app_model.rb', line 64 def session_report ts = Time.now now = ts.to_i session_info = Maglev::System.current_session_ids.map do |id| sess_desc = Maglev::System.description_of_session id sess_desc[0] = sess_desc[0].instance_variable_get(:@_st_userId) # UserProfile sess_desc[3] = '' if sess_desc[3] == 0 # Primitive? sess_desc[4] = format_secs(now - sess_desc[4]) # View Age sess_desc[6] = ['none', 'out', 'in'][sess_desc[6] + 1] # Transaction sess_desc[13] = format_secs(now - sess_desc[13]) # Quiet sess_desc[14] = format_secs(now - sess_desc[14]) # Age sess_desc # sess_cache_slot = Maglev::System.cache_slot_for_sessionid id end session_info end |