fluentd-ui 0.4.5 → 1.0.0.alpha.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 (243) hide show
  1. checksums.yaml +5 -5
  2. data/.babelrc +18 -0
  3. data/.editorconfig +11 -0
  4. data/.gitignore +7 -0
  5. data/.postcssrc.yml +3 -0
  6. data/.travis.yml +20 -4
  7. data/ChangeLog.md +7 -2
  8. data/Gemfile +8 -6
  9. data/Gemfile.lock +177 -178
  10. data/README.md +15 -10
  11. data/app/assets/stylesheets/application.css +6 -5
  12. data/app/controllers/concerns/setting_history_concern.rb +1 -1
  13. data/app/controllers/fluentd/agents_controller.rb +5 -0
  14. data/app/controllers/misc_controller.rb +2 -2
  15. data/app/controllers/plugins_controller.rb +4 -4
  16. data/app/helpers/application_helper.rb +8 -2
  17. data/app/helpers/settings_helper.rb +2 -2
  18. data/app/javascript/packs/application.js +31 -0
  19. data/app/{assets/javascripts/codemirror_fluentd.js → javascript/packs/codemirror.js} +32 -1
  20. data/app/javascript/packs/fluent_log.js +63 -0
  21. data/app/javascript/packs/in_tail_format.js +174 -0
  22. data/app/javascript/packs/nested_settings.js +40 -0
  23. data/app/javascript/packs/notification.js +60 -0
  24. data/app/javascript/packs/settings.js +122 -0
  25. data/app/javascript/packs/treeview.js +99 -0
  26. data/{vendor/assets/javascripts/.keep → app/javascript/stylesheets/application.scss} +0 -0
  27. data/app/jobs/all_plugin_check_update_job.rb +10 -0
  28. data/app/jobs/application_job.rb +2 -0
  29. data/app/{workers/fluentd_ui_restart.rb → jobs/fluentd_ui_restart_job.rb} +4 -4
  30. data/app/jobs/fluentd_ui_update_check_job.rb +11 -0
  31. data/app/{workers/gem_installer.rb → jobs/gem_installer_job.rb} +4 -5
  32. data/app/jobs/gem_uninstaller_job.rb +14 -0
  33. data/app/jobs/gem_update_check_job.rb +9 -0
  34. data/app/models/fluentd/agent.rb +9 -5
  35. data/app/models/fluentd/agent/common.rb +10 -6
  36. data/app/models/fluentd/agent/fluentd_gem.rb +2 -3
  37. data/app/models/fluentd/agent/td_agent/unix.rb +7 -5
  38. data/app/models/fluentd/setting/in_tail.rb +2 -2
  39. data/app/views/fluentd/_form.html.haml +1 -1
  40. data/app/views/fluentd/errors.html.haml +5 -6
  41. data/app/views/fluentd/log.html.haml +4 -5
  42. data/app/views/fluentd/settings/edit.html.haml +2 -1
  43. data/app/views/fluentd/settings/histories/_list.html.haml +1 -1
  44. data/app/views/fluentd/settings/histories/show.html.haml +6 -6
  45. data/app/views/fluentd/settings/in_tail/after_file_choose.html.haml +4 -3
  46. data/app/views/fluentd/settings/in_tail/after_format.html.haml +2 -2
  47. data/app/views/fluentd/settings/in_tail/confirm.html.haml +3 -3
  48. data/app/views/fluentd/settings/running_backup/show.html.haml +5 -5
  49. data/app/views/fluentd/settings/show.html.haml +7 -7
  50. data/app/views/fluentd/settings/source_and_output.html.haml +31 -18
  51. data/app/views/fluentd/show.html.haml +16 -15
  52. data/app/views/layouts/application.html.erb +31 -46
  53. data/app/views/layouts/sign_in.html.erb +9 -16
  54. data/app/views/misc/information.html.haml +13 -13
  55. data/app/views/misc/update_fluentd_ui.html.haml +3 -3
  56. data/app/views/plugins/installed.html.haml +8 -8
  57. data/app/views/plugins/recommended.html.haml +5 -5
  58. data/app/views/plugins/updated.html.haml +5 -5
  59. data/app/views/sessions/new.html.haml +5 -6
  60. data/app/views/shared/_global_nav.html.erb +9 -9
  61. data/app/views/shared/_initial_setup.html.haml +3 -3
  62. data/app/views/shared/_modal.html.erb +1 -1
  63. data/app/views/shared/settings/_form.html.haml +9 -8
  64. data/app/views/shared/settings/show.html.haml +4 -2
  65. data/app/views/shared/vue/_fluent_log.html.erb +6 -6
  66. data/app/views/shared/vue/_in_tail_format.html.erb +31 -29
  67. data/app/views/shared/vue/_notification.html.erb +5 -9
  68. data/app/views/shared/vue/_setting.html.erb +12 -10
  69. data/app/views/shared/vue/_treeview.html.erb +13 -10
  70. data/app/views/tutorials/chapter1.html.erb +3 -4
  71. data/app/views/tutorials/chapter2.html.haml +2 -2
  72. data/app/views/tutorials/chapter3.html.haml +2 -2
  73. data/app/views/tutorials/chapter4.html.haml +2 -2
  74. data/app/views/users/show.html.haml +1 -1
  75. data/bin/bundle +1 -1
  76. data/bin/fluentd-ui +1 -0
  77. data/bin/rails +1 -1
  78. data/bin/setup +16 -17
  79. data/bin/update +28 -0
  80. data/bin/webpack +15 -0
  81. data/bin/webpack-dev-server +15 -0
  82. data/bin/yarn +11 -0
  83. data/config/application.rb +18 -5
  84. data/config/boot.rb +2 -1
  85. data/config/environment.rb +1 -1
  86. data/config/environments/development.rb +27 -5
  87. data/config/environments/production.rb +34 -23
  88. data/config/environments/test.rb +7 -3
  89. data/config/initializers/application_controller_renderer.rb +8 -0
  90. data/config/initializers/assets.rb +14 -0
  91. data/config/initializers/content_security_policy.rb +25 -0
  92. data/config/initializers/cookies_serializer.rb +2 -0
  93. data/config/initializers/fluentd_ui_update_check.rb +2 -1
  94. data/config/initializers/new_framework_defaults_5_2.rb +35 -0
  95. data/config/initializers/prefetch_gem_updates.rb +4 -1
  96. data/config/initializers/wrap_parameters.rb +1 -6
  97. data/config/locales/ja.yml +61 -57
  98. data/config/routes.rb +1 -0
  99. data/config/spring.rb +6 -0
  100. data/config/webpack/development.js +5 -0
  101. data/config/webpack/environment.js +20 -0
  102. data/config/webpack/loaders/vue.js +13 -0
  103. data/config/webpack/production.js +5 -0
  104. data/config/webpack/test.js +5 -0
  105. data/config/webpacker.yml +69 -0
  106. data/fluentd-ui.gemspec +16 -6
  107. data/lib/fluentd-ui/version.rb +1 -1
  108. data/lib/regexp_preview/single_line.rb +5 -5
  109. data/package.json +19 -0
  110. data/spec/controllers/application_controller_spec.rb +2 -6
  111. data/spec/controllers/fluentd/agents_controller_spec.rb +12 -0
  112. data/spec/controllers/polling_controller_spec.rb +1 -1
  113. data/spec/factories/fluentd.rb +1 -1
  114. data/spec/factories/plugins.rb +2 -2
  115. data/spec/factories/user.rb +1 -1
  116. data/spec/features/fluentd/setting/histories_spec.rb +7 -6
  117. data/spec/features/fluentd/setting/running_backup_spec.rb +4 -3
  118. data/spec/features/setting_spec.rb +1 -0
  119. data/spec/features/source_and_output_spec.rb +16 -16
  120. data/spec/lib/regexp_preview/single_line_spec.rb +1 -1
  121. data/spec/models/fluentd_spec.rb +4 -4
  122. data/spec/spec_helper.rb +16 -4
  123. data/yarn.lock +6225 -0
  124. metadata +120 -154
  125. data/.bowerrc +0 -3
  126. data/app/assets/javascripts/application.js +0 -24
  127. data/app/assets/javascripts/codemirror.js +0 -29
  128. data/app/assets/javascripts/enable_bootstrap_tooltip.js +0 -3
  129. data/app/assets/javascripts/nested_setting.js +0 -41
  130. data/app/assets/javascripts/vue/fluent_log.js +0 -64
  131. data/app/assets/javascripts/vue/in_tail_format.js +0 -177
  132. data/app/assets/javascripts/vue/notification.js +0 -65
  133. data/app/assets/javascripts/vue/settings.js +0 -121
  134. data/app/assets/javascripts/vue/treeview.js +0 -97
  135. data/app/assets/javascripts/vue_common.js +0 -4
  136. data/app/workers/all_plugin_check_update.rb +0 -14
  137. data/app/workers/fluentd_ui_update_check.rb +0 -15
  138. data/app/workers/gem_uninstaller.rb +0 -15
  139. data/app/workers/gem_update_check.rb +0 -10
  140. data/bower.json +0 -11
  141. data/vendor/assets/javascripts/bower/.gitignore +0 -10
  142. data/vendor/assets/javascripts/bower/codemirror/.bower.json +0 -29
  143. data/vendor/assets/javascripts/bower/codemirror/bower.json +0 -16
  144. data/vendor/assets/javascripts/bower/codemirror/lib/codemirror.css +0 -309
  145. data/vendor/assets/javascripts/bower/codemirror/lib/codemirror.js +0 -8029
  146. data/vendor/assets/javascripts/bower/codemirror/theme/3024-day.css +0 -38
  147. data/vendor/assets/javascripts/bower/codemirror/theme/3024-night.css +0 -37
  148. data/vendor/assets/javascripts/bower/codemirror/theme/ambiance-mobile.css +0 -5
  149. data/vendor/assets/javascripts/bower/codemirror/theme/ambiance.css +0 -77
  150. data/vendor/assets/javascripts/bower/codemirror/theme/base16-dark.css +0 -36
  151. data/vendor/assets/javascripts/bower/codemirror/theme/base16-light.css +0 -36
  152. data/vendor/assets/javascripts/bower/codemirror/theme/blackboard.css +0 -30
  153. data/vendor/assets/javascripts/bower/codemirror/theme/cobalt.css +0 -23
  154. data/vendor/assets/javascripts/bower/codemirror/theme/eclipse.css +0 -23
  155. data/vendor/assets/javascripts/bower/codemirror/theme/elegant.css +0 -13
  156. data/vendor/assets/javascripts/bower/codemirror/theme/erlang-dark.css +0 -32
  157. data/vendor/assets/javascripts/bower/codemirror/theme/lesser-dark.css +0 -45
  158. data/vendor/assets/javascripts/bower/codemirror/theme/mbo.css +0 -35
  159. data/vendor/assets/javascripts/bower/codemirror/theme/mdn-like.css +0 -44
  160. data/vendor/assets/javascripts/bower/codemirror/theme/midnight.css +0 -45
  161. data/vendor/assets/javascripts/bower/codemirror/theme/monokai.css +0 -31
  162. data/vendor/assets/javascripts/bower/codemirror/theme/neat.css +0 -12
  163. data/vendor/assets/javascripts/bower/codemirror/theme/neo.css +0 -43
  164. data/vendor/assets/javascripts/bower/codemirror/theme/night.css +0 -26
  165. data/vendor/assets/javascripts/bower/codemirror/theme/paraiso-dark.css +0 -36
  166. data/vendor/assets/javascripts/bower/codemirror/theme/paraiso-light.css +0 -36
  167. data/vendor/assets/javascripts/bower/codemirror/theme/pastel-on-dark.css +0 -50
  168. data/vendor/assets/javascripts/bower/codemirror/theme/rubyblue.css +0 -23
  169. data/vendor/assets/javascripts/bower/codemirror/theme/solarized.css +0 -165
  170. data/vendor/assets/javascripts/bower/codemirror/theme/the-matrix.css +0 -28
  171. data/vendor/assets/javascripts/bower/codemirror/theme/tomorrow-night-bright.css +0 -35
  172. data/vendor/assets/javascripts/bower/codemirror/theme/tomorrow-night-eighties.css +0 -36
  173. data/vendor/assets/javascripts/bower/codemirror/theme/twilight.css +0 -30
  174. data/vendor/assets/javascripts/bower/codemirror/theme/vibrant-ink.css +0 -32
  175. data/vendor/assets/javascripts/bower/codemirror/theme/xq-dark.css +0 -51
  176. data/vendor/assets/javascripts/bower/codemirror/theme/xq-light.css +0 -43
  177. data/vendor/assets/javascripts/bower/codemirror/theme/zenburn.css +0 -37
  178. data/vendor/assets/javascripts/bower/es6-promise/.bower.json +0 -15
  179. data/vendor/assets/javascripts/bower/es6-promise/bower.json +0 -5
  180. data/vendor/assets/javascripts/bower/es6-promise/promise.js +0 -684
  181. data/vendor/assets/javascripts/bower/es6-promise/promise.min.js +0 -1
  182. data/vendor/assets/javascripts/bower/lodash/.bower.json +0 -33
  183. data/vendor/assets/javascripts/bower/lodash/LICENSE.txt +0 -22
  184. data/vendor/assets/javascripts/bower/lodash/bower.json +0 -23
  185. data/vendor/assets/javascripts/bower/lodash/dist/lodash.compat.js +0 -7157
  186. data/vendor/assets/javascripts/bower/lodash/dist/lodash.compat.min.js +0 -61
  187. data/vendor/assets/javascripts/bower/lodash/dist/lodash.js +0 -6785
  188. data/vendor/assets/javascripts/bower/lodash/dist/lodash.min.js +0 -56
  189. data/vendor/assets/javascripts/bower/lodash/dist/lodash.underscore.js +0 -4979
  190. data/vendor/assets/javascripts/bower/lodash/dist/lodash.underscore.min.js +0 -39
  191. data/vendor/assets/javascripts/bower/vue/.bower.json +0 -29
  192. data/vendor/assets/javascripts/bower/vue/bower.json +0 -17
  193. data/vendor/assets/javascripts/bower/vue/dist/vue.js +0 -7977
  194. data/vendor/assets/javascripts/bower/vue/dist/vue.min.js +0 -7
  195. data/vendor/assets/javascripts/sb-admin-v2/bootstrap.js +0 -1951
  196. data/vendor/assets/javascripts/sb-admin-v2/bootstrap.min.js +0 -6
  197. data/vendor/assets/javascripts/sb-admin-v2/demo/dashboard-demo.js +0 -117
  198. data/vendor/assets/javascripts/sb-admin-v2/demo/flot-demo.js +0 -1242
  199. data/vendor/assets/javascripts/sb-admin-v2/demo/morris-demo.js +0 -155
  200. data/vendor/assets/javascripts/sb-admin-v2/jquery-1.10.2.js +0 -6
  201. data/vendor/assets/javascripts/sb-admin-v2/plugins/dataTables/dataTables.bootstrap.js +0 -245
  202. data/vendor/assets/javascripts/sb-admin-v2/plugins/dataTables/jquery.dataTables.js +0 -14013
  203. data/vendor/assets/javascripts/sb-admin-v2/plugins/flot/excanvas.min.js +0 -1
  204. data/vendor/assets/javascripts/sb-admin-v2/plugins/flot/jquery.flot.js +0 -2599
  205. data/vendor/assets/javascripts/sb-admin-v2/plugins/flot/jquery.flot.pie.js +0 -750
  206. data/vendor/assets/javascripts/sb-admin-v2/plugins/flot/jquery.flot.resize.js +0 -60
  207. data/vendor/assets/javascripts/sb-admin-v2/plugins/flot/jquery.flot.tooltip.min.js +0 -12
  208. data/vendor/assets/javascripts/sb-admin-v2/plugins/metisMenu/jquery.metisMenu.js +0 -45
  209. data/vendor/assets/javascripts/sb-admin-v2/plugins/morris/morris.js +0 -1888
  210. data/vendor/assets/javascripts/sb-admin-v2/plugins/morris/raphael-2.1.0.min.js +0 -10
  211. data/vendor/assets/javascripts/sb-admin-v2/sb-admin.js +0 -18
  212. data/vendor/assets/stylesheets/.keep +0 -0
  213. data/vendor/assets/stylesheets/sb-admin-v2/bootstrap.css +0 -5830
  214. data/vendor/assets/stylesheets/sb-admin-v2/bootstrap.min.css +0 -7
  215. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/css/font-awesome.css +0 -1338
  216. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/css/font-awesome.min.css +0 -4
  217. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/fonts/FontAwesome.otf +0 -0
  218. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/fonts/fontawesome-webfont.eot +0 -0
  219. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/fonts/fontawesome-webfont.svg +0 -414
  220. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
  221. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/fonts/fontawesome-webfont.woff +0 -0
  222. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_bordered-pulled.scss +0 -16
  223. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_core.scss +0 -12
  224. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_fixed-width.scss +0 -6
  225. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_icons.scss +0 -412
  226. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_larger.scss +0 -13
  227. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_list.scss +0 -19
  228. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_mixins.scss +0 -20
  229. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_path.scss +0 -14
  230. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_rotated-flipped.scss +0 -9
  231. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_spinning.scss +0 -30
  232. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_stacked.scss +0 -20
  233. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_variables.scss +0 -381
  234. data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/font-awesome.scss +0 -17
  235. data/vendor/assets/stylesheets/sb-admin-v2/fonts/glyphicons-halflings-regular.eot +0 -0
  236. data/vendor/assets/stylesheets/sb-admin-v2/fonts/glyphicons-halflings-regular.svg +0 -229
  237. data/vendor/assets/stylesheets/sb-admin-v2/fonts/glyphicons-halflings-regular.ttf +0 -0
  238. data/vendor/assets/stylesheets/sb-admin-v2/fonts/glyphicons-halflings-regular.woff +0 -0
  239. data/vendor/assets/stylesheets/sb-admin-v2/plugins/dataTables/dataTables.bootstrap.css +0 -233
  240. data/vendor/assets/stylesheets/sb-admin-v2/plugins/morris/morris-0.4.3.min.css +0 -2
  241. data/vendor/assets/stylesheets/sb-admin-v2/plugins/social-buttons/social-buttons.css +0 -68
  242. data/vendor/assets/stylesheets/sb-admin-v2/plugins/timeline/timeline.css +0 -144
  243. data/vendor/assets/stylesheets/sb-admin-v2/sb-admin.css +0 -329
