fluentd-ui 0.3.17 → 0.3.18

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fluentd-ui might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15d174d08432c496cf19eb5d6e6a663b9eead54b
4
- data.tar.gz: f63750434b5475d44a1fd38a37573ed5aa71ab07
3
+ metadata.gz: 7d5210ae2603368a390f09da9318c5a81f2eeacf
4
+ data.tar.gz: 5193b86a5f75effaec831a90a911ab0231378e0e
5
5
  SHA512:
6
- metadata.gz: b23b9df0277dadf689bdd4d9d72e233457bc138d3cdbce0811003451e9709a3fa9423fcc3b800c40760589a366eb2dce282942f10714a9b271bdc935dd04bf95
7
- data.tar.gz: da92173f3fc2eeed2207c519d4ea77db9b5b85e36e7c3b54fa7313c551f773b7412ebaecd4baaa57aafc060331701616f74d6bedbb01de3cadb028ce46bcdf9c
6
+ metadata.gz: 0979f30e382c16a0519e2b3f556b92ff0c8df67208fd556d05e766b1c74d5e0f79a0f3c6ea84a733bba9f4538db65a20d84c7e5d6df8b235cb77a0454bb42e57
7
+ data.tar.gz: 502e7a129252caf39c4f73423d5ffa4080477844578ead61113b9c8d7aaf28d2622c762ef0cd7111e6516d661e2639c545a6fc20ab0cc0aa01326f3e1a24f0d2
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Release 0.3.18 - 2015/04/02
2
+ * [fixed] #167 Apply bootstrap css to inputboxes in signin form
3
+ * [fixed] #168 Fix the behavor mismatch between configtest and update (update failed but configtest is OK)
4
+
1
5
  Release 0.3.17 - 2015/04/01
2
6
  * [fixed] #164 Display add/remove icons correctly in out_forward settings page
3
7
  * [fixed] #165 Fix zombie process is created by clicking start button in dashboard
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fluentd-ui (0.3.17)
4
+ fluentd-ui (0.3.18)
5
5
  addressable
6
6
  bundler
7
7
  diff-lcs
@@ -115,14 +115,14 @@ GEM
115
115
  i18n_generators (1.2.1)
116
116
  mechanize
117
117
  rails (>= 3.0.0)
118
- jbuilder (2.2.7)
118
+ jbuilder (2.2.12)
119
119
  activesupport (>= 3.0.0, < 5)
120
120
  multi_json (~> 1.2)
121
121
  jquery-rails (3.1.2)
122
122
  railties (>= 3.0, < 5.0)
123
123
  thor (>= 0.14, < 2.0)
124
124
  json (1.8.2)
125
- kramdown (1.5.0)
125
+ kramdown (1.6.0)
126
126
  kramdown-haml (0.0.3)
127
127
  haml
128
128
  launchy (2.4.3)
@@ -160,7 +160,7 @@ GEM
160
160
  slop (~> 3.4)
161
161
  pry-rails (0.3.2)
162
162
  pry (>= 0.9.10)
163
- puma (2.11.0)
163
+ puma (2.11.1)
164
164
  rack (>= 1.1, < 2.0)
165
165
  rack (1.5.2)
166
166
  rack-test (0.6.3)
@@ -200,7 +200,7 @@ GEM
200
200
  rspec-core (~> 2.99.0)
201
201
  rspec-expectations (~> 2.99.0)
202
202
  rspec-mocks (~> 2.99.0)
203
- rubyzip (1.1.6)
203
+ rubyzip (1.1.7)
204
204
  safe_yaml (1.0.4)
205
205
  sass (3.2.19)
206
206
  sass-rails (4.0.5)
@@ -234,7 +234,7 @@ GEM
234
234
  timers (1.1.0)
235
235
  tzinfo (1.2.2)
236
236
  thread_safe (~> 0.1)
237
- tzinfo-data (1.2014.10)
237
+ tzinfo-data (1.2015.2)
238
238
  tzinfo (>= 1.0.0)
239
239
  unf (0.1.4)
240
240
  unf_ext
@@ -37,7 +37,12 @@ class Fluentd::SettingsController < ApplicationController
37
37
 
