fluentd-ui 1.0.0.alpha.3 → 1.0.0.beta.1

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.

Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.js +45 -0
  3. data/.travis.yml +17 -3
  4. data/Gemfile +2 -2
  5. data/Gemfile.lock +62 -63
  6. data/README.md +11 -0
  7. data/app/controllers/api/config_definitions_controller.rb +41 -17
  8. data/app/controllers/concerns/setting_concern.rb +0 -4
  9. data/app/controllers/fluentd/settings/in_tail_controller.rb +1 -1
  10. data/app/form_builders/fluentd_form_builder.rb +18 -6
  11. data/app/javascript/packs/application.js +20 -20
  12. data/app/javascript/packs/aws_credential.js +61 -0
  13. data/app/javascript/packs/codemirror.js +33 -37
  14. data/app/javascript/packs/config_field.js +93 -0
  15. data/app/javascript/packs/fluent_log.js +10 -9
  16. data/app/javascript/packs/in_tail_parse.js +77 -76
  17. data/app/javascript/packs/nested_settings.js +17 -16
  18. data/app/javascript/packs/notification.js +14 -14
  19. data/app/javascript/packs/out_forward_setting.js +14 -0
  20. data/app/javascript/packs/out_s3_setting.js +14 -0
  21. data/app/javascript/packs/owned_plugin_form.js +60 -57
  22. data/app/javascript/packs/parser_multiline_form.js +15 -14
  23. data/app/javascript/packs/plugin_setting.js +13 -13
  24. data/app/javascript/packs/settings.js +23 -18
  25. data/app/javascript/packs/transport_config.js +62 -0
  26. data/app/javascript/packs/transport_section.js +72 -0
  27. data/app/javascript/packs/treeview.js +11 -10
  28. data/app/models/concerns/fluentd/setting/configurable.rb +1 -3
  29. data/app/models/concerns/fluentd/setting/plugin.rb +29 -1
  30. data/app/models/concerns/fluentd/setting/plugin_config.rb +32 -8
  31. data/app/models/concerns/fluentd/setting/plugin_parameter.rb +74 -21
  32. data/app/models/concerns/fluentd/setting/registry_loader.rb +38 -0
  33. data/app/models/concerns/fluentd/setting/section_config.rb +52 -0
  34. data/app/models/concerns/fluentd/setting/section_parser.rb +25 -18
  35. data/app/models/fluentd/setting/in_forward.rb +29 -10
  36. data/app/models/fluentd/setting/in_syslog.rb +6 -6
  37. data/app/models/fluentd/setting/out_forward.rb +15 -3
  38. data/app/models/fluentd/setting/out_mongo.rb +0 -11
  39. data/app/models/fluentd/setting/out_s3.rb +17 -3
  40. data/app/models/fluentd/setting/out_tdlog.rb +3 -2
  41. data/app/models/fluentd/setting/section.rb +4 -0
  42. data/app/models/fluentd/setting/type/object.rb +17 -0
  43. data/app/views/fluentd/settings/in_forward/_form.html.haml +5 -3
  44. data/app/views/fluentd/settings/out_forward/_form.html.haml +18 -0
  45. data/app/views/fluentd/settings/out_s3/_form.html.haml +18 -0
  46. data/app/views/shared/settings/_form.html.haml +14 -10
  47. data/app/views/shared/settings/show.html.haml +2 -2
  48. data/app/views/shared/vue/_aws_credential.html.haml +22 -0
  49. data/app/views/shared/vue/_config_field.html.haml +49 -0
  50. data/app/views/shared/vue/_out_forward_setting.html.haml +13 -0
  51. data/app/views/shared/vue/_out_s3_setting.html.haml +19 -0
  52. data/app/views/shared/vue/_owned_plugin_form.html.haml +8 -48
  53. data/app/views/shared/vue/_transport_config.html.haml +20 -0
  54. data/app/views/shared/vue/_transport_section.html.haml +30 -0
  55. data/config/initializers/dig.rb +8 -0
  56. data/config/initializers/dummy_logger.rb +1 -0
  57. data/config/initializers/types.rb +2 -1
  58. data/config/locales/translation_ja.yml +2 -2
  59. data/fluentd-ui.gemspec +1 -0
  60. data/gemfiles/ruby2.2.gemfile +28 -0
  61. data/lib/dummy_logger.rb +13 -0
  62. data/lib/fluentd-ui/version.rb +1 -1
  63. data/package.json +5 -0
  64. data/spec/features/fluentd/setting/in_forward_spec.rb +1 -2
  65. data/spec/features/fluentd/setting/in_http_spec.rb +1 -2
  66. data/spec/features/fluentd/setting/in_monitor_agent_spec.rb +1 -2
  67. data/spec/features/fluentd/setting/out_forward_spec.rb +3 -5
  68. data/spec/features/fluentd/setting/out_stdout_spec.rb +1 -2
  69. data/spec/features/out_elasticsearch_spec.rb +3 -3
  70. data/spec/features/out_forward_spec.rb +6 -5
  71. data/spec/features/out_tdlog_spec.rb +3 -2
  72. data/spec/features/shared_examples/configurable_daemon_settings.rb +2 -2
  73. data/spec/features/source_and_output_spec.rb +2 -0
  74. data/spec/models/fluentd/setting/in_forward_spec.rb +65 -9
  75. data/spec/models/fluentd/setting/in_syslog_spec.rb +12 -7
  76. data/spec/models/fluentd/setting/in_tail_spec.rb +6 -0
  77. data/spec/models/fluentd/setting/out_mongo_spec.rb +2 -3
  78. data/spec/models/fluentd/setting/out_tdlog_spec.rb +1 -2
  79. data/spec/spec_helper.rb +5 -0
  80. data/yarn.lock +466 -12
  81. metadata +90 -39
  82. data/app/helpers/settings_helper.rb +0 -144
  83. data/app/models/concerns/fluentd/setting/section_validator.rb +0 -21
  84. data/app/views/fluentd/settings/_form.html.haml +0 -43
