fluentd-ui 1.1.0 → 1.2.0

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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.js +2 -1
  3. data/ChangeLog.md +8 -0
  4. data/Gemfile.lock +28 -28
  5. data/app/assets/stylesheets/application.css +1 -0
  6. data/app/controllers/misc_controller.rb +8 -0
  7. data/app/controllers/plugins_controller.rb +20 -3
  8. data/app/decorators/plugin_decorator.rb +18 -0
  9. data/app/helpers/application_helper.rb +0 -10
  10. data/app/javascript/packs/application.js +7 -5
  11. data/app/javascript/packs/codemirror.js +2 -1
  12. data/app/javascript/packs/{aws_credential.js → components/aws_credential.js} +0 -0
  13. data/app/javascript/packs/components/config_field.js +110 -0
  14. data/app/javascript/packs/{grep_container.js → components/grep_container.js} +1 -1
  15. data/app/javascript/packs/{grep_pattern.js → components/grep_pattern.js} +4 -2
  16. data/app/javascript/packs/components/owned_plugin_form.js +88 -0
  17. data/app/javascript/packs/{parser_multiline_form.js → components/parser_multiline_form.js} +0 -0
  18. data/app/javascript/packs/{owned_plugin_form.js → components/parser_plugin_form.js} +12 -20
  19. data/app/javascript/packs/{transport_config.js → components/transport_config.js} +0 -0
  20. data/app/javascript/packs/filter_grep_setting.js +2 -2
  21. data/app/javascript/packs/fluent_log.js +1 -1
  22. data/app/javascript/packs/in_tail_parse.js +20 -16
  23. data/app/javascript/packs/{notification.js → navigation.js} +8 -6
  24. data/app/javascript/packs/nested_settings.js +1 -1
  25. data/app/javascript/packs/out_forward_setting.js +3 -3
  26. data/app/javascript/packs/out_s3_setting.js +3 -3
  27. data/app/javascript/packs/plugin_setting.js +4 -2
  28. data/app/javascript/packs/settings.js +2 -2
  29. data/app/javascript/packs/store/index.js +21 -0
  30. data/app/javascript/packs/store/modules/parser_params.js +83 -0
  31. data/app/javascript/packs/transport_section.js +2 -2
  32. data/app/javascript/packs/treeview.js +1 -1
  33. data/app/models/concerns/fluentd/setting/configurable.rb +1 -1
  34. data/app/models/concerns/fluentd/setting/formatter_advanced_options.rb +22 -0
  35. data/app/models/concerns/fluentd/setting/label.rb +1 -1
  36. data/app/models/concerns/fluentd/setting/parser_advanced_options.rb +27 -0
  37. data/app/models/concerns/fluentd/setting/plugin.rb +12 -1
  38. data/app/models/fluentd/setting/buffer_file.rb +4 -0
  39. data/app/models/fluentd/setting/buffer_memory.rb +4 -0
  40. data/app/models/fluentd/setting/parser_ltsv.rb +1 -1
  41. data/app/models/fluentd/setting/parser_regexp.rb +2 -2
  42. data/app/models/fluentd/setting/parser_syslog.rb +2 -8
  43. data/app/models/plugin.rb +4 -4
  44. data/app/views/fluentd/settings/in_tail/_form.html.haml +3 -3
  45. data/app/views/fluentd/settings/in_tail/after_file_choose.html.haml +1 -1
  46. data/app/views/fluentd/settings/source_and_output.html.haml +10 -10
  47. data/app/views/layouts/application.html.erb +2 -28
  48. data/app/views/misc/information.html.haml +48 -44
  49. data/app/views/plugins/installed.html.haml +49 -60
  50. data/app/views/plugins/recommended.html.haml +54 -54
  51. data/app/views/sessions/new.html.haml +10 -4
  52. data/app/views/shared/settings/_form.html.haml +16 -13
  53. data/app/views/shared/vue/_aws_credential.html.haml +2 -4
  54. data/app/views/shared/vue/_config_field.html.haml +16 -30
  55. data/app/views/shared/vue/_grep_container.html.haml +13 -14
  56. data/app/views/shared/vue/_grep_pattern.html.haml +10 -6
  57. data/app/views/shared/vue/_in_tail_parse.html.haml +13 -13
  58. data/app/views/shared/vue/_navigation.html.haml +38 -0
  59. data/app/views/shared/vue/_owned_plugin_form.html.haml +18 -13
  60. data/app/views/shared/vue/_parser_multiline_form.html.haml +5 -3
  61. data/app/views/shared/vue/_parser_plugin_form.html.haml +40 -0
  62. data/app/views/shared/vue/_setting.html.haml +20 -0
  63. data/app/views/shared/vue/_sidemenu.html.haml +40 -0
  64. data/app/views/shared/vue/_transport_section.html.haml +10 -8
  65. data/app/views/shared/vue/_treeview.html.haml +30 -0
  66. data/config/locales/translation_en.yml +1 -0
  67. data/config/locales/translation_ja.yml +1 -0
  68. data/lib/fluentd-ui/version.rb +1 -1
  69. data/lib/regexp_preview/multi_line.rb +4 -3
  70. data/lib/regexp_preview/single_line.rb +4 -3
  71. data/package.json +3 -1
  72. data/test/test_helper.rb +5 -0
  73. data/yarn.lock +111 -5
  74. metadata +62 -78
  75. data/app/javascript/packs/config_field.js +0 -93
  76. data/app/views/shared/_global_nav.html.erb +0 -80
  77. data/app/views/shared/_modal.html.erb +0 -25
  78. data/app/views/shared/vue/_notification.html.erb +0 -27
  79. data/app/views/shared/vue/_setting.html.erb +0 -25
  80. data/app/views/shared/vue/_treeview.html.erb +0 -33
