mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-12 01:07:09 +02:00
Remove dead/duplicated code
This commit is contained in:
parent
96e66540aa
commit
e37197bf5c
@ -1,11 +1,6 @@
|
||||
class Fluentd::AgentsController < ApplicationController
|
||||
before_action :find_fluentd
|
||||
|
||||
def show
|
||||
@error_count = 10
|
||||
@errors = @fluentd.agent.recent_errors(@error_count)
|
||||
end
|
||||
|
||||
def start
|
||||
unless @fluentd.agent.start
|
||||
flash[:error] = t("error.fluentd_start_failed") + @fluentd.agent.log_tail(1).first
|
||||
@ -27,10 +22,6 @@ class Fluentd::AgentsController < ApplicationController
|
||||
redirect_to fluentd_path(@fluentd), status: 303 # 303 is change HTTP Verb GET
|
||||
end
|
||||
|
||||
def log
|
||||
render text: @fluentd.agent.log, content_type: "text/plain"
|
||||
end
|
||||
|
||||
def log_tail
|
||||
@logs = @fluentd.agent.log_tail(params[:limit]).reverse if @fluentd
|
||||
render json: @logs
|
||||
|
@ -47,10 +47,6 @@ class FluentdController < ApplicationController
|
||||
|
||||
private
|
||||
|
||||
def find_fluentd
|
||||
@fluentd = Fluentd.instance
|
||||
end
|
||||
|
||||
def fluentd_params
|
||||
params.require(:fluentd).permit(:log_file, :pid_file, :config_file, :variant, :api_endpoint)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user