38
38
  def handle_dryrun
39
39
  if dryrun(params[:config])
40
- flash.now[:success] = I18n.t('messages.dryrun_is_passed')
40
+ begin
41
+ parse_config(params[:config])
42
+ flash.now[:success] = I18n.t('messages.dryrun_is_passed')
43
+ rescue Fluent::ConfigParseError => e
44
+ flash.now[:danger] = e.message
45
+ end
41
46
  else
42
47
  flash.now[:danger] = @fluentd.agent.log.last_error_message
43
48
  end
@@ -46,6 +51,7 @@ class Fluentd::SettingsController < ApplicationController
46
51
  end
47
52
 
48
53
  def handle_update
54
+ parse_config(params[:config])
49
55
  update_config(params[:config])
50
56
  redirect_to daemon_setting_path(@fluentd)
51
57
  rescue Fluent::ConfigParseError => e
@@ -61,8 +67,12 @@ class Fluentd::SettingsController < ApplicationController
61
67
  @fluentd.agent.dryrun(tmpfile.path)
62
68
  end
63
69
 
70
+ def parse_config(conf)
71
+ # V1Parser.parse could raise exception
72
+ Fluent::Config::V1Parser.parse(conf, @fluentd.config_file, File.dirname(@fluentd.config_file), binding)
73
+ end
74
+
64
75
  def update_config(conf)
65
- Fluent::Config::V1Parser.parse(conf, @fluentd.config_file)
66
76
  @fluentd.agent.config_write conf
67
77
  @fluentd.agent.restart if @fluentd.agent.running?
68
78
  end
@@ -6,8 +6,8 @@
6
6
  = render partial: "shared/error"
7
7
  = form_for(:session, url: sessions_path) do |f|
8
8
  .form-group
9
- = f.text_field :name, placeholder: t('terms.name')
9
+ = f.text_field :name, placeholder: t('terms.name'), class: "form-control"
10
10
  .form-group
11
- = f.password_field :password, placeholder: t('terms.password')
11
+ = f.password_field :password, placeholder: t('terms.password'), class: "form-control"
12
12
 
13
13
  = submit_tag t("terms.sign_in"), class: "btn btn-success"
@@ -1,3 +1,3 @@
1
1
  module FluentdUI
2
- VERSION = "0.3.17"
2
+ VERSION = "0.3.18"
3
3
  end
@@ -47,4 +47,48 @@ describe 'setting', stub: :daemon do
47
47
  current_path.should == '/daemon/setting'
48
48
  page.should have_css('pre', text: 'YET ANOTHER CONFIG')
49
49
  end
50
+
51
+ describe "config" do
52
+ before do
53
+ daemon.agent.config_write conf
54
+ click_link I18n.t('terms.edit')
55
+ end
56
+
57
+ context "plain config" do
58
+ let(:conf) { <<-'CONF' }
59
+ <source>
60
+ type forward
61
+ </source>
62
+ CONF
63
+
64
+ it 'configtest' do
65
+ click_button I18n.t('terms.configtest')
66
+ page.should have_css('.alert-success')
67
+ end
68
+
69
+ it "update & restart check" do
70
+ click_button I18n.t('terms.update')
71
+ daemon.agent.config.gsub("\r\n", "\n").should == conf # CodeMirror exchange \n -> \r\n
72
+ end
73
+ end
74
+
75
+ context "embedded config" do
76
+ let(:conf) { <<-'CONF' }
77
+ <source>
78
+ type forward
79
+ id "foo#{Time.now.to_s}"
80
+ </source>
81
+ CONF
82
+
83
+ it 'configtest' do
84
+ click_button I18n.t('terms.configtest')
85
+ page.should have_css('.alert-success')
86
+ end
87
+
88
+ it "update & restart check" do
89
+ click_button I18n.t('terms.update')
90
+ daemon.agent.config.gsub("\r\n", "\n").should == conf # CodeMirror exchange \n -> \r\n
91
+ end
92
+ end
93
+ end
50
94
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluentd-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.17
4
+ version: 0.3.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro Nakagawa
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-04-01 00:00:00.000000000 Z
12
+ date: 2015-04-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fluentd