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
@@ -1,18 +1,22 @@
1
1
  # pidfile
2
2
  # td-agent: /var/run/td-agent/td-agent.pid
3
- # - https://github.com/treasure-data/td-agent/blob/master/td-agent.logrotate#L10
4
- # - https://github.com/treasure-data/td-agent/blob/master/debian/td-agent.init#L25
3
+ # - https://github.com/treasure-data/omnibus-td-agent/blob/master/templates/etc/systemd/td-agent.service.erb#L18
4
+ # - https://github.com/treasure-data/omnibus-td-agent/blob/master/templates/etc/init.d/deb/td-agent#L24
5
+ # - https://github.com/treasure-data/omnibus-td-agent/blob/master/templates/etc/init.d/rpm/td-agent#L24
6
+ # - https://github.com/treasure-data/omnibus-td-agent/blob/master/templates/etc/td-agent/logrotate.d/td-agent.logrotate#L10
5
7
  # fluentd: nothing (or --daemon PIDFILE)
6
8
  #
7
9
  # logfile
8
10
  # td-agent: /var/log/td-agent/td-agent.log
9
- # - https://github.com/treasure-data/td-agent/blob/master/debian/td-agent.init#L28
11
+ # - https://github.com/treasure-data/omnibus-td-agent/blob/master/templates/etc/systemd/td-agent.service.erb#L21
12
+ # - https://github.com/treasure-data/omnibus-td-agent/blob/master/templates/etc/init.d/deb/td-agent#L23
13
+ # - https://github.com/treasure-data/omnibus-td-agent/blob/master/templates/etc/init.d/rpm/td-agent#L23
10
14
  # fluentd: stdout (or --log LOGFILE)
11
15
  #
12
16
  # config file
13
17
  # td-agent: /etc/td-agent/td-agent.conf
14
- # - https://github.com/treasure-data/td-agent/blob/master/debian/td-agent.postinst#L69
15
- # fluentd: /etc/fluent/fluent.conf (by fluentd -s)
18
+ # - https://github.com/treasure-data/omnibus-td-agent/blob/master/templates/etc/systemd/td-agent.service.erb#L14
19
+ # fluentd: /etc/fluent/fluent.conf (created by fluentd -s)
16
20
 
17
21
  class Fluentd
18
22
  class Agent
@@ -20,7 +24,7 @@ class Fluentd
20
24
  attr_reader :extra_options
21
25
 
22
26
  def self.included(base)
23
- base.send(:include, Fluentd::Agent::ProcessOperation)
27
+ base.include(Fluentd::Agent::ProcessOperation)
24
28
  end
25
29
 
26
30
  # define these methods on each Agent class
@@ -36,7 +36,7 @@ class Fluentd
36
36
  end
37
37
  end
38
38
 
39
- def reload # NOTE: does not used currently, and td-agent has no reload command
39
+ def reload
40
40
  return false unless running?
41
41
  actual_reload
42
42
  end
@@ -96,8 +96,7 @@ class Fluentd
96
96
  true
97
97
  rescue Errno::ESRCH
98
98
  # successful to create pidfile, but process not exists.
99
- # any error occured at booting process that after create pidfile. such as readling config, loading plugins, etc
100
- # https://github.com/fluent/fluentd/blob/master/lib/fluent/supervisor.rb#L106
99
+ # any error occured at booting process that after create pidfile. such as reading config, loading plugins, etc
101
100
  false
102
101
  rescue TimeoutError
103
102
  false
@@ -4,18 +4,20 @@ class Fluentd
4
4
  module Unix
5
5
  def start
6
6
  backup_running_config do
7
- detached_command('/etc/init.d/td-agent start')
7
+ detached_command("systemctl start td-agent.service")
8
8
  end
9
9
  end
10
10
 
11
11
  def stop
12
- detached_command('/etc/init.d/td-agent stop')
12
+ detached_command("systemctl stop td-agent.service")
13
13
  end
14
14
 
15
15
  def restart
16
- # NOTE: td-agent has no reload command
17
- # https://github.com/treasure-data/td-agent/blob/master/debian/td-agent.init#L156
18
- detached_command('/etc/init.d/td-agent restart')
16
+ detached_command("systemctl restart td-agent.service")
17
+ end
18
+
19
+ def reload
20
+ detached_command("systemctl reload td-agent.service")
19
21
  end
20
22
  end
21
23
  end
@@ -101,7 +101,7 @@ class Fluentd
101
101
 
102
102
  def to_conf