data/config/boot.rb CHANGED
@@ -1,3 +1,4 @@
1
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
2
 
3
3
  require 'bundler/setup' # Set up gems listed in the Gemfile.
4
+ require 'bootsnap/setup' # Speed up boot time by caching expensive operations.
@@ -1,5 +1,5 @@
1
1
  # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
2
+ require_relative 'application'
3
3
 
4
4
  # Initialize the Rails application.
5
5
  Rails.application.initialize!
@@ -1,4 +1,6 @@
1
1
  Rails.application.configure do
2
+ # Verifies that versions and hashed value of the package contents in the project's package.json
3
+ config.webpacker.check_yarn_integrity = true
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
4
6
  # In the development environment your application's code is reloaded on
@@ -9,18 +11,32 @@ Rails.application.configure do
9
11
  # Do not eager load code on boot.
10
12
  config.eager_load = false
11
13
 
12
- # Show full error reports and disable caching.
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
14
+ # Show full error reports.
15
+ config.consider_all_requests_local = true
16
+
17
+ # Enable/disable caching. By default caching is disabled.
18
+ # Run rails dev:cache to toggle caching.
19
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
20
+ config.action_controller.perform_caching = true
21
+
22
+ config.cache_store = :memory_store, { size: 16 * 1024 * 1024 } # NOTE: `16.megabytes` will be undefined method error at here
23
+ config.public_file_server.headers = {
24
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
25
+ }
26
+ else
27
+ config.action_controller.perform_caching = false
28
+
29
+ config.cache_store = :null_store
30
+ end
15
31
 