@@ -6,6 +6,6 @@
6
6
  = raw t("fluentd.settings.#{target_plugin_name}.option_guide")
7
7
 
8
8
  - if lookup_context.exists?("form", controller.controller_path, true)
9
- = render "#{controller.controller_path}/form"
9
+ = render "#{controller.controller_path}/form", setting: @setting, fluentd: @fluentd
10
10
  - else
11
- = render "shared/settings/form"
11
+ = render "shared/settings/form", setting: @setting, fluentd: @fluentd
@@ -0,0 +1,22 @@
1
+ = render "shared/vue/config_field"
2
+
3
+ %script{type: "text/x-template", id: "vue-aws-credential"}
4
+ .form-group.card.bg-light.mb-3
5
+ .card-body
6
+ %label{"for" => "aws-credential"}
7
+ AWS credential
8
+ %select{"id" => "aws-credential",
9
+ "class" => "form-control mb-3",
10
+ "v-model" => "credentialType",
11
+ "v-on:change" => "onChange"}
12
+ %option{"v-for" => "option in options",
13
+ "v-bind:value" => "option",
14
+ "v-bind:selected" => "credentialType===option"}
15
+ {{ option }}
16
+ %template{"v-for" => "option in credentialOptions"}
17
+ %template{"v-if" => 'credentialType==="simple"'}
18
+ %config-field{"v-bind:plugin-type" => '"output"',
19
+ "v-bind:option" => "option"}
20
+ %template(v-else)
21
+ %config-field{"v-bind:plugin-type" => 'credentialType',
22
+ "v-bind:option" => "option"}
@@ -0,0 +1,49 @@
1
+ %script{type: "text/x-template", id: "vue-config-field"}
2
+ .form-group
3
+ %template{"v-if" => 'option.type==="enum"'}
4
+ %label{"v-bind:for" => "inputId(pluginType, option)",
5
+ "data-toggle" => "tooltip",
6
+ "data-placement" => "right",
7
+ "v-bind:title" => "option.desc"}
8
+ {{ option.name | humanize }}
9
+ %select{"v-bind:id" => "inputId(pluginType, option)",
10
+ "v-bind:name" => "inputName(pluginType, option)",
11
+ "class" => "form-control"}
12
+ %option{"v-for" => "item in option.list",
13
+ "v-bind:value" => "item",
14
+ "v-bind:selected" => "option.default === item"}
15
+ {{ item }}
16
+ %template{"v-else-if" => 'option.type==="bool"'}
17
+ %input{"v-bind:id" => "inputId(pluginType, option)",
18
+ "v-bind:name" => "inputName(pluginType, option)",
19
+ "v-bind:checked" => "checked(option.default)",
20
+ "type" => "checkbox"}
21
+ %label{"v-bind:for" => "inputId(pluginType, option)",
22
+ "data-toggle" => "tooltip",
23
+ "data-placement" => "right",
24
+ "v-bind:title" => "option.desc"}
25
+ {{ option.name | humanize }}
26
+ %template(v-else)
27
+ %label{"v-bind:for" => "inputId(pluginType, option)",
28
+ "data-toggle" => "tooltip",
29
+ "data-placement" => "right",
30
+ "v-bind:title" => "option.desc"}
31
+ {{ option.name | humanize }}
32
+ %template{"v-if" => 'option.name === "expression"'}
33
+ %input{"v-bind:id" => "inputId(pluginType, option)",
34
+ "v-bind:name" => "inputName(pluginType, option)",
35
+ "v-model.lazy" => "expression",
36
+ "type" => "text",
37
+ "class" => "form-control"}
38
+ %template{"v-else-if" => 'option.name === "time_format"'}
39
+ %input{"v-bind:id" => "inputId(pluginType, option)",
40
+ "v-bind:name" => "inputName(pluginType, option)",
41
+ "v-model.lazy" => "timeFormat",
42
+ "type" => "text",
43
+ "class" => "form-control"}
44
+ %template(v-else)
45
+ %input{"v-bind:id" => "inputId(pluginType, option)",
46
+ "v-bind:name" => "inputName(pluginType, option)",
47
+ "v-model.lazy" => "textValue",
48
+ "type" => "text",
49
+ "class" => "form-control"}
@@ -0,0 +1,13 @@
1
+ - add_javascript_pack_tag("out_forward_setting")
2
+
3
+ = render "shared/vue/owned_plugin_form"
4
+ = render "shared/vue/transport_config"
5
+
6
+ #out-forward-setting
7
+ %owned-plugin-form{"v-bind:id" => "'buffer-section'",
8
+ "v-bind:options-json" => "'#{Fluent::Plugin::BUFFER_REGISTRY.map.keys.to_json}'",
9
+ "v-bind:initial-plugin-name" => "'#{setting.buffer_type}'",
10
+ "v-bind:plugin-type" => "'buffer'",
11
+ "v-bind:plugin-label" => "'Buffer'"}
12
+ %transport-config{"v-bind:plugin-type" => "'#{setting.plugin_type}'",
13
+ "v-bind:plugin-name" => "'#{setting.plugin_name}'"}
@@ -0,0 +1,19 @@
1
+ - add_javascript_pack_tag("out_s3_setting")
2
+
3
+ = render "shared/vue/aws_credential"
4
+ = render "shared/vue/owned_plugin_form"
5
+
6
+ #out-s3-setting
7
+ %owned-plugin-form{"v-bind:id" => "'buffer-section'",
8
+ "v-bind:options-json" => "'#{Fluent::Plugin::BUFFER_REGISTRY.map.keys.to_json}'",
9
+ "v-bind:initial-plugin-name" => "'#{setting.buffer_type}'",
10
+ "v-bind:plugin-type" => "'buffer'",
11
+ "v-bind:plugin-label" => "'Buffer'"}
12
+ %owned-plugin-form{"v-bind:id" => "'format-section'",
13
+ "v-bind:options-json" => "'#{Fluent::Plugin::FORMATTER_REGISTRY.map.keys.to_json}'",
14
+ "v-bind:initial-plugin-name" => "'#{setting.format_type}'",
15
+ "v-bind:plugin-type" => "'format'",
16
+ "v-bind:plugin-label" => "'Format'"}
17
+ %aws-credential{"v-bind:id" => "'aws-credential'",
18
+ "v-bind:plugin-type" => "'output'",
19
+ "v-bind:plugin-name" => "'s3'"}
@@ -1,4 +1,5 @@
1
1
  = render "shared/vue/parser_multiline_form"
