mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-15 02:37:08 +02:00
Improve UI of config-diff
This commit is contained in:
parent
16464e7e34
commit
dc35729c74
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user