mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-11 00:37:06 +02:00
32 lines
458 B
Ruby
32 lines
458 B
Ruby
class Fluentd::AgentsController < ApplicationController
|
|
before_action :find_fluentd
|
|
|
|
def show
|
|
end
|
|
|
|
def start
|
|
@fluentd.agent.start
|
|
render :show
|
|
end
|
|
|
|
def stop
|
|
@fluentd.agent.stop
|
|
render :show
|
|
end
|
|
|
|
def reload
|
|
@fluentd.agent.reload
|
|
render :show
|
|
end
|
|
|
|
def log
|
|
render text: @fluentd.agent.log, content_type: "text/plain"
|
|
end
|
|
|
|
private
|
|
|
|
def find_fluentd
|
|
@fluentd = Fluentd.find(params[:fluentd_id])
|
|
end
|
|
end
|