mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 19:06:12 +02:00
Fix to parse config with embedded code
This commit is contained in:
parent
818e5d96bf
commit
aaf4f179ab
@ -69,7 +69,7 @@ class Fluentd::SettingsController < ApplicationController
|
||||
|
||||
def parse_config(conf)
|
||||
# V1Parser.parse could raise exception
|
||||
Fluent::Config::V1Parser.parse(conf, @fluentd.config_file)
|
||||
Fluent::Config::V1Parser.parse(conf, @fluentd.config_file, File.dirname(@fluentd.config_file), binding)
|
||||
end
|
||||
|
||||
def update_config(conf)
|
||||
|
||||
@ -82,12 +82,12 @@ describe 'setting', stub: :daemon do
|
||||
|
||||
it 'configtest' do
|
||||
click_button I18n.t('terms.configtest')
|
||||
page.should have_css('.alert-danger')
|
||||
page.should have_css('.alert-success')
|
||||
end
|
||||
|
||||
it "update & restart check" do
|
||||
click_button I18n.t('terms.update')
|
||||
page.should have_css('.alert-danger')
|
||||
daemon.agent.config.gsub("\r\n", "\n").should == conf # CodeMirror exchange \n -> \r\n
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user