Class: LogsExplorer::LogsController
Instance Method Summary
collapse
#active?, #format_datetime, #icon, #insert_css_file, #insert_js_file
Instance Method Details
#changes ⇒ Object
11
12
13
14
|
# File 'app/controllers/logs_explorer/logs_controller.rb', line 11
def changes
@lines = log_file.readlines
@total_lines = log_file.total_lines
end
|
#download ⇒ Object
16
17
18
|
# File 'app/controllers/logs_explorer/logs_controller.rb', line 16
def download
send_file log_file.path
end
|
#log_file ⇒ Object
20
21
22
23
24
25
|
# File 'app/controllers/logs_explorer/logs_controller.rb', line 20
def log_file
@log_file ||= begin
item = LogsExplorer.logs.detect {|e| e[:name] == params[:name]}
LogFile.new(path: item[:path], client_total_lines: params[:client_total_lines])
end
end
|
#watch ⇒ Object
9
|
# File 'app/controllers/logs_explorer/logs_controller.rb', line 9
def watch; end
|