103
103
  # NOTE: Using strip_heredoc makes more complex for format_specific_conf indent
104
- <<-XML.gsub(/^[ ]*\n/m, "")
104
+ <<-CONFIG.gsub(/^[ ]*\n/m, "")
105
105
  <source>
106
106
  type tail
107
107
  path #{path}
@@ -114,7 +114,7 @@ class Fluentd
114
114
  #{rotate_wait.present? ? "rotate_wait #{rotate_wait}" : ""}
115
115
  #{refresh_interval.present? ? "refresh_interval #{refresh_interval}" : ""}
116
116
  </source>
117
- XML
117
+ CONFIG
118
118
  end
119
119
  end
120
120
  end
@@ -1,4 +1,4 @@
1
- .col-xs-6
1
+ .col-xl-6
2
2
  - @fluentd.errors.full_messages.each do |e|
3
3
  .alert.alert-danger= e
4
4
 
@@ -1,19 +1,18 @@
1
1
  - page_title t('fluentd.common.recent_errors', days: @error_duration_days) do
2
- - link_to raw_log_daemon_path(@fluentd), class: "btn btn-primary pull-right" do
2
+ - link_to raw_log_daemon_path(@fluentd), class: "btn btn-primary float-right mt-3" do
3
3
  = icon('fa-download')
4
4
  = t('fluentd.common.raw_log_link')
5
5
 
6
6
  .row
7
- .col-xs-12
7
+ .col-xl-12.col-sm-12
8
8
  - @errors.each do |error|
9
- .panel.panel-default
10
- .panel-heading
9
+ .card.card-primary
10
+ .card-heading
11
11
  %h4= error[:subject]
12
12
  - if error[:notes].present?
13
- .panel-body
13
+ .card-body
14
14
  %ul
15
15
  - error[:notes].each do |stack|
16
16
  %li= stack
17
17
  - if @errors.empty?
18
18
  %p= t('.error_is_empty')
19
-
@@ -1,9 +1,8 @@
1
1
  - page_title t('.page_title', label: @fluentd.label) do
2
- - link_to raw_log_daemon_path(@fluentd), class: "btn btn-primary pull-right" do
2
+ - link_to raw_log_daemon_path(@fluentd), class: "btn btn-primary float-right mt-3" do
3
3
  = icon('fa-download')
4
4
  = t('fluentd.common.raw_log_link')
5
5
 
6
- .row
7
- .col-xs-12
8
- = preserve do # partial containing <pre>, so shouldn't break indent
9
- = render partial: "shared/vue/fluent_log", locals: { fluentd: @fluentd }
6
+ .row.ml-3
7
+ = preserve do # partial containing <pre>, so shouldn't break indent
8
+ = render partial: "shared/vue/fluent_log", locals: { fluentd: @fluentd }
@@ -1,8 +1,9 @@
1
1
  - page_title t('.page_title', label: @fluentd.label)
2
+ - add_javascript_pack_tag("codemirror")
2
3
 
3
4
  = form_tag(daemon_setting_path(@fluentd), method: :patch) do
4
5
  .form-group
5
6
  = text_area_tag "config", @config, class: "form-control js-fluentd-config-editor", rows: 40
6
7
  %p.text.text-danger= t('terms.notice_restart_for_config_edit', brand: fluentd_ui_brand)
7
8
  = submit_tag t("terms.update"), class: "btn btn-primary"
8
- = submit_tag t("terms.configtest"), class: "btn btn-default", name: "dryrun"
9
+ = submit_tag t("terms.configtest"), class: "btn btn-secondary", name: "dryrun"
@@ -14,4 +14,4 @@
14
14
  .form-group.input-group
15
15
  = f.text_field :content, value: file.note.content, class: "note-content form-control", id: nil
16
16
  %span.input-group-btn
17
- = submit_tag t('terms.save'), class: 'btn btn-default'
17
+ = submit_tag t('terms.save'), class: 'btn btn-info'
@@ -1,7 +1,7 @@
1
1
  - page_title t('.page_title', label: @fluentd.label)
2
2
 
3
- %p.pull-right
4
- = link_to configtest_daemon_setting_history_path(id: @backup_file.file_id), method: "post", class: "btn btn-default" do
3
+ %p.float-right
4
+ = link_to configtest_daemon_setting_history_path(id: @backup_file.file_id), method: "post", class: "btn btn-secondary" do
5
5
  = icon('fa-legal')
6
6
  = t("terms.configtest")
7
7
  = link_to reuse_daemon_setting_history_path(id: @backup_file.file_id), method: 'post', class: "btn btn-primary" do