2
+ = render "shared/vue/config_field"
2
3
 
3
4
  %script{type: "text/x-template", id: "vue-owned-plugin-form"}
4
5
  .form-group.card.bg-light.mb-3{"v-bind:id" => "id"}
@@ -18,51 +19,10 @@
18
19
  "v-bind:plugin-type" => "pluginType",
19
20
  "v-bind:common-options" => "commonOptions",
20
21
  "v-on:change-formats" => "onChangeFormats"}
21
- .form-group(v-else){"v-for" => "option in commonOptions"}
22
- %template{"v-if" => 'option.type==="enum"'}
23
- %label{"v-bind:for" => "inputId(pluginType, option)",
24
- "data-toggle" => "tooltip",
25
- "data-placement" => "right",
26
- "v-bind:title" => "option.desc"}
27
- {{ option.name }}
28
- %select{"v-bind:id" => "inputId(pluginType, option)",
29
- "v-bind:name" => "inputName(pluginType, option)",
30
- "class" => "form-control"}
31
- %option{"v-for" => "item in option.list",
32
- "v-bind:value" => "item",
33
- "v-bind:selected" => "option.default === item"}
34
- {{ item }}
35
- %template{"v-else-if" => 'option.type==="bool"'}
36
- %input{"v-bind:id" => "inputId(pluginType, option)",
37
- "v-bind:name" => "inputName(pluginType, option)",
38
- "v-bind:checked" => "checked(option.default)",
39
- "type" => "checkbox"}
40
- %label{"v-bind:for" => "inputId(pluginType, option)",
41
- "data-toggle" => "tooltip",
42
- "data-placement" => "right",
43
- "v-bind:title" => "option.desc"}
44
- {{ option.name }}
45
- %template(v-else)
46
- %label{"v-bind:for" => "inputId(pluginType, option)",
47
- "data-toggle" => "tooltip",
48
- "data-placement" => "right",
49
- "v-bind:title" => "option.desc"}
50
- {{ option.name }}
51
- %template{"v-if" => 'option.name === "expression"'}
52
- %input{"v-bind:id" => "inputId(pluginType, option)",
53
- "v-bind:name" => "inputName(pluginType, option)",
54
- "v-model.lazy" => "expression",
55
- "type" => "text",
56
- "class" => "form-control"}
57
- %template{"v-else-if" => 'option.name === "time_format"'}
58
- %input{"v-bind:id" => "inputId(pluginType, option)",
59
- "v-bind:name" => "inputName(pluginType, option)",
60
- "v-model.lazy" => "timeFormat",
61
- "type" => "text",
62
- "class" => "form-control"}
63
- %template(v-else)
64
- %input{"v-bind:id" => "inputId(pluginType, option)",
65
- "v-bind:name" => "inputName(pluginType, option)",
66
- "v-bind:value" => "option.default",
67
- "type" => "text",
68
- "class" => "form-control"}
22
+ %template(v-else){"v-for" => "option in commonOptions"}
23
+ %config-field{"v-bind:plugin-type" => "pluginType",
24
+ "v-bind:option" => "option",
25
+ "v-bind:initial-expression" => "expression",
26
+ "v-bind:initial-time-format" => "timeFormat",
27
+ "v-bind:initial-text-value" => "initialParams[option.name]",
28
+ "v-on:change-parse-config" => "onChangeParseConfig"}
@@ -0,0 +1,20 @@
1
+ = render "shared/vue/config_field"
2
+
3
+ %script{type: "text/x-template", id: "vue-transport-config"}
4
+ .form-group.card.card-body.bg-light
5
+ %h4
6
+ Transport
7
+ .form-group
8
+ %select{"class" => "form-control",
9
+ "v-model" => "transportType",
10
+ "v-on:change" => "onChange"}
11
+ %option{"v-for" => "option in options",
12
+ "v-bind:value" => "option",
13
+ "v-bind:selected" => "transportType === option"}
14
+ {{ option | toUpper }}
15
+ %p{"v-if" => 'transportType === "tcp"'}
16
+ Nothing to configure
17
+ %template(v-else)
18
+ %template{"v-for" => "option in tlsOptions"}
19
+ %config-field{"v-bind:plugin-type" => "pluginType",
20
+ "v-bind:option" => "option"}
@@ -0,0 +1,30 @@
1
+ - add_javascript_pack_tag("transport_section")
2
+
3
+ = render "shared/vue/config_field"
4
+
5
+ #transport-section.form-group.card.card-body.bg-light{"pluginType" => setting.plugin_type,
6
+ "pluginName" => setting.plugin_name}
7
+ %label
8
+ Transport
9
+ .form-group
10
+ %select{"class" => "form-control",
11
+ "v-model" => "transportType",
12
+ "v-on:change" => "onChange"}
13
+ %option{"v-for" => "option in options",
14
+ "v-bind:value" => "option",
15
+ "v-bind:selected" => "transportType === option"}
16
+ {{ option | toUpper }}
17
+ %p{"v-if" => 'transportType === "tcp"'}
18
+ Nothing to configure
19
+ %template(v-else)
20
+ %template{"v-for" => "option in commonOptions"}
21
+ %config-field{"v-bind:plugin-type" => "pluginType",
22
+ "v-bind:option" => "option"}
23
+ .card.card-body.bg-light
24
+ %h4{"data-toggle" => "collapse", "href" => "#transport-advanced-setting"}
25
+ = icon('fa-caret-down')
26
+ = t('terms.advanced_setting') + '(TLS)'
27
+ #transport-advanced-setting.collapse
28
+ %template{"v-for" => "option in advancedOptions"}
29
+ %config-field{"v-bind:plugin-type" => "pluginType",
30
+ "v-bind:option" => "option"}
@@ -0,0 +1,8 @@
1
+ unless {}.respond_to?(:dig)
2
+ begin
3
+ # backport_dig is faster than dig_rb so prefer backport_dig.
4
+ require 'backport_dig'
5
+ rescue LoadError
6
+ require 'dig_rb'
7
+ end
8
+ end
@@ -0,0 +1 @@
1
+ $log ||= DummyLogger.logger
@@ -2,6 +2,7 @@ ActiveModel::Type.register(:array, Fluentd::Setting::Type::Array)
2
2
  ActiveModel::Type.register(:enum, Fluentd::Setting::Type::Enum)