16
32
  # Don't care if the mailer can't send.
17
33
  config.action_mailer.raise_delivery_errors = false
18
34
 
35
+ config.action_mailer.perform_caching = false
36
+
19
37
  # Print deprecation notices to the Rails logger.
20
38
  config.active_support.deprecation = :log
21
39
 
22
- config.cache_store = :memory_store, { size: 16 * 1024 * 1024 } # NOTE: `16.megabytes` will be undefined method error at here
23
-
24
40
  # Debug mode disables concatenation and preprocessing of assets.
25
41
  # This option may cause significant delays in view rendering with a large
26
42
  # number of complex assets.
@@ -30,7 +46,13 @@ Rails.application.configure do
30
46
  # Checks for improperly declared sprockets dependencies.
31
47
  # Raises helpful error messages.
32
48
  config.assets.raise_runtime_errors = true
49
+ # Suppress logger output for asset requests.
50
+ config.assets.quiet = true
33
51
 
34
52
  # Raises error for missing translations
35
53
  # config.action_view.raise_on_missing_translations = true
54
+
55
+ # Use an evented file watcher to asynchronously detect changes in source code,
56
+ # routes, locales, etc. This feature depends on the listen gem.
57
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
36
58
  end
@@ -1,4 +1,6 @@
1
1
  Rails.application.configure do