@@ -1,61 +1,61 @@
1
1
  - page_title t('.page_title')
2
2
 
3
- %table{class: "table table-striped table-hover", id: "plugins-table"}
4
- %thead
5
- %tr
6
- %th{scope: "col", width: "24"}
7
- %th{scope: "col"}= t('plugins.common.name')
8
- %th{scope: "col"}= t('plugins.common.api_version')
9
- %th{scope: "col"}= t('plugins.common.category')
10
- %th{scope: "col"}= t('plugins.common.status')
11
- %th{scope: "col"}
12
- %tbody
13
- - @plugins.each do |plugin|
14
- %tr
15
- %td
16
- - unless plugin.installed? || plugin.processing?
17
- = link_to t("terms.install"), install_plugins_path, class: "js-install btn btn-primary", data: { url: install_plugins_path, name: plugin.gem_name}
18
- %td
19
- %label{for: "plugin_#{plugin.gem_name}"}
20
- = plugin.gem_name
21
- %td
22
- = plugin.api_version
23
- %td
24
- = plugin.category
25
- %td
26
- = plugin.status
27
- %td
28
- = link_to t('plugins.view_on_rubygems_org'), plugin.rubygems_org_page, target: "_blank"
29
-
3
+ #plugins-table
4
+ %b-form-group.float-right(horizontal){"label" => t("terms.search")}
5
+ %b-input-group
6
+ %b-form-input{"v-model" => "filter"}
7
+ %b-input-group-append
8
+ %b-btn{ "v-bind:disabled" => "!filter", "v-on:click" => "filter = ''" }
9
+ = t("terms.clear")
10
+ %b-table(stripped hover small){"v-bind:items" => "items",
11
+ "v-bind:fields" => "fields",
12
+ "v-bind:filter" => "filter"}
13
+ %template{"slot" => "is_installed", "slot-scope" => "row"}
14
+ %template{"v-if" => "row.item.is_installed || row.item.is_processing"}
15
+  
16
+ %template(v-else)
17
+ %b-button{"variant" => "primary",
18
+ "data-url" => install_plugins_path,
19
+ "v-bind:data-name" => "row.item.name",
20
+ "v-on:click" => "installPlugin"}
21
+ = t("terms.install")
22
+ %template{"slot" => "rubygems_org_page", "slot-scope" => "row"}
23
+ %a{"target" => "_blank", "v-bind:href" => "row.item.rubygems_org_page"}
24
+ = t("plugins.view_on_rubygems_org")
30
25
 
31
26
  :javascript
