Remove dead/duplicated code

This commit is contained in:
uu59 2014-06-30 17:45:22 +09:00
parent 96e66540aa
commit e37197bf5c
2 changed files with 0 additions and 13 deletions

View File

@ -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

View File

@ -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