2
+ # Verifies that versions and hashed value of the package contents in the project's package.json
3
+ config.webpacker.check_yarn_integrity = false
2
4
  # Settings specified here will take precedence over those in config/application.rb.
3
5
 
4
6
  # Code is not reloaded between requests.
@@ -14,16 +16,25 @@ Rails.application.configure do
14
16
  config.consider_all_requests_local = false
15
17
  config.action_controller.perform_caching = true
16
18
 
17
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
- # Add `rack-cache` to your Gemfile before enabling this.
19
- # For large-scale production use, consider using a caching reverse proxy like
20
- # NGINX, varnish or squid.
21
- # config.action_dispatch.rack_cache = true
19
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
20
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
21
+ # config.require_master_key = true
22
22
 
23
23
  # Disable serving static files from the `/public` folder by default since
24
24
  # Apache or NGINX already handles this.
25
- config.serve_static_files = true
25
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
26
 
27
+ # Compress JavaScripts and CSS.
28
+ config.assets.js_compressor = :uglifier
29
+ # config.assets.css_compressor = :sass
30
+
31
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
32
+ config.assets.compile = false
33
+
34
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
35
+
36
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
37
+ # config.action_controller.asset_host = 'http://assets.example.com'
27
38
 
28
39
  # Specifies the header that your server uses for sending files.