32
- $(document).ready(function() {
33
- $('#plugins-table').dataTable({
34
- "autoWidth": false,
35
- "ordering": true,
36
- "paging": false,
37
- "info": false,
38
- "searching": true,
39
- "language": {
40
- "search": "#{t("terms.search")} "
27
+ window.addEventListener("load", () => {
28
+ new Vue({
29
+ name: "RecommendedPlugins",
30
+ el: "#plugins-table",
31
+ data() {
32
+ return {
33
+ fields: {
34
+ is_installed: { label: "" },
35
+ name: { label: "#{t("plugins.common.name")}", sortable: true },
36
+ api_version: { label: "#{t("plugins.common.api_version")}", sortable: true },
37
+ category: { label: "#{t("plugins.common.category")}", sortable: true },
38
+ status: { label: "#{t("plugins.common.status")}", sortable: true },
39
+ rubygems_org_page: { label: "" }
40
+ },
41
+ items: #{plugins_json.html_safe},
42
+ filter: null
43
+ };
44
+ },
45
+ methods: {
46
+ installPlugin(event) {
47
+ $.ajax({
48
+ url: `${event.target.dataset.url}.json`,
49
+ data: {"plugins[]": event.target.dataset.name, "_method": "PATCH"},
50
+ method: "POST"
51
+ }).then((data) => {
52
+ console.log("installed", data);
53
+ let item = this.items.find(item => item.name === event.target.dataset.name);
54
+ item.is_processing = true;
55
+ item.status = "#{t("terms.processing")}";
56
+ this.update();
57
+ });
58
+ }
41
59
  }
42
60
  });
43
- $('#plugins-table').on('click', '.js-install', function(ev){
44
- ev.preventDefault();
45
- var $anchor = $(ev.target);
46
- var url = $anchor.attr('href');
47
- $anchor.removeClass('js-install');
48
- $anchor.attr("href", "#");
49
- $anchor.css({color: "green"});
50
- var name = $anchor.attr('data-name');
51
- $.ajax({
52
- url: url,
53
- data: {"plugins[]": name, "_method": "PATCH"},
54
- method: "POST"
55
- }).done(function(){
56
- $anchor.fadeOut();
57
- var status = $anchor.parent().closest('tr').children()[3];
58
- $(status).text("#{t("terms.processing")}");
59
- });;
60
- });
61
61
  });
@@ -1,7 +1,5 @@
1
- .card.card-login.mx-auto.mt-5
2
- .card-header
3
- = t('messages.please_sign_in')
4
- .card-body
1
+ #login-form
2
+ %b-card.card-login.mx-auto.mt-5{"header" => t('messages.please_sign_in')}
5
3
  = render partial: "shared/error"
6
4
  = form_for(:session, url: sessions_path) do |f|
7
5
  .form-group
@@ -10,3 +8,11 @@
10
8
  = f.password_field :password, placeholder: t('terms.password'), class: "form-control"
11
9
 
12
10
  = submit_tag t("terms.sign_in"), class: "btn btn-primary btn-block"
11
+
12
+ :javascript
13
+ window.addEventListener("load", () => {
14
+ new Vue({
15
+ name: "LoginForm",
16
+ el: "#login-form"
17
+ })
18
+ });
@@ -1,5 +1,6 @@
1
1
  = render "shared/setting_errors"
2
2
  = render "shared/vue/owned_plugin_form"
3
+ = render "shared/vue/parser_plugin_form"
3
4
 
4
5
  = javascript_pack_tag("plugin_setting")
5
6
 
@@ -26,12 +27,12 @@
26
27
  "v-bind:plugin-label" => "'Storage'"}
27
28
 
28
29
  - if setting.have_parse_section?
29
- %owned-plugin-form{"v-bind:id" => "'parse-section'",
30
- "v-bind:options-json" => "'#{Fluent::Plugin::PARSER_REGISTRY.map.keys.to_json}'",
31
- "v-bind:initial-plugin-name" => "'#{setting.parse_type}'",
32
- "v-bind:initial-params-json" => "'#{setting.class.initial_params[:parse]["0"].to_json}'",
33
- "v-bind:plugin-type" => "'parse'",
34
- "v-bind:plugin-label" => "'Parse'"}
30
+ %parser-plugin-form{"v-bind:id" => "'parse-section'",
31
+ "v-bind:options-json" => "'#{Fluent::Plugin::PARSER_REGISTRY.map.keys.to_json}'",
32
+ "v-bind:initial-plugin-name" => "'#{setting.parse_type}'",
33
+ "v-bind:initial-params-json" => "'#{setting.class.initial_params[:parse]["0"].to_json}'",
34
+ "v-bind:plugin-type" => "'parse'",
35
+ "v-bind:plugin-label" => "'Parse'"}
35
36
 
36
37
  - if setting.have_format_section?
37
38
  %owned-plugin-form{"v-bind:id" => "'format-section'",
@@ -42,12 +43,14 @@
42
43
  "v-bind:plugin-label" => "'Format'"}
43
44
 
44
45
  - if setting.advanced_options.present?
45
- .card.card-body.bg-light
46
- %h4{"data-toggle" => "collapse", "href" => "#advanced-setting"}
47
- = icon('fa-caret-down')
48
- = t('terms.advanced_setting')
49
- #advanced-setting.collapse
50
- - setting.advanced_options.each do |key|
51
- = form.field(key)
46
+ %b-card(no-body){"bg-variant" => "light"}
47
+ %template{"slot" => "header"}
48
+ %h4{"v-b-toggle" => "'advanced-setting'"}
49
+ = icon('fa-caret-down')
50
+ = t('terms.advanced_setting')
51
+ %b-collapse{"id" => "advanced-setting"}
52
+ %b-card-body
53
+ - setting.advanced_options.each do |key|
54
+ = form.field(key)
52
55
 
53
56
  = form.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary float-right mt-3"
@@ -1,10 +1,8 @@
1
1
  = render "shared/vue/config_field"
2
2
 
3
3
  %script{type: "text/x-template", id: "vue-aws-credential"}
4
- .form-group.card.bg-light.mb-3
5
- .card-body
6
- %label{"for" => "aws-credential"}
7
- AWS credential
4
+ .form-group.mb-3
5
+ %b-card{"header" => "AWS credential", "bg-variant" => "light"}
8
6
  %select{"id" => "aws-credential",
9
7
  "class" => "form-control mb-3",
10
8
  "v-model" => "credentialType",
@@ -1,49 +1,35 @@
1
1
  %script{type: "text/x-template", id: "vue-config-field"}
2
2
  .form-group
3
3
  %template{"v-if" => 'option.type==="enum"'}
4
- %label{"v-bind:for" => "inputId(pluginType, option)",
5
- "data-toggle" => "tooltip",
6
- "data-placement" => "right",
7
- "v-bind:title" => "option.desc"}
4
+ %b-tooltip{"v-bind:target" => "labelId(pluginType, option)", "placement" => "right", "v-bind:title" => "option.desc"}
5
+ %label{"v-bind:id" => "labelId(pluginType, option)", "v-bind:for" => "inputId(pluginType, option)"}
8
6
  {{ option.name | humanize }}
9
7
  %select{"v-bind:id" => "inputId(pluginType, option)",
10
8
  "v-bind:name" => "inputName(pluginType, option)",
9
+ "v-model.lazy" => "selectedValue",
10
+ "v-on:change" => "onChange",
11
11
  "class" => "form-control"}
12
12
  %option{"v-for" => "item in option.list",
13
13
  "v-bind:value" => "item",
14
14
  "v-bind:selected" => "option.default === item"}
15
15
  {{ item }}
16
16
  %template{"v-else-if" => 'option.type==="bool"'}
17
+ %b-tooltip{"v-bind:target" => "labelId(pluginType, option)", "placement" => "right", "v-bind:title" => "option.desc"}
17
18
  %input{"v-bind:id" => "inputId(pluginType, option)",
18
19
  "v-bind:name" => "inputName(pluginType, option)",
19
20
  "v-bind:checked" => "checked(option.default)",
21
+ "v-model.lazy" => "checkboxValue",
22
+ "v-on:change" => "onChange",
20
23
  "type" => "checkbox"}
21
- %label{"v-bind:for" => "inputId(pluginType, option)",
22
- "data-toggle" => "tooltip",
23
- "data-placement" => "right",
24
- "v-bind:title" => "option.desc"}
24
+ %label{"v-bind:id" => "labelId(pluginType, option)", "v-bind:for" => "inputId(pluginType, option)"}
25
25
  {{ option.name | humanize }}
26
26
  %template(v-else)
27
- %label{"v-bind:for" => "inputId(pluginType, option)",
28
- "data-toggle" => "tooltip",
29
- "data-placement" => "right",
30
- "v-bind:title" => "option.desc"}
27
+ %b-tooltip{"v-bind:target" => "labelId(pluginType, option)", "placement" => "right", "v-bind:title" => "option.desc"}
28
+ %label{"v-bind:id" => "labelId(pluginType, option)", "v-bind:for" => "inputId(pluginType, option)"}
31
29
  {{ option.name | humanize }}
32
- %template{"v-if" => 'option.name === "expression"'}
33
- %input{"v-bind:id" => "inputId(pluginType, option)",
34
- "v-bind:name" => "inputName(pluginType, option)",
35
- "v-model.lazy" => "expression",
36
- "type" => "text",
37
- "class" => "form-control"}
38
- %template{"v-else-if" => 'option.name === "time_format"'}
39
- %input{"v-bind:id" => "inputId(pluginType, option)",
40
- "v-bind:name" => "inputName(pluginType, option)",
41
- "v-model.lazy" => "timeFormat",
42
- "type" => "text",
43
- "class" => "form-control"}
44
- %template(v-else)
45
- %input{"v-bind:id" => "inputId(pluginType, option)",
46
- "v-bind:name" => "inputName(pluginType, option)",
47
- "v-model.lazy" => "textValue",
48
- "type" => "text",
49
- "class" => "form-control"}
30
+ %input{"v-bind:id" => "inputId(pluginType, option)",
31
+ "v-bind:name" => "inputName(pluginType, option)",
32
+ "v-model.lazy" => "textValue",
33
+ "v-on:change" => "onChange",
34
+ "type" => "text",
35
+ "class" => "form-control"}
@@ -1,10 +1,10 @@
1
1
  = render "shared/vue/grep_pattern"
2
2
  %script{type: "text/x-template", id: "vue-grep-container"}
3
- .form-group.card
4
- .card-header
5
- %a.btn.btn-xs{"v-on:click" => "add", "v-if" => "index == 0"}
3
+ %b-card.form-group
4
+ %template{"slot" => "header"}
5
+ %b-button{"v-on:click" => "add", "size" => "sm", "variant" => "light", "v-if" => "index === 0"}
6
6
  = icon("fa-plus")
7
- %a.btn.btn-xs{"v-on:click" => "remove", "v-if" => "index != 0"}
7
+ %b-button{"v-on:click" => "remove", "size" => "sm", "variant" => "light", "v-if" => "index !== 0"}
8
8
  = icon("fa-minus")
9
9
  %label
10
10
  {{ containerType | humanize }}
@@ -20,13 +20,12 @@
20
20
  "v-bind:name" => "inputName(index)",
21
21
  "v-model" => "grepType"}
22
22
  Exclude
23
- .card-body
24
- .row
25
- %template{"v-for" => "(enabled, i) in patterns"}
26
- %grep-pattern.col-xl-3{"v-if" => "enabled",
27
- "v-bind:container-type" => "containerType",
28
- "v-bind:grep-type" => "grepType",
29
- "v-bind:index" => "index",
30
- "v-bind:subIndex" => "i",
31
- "v-on:add-grep-pattern" => "addGrepPattern",
32
- "v-on:remove-grep-pattern" => "removeGrepPattern"}
23
+ .row
24
+ %template{"v-for" => "(enabled, i) in patterns"}
25
+ %grep-pattern.col-xl-3{"v-if" => "enabled",
26
+ "v-bind:container-type" => "containerType",
27
+ "v-bind:grep-type" => "grepType",
28
+ "v-bind:index" => "index",
29
+ "v-bind:subIndex" => "i",
30
+ "v-on:add-grep-pattern" => "addGrepPattern",
31
+ "v-on:remove-grep-pattern" => "removeGrepPattern"}
@@ -1,22 +1,26 @@
1
1
  %script{type: "text/x-template", id: "vue-grep-pattern"}
2
2
  %div
3
- %a.btn.btn-xs{"v-on:click" => "add", "v-if" => "subIndex == 0"}
3
+ %b-button{"v-on:click" => "add", "size" => "sm", "variant" => "light", "v-if" => "subIndex === 0"}
4
4
  = icon("fa-plus")
5
- %a.btn.btn-xs{"v-on:click" => "remove", "v-if" => "subIndex != 0"}
5
+ %b-button{"v-on:click" => "remove", "size" => "sm", "variant" => "light", "v-if" => "subIndex !== 0"}
6
6
  = icon("fa-minus")
7
7
  %label
8
8
  {{ grepType | humanize }}
9
9
  .form-group
10
- %label{"data" => {"toggle" => "tooltip", "placement" => "right"},
11
- "title" => "The field name to which the regular expression is applied."}
10
+ %b-tooltip{"v-bind:target" => 'labelId("key", index, subIndex)',
11
+ "placement" => "right",
12
+ "title" => "The field name to which the regular expression is applied."}
13
+ %label{"v-bind:id" => 'labelId("key", index, subIndex)'}
12
14
  Key
13
15
  %input.form-control{"v-bind:id" => 'inputId("key", index, subIndex)',
14
16
  "v-bind:name" => 'inputName("key", index, subIndex)',
15
17
  "v-model:lazy" => "key",
16
18
  "type" => "text"}
17
19
  .form-group
18
- %label{"data" => {"toggle" => "tooltip", "placement" => "right"},
19
- "title" => "The regular expression"}
20
+ %b-tooltip{"v-bind:target" => 'labelId("pattern", index, subIndex)',
21
+ "placement" => "right",
22
+ "title" => "The regular expression"}
23
+ %label{"v-bind:id" => 'labelId("pattern", index, subIndex)'}
20
24
  Pattern
21
25
  %input.form-control{"v-bind:id" => 'inputId("pattern", index, subIndex)',
22
26
  "v-bind:name" => 'inputName("pattern", index, subIndex)',
@@ -1,20 +1,20 @@
1
1
  - add_javascript_pack_tag("in_tail_parse")
2
2
 
3
- = render "shared/vue/owned_plugin_form"
3
+ = render "shared/vue/parser_plugin_form"
4
4
 
5
5
  #in-tail-parse{"path" => setting.path}
6
- %owned-plugin-form{"v-bind:id" => "'parse-section'",
7
- "v-bind:options-json" => "'#{Fluent::Plugin::PARSER_REGISTRY.map.keys.to_json}'",
8
- "v-bind:initial-plugin-name" => "'#{setting.parse_type || setting.guess_parse_type}'",
9
- "v-bind:plugin-type" => "'parse'",
10
- "v-bind:plugin-label" => "'Parse'",
11
- "v-on:change-parse-config" => "onChangeParseConfig",
12
- "v-on:change-plugin-name" => "onChangePluginName",
13
- "v-on:change-formats" => "onChangeFormats"}
6
+ %parser-plugin-form{"v-bind:id" => "'parse-section'",
7
+ "v-bind:options-json" => "'#{Fluent::Plugin::PARSER_REGISTRY.map.keys.to_json}'",
8
+ "v-bind:initial-plugin-name" => "'#{setting.parse_type || setting.guess_parse_type}'",
9
+ "v-bind:plugin-type" => "'parse'",
10
+ "v-bind:plugin-label" => "'Parse'",
11
+ "v-on:change-parse-config" => "onChangeParseConfig",
12
+ "v-on:change-plugin-name" => "onChangePluginName",
13
+ "v-on:change-formats" => "onChangeFormats"}
14
14
 
15
- .card.mb-3
16
- %pre{"class" => "card-body", "v-html" => "highlightedLines"}
15
+ %b-card.mb-3
16
+ %pre{"v-html" => "highlightedLines"}
17
17
 
18
- .card.md-3
19
- %p.card-body.pb-0
18
+ %b-card.mb-3
19
+ %p.pb-0.mb-0
20
20
  =raw(t("fluentd.settings.in_tail_option_guide"))
@@ -0,0 +1,38 @@
1
+ %nav#mainNav.navbar.navbar-expand-lg.navbar-light.bg-light.fixed-top
2
+ = link_to fluentd_ui_logo, root_path, class: "navbar-brand fluentd-ui-logo"
3
+ %button{"type" => "button",
4
+ "class" => "navbar-toggler navbar-toggler-right",
5
+ "data-toggle" => "collapse",
6
+ "data-target" => "#navbarResponsive",
7
+ "aria-controls" => "navbarResponsive",
8
+ "aria-expanded" => "false",
9
+ "aria-label" => "Toggle navigation"}
10
+ %span.navbar-toggler-icon
11
+ #navbarResponsive.collapse.navbar-collapse
12
+ = render partial: "shared/vue/sidemenu"
13
+ %ul.navbar-nav.ml-auto
14
+ - if @fluentd
15
+ %li.nav-item.fluentd-note
16
+ = @fluentd.note
17
+ %li.nav-item.fluentd-status
18
+ %b-tooltip{"target" => "fluentd-status-message",
19
+ "placement" => "bottom",
20
+ "title" => "fluentd #{fluentd_status_message}"}
21
+ %a.nav-link#fluentd-status-message{"href" => daemon_path}
22
+ = fluentd_status_icon
23
+ %li.nav-item
24
+ %b-dropdown(no-caret){"variant" => "light"}
25
+ %template{"slot" => "button-content"}
26
+ = icon("fa-bell fa-fw")
27
+ %span.badge{"v-if" => "hasAlerts"}
28
+ {{ alertsCount }}
29
+ %b-dropdown-item{"v-if" => "!hasAlerts"}
30
+ .nothing.text.text-success
31
+ = icon("fa-check")
32
+ = t("terms.no-alert")
33
+ %b-dropdown-item{"v-for" => "alert in alerts"}
34
+ = icon("fa-cog fa-fw fa-la fa-spin")
35
+ {{ alert }}
36
+
37
+ %li.nav-item
38
+ = link_to(icon("fa-fw fa-sign-out") + t("terms.sign_out"), sessions_path, method: :delete, class: "nav-link")
@@ -1,9 +1,8 @@
1
- = render "shared/vue/parser_multiline_form"
2
1
  = render "shared/vue/config_field"
3
2
 
4
3
  %script{type: "text/x-template", id: "vue-owned-plugin-form"}
5
4
  .form-group.card.bg-light.mb-3{"v-bind:id" => "id"}
6
- .card-body
5
+ %b-card{"bg-variant" => "light"}
7
6
  %label{"v-bind:for" => "selectId(pluginType)"}
8
7
  {{ pluginLabel }}
9
8
  %select{"v-bind:id" => "selectId(pluginType)",
@@ -15,14 +14,20 @@
15
14
  "v-bind:value" => "option",
16
15
  "v-bind:selected" => "pluginName===option"}
17
16
  {{ option }}
18
- %parser-multiline-form{"v-if" => 'pluginName==="multiline"',
19
- "v-bind:plugin-type" => "pluginType",
20
- "v-bind:common-options" => "commonOptions",
21
- "v-on:change-formats" => "onChangeFormats"}
22
- %template(v-else){"v-for" => "option in commonOptions"}
23
- %config-field{"v-bind:plugin-type" => "pluginType",
24
- "v-bind:option" => "option",
25
- "v-bind:initial-expression" => "expression",
26
- "v-bind:initial-time-format" => "timeFormat",
27
- "v-bind:initial-text-value" => "initialParams[option.name]",
28
- "v-on:change-parse-config" => "onChangeParseConfig"}
17
+
18
+ %config-field{"v-for" => "option in commonOptions",
19
+ "v-bind:key" => "option.name",
20
+ "v-bind:plugin-type" => "pluginType",
21
+ "v-bind:option" => "option"}
22
+ %template{"v-if" => '!_.isEmpty(advancedOptions)'}
23
+ %b-card(no-body){"bg-variant" => "light"}
24
+ %template{"slot" => "header"}
25
+ %h4{"v-b-toggle" => "`${id}-advanced-setting`"}
26
+ = icon('fa-caret-down')
27
+ = t('terms.advanced_setting')
28
+ %b-collapse{"v-bind:id" => "`${id}-advanced-setting`"}
29
+ %b-card-body
30
+ %config-field{"v-for" => "option in advancedOptions",
31
+ "v-bind:key" => "option.name",
32
+ "v-bind:plugin-type" => "pluginType",
33
+ "v-bind:option" => "option"}