3
3
  ActiveModel::Type.register(:bool, Fluentd::Setting::Type::Bool)
4
4
  ActiveModel::Type.register(:hash, Fluentd::Setting::Type::Hash)
5
- ActiveModel::Type.register(:regexp, Fluentd::Setting::Type::Hash)
5
+ ActiveModel::Type.register(:object, Fluentd::Setting::Type::Object)
6
+ ActiveModel::Type.register(:regexp, Fluentd::Setting::Type::Regexp)
6
7
  ActiveModel::Type.register(:size, Fluentd::Setting::Type::Size)
7
8
  ActiveModel::Type.register(:section, Fluentd::Setting::Type::Section)
@@ -111,7 +111,7 @@ ja:
111
111
  setup_in_monitor_agent: 監視エージェント
112
112
  setup_in_http: http
113
113
  setup_in_forward: 転送(他Fluentdからの受信)
114
- setup_out_td: Treasure Data
114
+ setup_out_tdlog: Treasure Data
115
115
  setup_out_stdout: 標準出力(ログ)
116
116
  setup_out_mongo: MongoDB
117
117
  setup_out_forward: 転送
@@ -163,7 +163,7 @@ ja:
163
163
  <a target="_blank" href="http://docs.fluentd.org/articles/out_s3">out_s3プラグインの解説</a>もご参照ください。
