mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-11 00:37:06 +02:00
35 lines
451 B
Ruby
35 lines
451 B
Ruby
class FluentdController < ApplicationController
|
|
before_filter :fluentd
|
|
|
|
def index
|
|
end
|
|
|
|
def status
|
|
end
|
|
|
|
def start
|
|
fluentd.start
|
|
render :status
|
|
end
|
|
|
|
def stop
|
|
fluentd.stop
|
|
render :status
|
|
end
|
|
|
|
def reload
|
|
fluentd.reload
|
|
render :status
|
|
end
|
|
|
|
def log
|
|
render text: fluentd.log, content_type: "text/plain"
|
|
end
|
|
|
|
private
|
|
|
|
def fluentd
|
|
@fluentd ||= Fluentd.new(Rails.root + "tmp" + "fluentd")
|
|
end
|
|
end
|