29
40
  # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
@@ -32,24 +43,21 @@ Rails.application.configure do
32
43
  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
33
44
  # config.force_ssl = true
34
45
 
35
- # Set to :debug to see everything in the log.
36
- config.log_level = :info
46
+ # Use the lowest log level to ensure availability of diagnostic information
47
+ # when problems arise.
48
+ config.log_level = :debug
37
49
 
38
50
  # Prepend all log lines with the following tags.
39
- # config.log_tags = [ :subdomain, :uuid ]
40
-
41
- # Use a different logger for distributed setups.
42
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
51
+ config.log_tags = [ :request_id ]
43
52
 
44
53
  # cache for rubygems.org response
45
54
  config.cache_store = :memory_store, { size: 16 * 1024 * 1024 } # NOTE: `16.megabytes` will be undefined method error at here
46
55
 
47
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
48
- # config.action_controller.asset_host = "http://assets.example.com"
56
+ # Use a real queuing backend for Active Job (and separate queues per environment)
57
+ # config.active_job.queue_adapter = :resque
58
+ # config.active_job.queue_name_prefix = "fluentd_ui_#{Rails.env}"
49
59
 
50
- # Precompile additional assets.
51
- # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
52
- # config.assets.precompile += %w( search.js )
60
+ config.action_mailer.perform_caching = false
53
61
 