@@ -10,22 +10,22 @@
10
10
 
11
11
  - if @backup_file.note.content.present?
12
12
  .row
13
- .col-xs-12
13
+ .col-xl-12
14
14
  %p= @backup_file.note.content
15
15
 
16
16
  .row
17
- .col-xs-12
17
+ .col-xl-12
18
18
  %h2
19
19
  ="#{t('.target_config')}(#{params[:id]})"
20
20
  %pre
21
21
  = preserve do
22
22
  = @backup_file.content
23
23
 
24
- .col-xs-12.diff
24
+ .col-xl-12.diff
25
25
  %h2
26
26
  Diff:
27
27
  %div
28
28
  = t(".diff_description", file_name: params[:id] )
29
- .pull-right
29
+ .float-right
30
30
  = link_to t(".show_current"), daemon_setting_path(@fluentd)
31
31
  = preserve render "/shared/settings/diff"
@@ -12,8 +12,9 @@
12
12
  = f.text_field :path, class: "form-control", disabled: true
13
13
  = render partial: "shared/vue/in_tail_format", locals: { file: f.object.path, formats: @setting.known_formats, initialSelected: f.object.format || @setting.guess_format }
14
14
 
15
- %pre= file_tail(@setting.path, Settings.in_tail_preview_line_count).join("\n")
15
+ .card
16
+ %pre.card-body= file_tail(@setting.path, Settings.in_tail_preview_line_count).join("\n")
16
17
 
17
18
  %p
18
- = f.submit t('terms.next'), class: "btn btn-lg btn-primary pull-right"
19
- = link_to t('terms.prev'), daemon_setting_in_tail_path(@fluentd), class: "btn btn-lg btn-default"
19
+ = f.submit t('terms.next'), class: "btn btn-lg btn-primary float-right"
20
+ = link_to t('terms.prev'), daemon_setting_in_tail_path(@fluentd), class: "btn btn-lg btn-secondary"
@@ -6,5 +6,5 @@
6
6
  = render partial: "form", locals: { f: f }
7
7
 
8
8
  %p
9
- = f.submit t('terms.next'), class: "btn btn-lg btn-primary pull-right"
10
- = f.submit t('terms.prev'), class: "btn btn-lg btn-default", name: "back"
9
+ = f.submit t('terms.next'), class: "btn btn-lg btn-primary float-right"
10
+ = f.submit t('terms.prev'), class: "btn btn-lg btn-secondary", name: "back"
@@ -8,6 +8,6 @@
8
8
  %pre= @setting.to_conf
9
9
 
10
10
  %p
11
- = f.submit t('fluentd.common.finish') , class: "btn btn-lg btn-primary pull-right"
12
- = f.submit t('terms.prev'), class: "btn btn-lg btn-default", name: "back"
13
- .clearfix.pull-right= t('terms.notice_restart_for_config_edit', brand: fluentd_ui_brand)
11
+ = f.submit t('fluentd.common.finish') , class: "btn btn-lg btn-primary float-right"
12
+ = f.submit t('terms.prev'), class: "btn btn-lg btn-secondary", name: "back"
13
+ .clearfix.float-right= t('terms.notice_restart_for_config_edit', brand: fluentd_ui_brand)
@@ -1,8 +1,8 @@
1
1
  - page_title t('.page_title', label: @fluentd.label)
2
2
 
3
3
  - if @backup_file.content
4
- %p.pull-right
5
- = link_to configtest_daemon_setting_running_backup_path, method: 'post', class: "btn btn-default" do
4
+ %p.float-right
5
+ = link_to configtest_daemon_setting_running_backup_path, method: 'post', class: "btn btn-secondary" do
6
6
  = icon('fa-legal')
7
7
  = t("terms.configtest")
8
8
  = link_to reuse_daemon_setting_running_backup_path, method: 'post', class: "btn btn-primary" do
@@ -10,7 +10,7 @@
10
10
  = t("terms.reuse")
11
11
 
12
12
  .row
13
- .col-xs-12
13
+ .col-xl-12
14
14
  - if @backup_file.content
15
15
  %h2
16
16
  = t('.page_title')
@@ -21,11 +21,11 @@
21
21
  %p
22
22
  =t('fluentd.common.never_started_yet', brand: fluentd_ui_brand)
23
23
  - if @backup_file.content
24
- .col-xs-12.diff
24
+ .col-xl-12.diff
25
25
  %h2
26
26
  Diff:
27
27
  %div
28
28
  = t(".diff_description")
