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.
- checksums.yaml +5 -5
- data/.babelrc +18 -0
- data/.editorconfig +11 -0
- data/.gitignore +7 -0
- data/.postcssrc.yml +3 -0
- data/.travis.yml +20 -4
- data/ChangeLog.md +7 -2
- data/Gemfile +8 -6
- data/Gemfile.lock +177 -178
- data/README.md +15 -10
- data/app/assets/stylesheets/application.css +6 -5
- data/app/controllers/concerns/setting_history_concern.rb +1 -1
- data/app/controllers/fluentd/agents_controller.rb +5 -0
- data/app/controllers/misc_controller.rb +2 -2
- data/app/controllers/plugins_controller.rb +4 -4
- data/app/helpers/application_helper.rb +8 -2
- data/app/helpers/settings_helper.rb +2 -2
- data/app/javascript/packs/application.js +31 -0
- data/app/{assets/javascripts/codemirror_fluentd.js → javascript/packs/codemirror.js} +32 -1
- data/app/javascript/packs/fluent_log.js +63 -0
- data/app/javascript/packs/in_tail_format.js +174 -0
- data/app/javascript/packs/nested_settings.js +40 -0
- data/app/javascript/packs/notification.js +60 -0
- data/app/javascript/packs/settings.js +122 -0
- data/app/javascript/packs/treeview.js +99 -0
- data/{vendor/assets/javascripts/.keep → app/javascript/stylesheets/application.scss} +0 -0
- data/app/jobs/all_plugin_check_update_job.rb +10 -0
- data/app/jobs/application_job.rb +2 -0
- data/app/{workers/fluentd_ui_restart.rb → jobs/fluentd_ui_restart_job.rb} +4 -4
- data/app/jobs/fluentd_ui_update_check_job.rb +11 -0
- data/app/{workers/gem_installer.rb → jobs/gem_installer_job.rb} +4 -5
- data/app/jobs/gem_uninstaller_job.rb +14 -0
- data/app/jobs/gem_update_check_job.rb +9 -0
- data/app/models/fluentd/agent.rb +9 -5
- data/app/models/fluentd/agent/common.rb +10 -6
- data/app/models/fluentd/agent/fluentd_gem.rb +2 -3
- data/app/models/fluentd/agent/td_agent/unix.rb +7 -5
- data/app/models/fluentd/setting/in_tail.rb +2 -2
- data/app/views/fluentd/_form.html.haml +1 -1
- data/app/views/fluentd/errors.html.haml +5 -6
- data/app/views/fluentd/log.html.haml +4 -5
- data/app/views/fluentd/settings/edit.html.haml +2 -1
- data/app/views/fluentd/settings/histories/_list.html.haml +1 -1
- data/app/views/fluentd/settings/histories/show.html.haml +6 -6
- data/app/views/fluentd/settings/in_tail/after_file_choose.html.haml +4 -3
- data/app/views/fluentd/settings/in_tail/after_format.html.haml +2 -2
- data/app/views/fluentd/settings/in_tail/confirm.html.haml +3 -3
- data/app/views/fluentd/settings/running_backup/show.html.haml +5 -5
- data/app/views/fluentd/settings/show.html.haml +7 -7
- data/app/views/fluentd/settings/source_and_output.html.haml +31 -18
- data/app/views/fluentd/show.html.haml +16 -15
- data/app/views/layouts/application.html.erb +31 -46
- data/app/views/layouts/sign_in.html.erb +9 -16
- data/app/views/misc/information.html.haml +13 -13
- data/app/views/misc/update_fluentd_ui.html.haml +3 -3
- data/app/views/plugins/installed.html.haml +8 -8
- data/app/views/plugins/recommended.html.haml +5 -5
- data/app/views/plugins/updated.html.haml +5 -5
- data/app/views/sessions/new.html.haml +5 -6
- data/app/views/shared/_global_nav.html.erb +9 -9
- data/app/views/shared/_initial_setup.html.haml +3 -3
- data/app/views/shared/_modal.html.erb +1 -1
- data/app/views/shared/settings/_form.html.haml +9 -8
- data/app/views/shared/settings/show.html.haml +4 -2
- data/app/views/shared/vue/_fluent_log.html.erb +6 -6
- data/app/views/shared/vue/_in_tail_format.html.erb +31 -29
- data/app/views/shared/vue/_notification.html.erb +5 -9
- data/app/views/shared/vue/_setting.html.erb +12 -10
- data/app/views/shared/vue/_treeview.html.erb +13 -10
- data/app/views/tutorials/chapter1.html.erb +3 -4
- data/app/views/tutorials/chapter2.html.haml +2 -2
- data/app/views/tutorials/chapter3.html.haml +2 -2
- data/app/views/tutorials/chapter4.html.haml +2 -2
- data/app/views/users/show.html.haml +1 -1
- data/bin/bundle +1 -1
- data/bin/fluentd-ui +1 -0
- data/bin/rails +1 -1
- data/bin/setup +16 -17
- data/bin/update +28 -0
- data/bin/webpack +15 -0
- data/bin/webpack-dev-server +15 -0
- data/bin/yarn +11 -0
- data/config/application.rb +18 -5
- data/config/boot.rb +2 -1
- data/config/environment.rb +1 -1
- data/config/environments/development.rb +27 -5
- data/config/environments/production.rb +34 -23
- data/config/environments/test.rb +7 -3
- data/config/initializers/application_controller_renderer.rb +8 -0
- data/config/initializers/assets.rb +14 -0
- data/config/initializers/content_security_policy.rb +25 -0
- data/config/initializers/cookies_serializer.rb +2 -0
- data/config/initializers/fluentd_ui_update_check.rb +2 -1
- data/config/initializers/new_framework_defaults_5_2.rb +35 -0
- data/config/initializers/prefetch_gem_updates.rb +4 -1
- data/config/initializers/wrap_parameters.rb +1 -6
- data/config/locales/ja.yml +61 -57
- data/config/routes.rb +1 -0
- data/config/spring.rb +6 -0
- data/config/webpack/development.js +5 -0
- data/config/webpack/environment.js +20 -0
- data/config/webpack/loaders/vue.js +13 -0
- data/config/webpack/production.js +5 -0
- data/config/webpack/test.js +5 -0
- data/config/webpacker.yml +69 -0
- data/fluentd-ui.gemspec +16 -6
- data/lib/fluentd-ui/version.rb +1 -1
- data/lib/regexp_preview/single_line.rb +5 -5
- data/package.json +19 -0
- data/spec/controllers/application_controller_spec.rb +2 -6
- data/spec/controllers/fluentd/agents_controller_spec.rb +12 -0
- data/spec/controllers/polling_controller_spec.rb +1 -1
- data/spec/factories/fluentd.rb +1 -1
- data/spec/factories/plugins.rb +2 -2
- data/spec/factories/user.rb +1 -1
- data/spec/features/fluentd/setting/histories_spec.rb +7 -6
- data/spec/features/fluentd/setting/running_backup_spec.rb +4 -3
- data/spec/features/setting_spec.rb +1 -0
- data/spec/features/source_and_output_spec.rb +16 -16
- data/spec/lib/regexp_preview/single_line_spec.rb +1 -1
- data/spec/models/fluentd_spec.rb +4 -4
- data/spec/spec_helper.rb +16 -4
- data/yarn.lock +6225 -0
- metadata +120 -154
- data/.bowerrc +0 -3
- data/app/assets/javascripts/application.js +0 -24
- data/app/assets/javascripts/codemirror.js +0 -29
- data/app/assets/javascripts/enable_bootstrap_tooltip.js +0 -3
- data/app/assets/javascripts/nested_setting.js +0 -41
- data/app/assets/javascripts/vue/fluent_log.js +0 -64
- data/app/assets/javascripts/vue/in_tail_format.js +0 -177
- data/app/assets/javascripts/vue/notification.js +0 -65
- data/app/assets/javascripts/vue/settings.js +0 -121
- data/app/assets/javascripts/vue/treeview.js +0 -97
- data/app/assets/javascripts/vue_common.js +0 -4
- data/app/workers/all_plugin_check_update.rb +0 -14
- data/app/workers/fluentd_ui_update_check.rb +0 -15
- data/app/workers/gem_uninstaller.rb +0 -15
- data/app/workers/gem_update_check.rb +0 -10
- data/bower.json +0 -11
- data/vendor/assets/javascripts/bower/.gitignore +0 -10
- data/vendor/assets/javascripts/bower/codemirror/.bower.json +0 -29
- data/vendor/assets/javascripts/bower/codemirror/bower.json +0 -16
- data/vendor/assets/javascripts/bower/codemirror/lib/codemirror.css +0 -309
- data/vendor/assets/javascripts/bower/codemirror/lib/codemirror.js +0 -8029
- data/vendor/assets/javascripts/bower/codemirror/theme/3024-day.css +0 -38
- data/vendor/assets/javascripts/bower/codemirror/theme/3024-night.css +0 -37
- data/vendor/assets/javascripts/bower/codemirror/theme/ambiance-mobile.css +0 -5
- data/vendor/assets/javascripts/bower/codemirror/theme/ambiance.css +0 -77
- data/vendor/assets/javascripts/bower/codemirror/theme/base16-dark.css +0 -36
- data/vendor/assets/javascripts/bower/codemirror/theme/base16-light.css +0 -36
- data/vendor/assets/javascripts/bower/codemirror/theme/blackboard.css +0 -30
- data/vendor/assets/javascripts/bower/codemirror/theme/cobalt.css +0 -23
- data/vendor/assets/javascripts/bower/codemirror/theme/eclipse.css +0 -23
- data/vendor/assets/javascripts/bower/codemirror/theme/elegant.css +0 -13
- data/vendor/assets/javascripts/bower/codemirror/theme/erlang-dark.css +0 -32
- data/vendor/assets/javascripts/bower/codemirror/theme/lesser-dark.css +0 -45
- data/vendor/assets/javascripts/bower/codemirror/theme/mbo.css +0 -35
- data/vendor/assets/javascripts/bower/codemirror/theme/mdn-like.css +0 -44
- data/vendor/assets/javascripts/bower/codemirror/theme/midnight.css +0 -45
- data/vendor/assets/javascripts/bower/codemirror/theme/monokai.css +0 -31
- data/vendor/assets/javascripts/bower/codemirror/theme/neat.css +0 -12
- data/vendor/assets/javascripts/bower/codemirror/theme/neo.css +0 -43
- data/vendor/assets/javascripts/bower/codemirror/theme/night.css +0 -26
- data/vendor/assets/javascripts/bower/codemirror/theme/paraiso-dark.css +0 -36
- data/vendor/assets/javascripts/bower/codemirror/theme/paraiso-light.css +0 -36
- data/vendor/assets/javascripts/bower/codemirror/theme/pastel-on-dark.css +0 -50
- data/vendor/assets/javascripts/bower/codemirror/theme/rubyblue.css +0 -23
- data/vendor/assets/javascripts/bower/codemirror/theme/solarized.css +0 -165
- data/vendor/assets/javascripts/bower/codemirror/theme/the-matrix.css +0 -28
- data/vendor/assets/javascripts/bower/codemirror/theme/tomorrow-night-bright.css +0 -35
- data/vendor/assets/javascripts/bower/codemirror/theme/tomorrow-night-eighties.css +0 -36
- data/vendor/assets/javascripts/bower/codemirror/theme/twilight.css +0 -30
- data/vendor/assets/javascripts/bower/codemirror/theme/vibrant-ink.css +0 -32
- data/vendor/assets/javascripts/bower/codemirror/theme/xq-dark.css +0 -51
- data/vendor/assets/javascripts/bower/codemirror/theme/xq-light.css +0 -43
- data/vendor/assets/javascripts/bower/codemirror/theme/zenburn.css +0 -37
- data/vendor/assets/javascripts/bower/es6-promise/.bower.json +0 -15
- data/vendor/assets/javascripts/bower/es6-promise/bower.json +0 -5
- data/vendor/assets/javascripts/bower/es6-promise/promise.js +0 -684
- data/vendor/assets/javascripts/bower/es6-promise/promise.min.js +0 -1
- data/vendor/assets/javascripts/bower/lodash/.bower.json +0 -33
- data/vendor/assets/javascripts/bower/lodash/LICENSE.txt +0 -22
- data/vendor/assets/javascripts/bower/lodash/bower.json +0 -23
- data/vendor/assets/javascripts/bower/lodash/dist/lodash.compat.js +0 -7157
- data/vendor/assets/javascripts/bower/lodash/dist/lodash.compat.min.js +0 -61
- data/vendor/assets/javascripts/bower/lodash/dist/lodash.js +0 -6785
- data/vendor/assets/javascripts/bower/lodash/dist/lodash.min.js +0 -56
- data/vendor/assets/javascripts/bower/lodash/dist/lodash.underscore.js +0 -4979
- data/vendor/assets/javascripts/bower/lodash/dist/lodash.underscore.min.js +0 -39
- data/vendor/assets/javascripts/bower/vue/.bower.json +0 -29
- data/vendor/assets/javascripts/bower/vue/bower.json +0 -17
- data/vendor/assets/javascripts/bower/vue/dist/vue.js +0 -7977
- data/vendor/assets/javascripts/bower/vue/dist/vue.min.js +0 -7
- data/vendor/assets/javascripts/sb-admin-v2/bootstrap.js +0 -1951
- data/vendor/assets/javascripts/sb-admin-v2/bootstrap.min.js +0 -6
- data/vendor/assets/javascripts/sb-admin-v2/demo/dashboard-demo.js +0 -117
- data/vendor/assets/javascripts/sb-admin-v2/demo/flot-demo.js +0 -1242
- data/vendor/assets/javascripts/sb-admin-v2/demo/morris-demo.js +0 -155
- data/vendor/assets/javascripts/sb-admin-v2/jquery-1.10.2.js +0 -6
- data/vendor/assets/javascripts/sb-admin-v2/plugins/dataTables/dataTables.bootstrap.js +0 -245
- data/vendor/assets/javascripts/sb-admin-v2/plugins/dataTables/jquery.dataTables.js +0 -14013
- data/vendor/assets/javascripts/sb-admin-v2/plugins/flot/excanvas.min.js +0 -1
- data/vendor/assets/javascripts/sb-admin-v2/plugins/flot/jquery.flot.js +0 -2599
- data/vendor/assets/javascripts/sb-admin-v2/plugins/flot/jquery.flot.pie.js +0 -750
- data/vendor/assets/javascripts/sb-admin-v2/plugins/flot/jquery.flot.resize.js +0 -60
- data/vendor/assets/javascripts/sb-admin-v2/plugins/flot/jquery.flot.tooltip.min.js +0 -12
- data/vendor/assets/javascripts/sb-admin-v2/plugins/metisMenu/jquery.metisMenu.js +0 -45
- data/vendor/assets/javascripts/sb-admin-v2/plugins/morris/morris.js +0 -1888
- data/vendor/assets/javascripts/sb-admin-v2/plugins/morris/raphael-2.1.0.min.js +0 -10
- data/vendor/assets/javascripts/sb-admin-v2/sb-admin.js +0 -18
- data/vendor/assets/stylesheets/.keep +0 -0
- data/vendor/assets/stylesheets/sb-admin-v2/bootstrap.css +0 -5830
- data/vendor/assets/stylesheets/sb-admin-v2/bootstrap.min.css +0 -7
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/css/font-awesome.css +0 -1338
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/css/font-awesome.min.css +0 -4
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/fonts/FontAwesome.otf +0 -0
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/fonts/fontawesome-webfont.svg +0 -414
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_bordered-pulled.scss +0 -16
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_core.scss +0 -12
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_fixed-width.scss +0 -6
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_icons.scss +0 -412
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_larger.scss +0 -13
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_list.scss +0 -19
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_mixins.scss +0 -20
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_path.scss +0 -14
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_rotated-flipped.scss +0 -9
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_spinning.scss +0 -30
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_stacked.scss +0 -20
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/_variables.scss +0 -381
- data/vendor/assets/stylesheets/sb-admin-v2/font-awesome/scss/font-awesome.scss +0 -17
- data/vendor/assets/stylesheets/sb-admin-v2/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/stylesheets/sb-admin-v2/fonts/glyphicons-halflings-regular.svg +0 -229
- data/vendor/assets/stylesheets/sb-admin-v2/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/stylesheets/sb-admin-v2/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/stylesheets/sb-admin-v2/plugins/dataTables/dataTables.bootstrap.css +0 -233
- data/vendor/assets/stylesheets/sb-admin-v2/plugins/morris/morris-0.4.3.min.css +0 -2
- data/vendor/assets/stylesheets/sb-admin-v2/plugins/social-buttons/social-buttons.css +0 -68
- data/vendor/assets/stylesheets/sb-admin-v2/plugins/timeline/timeline.css +0 -144
- data/vendor/assets/stylesheets/sb-admin-v2/sb-admin.css +0 -329
@@ -1,28 +1,4 @@
|
|
1
|
-
|
2
|
-
<div class="form-inline form-group">
|
3
|
-
<label for="in_tail_setting_format">format</label>
|
4
|
-
<select id="in_tail_setting_format" name="setting[format]" v-model="format" class="form-control">
|
5
|
-
<option v-repeat="selectableFormats" value="{{ $value }}" v-attr="selected: format==$value">{{ $value }}</option>
|
6
|
-
</select>
|
7
|
-
</div>
|
8
|
-
<div class="form-inline form-group" v-repeat="options">
|
9
|
-
<label for="in_tail_setting_{{ $value }}" v-if="!useTextArea">{{ $value }} </label>
|
10
|
-
<input id="in_tail_setting_{{ $value }}" type="{{ useTextArea ? 'hidden' : 'text' }}" name="setting[{{ $value }}]" v-model="params.setting[$value]" v-on="keyup: onKeyup" size="100%" class="form-control" />
|
11
|
-
</div>
|
12
|
-
|
13
|
-
<div v-if="useTextArea">
|
14
|
-
<div class="form-inline form-group">
|
15
|
-
<label for="in_tail_setting_format_firstline">format_firstline</label>
|
16
|
-
<input id="in_tail_setting_format_firstline" type="text" name="setting[format_firstline]" v-model="params.setting['format_firstline']" v-on="keyup: onKeyup" size="100%" class="form-control" />
|
17
|
-
</div>
|
18
|
-
|
19
|
-
<div class="form-group">
|
20
|
-
<p class="alert alert-warning"><%= t("fluentd.settings.in_tail.notice_for_multiline_limit") %></p>
|
21
|
-
<label for="in_tail_setting_formats">formats</label>
|
22
|
-
<textarea id="in_tail_setting_formats" type="text" name="setting[formats]" v-model="params.setting['formats']" v-on="keyup: onKeyup" rows='20' size='100%' class="form-control"></textarea>
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
</script>
|
1
|
+
<%- add_javascript_pack_tag("in_tail_format") %>
|
26
2
|
|
27
3
|
<div id="in_tail_format"
|
28
4
|
formatOptionsJson="<%= formats.to_json %>"
|
@@ -31,11 +7,37 @@
|
|
31
7
|
paramsJson="<%= params.to_json %>"
|
32
8
|
>
|
33
9
|
|
34
|
-
<div
|
10
|
+
<div class="form-inline form-group">
|
11
|
+
<label for="in_tail_setting_format">format</label>
|
12
|
+
<select id="in_tail_setting_format" name="setting[format]" v-model="format" class="form-control">
|
13
|
+
<option v-for="selectableFormat in selectableFormats" v-bind:value="selectableFormat" v-bind:selected="format==selectableFormat" v-if="selectableFormats">{{ selectableFormat }}</option>
|
14
|
+
</select>
|
15
|
+
</div>
|
16
|
+
<div class="form-inline form-group" v-for="option in options">
|
17
|
+
<label v-bind:for="'in_tail_setting_' + option" v-if="!useTextArea">{{ option }} </label>
|
18
|
+
<input v-bind:id="'in_tail_setting_' + option" v-bind:type="useTextArea ? 'hidden' : 'text'" v-bind:name="'setting[' + option + ']'" v-model="params.setting[option]" v-on:keyup="onKeyup" size="100%" class="form-control" />
|
19
|
+
</div>
|
35
20
|
|
36
|
-
<
|
21
|
+
<div v-if="useTextArea">
|
22
|
+
<div class="form-inline form-group">
|
23
|
+
<label for="in_tail_setting_format_firstline">format_firstline</label>
|
24
|
+
<input id="in_tail_setting_format_firstline" type="text" name="setting[format_firstline]" v-model="params.setting['format_firstline']" v-on:keyup="onKeyup" size="100%" class="form-control" />
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div class="form-group">
|
28
|
+
<p class="alert alert-warning"><%= t("fluentd.settings.in_tail.notice_for_multiline_limit") %></p>
|
29
|
+
<label for="in_tail_setting_formats">formats</label>
|
30
|
+
<textarea id="in_tail_setting_formats" type="text" name="setting[formats]" v-model="params.setting['formats']" v-on:keyup="onKeyup" rows='20' size='100%' class="form-control"></textarea>
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<div class="card mb-3">
|
35
|
+
<pre class="card-body" v-html="highlightedLines"></pre>
|
36
|
+
</div>
|
37
37
|
|
38
|
-
<div class="
|
39
|
-
|
38
|
+
<div class="card mb-3">
|
39
|
+
<p class="card-body pb-0">
|
40
|
+
<%= raw t('fluentd.settings.in_tail_option_guide') %>
|
41
|
+
</p>
|
40
42
|
</div>
|
41
43
|
</div>
|
@@ -1,14 +1,10 @@
|
|
1
1
|
<!-- vue.js -->
|
2
|
-
<li class="dropdown" id="vue-notification">
|
3
|
-
<a
|
4
|
-
class="dropdown-toggle"
|
5
|
-
data-toggle="dropdown" href="#"
|
6
|
-
>
|
2
|
+
<li class="nav-item dropdown" id="vue-notification">
|
3
|
+
<a class="nav-link dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#">
|
7
4
|
<i class="fa fa-bell fa-fw"></i>
|
8
5
|
<span class="badge" v-if="hasAlerts">{{ alertsCount }}</span>
|
9
|
-
<i class="fa fa-caret-down"></i>
|
10
6
|
</a>
|
11
|
-
<ul class="
|
7
|
+
<ul class="dropdown-menu" aria-labelledby="alertsDropdown">
|
12
8
|
<li v-if="!hasAlerts">
|
13
9
|
<a>
|
14
10
|
<div class="nothing text text-success">
|
@@ -17,11 +13,11 @@
|
|
17
13
|
</div>
|
18
14
|
</a>
|
19
15
|
</li>
|
20
|
-
<li v-
|
16
|
+
<li v-for="alert in alerts">
|
21
17
|
<a>
|
22
18
|
<div>
|
23
19
|
<%= icon("fa-cog fa-fw fa-lg fa-spin") %>
|
24
|
-
{{
|
20
|
+
{{ alert }}
|
25
21
|
</div>
|
26
22
|
</a>
|
27
23
|
</li>
|
@@ -1,21 +1,23 @@
|
|
1
|
-
|
1
|
+
<%- add_javascript_pack_tag('codemirror') %>
|
2
2
|
|
3
|
-
<
|
4
|
-
|
3
|
+
<script type="text/x-template" id="vue-setting-section">
|
4
|
+
|
5
|
+
<div class="card card-primary mb-3">
|
6
|
+
<div class="card-header" data-toggle="collapse" v-bind:href="'#'+id" v-bind:title="content">
|
5
7
|
{{ type }}
|
6
8
|
<span v-if="name == 'match'">({{ arg }})</span>
|
7
9
|
<i class="fa fa-caret-down"></i>
|
8
10
|
</div>
|
9
|
-
<div class=
|
11
|
+
<div class="card-body collapse" v-bind:id="id">
|
10
12
|
<pre v-if="mode != 'edit'">{{ content }}</pre>
|
11
13
|
<p v-if="mode == 'edit'">
|
12
|
-
<textarea v-config-editor class="form-control" v-model="
|
14
|
+
<textarea v-config-editor class="form-control" v-model="content" v-bind:disabled="processing"></textarea>
|
13
15
|
</p>
|
14
|
-
<p class="
|
15
|
-
<button v-if="mode != 'edit'" class="btn btn-
|
16
|
-
<button v-if="mode != 'edit'" class="btn btn-danger" v-on="
|
17
|
-
<button v-if="mode == 'edit'" class="btn btn-
|
18
|
-
<button v-if="mode == 'edit'" class="btn btn-primary" v-on="
|
16
|
+
<p class="float-right">
|
17
|
+
<button v-if="mode != 'edit'" class="btn btn-secondary" v-on:click="onEdit"><%= t('terms.edit') %></button>
|
18
|
+
<button v-if="mode != 'edit'" class="btn btn-danger" v-on:click="onDelete"><%= t('terms.destroy') %></button>
|
19
|
+
<button v-if="mode == 'edit'" class="btn btn-secondary" v-on:click="onCancel"><%= t('terms.cancel') %></button>
|
20
|
+
<button v-if="mode == 'edit'" class="btn btn-primary" v-on:click="onSubmit"><%= t('terms.save') %></button>
|
19
21
|
</p>
|
20
22
|
</div>
|
21
23
|
</div>
|
@@ -1,30 +1,33 @@
|
|
1
|
+
<% add_javascript_pack_tag("treeview") %>
|
1
2
|
<% name ||= "" %>
|
2
3
|
<% action ||= "" %>
|
3
4
|
<% submit_button ||= "" %>
|
4
5
|
<%= form_tag(action, method: :post) do %>
|
5
|
-
<div id="treeview"
|
6
|
-
<
|
6
|
+
<div id="treeview">
|
7
|
+
<div class="card">
|
8
|
+
<pre class="card-body pb-0">{{ path }}</pre>
|
9
|
+
</div>
|
7
10
|
<input type="hidden" name="<%= name %>" v-model="path" />
|
8
11
|
<div class="dirs">
|
9
|
-
<span v-
|
10
|
-
<span v-if="
|
12
|
+
<span v-for="(dir, index) in currentDirs">
|
13
|
+
<span v-if="index > 0">
|
11
14
|
<%= icon('fa-caret-right') %>
|
12
15
|
</span>
|
13
|
-
<span v-on="
|
16
|
+
<span v-on:click="selectPath(dir)" class="dir">{{ basename(dir) }}</span>
|
14
17
|
</span>
|
15
18
|
</div>
|
16
19
|
<div class="tree">
|
17
|
-
<span v-on="
|
18
|
-
<span v-if="is_dir"><%= icon("fa-folder") %></span>
|
19
|
-
<span v-if="!is_dir"><%= icon("fa-file-o") %></span>
|
20
|
-
{{ basename(path) }}
|
20
|
+
<span v-on:click="selectPath(value.path)" class="vue-path" v-bind:class="{ selected: isSelected(value.path) }" v-for="value in paths">
|
21
|
+
<span v-if="value.is_dir"><%= icon("fa-folder") %></span>
|
22
|
+
<span v-if="!value.is_dir"><%= icon("fa-file-o") %></span>
|
23
|
+
{{ basename(value.path) }}
|
21
24
|
<br />
|
22
25
|
</span>
|
23
26
|
</div>
|
24
27
|
|
25
28
|
<pre v-if="preview" class="preview">{{ preview }}</pre>
|
26
29
|
<p>
|
27
|
-
<%= submit_tag submit_button, class: "btn btn-lg btn-primary
|
30
|
+
<%= submit_tag submit_button, class: "btn btn-lg btn-primary float-right", "v-bind:disabled" => "selectedIsDir" %>
|
28
31
|
</p>
|
29
32
|
</div>
|
30
33
|
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% page_title t(".page_title") %>
|
4
4
|
|
5
5
|
<p class="clearfix">
|
6
|
-
<%= link_to t('tutorials.chapter2.page_title') << " >>", tutorials_chapter2_path, class: "
|
6
|
+
<%= link_to t('tutorials.chapter2.page_title') << " >>", tutorials_chapter2_path, class: "float-right" %>
|
7
7
|
</p>
|
8
8
|
|
9
9
|
<p>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<div id="chapter1">
|
15
15
|
<form>
|
16
16
|
<p v-repeat="payloads">
|
17
|
-
<input type="button" class="btn btn-
|
17
|
+
<input type="button" class="btn btn-primary" v-on="click: sendRequest($data)" value="<%= t ".send" %>" />
|
18
18
|
<code>
|
19
19
|
$ curl -X POST http://localhost:<%= @in_http["port"] %>{{ path }} -F 'json={{ data | to_json }}'
|
20
20
|
</code>
|
@@ -26,6 +26,5 @@
|
|
26
26
|
<%= render partial: "shared/vue/fluent_log", locals: { fluentd: @fluentd } %>
|
27
27
|
|
28
28
|
<p class="clearfix">
|
29
|
-
<%= link_to t('tutorials.chapter2.page_title') << " >>", tutorials_chapter2_path, class: "
|
29
|
+
<%= link_to t('tutorials.chapter2.page_title') << " >>", tutorials_chapter2_path, class: "float-right" %>
|
30
30
|
</p>
|
31
|
-
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
%p.clearfix
|
4
4
|
= link_to "<< " << t('tutorials.chapter1.page_title'), tutorials_chapter1_path, class: "pull-left"
|
5
|
-
= link_to t('tutorials.chapter3.page_title') << " >>", tutorials_chapter3_path, class: "
|
5
|
+
= link_to t('tutorials.chapter3.page_title') << " >>", tutorials_chapter3_path, class: "float-right"
|
6
6
|
|
7
7
|
:markdown
|
8
8
|
#{t('.lesson_markdown', http_port: @in_http["port"])}
|
9
9
|
|
10
10
|
%p.clearfix
|
11
11
|
= link_to "<< " << t('tutorials.chapter1.page_title'), tutorials_chapter1_path, class: "pull-left"
|
12
|
-
= link_to t('tutorials.chapter3.page_title') << " >>", tutorials_chapter3_path, class: "
|
12
|
+
= link_to t('tutorials.chapter3.page_title') << " >>", tutorials_chapter3_path, class: "float-right"
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
%p.clearfix
|
4
4
|
= link_to "<< " << t('tutorials.chapter2.page_title'), tutorials_chapter2_path, class: "pull-left"
|
5
|
-
= link_to t('tutorials.chapter4.page_title') << " >>", tutorials_chapter4_path, class: "
|
5
|
+
= link_to t('tutorials.chapter4.page_title') << " >>", tutorials_chapter4_path, class: "float-right"
|
6
6
|
|
7
7
|
:markdown
|
8
8
|
#{t(".lesson_markdown", edit_config_url: edit_daemon_setting_path(@fluentd))}
|
9
9
|
|
10
10
|
%p.clearfix
|
11
11
|
= link_to "<< " << t('tutorials.chapter2.page_title'), tutorials_chapter2_path, class: "pull-left"
|
12
|
-
= link_to t('tutorials.chapter4.page_title') << " >>", tutorials_chapter4_path, class: "
|
12
|
+
= link_to t('tutorials.chapter4.page_title') << " >>", tutorials_chapter4_path, class: "float-right"
|
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
%p.clearfix
|
4
4
|
= link_to "<< " << t('tutorials.chapter3.page_title'), tutorials_chapter3_path, class: "pull-left"
|
5
|
-
= link_to t('tutorials.chapter5.page_title') << " >>", tutorials_chapter5_path, class: "
|
5
|
+
= link_to t('tutorials.chapter5.page_title') << " >>", tutorials_chapter5_path, class: "float-right"
|
6
6
|
|
7
7
|
:markdown
|
8
8
|
#{t ".lesson_markdown"}
|
9
9
|
|
10
10
|
%p.clearfix
|
11
11
|
= link_to "<< " << t('tutorials.chapter3.page_title'), tutorials_chapter3_path, class: "pull-left"
|
12
|
-
= link_to t('tutorials.chapter5.page_title') << " >>", tutorials_chapter5_path, class: "
|
12
|
+
= link_to t('tutorials.chapter5.page_title') << " >>", tutorials_chapter5_path, class: "float-right"
|
data/bin/bundle
CHANGED
data/bin/fluentd-ui
CHANGED
@@ -7,6 +7,7 @@ dir = File.expand_path("../../", __FILE__)
|
|
7
7
|
ENV["BUNDLE_GEMFILE"] ||= File.join(dir, "Gemfile.production")
|
8
8
|
ENV["SECRET_KEY_BASE"] ||= SecureRandom.hex(64)
|
9
9
|
ENV["RAILS_ENV"] ||= "production"
|
10
|
+
ENV["RAILS_SERVE_STATIC_FILES"] = "yes"
|
10
11
|
|
11
12
|
require File.join(dir, "lib/fluentd-ui/command.rb")
|
12
13
|
|
data/bin/rails
CHANGED
data/bin/setup
CHANGED
@@ -1,29 +1,28 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require '
|
2
|
+
require 'fileutils'
|
3
|
+
include FileUtils
|
3
4
|
|
4
5
|
# path to your application root.
|
5
|
-
APP_ROOT =
|
6
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
def system!(*args)
|
9
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
10
|
+
end
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
chdir APP_ROOT do
|
13
|
+
# This script is a starting point to setup your application.
|
14
|
+
# Add necessary setup steps to this file.
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
# end
|
16
|
+
puts '== Installing dependencies =='
|
17
|
+
system! 'gem install bundler --conservative'
|
18
|
+
system('bundle check') || system!('bundle install --jobs=4 --retry=4')
|
19
19
|
|
20
|
-
|
21
|
-
system
|
20
|
+
# Install JavaScript dependencies if using Yarn
|
21
|
+
system('bin/yarn')
|
22
22
|
|
23
23
|
puts "\n== Removing old logs and tempfiles =="
|
24
|
-
system
|
25
|
-
system "rm -rf tmp/cache"
|
24
|
+
system! 'bin/rails log:clear tmp:clear'
|
26
25
|
|
27
26
|
puts "\n== Restarting application server =="
|
28
|
-
system
|
27
|
+
system! 'bin/rails restart'
|
29
28
|
end
|
data/bin/update
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'fileutils'
|
3
|
+
include FileUtils
|
4
|
+
|
5
|
+
# path to your application root.
|
6
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
7
|
+
|
8
|
+
def system!(*args)
|
9
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
10
|
+
end
|
11
|
+
|
12
|
+
chdir APP_ROOT do
|
13
|
+
# This script is a way to update your development environment automatically.
|
14
|
+
# Add necessary update steps to this file.
|
15
|
+
|
16
|
+
puts '== Installing dependencies =='
|
17
|
+
system! 'gem install bundler --conservative'
|
18
|
+
system('bundle check') || system!('bundle install')
|
19
|
+
|
20
|
+
# Install JavaScript dependencies if using Yarn
|
21
|
+
# system('bin/yarn')
|
22
|
+
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
24
|
+
system! 'bin/rails log:clear tmp:clear'
|
25
|
+
|
26
|
+
puts "\n== Restarting application server =="
|
27
|
+
system! 'bin/rails restart'
|
28
|
+
end
|
data/bin/webpack
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
4
|
+
ENV["NODE_ENV"] ||= "development"
|
5
|
+
|
6
|
+
require "pathname"
|
7
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
8
|
+
Pathname.new(__FILE__).realpath)
|
9
|
+
|
10
|
+
require "rubygems"
|
11
|
+
require "bundler/setup"
|
12
|
+
|
13
|
+
require "webpacker"
|
14
|
+
require "webpacker/webpack_runner"
|
15
|
+
Webpacker::WebpackRunner.run(ARGV)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
|
4
|
+
ENV["NODE_ENV"] ||= "development"
|
5
|
+
|
6
|
+
require "pathname"
|
7
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
8
|
+
Pathname.new(__FILE__).realpath)
|
9
|
+
|
10
|
+
require "rubygems"
|
11
|
+
require "bundler/setup"
|
12
|
+
|
13
|
+
require "webpacker"
|
14
|
+
require "webpacker/dev_server_runner"
|
15
|
+
Webpacker::DevServerRunner.run(ARGV)
|
data/bin/yarn
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
3
|
+
Dir.chdir(APP_ROOT) do
|
4
|
+
begin
|
5
|
+
exec "yarnpkg", *ARGV
|
6
|
+
rescue Errno::ENOENT
|
7
|
+
$stderr.puts "Yarn executable was not detected in the system."
|
8
|
+
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
|
9
|
+
exit 1
|
10
|
+
end
|
11
|
+
end
|
data/config/application.rb
CHANGED
@@ -1,10 +1,15 @@
|
|
1
|
-
|
1
|
+
require_relative 'boot'
|
2
2
|
|
3
|
+
require "rails"
|
3
4
|
# Pick the frameworks you want:
|
4
5
|
require "active_model/railtie"
|
6
|
+
require "active_job/railtie"
|
7
|
+
# require "active_record/railtie"
|
8
|
+
# require "active_storage/engine"
|
5
9
|
require "action_controller/railtie"
|
6
10
|
require "action_mailer/railtie"
|
7
11
|
require "action_view/railtie"
|
12
|
+
# require "action_cable/engine"
|
8
13
|
require "sprockets/railtie"
|
9
14
|
# require "rails/test_unit/railtie"
|
10
15
|
|
@@ -12,21 +17,26 @@ require "sprockets/railtie"
|
|
12
17
|
# you've limited to :test, :development, or :production.
|
13
18
|
Bundler.require(*Rails.groups)
|
14
19
|
# these gems are not required by Bundler.require
|
20
|
+
require "font-awesome-rails"
|
15
21
|
require "draper"
|
16
22
|
require "sass"
|
17
23
|
require "haml-rails"
|
18
|
-
require "jquery-rails"
|
19
24
|
require "sucker_punch"
|
20
25
|
require "settingslogic"
|
21
26
|
require "kramdown-haml"
|
22
27
|
require "jbuilder"
|
23
28
|
require "diff/lcs"
|
29
|
+
require "webpacker"
|
24
30
|
|
25
31
|
module FluentdUi
|
26
32
|
class Application < Rails::Application
|
33
|
+
# Initialize configuration defaults for originally generated Rails version.
|
34
|
+
config.load_defaults 5.2
|
35
|
+
|
27
36
|
# Settings in config/environments/* take precedence over those specified here.
|
28
|
-
# Application configuration
|
29
|
-
# -- all .rb files in that directory are automatically loaded
|
37
|
+
# Application configuration can go into files in config/initializers
|
38
|
+
# -- all .rb files in that directory are automatically loaded after loading
|
39
|
+
# the framework and any gems in your application.
|
30
40
|
|
31
41
|
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
32
42
|
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
@@ -35,7 +45,10 @@ module FluentdUi
|
|
35
45
|
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
36
46
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
37
47
|
config.i18n.default_locale = 'en'
|
38
|
-
config.
|
48
|
+
config.i18n.available_locales = %i(en ja)
|
49
|
+
config.autoload_paths += %W(#{config.root}/lib)
|
50
|
+
|
51
|
+
config.active_job.queue_adapter = :sucker_punch
|
39
52
|
|
40
53
|
# NOTE: currently, fluentd-ui does not using ActiveRecord, and using Time.now instead of Time.zone.now for each different TZ for users.
|
41
54
|
# If AR will be used, please comment in and check timezone.
|