54
62
  # Ignore bad email addresses and do not raise email delivery errors.
55
63
  # Set this to true and configure the email server for immediate delivery to raise delivery errors.
@@ -62,13 +70,16 @@ Rails.application.configure do
62
70
  # Send deprecation notices to registered listeners.
63
71
  config.active_support.deprecation = :notify
64
72
 
65
- # Disable automatic flushing of the log to improve performance.
66
- # config.autoflush_log = false
67
-
68
73
  # Use default logging formatter so that PID and timestamp are not suppressed.
69
74
  config.log_formatter = ::Logger::Formatter.new
70
75
 
71
-
72
- # Don't concat assets for font-awesome path resolving, instead of changing url in css files
73
- config.assets.debug = true
76
+ # Use a different logger for distributed setups.
77
+ # require 'syslog/logger'
78
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
79
+
80
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
81
+ logger = ActiveSupport::Logger.new(STDOUT)
82
+ logger.formatter = config.log_formatter
83
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
84
+ end
74
85
  end
@@ -12,9 +12,11 @@ Rails.application.configure do
12
12
  # preloads Rails for running tests, you may have to set it to true.
13
13
  config.eager_load = false
14
14
 
15
- # Configure static file server for tests with Cache-Control for performance.
16
- config.serve_static_files = true
17
- config.static_cache_control = 'public, max-age=3600'
15
+ # Configure public file server for tests with Cache-Control for performance.
16
+ config.public_file_server.enabled = true
17
+ config.public_file_server.headers = {
18
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
19
+ }
18
20
 
19
21
  # Show full error reports and disable caching.
20
22
  config.consider_all_requests_local = true
@@ -27,6 +29,8 @@ Rails.application.configure do
27
29
  # Disable request forgery protection in test environment.
28
30
  config.action_controller.allow_forgery_protection = false
29
31
 
32
+ config.action_mailer.perform_caching = false
33
+
30
34
  # Tell Action Mailer not to deliver emails to the real world.
31
35
  # The :test delivery method accumulates sent emails in the
32
36
  # ActionMailer::Base.deliveries array.
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # ActiveSupport::Reloader.to_prepare do
4
+ # ApplicationController.renderer.defaults.merge!(
5
+ # http_host: 'example.org',
6
+ # https: false
7
+ # )
8
+ # end
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path.
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+ # Add Yarn node_modules folder to the asset load path.
9
+ Rails.application.config.assets.paths << Rails.root.join('node_modules')
10
+
11
+ # Precompile additional assets.
12
+ # application.js, application.css, and all non-JS/CSS in the app/assets
13
+ # folder are already added.
14
+ # Rails.application.config.assets.precompile += %w( admin.js admin.css )
@@ -0,0 +1,25 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Define an application-wide content security policy
4
+ # For further information see the following documentation
5
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6
+
7
+ # Rails.application.config.content_security_policy do |policy|
8
+ # policy.default_src :self, :https
9
+ # policy.font_src :self, :https, :data
10
+ # policy.img_src :self, :https, :data
11
+ # policy.object_src :none
12
+ # policy.script_src :self, :https
13
+ # policy.style_src :self, :https
14
+
15
+ # # Specify URI for violation reports
16
+ # # policy.report_uri "/csp-violation-report-endpoint"
17
+ # end
18
+
19
+ # If you are using UJS then enable automatic nonce generation
20
+ # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
21
+
22
+ # Report CSP violations to a specified URI
23
+ # For further information see the following documentation:
24
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
25
+ # Rails.application.config.content_security_policy_report_only = true
@@ -1,3 +1,5 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
+ # Specify a serializer for the signed and encrypted cookie jars.
4
+ # Valid options are :json, :marshal, and :hybrid.
3
5
  Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -1,6 +1,7 @@
1
+ require "plugin" # Avoid: RuntimeError Circular dependency detected while autoloading constant Plugin
1
2
  unless Rails.env.test?
2
3
  unless FluentdUI.td_agent_ui?
3
4
  # td-agent-ui shouldn't auto update
4
- FluentdUiUpdateCheck.new.async.perform
5
+ FluentdUiUpdateCheckJob.perform_later
5
6
  end
6
7
  end
