diff --git a/app/controllers/concerns/setting_history_concern.rb b/app/controllers/concerns/setting_history_concern.rb index b1c46cb..26abcfd 100644 --- a/app/controllers/concerns/setting_history_concern.rb +++ b/app/controllers/concerns/setting_history_concern.rb @@ -8,9 +8,9 @@ module SettingHistoryConcern end def show - @current = @fluentd.agent.config + current = @fluentd.agent.config target = @backup_file.content - @sdiff = Diff::LCS.sdiff(@current.split("\n").map(&:rstrip), target.split("\n").map(&:rstrip)) + @sdiff = Diff::LCS.sdiff(current.split("\n").map(&:rstrip), target.split("\n").map(&:rstrip)) end def reuse diff --git a/app/views/fluentd/settings/histories/show.html.haml b/app/views/fluentd/settings/histories/show.html.haml index f5dea73..4fa1e56 100644 --- a/app/views/fluentd/settings/histories/show.html.haml +++ b/app/views/fluentd/settings/histories/show.html.haml @@ -14,21 +14,20 @@ %p= @backup_file.note.content .row - .col-xs-6 - %h2 Current - %pre - = preserve do - = @current - .col-xs-6 - %h2 Target + .col-xs-12 + %h2 + ="Target Config(#{params[:id]})" %pre = preserve do = @backup_file.content .col-xs-12.diff %h2 - Diff: - current - = ".." - = params[:id] + Diff: + %p + diff between + = " " + = link_to "current conf", daemon_setting_path(@fluentd) + = " and " + = "target conf(#{params[:id]})" = preserve render "diff"