164
164
  show:
165
165
  page_title: AWS S3書き出し設定
166
- out_td:
166
+ out_tdlog:
167
167
  option_guide: |
168
168
  fluent-plugin-tdプラグインのインストールが必要です。<br />
169
169
  show:
@@ -35,6 +35,7 @@ Gem::Specification.new do |spec|
35
35
 
36
36
  spec.add_dependency "fluentd", [">= 1.0.0", "< 2"]
37
37
  spec.add_dependency 'rails', '~> 5.2.0'
38
+ spec.add_dependency "dig_rb", "~> 1.0.0"
38
39
  spec.add_dependency "bootsnap", ">= 1.1.0"
39
40
  spec.add_dependency 'sucker_punch', "~> 2.0.4"
40
41
  spec.add_dependency 'addressable'
@@ -0,0 +1,28 @@
1
+ source "https://rubygems.org"
2
+
3
+ group :development, :test do
4
+ gem "rake"
5
+ gem "pry"
6
+ gem "pry-rails"
7
+ gem "rspec-rails", "~> 3.0"
8
+ end
9
+
10
+ group :development do
11
+ gem 'listen', '>= 3.0.5', '< 3.2'
12
+ gem 'i18n_generators', '2.1.1'
13
+ gem 'better_errors'
14
+ gem 'web-console', '~> 3.6'
15
+ gem 'binding_of_caller'
16
+ end
17
+
18
+ group :test do
19
+ gem "factory_bot_rails"
20
+ gem "capybara", "~> 3.1.1"
21
+ gem "capybara-screenshot"
22
+ gem "simplecov", "~> 0.16.1", require: false
23
+ gem "webmock", "~> 3.3.0"
24
+ gem "timecop"
25
+ gem "selenium-webdriver", "~> 3.12.0"
26
+ end
27
+
28
+ gemspec path: ".."
@@ -0,0 +1,13 @@
1
+ require "fluent/test/log"
2
+ require "serverengine"
3
+
4
+ module DummyLogger
5
+ class << self
6
+ def logger
7
+ dl_opts = {log_level: ServerEngine::DaemonLogger::INFO}
8
+ logdev = Fluent::Test::DummyLogDevice.new
9
+ logger = ServerEngine::DaemonLogger.new(logdev, dl_opts)
10
+ Fluent::Log.new(logger)
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module FluentdUI
2
- VERSION = "1.0.0.alpha.3"
2
+ VERSION = "1.0.0.beta.1"
3
3
  end
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "fluentd-ui",
3
3
  "private": true,