@@ -0,0 +1,35 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains migration options to ease your Rails 5.2 upgrade.
4
+ #
5
+ # Once upgraded flip defaults one by one to migrate to the new default.
6
+ #
7
+ # Read the Guide for Upgrading Ruby on Rails for more info on each option.
8
+
9
+ # Make Active Record use stable #cache_key alongside new #cache_version method.
10
+ # This is needed for recyclable cache keys.
11
+ # Rails.application.config.active_record.cache_versioning = true
12
+
13
+ # Use AES-256-GCM authenticated encryption for encrypted cookies.
14
+ # Also, embed cookie expiry in signed or encrypted cookies for increased security.
15
+ #
16
+ # This option is not backwards compatible with earlier Rails versions.
17
+ # It's best enabled when your entire app is migrated and stable on 5.2.
18
+ #
19
+ # Existing cookies will be converted on read then written with the new scheme.
20
+ # Rails.application.config.action_dispatch.use_authenticated_cookie_encryption = true
21
+
22
+ # Use AES-256-GCM authenticated encryption as default cipher for encrypting messages
23
+ # instead of AES-256-CBC, when use_authenticated_message_encryption is set to true.
24
+ # Rails.application.config.active_support.use_authenticated_message_encryption = true
25
+
26
+ # Add default protection from forgery to ActionController::Base instead of in
27
+ # ApplicationController.
28
+ # Rails.application.config.action_controller.default_protect_from_forgery = true
29
+
30
+ # Store boolean values are in sqlite3 databases as 1 and 0 instead of 't' and
31
+ # 'f' after migrating old data.
32
+ # Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
33
+
34
+ # Use SHA-1 instead of MD5 to generate non-sensitive digests, such as the ETag header.
35
+ # Rails.application.config.active_support.use_sha1_digests = true
@@ -1 +1,4 @@
1
- AllPluginCheckUpdate.new.async.perform
1
+ require "plugin" # Avoid: RuntimeError Circular dependency detected while autoloading constant Plugin
2
+ unless Rails.env.test?
3
+ AllPluginCheckUpdateJob.perform_later
4
+ end
@@ -5,10 +5,5 @@
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
7
  ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
8
+ wrap_parameters format: [:json]
9
9
  end
10
-
11
- # To enable root element in JSON for ActiveRecord objects.
12
- # ActiveSupport.on_load(:active_record) do
13
- # self.include_root_in_json = true
14
- # end
@@ -1,3 +1,4 @@
1
+ ---
1
2
  ja:
2
3
  date:
3
4
  abbr_day_names:
@@ -31,9 +32,9 @@ ja:
31
32
  - 金曜日
32
33
  - 土曜日
33
34
  formats:
34
- default: ! '%Y/%m/%d'
35
- long: ! '%Y年%m月%d日(%a)'
36
- short: ! '%m/%d'
35
+ default: "%Y/%m/%d"
36
+ long: "%Y年%m月%d日(%a)"
37
+ short: "%m/%d"
37
38
  month_names:
38
39
  -
39
40
  - 1月
@@ -65,29 +66,32 @@ ja:
65
66
  other: 約%{count}年
66
67
  almost_x_years:
67
68
  one: 1年弱
68
- other: ! '%{count}年弱'
69
+ other: "%{count}年弱"
69
70
  half_a_minute: 30秒前後
70
71
  less_than_x_minutes:
71
72
  one: 1分以内
72
- other: ! '%{count}分未満'
73
+ other: "%{count}分未満"
73
74
  less_than_x_seconds:
74
75
  one: 1秒以内
75
- other: ! '%{count}秒未満'
76
+ other: "%{count}秒未満"
76
77
  over_x_years:
77
78
  one: 1年以上
78
- other: ! '%{count}年以上'
79
+ other: "%{count}年以上"
79
80
  x_days:
80
81
  one: 1日
81
- other: ! '%{count}日'
82
+ other: "%{count}日"
82
83
  x_minutes:
83
84
  one: 1分
84
- other: ! '%{count}分'
85
+ other: "%{count}分"
85
86
  x_months:
86
87
  one: 1ヶ月
87
- other: ! '%{count}ヶ月'
88
+ other: "%{count}ヶ月"
89
+ x_years:
90
+ one: 1年
91
+ other: "%{count}年"
88
92
  x_seconds:
89
93
  one: 1秒
90
- other: ! '%{count}秒'
94
+ other: "%{count}秒"
91
95
  prompts:
92
96
  day: 日
93
97
  hour: 時
@@ -96,40 +100,40 @@ ja:
96
100
  second: 秒
97
101
  year: 年
98
102
  errors:
99
- format: ! '%{attribute}%{message}'
103
+ format: "%{attribute}%{message}"
100
104
  messages:
