mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-15 10:47:06 +02:00
Improve UI of config-diff
This commit is contained in:
parent
16464e7e34
commit
dc35729c74
@ -8,9 +8,9 @@ module SettingHistoryConcern
|
|||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@current = @fluentd.agent.config
|
current = @fluentd.agent.config
|
||||||
target = @backup_file.content
|
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
|
end
|
||||||
|
|
||||||
def reuse
|
def reuse
|
||||||
|
@ -14,13 +14,9 @@
|
|||||||
%p= @backup_file.note.content
|
%p= @backup_file.note.content
|
||||||
|
|
||||||
.row
|
.row
|
||||||
.col-xs-6
|
.col-xs-12
|
||||||
%h2 Current
|
%h2
|
||||||
%pre
|
="Target Config(#{params[:id]})"
|
||||||
= preserve do
|
|
||||||
= @current
|
|
||||||
.col-xs-6
|
|
||||||
%h2 Target
|
|
||||||
%pre
|
%pre
|
||||||
= preserve do
|
= preserve do
|
||||||
= @backup_file.content
|
= @backup_file.content
|
||||||
@ -28,7 +24,10 @@
|
|||||||
.col-xs-12.diff
|
.col-xs-12.diff
|
||||||
%h2
|
%h2
|
||||||
Diff:
|
Diff:
|
||||||
current
|
%p
|
||||||
= ".."
|
diff between
|
||||||
= params[:id]
|
= " "
|
||||||
|
= link_to "current conf", daemon_setting_path(@fluentd)
|
||||||
|
= " and "
|
||||||
|
= "target conf(#{params[:id]})"
|
||||||
= preserve render "diff"
|
= preserve render "diff"
|
||||||
|
Loading…
Reference in New Issue
Block a user