29
- .pull-right
29
+ .float-right
30
30
  = link_to t(".show_current"), daemon_setting_path(@fluentd)
31
31
  = preserve render "/shared/settings/diff"
@@ -1,23 +1,23 @@
1
1
  - page_title t('.page_title') do
2
- - link_to edit_daemon_setting_path(@fluentd), class: "btn btn-primary pull-right" do
2
+ - link_to edit_daemon_setting_path(@fluentd), class: "btn btn-primary float-right mt-3" do
3
3
  = icon('fa-pencil')
4
4
  = t("terms.edit")
5
5
 
6
- .row
7
- .col-xs-12
8
- %pre
6
+ .row.mb-3
7
+ .card.col-xl-12.bg-light.ml-3
8
+ %pre.card-body
9
9
  = preserve do
10
10
  = @config
11
11
 
12
- .row
13
- .col-xs-12
12
+ .row.mb-3
13
+ .col-xl-12
14
14
  %h3= link_to(t('fluentd.settings.running_backup.title'), daemon_setting_running_backup_path)
15
15
  %p
16
16
  %label= t('terms.backup_time')
17
17
  = @running_backedup_file.ctime.try(:strftime, I18n.t('time.formats.default')) || t('fluentd.common.never_started_yet', brand: fluentd_ui_brand)
18
18
 
19
19
  .row
20
- .col-xs-12
20
+ .col-xl-12
21
21
  %h3= t('fluentd.settings.history')
22
22
  = render '/fluentd/settings/histories/list'
23
23
  .link= link_to t('.link_to_histories'), daemon_setting_histories_path
@@ -1,27 +1,28 @@
1
+ - add_javascript_pack_tag("settings")
1
2
  - page_title t('.page_title')
2
3
 
3
4
  .row.fluentd-setting-inout
4
- .col-xs-4
5
- .panel.panel-default
6
- .panel-heading
5
+ .col-xl-4
6
+ .card.card-primary
7
+ .card-header
7
8
  %h4= t('.in')
8
- .panel-body
9
+ .card-body
9
10
  - %w|tail syslog monitor_agent http forward|.each do |type|
10
11
  %p
11
12
  = link_to(send("daemon_setting_in_#{type}_path", @fluentd)) do
12
13
  = icon('fa-file-text-o fa-lg')
13
14
  = t("fluentd.common.setup_in_#{type}")
14
- .col-xs-1.arrow-right
15
+ .col-xl-1.arrow-right
15
16
  = icon "fa-arrow-circle-right"
16
- .col-xs-2
17
+ .col-xl-2
17
18
  = image_tag "/fluentd-logo.png", style: "max-width: 100%"
18
- .col-xs-1.arrow-right
19
+ .col-xl-1.arrow-right
19
20
  = icon "fa-arrow-circle-right"
20
- .col-xs-4
21
- .panel.panel-default
22
- .panel-heading
21
+ .col-xl-4
22
+ .card.card-primary
23
+ .card-header
23
24
  %h4= t('.out')
24
- .panel-body
25
+ .card-body
25
26
  - %w|stdout td s3 mongo elasticsearch forward|.each do |type|
26
27
  %p
27
28
  = link_to(send("daemon_setting_out_#{type}_path", @fluentd)) do
@@ -33,17 +34,29 @@
33
34
  #vue-setting.current-settings
34
35
  %h2
35
36
  = t('.current')
36
- .pull-right
37
- %button.btn.btn-default.btn-sm{"v-on" => "click: update", "v-if" => "!loading"}= icon('fa-refresh')
38
- %button.btn.btn-default.btn-sm{"v-if" => "loading"}= icon('fa-spin fa-refresh')
37
+ .float-right
38
+ %button.btn.btn-outline-dark.btn-sm{"v-on:click" => "update", "v-if" => "!loading"}= icon('fa-refresh')
39
+ %button.btn.btn-outline-dark.btn-sm{"v-if" => "loading"}= icon('fa-spin fa-refresh')
39
40
  .row
40
- .col-xs-6.input
41
+ .col-xl-6.input
41
42
  %h3= t('.in')
42
43
  %div{"v-if" => "loaded && sections.sources.length == 0"}
43
44
  %p.empty= t('.setting_empty')
44
- %div{"v-repeat" => "sections.sources", "v-component" => "section"}
45
- .col-xs-6.output
45
+ %setting-section{"v-if" => "loaded && sections.sources.length > 0",
46
+ "v-for" => "source in sections.sources",
47
+ "v-bind:id" => "source.id",
48
+ "v-bind:content" => "source.content",
49
+ "v-bind:type" => "source.type",
50
+ "v-bind:name" => "source.name",
51
+ "v-bind:arg" => "source.arg"}
52
+ .col-xl-6.output
46
53
  %h3= t('.out')