101
- accepted: を受諾してください。
102
- blank: を入力してください。
103
- present: は入力しないでください。
104
- confirmation: と%{attribute}の入力が一致しません。
105
- empty: を入力してください。
106
- equal_to: は%{count}にしてください。
107
- even: は偶数にしてください。
108
- exclusion: は予約されています。
109
- greater_than: は%{count}より大きい値にしてください。
110
- greater_than_or_equal_to: は%{count}以上の値にしてください。
111
- inclusion: は一覧にありません。
112
- invalid: は不正な値です。
113
- less_than: は%{count}より小さい値にしてください。
114
- less_than_or_equal_to: は%{count}以下の値にしてください。
115
- not_a_number: は数値で入力してください。
116
- not_an_integer: は整数で入力してください。
117
- odd: は奇数にしてください。
118
- record_invalid: バリデーションに失敗しました。 %{errors}
119
- restrict_dependent_destroy: ! '%{record}が存在しているので削除できません。'
120
- taken: はすでに存在します。
121
- too_long: は%{count}文字以内で入力してください。
122
- too_short: は%{count}文字以上で入力してください。
123
- wrong_length: は%{count}文字で入力してください。
124
- other_than: "は%{count}以外の値にしてください。"
105
+ accepted: を受諾してください
106
+ blank: を入力してください
107
+ present: は入力しないでください
108
+ confirmation: と%{attribute}の入力が一致しません
109
+ empty: を入力してください
110
+ equal_to: は%{count}にしてください
111
+ even: は偶数にしてください
112
+ exclusion: は予約されています
113
+ greater_than: は%{count}より大きい値にしてください
114
+ greater_than_or_equal_to: は%{count}以上の値にしてください
115
+ inclusion: は一覧にありません
116
+ invalid: は不正な値です
117
+ less_than: は%{count}より小さい値にしてください
118
+ less_than_or_equal_to: は%{count}以下の値にしてください
119
+ model_invalid: "バリデーションに失敗しました: %{errors}"
120
+ not_a_number: は数値で入力してください
121
+ not_an_integer: は整数で入力してください
122
+ odd: は奇数にしてください
123
+ required: を入力してください
124
+ taken: はすでに存在します
125
+ too_long: は%{count}文字以内で入力してください
126
+ too_short: は%{count}文字以上で入力してください
127
+ wrong_length: は%{count}文字で入力してください
128
+ other_than: は%{count}以外の値にしてください
125
129
  template:
126
- body: 次の項目を確認してください。
130
+ body: 次の項目を確認してください
127
131
  header:
128
- one: ! '%{model}にエラーが発生しました。'
129
- other: ! '%{model}に%{count}個のエラーが発生しました。'
132
+ one: "%{model}にエラーが発生しました"
133
+ other: "%{model}に%{count}個のエラーが発生しました"
130
134
  helpers:
131
135
  select:
132
- prompt: 選択してください。
136
+ prompt: 選択してください
133
137
  submit:
134
138
  create: 登録する
135
139
  submit: 保存する
@@ -137,22 +141,22 @@ ja:
137
141
  number:
138
142
  currency:
139
143
  format:
140
- delimiter: ! ','
141
- format: ! '%n%u'
144
+ delimiter: ","
145
+ format: "%n%u"
142
146
  precision: 0
143
- separator: .
147
+ separator: "."
144
148
  significant: false
145
149
  strip_insignificant_zeros: false
146
150
  unit: 円
147
151
  format:
148
- delimiter: ! ','
152
+ delimiter: ","
149
153
  precision: 3
150
- separator: .
154
+ separator: "."
151
155
  significant: false
152
156
  strip_insignificant_zeros: false
153
157
  human:
154
158
  decimal_units:
155
- format: ! '%n %u'
159
+ format: "%n %u"
156
160
  units:
157
161
  billion: 十億
158
162
  million: 百万
@@ -166,13 +170,13 @@ ja:
166
170
  significant: true
167
171
  strip_insignificant_zeros: true
168
172
  storage_units:
169
- format: ! '%n%u'
173
+ format: "%n%u"
170
174
  units:
171
175
  byte: バイト
172
- gb: ギガバイト
173
- kb: キロバイト
174
- mb: メガバイト
175
- tb: テラバイト
176
+ gb: GB
177
+ kb: KB
178
+ mb: MB
179
+ tb: TB
176
180
  percentage:
177
181
  format:
178
182
  delimiter: ''
@@ -182,13 +186,13 @@ ja:
182
186
  delimiter: ''
183
187
  support:
184
188
  array:
185
- last_word_connector:
186
- two_words_connector:
187
- words_connector:
189
+ last_word_connector:
190
+ two_words_connector:
191
+ words_connector:
188
192
  time:
189
193
  am: 午前
190
194
  formats:
191
- default: ! '%Y/%m/%d %H:%M:%S'
192
- long: ! '%Y年%m月%d日(%a) %H時%M分%S秒 %z'
193
- short: ! '%y/%m/%d %H:%M'
195
+ default: "%Y/%m/%d %H:%M:%S"
196
+ long: "%Y年%m月%d日(%a) %H時%M分%S秒 %z"
197
+ short: "%y/%m/%d %H:%M"
194
198
  pm: 午後