4
+ "scripts": {
5
+ "lint": "eslint app/javascript"
6
+ },
4
7
  "dependencies": {
5
8
  "@rails/webpacker": "3.5",
6
9
  "codemirror": "^5.37.0",
@@ -15,6 +18,8 @@
15
18
  "vue-template-compiler": "^2.5.16"
16
19
  },
17
20
  "devDependencies": {
21
+ "eslint": "^5.1.0",
22
+ "eslint-plugin-vue": "^4.7.0",
18
23
  "webpack-dev-server": "2.11.2"
19
24
  }
20
25
  }
@@ -1,7 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- describe "in_forward", stub: :daemon do
3
+ describe "in_forward", stub: :daemon, js: true do
4
4
  before { login_with exists_user }
5
5
  it_should_behave_like "configurable daemon settings", "in_forward", "port", "12345"
6
-
7
6
  end
@@ -1,7 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- describe "in_http", stub: :daemon do
3
+ describe "in_http", js: true, stub: :daemon do
4
4
  before { login_with exists_user }
5
5
  it_should_behave_like "configurable daemon settings", "in_http", "port", "12345"
6
-
7
6
  end
@@ -1,7 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- describe "in_monitor_agent", stub: :daemon do
3
+ describe "in_monitor_agent", js: true, stub: :daemon do
4
4
  before { login_with exists_user }
5
5
  it_should_behave_like "configurable daemon settings", "in_monitor_agent", "port", "12345"
6
-
7
6
  end
@@ -1,6 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- describe "out_forward", stub: :daemon do
3
+ describe "out_forward", js: true, stub: :daemon do
4
4
  before { login_with exists_user }
5
5
 
6
6
  let(:type) { "out_forward" }
@@ -8,9 +8,8 @@ describe "out_forward", stub: :daemon do
8
8
  let(:form_values) { {
9
9
  Pattern: "*",
10
10
  Name: "name",
11
- Host: "host",
11
+ Host: "localhost",
12
12
  Port: "9999",
13
- Path: "/dev/null",
14
13
  } }
15
14
 
16
15
  it "Updated config after submit" do
@@ -19,7 +18,7 @@ describe "out_forward", stub: :daemon do
19
18
  daemon.agent.config.should_not include(v)
20
19
  end
21
20
  visit page_url
22
- within("#new_fluentd_setting_#{type}") do
21
+ within("form") do
23
22
  form_values.each_pair do |k,v|
24
23
  fill_in k, with: v
25
24
  end
@@ -28,7 +27,6 @@ describe "out_forward", stub: :daemon do
28
27
  form_values.each_pair do |k,v|
29
28
  daemon.agent.config.should include(v)
30
29
  end
31
- daemon.agent.config.should include("type file") # out_forward's Secondary hidden field
32
30
  end
33
31
 
34
32
  it "Click to append Server fields", js: true do
@@ -1,7 +1,6 @@
1
1
  require "spec_helper"
2
2
 
3
- describe "out_stdout", stub: :daemon do
3
+ describe "out_stdout", js: true, stub: :daemon do
4
4
  before { login_with exists_user }
5
5
  it_should_behave_like "configurable daemon settings", "out_stdout", "pattern", "stdout.**"
6
-
7
6
  end
@@ -11,14 +11,14 @@ describe "out_elasticsearch", stub: :daemon do
11
11
 
12
12
  it "Shown form" do
13
13
  visit location
14
- page.should have_css('input[name="fluentd_setting_out_elasticsearch[match]"]')
14
+ page.should have_css('input[name="setting[pattern]"]')
15
15
  end
16
16
 
17
17
  it "Updated config after submit", js: true do
18
18
  daemon.agent.config.should_not include(match)
19
19
  visit location
20
- within('#new_fluentd_setting_out_elasticsearch') do
21
- fill_in "Match", with: match
20
+ within('form') do
21
+ fill_in "Pattern", with: match
22
22
  fill_in "Index name", with: "index"
23
23
  fill_in "Type name", with: "type_name"
24
24
  end