47
54
  %div{"v-if" => "loaded && sections.matches.length == 0"}
48
55
  %p.empty= t('.setting_empty')
49
- %div{"v-repeat" => "sections.matches", "v-component" => "section"}
56
+ %setting-section{"v-if" => "loaded && sections.matches.length > 0",
57
+ "v-for" => "match in sections.matches",
58
+ "v-bind:id" => "match.id",
59
+ "v-bind:content" => "match.content",
60
+ "v-bind:type" => "match.type",
61
+ "v-bind:name" => "match.name",
62
+ "v-bind:arg" => "match.arg"}
@@ -1,9 +1,9 @@
1
1
  - if @fluentd.present?
2
2
  - page_title t('.page_title')
3
3
  .row
4
- .col-xs-6
5
- %div{class: "panel panel-#{@fluentd.agent.running? ? "success":"default"}"}
6
- .panel-heading
4
+ .col-xl-6.col-sm-6
5
+ %div{class: "card card-#{@fluentd.agent.running? ? "primary":"secondary"}"}
6
+ .card-header
7
7
  %h4
8
8
  - if @fluentd.agent.running?
9
9
  = icon("fa-play")
@@ -11,17 +11,18 @@
11
11
  - else
12
12
  = icon("fa-pause")
13
13
  = t("fluentd.common.stopped")
14
- .panel-body
14
+ .card-body
15
15
  - if flash[:error]
16
16
  .alert.alert-danger= flash[:error]
17
- = link_to icon("fa-play") << t("fluentd.common.start"), start_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "disabled btn-default" : "btn-primary"}"
18
- = link_to icon("fa-pause") << t("fluentd.common.stop"), stop_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-danger" : "disabled btn-default"}"
19
- = link_to icon("fa-refresh") << t("fluentd.common.restart"), restart_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-warning" : "disabled btn-default"}"
20
- .col-xs-6
21
- .panel.panel-default
22
- .panel-heading
23
- .pull-right
24
- = link_to t('terms.edit'), edit_daemon_path, class: "btn btn-default"
17
+ = link_to icon("fa-play") << t("fluentd.common.start"), start_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "disabled btn-outline-dark" : "btn-primary"}"
18
+ = link_to icon("fa-pause") << t("fluentd.common.stop"), stop_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-danger" : "disabled btn-outline-dark"}"
19
+ = link_to icon("fa-refresh") << t("fluentd.common.restart"), restart_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-warning" : "disabled btn-outline-dark"}"
20
+ = link_to icon("fa-refresh") << t("fluentd.common.reload"), reload_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-info" : "disabled btn-default"}"
21
+ .col-xl-6.col-sm-6
22
+ .card.card-default
23
+ .card-header
24
+ .float-right
25
+ = link_to t('terms.edit'), edit_daemon_path, class: "btn btn-info"
25
26
  = link_to t('terms.destroy'), "#", class: "btn btn-danger", data: { toggle: "modal", target: "#setting-destroy-modal" }
26
27
  %h4= t('fluentd.common.fluentd_info')
27
28
  .modal.fade{id: "setting-destroy-modal"}
@@ -36,11 +37,11 @@
36
37
  = raw t('fluentd.common.destroy_fluentd_setting_warning', brand: fluentd_ui_brand)
37
38
  .modal-footer
38
39
  = form_tag(daemon_path(@fluentd), method: :delete) do
39
- %button.btn.btn-default{"data-dismiss" => "modal"}
40
+ %button.btn.btn-secondary{"data-dismiss" => "modal"}
40
41
  Close
41
42
  = submit_tag t('terms.destroy'), class: "btn btn-danger"
42
43
 
43
- %table.table.table-hover
44
+ %table.table.table-hover.mb-0
44
45
  %tbody
45
46
  %tr
46
47
  %th= @fluentd.class.human_attribute_name(:pid_file)
@@ -52,7 +53,7 @@
52
53
  %th= @fluentd.class.human_attribute_name(:config_file)
53
54
  %td= @fluentd.agent.config_file
54
55
  .row
55
- .col-xs-12
56
+ .col-xl-12
56
57
  = preserve do # partial containing <pre>, so shouldn't break indent
57
58
  = render partial: "shared/vue/fluent_log", locals: { fluentd: @fluentd }
58
59