fluentd-ui 1.0.0.alpha.2 → 1.0.0.alpha.3
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 +4 -4
- data/ChangeLog.md +5 -0
- data/Gemfile.lock +56 -1
- data/README.md +2 -2
- data/app/controllers/api/config_definitions_controller.rb +55 -0
- data/app/controllers/api_controller.rb +20 -3
- data/app/controllers/concerns/setting_concern.rb +18 -2
- data/app/controllers/fluentd/settings/in_tail_controller.rb +13 -5
- data/app/controllers/fluentd/settings/out_forward_controller.rb +0 -9
- data/app/controllers/fluentd/settings/out_s3_controller.rb +0 -5
- data/app/controllers/fluentd/settings/out_tdlog_controller.rb +9 -0
- data/app/form_builders/fluentd_form_builder.rb +83 -0
- data/app/helpers/settings_helper.rb +81 -18
- data/app/javascript/packs/application.js +4 -0
- data/app/javascript/packs/in_tail_parse.js +159 -0
- data/app/javascript/packs/owned_plugin_form.js +141 -0
- data/app/javascript/packs/parser_multiline_form.js +51 -0
- data/app/javascript/packs/plugin_setting.js +19 -0
- data/app/models/concerns/fluentd/setting/configurable.rb +113 -0
- data/app/models/concerns/fluentd/setting/pattern.rb +11 -0
- data/app/models/concerns/fluentd/setting/plugin.rb +78 -0
- data/app/models/concerns/fluentd/setting/plugin_config.rb +74 -0
- data/app/models/concerns/fluentd/setting/plugin_parameter.rb +121 -0
- data/app/models/concerns/fluentd/setting/section_parser.rb +36 -0
- data/app/models/concerns/fluentd/setting/section_validator.rb +21 -0
- data/app/models/fluentd.rb +5 -5
- data/app/models/fluentd/setting/buffer_file.rb +23 -0
- data/app/models/fluentd/setting/buffer_memory.rb +17 -0
- data/app/models/fluentd/setting/formatter_csv.rb +21 -0
- data/app/models/fluentd/setting/formatter_hash.rb +19 -0
- data/app/models/fluentd/setting/formatter_json.rb +25 -0
- data/app/models/fluentd/setting/formatter_ltsv.rb +21 -0
- data/app/models/fluentd/setting/formatter_msgpack.rb +13 -0
- data/app/models/fluentd/setting/formatter_out_file.rb +21 -0
- data/app/models/fluentd/setting/formatter_single_value.rb +20 -0
- data/app/models/fluentd/setting/formatter_stdout.rb +19 -0
- data/app/models/fluentd/setting/formatter_tsv.rb +21 -0
- data/app/models/fluentd/setting/in_forward.rb +7 -17
- data/app/models/fluentd/setting/in_http.rb +13 -19
- data/app/models/fluentd/setting/in_monitor_agent.rb +6 -19
- data/app/models/fluentd/setting/in_syslog.rb +14 -12
- data/app/models/fluentd/setting/in_tail.rb +7 -84
- data/app/models/fluentd/setting/out_elasticsearch.rb +12 -21
- data/app/models/fluentd/setting/out_forward.rb +22 -66
- data/app/models/fluentd/setting/out_mongo.rb +20 -26
- data/app/models/fluentd/setting/out_s3.rb +18 -30
- data/app/models/fluentd/setting/out_stdout.rb +21 -18
- data/app/models/fluentd/setting/out_tdlog.rb +35 -0
- data/app/models/fluentd/setting/parser_apache.rb +13 -0
- data/app/models/fluentd/setting/parser_apache2.rb +13 -0
- data/app/models/fluentd/setting/parser_apache_error.rb +13 -0
- data/app/models/fluentd/setting/parser_csv.rb +22 -0
- data/app/models/fluentd/setting/parser_in_http.rb +13 -0
- data/app/models/fluentd/setting/parser_json.rb +25 -0
- data/app/models/fluentd/setting/parser_ltsv.rb +30 -0
- data/app/models/fluentd/setting/parser_msgpack.rb +13 -0
- data/app/models/fluentd/setting/parser_multiline.rb +24 -0
- data/app/models/fluentd/setting/parser_nginx.rb +13 -0
- data/app/models/fluentd/setting/parser_none.rb +19 -0
- data/app/models/fluentd/setting/parser_regexp.rb +26 -0
- data/app/models/fluentd/setting/parser_syslog.rb +29 -0
- data/app/models/fluentd/setting/parser_tsv.rb +19 -0
- data/app/models/fluentd/setting/section.rb +38 -0
- data/app/models/fluentd/setting/storage_local.rb +22 -0
- data/app/models/fluentd/setting/type/array.rb +17 -0
- data/app/models/fluentd/setting/type/bool.rb +18 -0
- data/app/models/fluentd/setting/type/enum.rb +17 -0
- data/app/models/fluentd/setting/type/hash.rb +17 -0
- data/app/models/fluentd/setting/type/regexp.rb +17 -0
- data/app/models/fluentd/setting/type/section.rb +17 -0
- data/app/models/fluentd/setting/type/size.rb +17 -0
- data/app/models/fluentd/setting/type/time.rb +17 -0
- data/app/views/api/settings/_element.json.jbuilder +1 -1
- data/app/views/fluentd/settings/in_forward/_form.html.haml +16 -0
- data/app/views/fluentd/settings/in_tail/_form.html.haml +22 -29
- data/app/views/fluentd/settings/in_tail/after_file_choose.html.haml +1 -1
- data/app/views/fluentd/settings/in_tail/after_format.html.haml +4 -4
- data/app/views/fluentd/settings/in_tail/confirm.html.haml +5 -5
- data/app/views/fluentd/settings/source_and_output.html.haml +1 -1
- data/app/views/shared/_global_nav.html.erb +8 -8
- data/app/views/shared/settings/_form.html.haml +40 -9
- data/app/views/shared/settings/show.html.haml +4 -1
- data/app/views/shared/vue/_in_tail_parse.html.haml +20 -0
- data/app/views/shared/vue/_owned_plugin_form.html.haml +68 -0
- data/app/views/shared/vue/_parser_multiline_form.html.haml +19 -0
- data/app/views/shared/vue/_setting.html.erb +1 -1
- data/config/application.rb +1 -1
- data/config/environment.rb +3 -0
- data/config/initializers/types.rb +7 -0
- data/config/routes.rb +2 -1
- data/fluentd-ui.gemspec +5 -0
- data/lib/fluentd-ui/version.rb +1 -1
- data/lib/regexp_preview.rb +2 -2
- data/lib/regexp_preview/multi_line.rb +53 -63
- data/lib/regexp_preview/single_line.rb +40 -46
- data/spec/features/fluentd/setting/out_forward_spec.rb +1 -1
- data/spec/features/fluentd/setting/out_stdout_spec.rb +1 -1
- data/spec/features/{out_td_spec.rb → out_tdlog_spec.rb} +3 -3
- data/spec/lib/regexp_preview/multi_line_spec.rb +29 -34
- data/spec/lib/regexp_preview/single_line_spec.rb +89 -87
- data/spec/models/fluentd/setting/in_forward_spec.rb +75 -0
- data/spec/models/fluentd/setting/in_http_spec.rb +31 -0
- data/spec/models/fluentd/setting/in_monitor_agent_spec.rb +31 -0
- data/spec/models/fluentd/setting/in_syslog_spec.rb +65 -7
- data/spec/models/fluentd/setting/in_tail_spec.rb +47 -0
- data/spec/models/fluentd/setting/out_elasticsearch_spec.rb +31 -0
- data/spec/models/fluentd/setting/out_mongo_spec.rb +35 -12
- data/spec/models/fluentd/setting/out_s3_spec.rb +128 -0
- data/spec/models/fluentd/setting/out_stdout_spec.rb +31 -0
- data/spec/models/fluentd/setting/out_tdlog_spec.rb +47 -0
- metadata +164 -38
- data/app/controllers/fluentd/settings/out_td_controller.rb +0 -18
- data/app/helpers/fluentd/settings_helper.rb +0 -2
- data/app/javascript/packs/in_tail_format.js +0 -174
- data/app/models/fluentd/setting/common.rb +0 -185
- data/app/models/fluentd/setting/out_td.rb +0 -48
- data/app/views/shared/vue/_in_tail_format.html.erb +0 -43
- data/spec/models/fluentd/setting/common_spec.rb +0 -178
- data/spec/models/fluentd/setting/out_td_spec.rb +0 -38
@@ -0,0 +1,16 @@
|
|
1
|
+
= render "shared/setting_errors"
|
2
|
+
|
3
|
+
- # NOTE: plugin_setting_form_action_url is defined at SettingConcern
|
4
|
+
= form_with(model: @setting, scope: "setting", url: plugin_setting_form_action_url(@fluentd), local: true, class: "ignore-rails-error-div", builder: FluentdFormBuilder) do |f|
|
5
|
+
- @setting.common_options.each do |key|
|
6
|
+
= f.field(key)
|
7
|
+
|
8
|
+
.card.card-body.bg-light
|
9
|
+
%h4{"data-toggle" => "collapse", "href" => "#advanced-setting"}
|
10
|
+
= icon('fa-caret-down')
|
11
|
+
= t('terms.advanced_setting')
|
12
|
+
#advanced-setting.collapse
|
13
|
+
- @setting.advanced_options.each do |key|
|
14
|
+
= f.field(key)
|
15
|
+
|
16
|
+
= f.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary pull-right"
|
@@ -1,42 +1,35 @@
|
|
1
|
-
-
|
1
|
+
- setting.errors.full_messages.each do |e|
|
2
2
|
.alert.alert-danger= e
|
3
3
|
|
4
4
|
.form-group
|
5
|
-
=
|
6
|
-
=
|
7
|
-
=
|
5
|
+
= form.label :path
|
6
|
+
= form.hidden_field :path
|
7
|
+
= form.text_field :path, class: "form-control", disabled: true
|
8
8
|
.form-group
|
9
|
-
=
|
10
|
-
=
|
11
|
-
=
|
12
|
-
|
13
|
-
- @setting.known_formats[@setting.format.to_sym].each do |key|
|
14
|
-
%label= key
|
15
|
-
= f.hidden_field key
|
16
|
-
= @setting.send(key)
|
17
|
-
%br
|
18
|
-
- else
|
19
|
-
%label= @setting.format
|
20
|
-
= f.hidden_field :regexp
|
21
|
-
= @setting.regexp
|
22
|
-
.form-group
|
23
|
-
= f.label :tag
|
24
|
-
= f.text_field :tag, class: "form-control"
|
9
|
+
= form.label :parse_type
|
10
|
+
= form.hidden_field :parse_type
|
11
|
+
= form.text_field :parse_type, class: "form-control", disabled: true
|
12
|
+
|
25
13
|
.form-group
|
26
|
-
=
|
27
|
-
=
|
14
|
+
%label= setting.parse_type
|
15
|
+
- parse_config = setting.create_parser
|
16
|
+
= hidden_field_tag("setting[parse[0]][type]", form.object.parse_type)
|
17
|
+
= form.fields("parse[0]", model: parse_config, builder: FluentdFormBuilder) do |f|
|
18
|
+
- f.object.common_options.each do |key|
|
19
|
+
= f.hidden_field(key)
|
20
|
+
= f.field(key, disabled: true)
|
21
|
+
|
22
|
+
= form.field(:tag)
|
23
|
+
= form.field(:pos_file)
|
24
|
+
|
28
25
|
.well.well-sm
|
29
26
|
%h4{"data-toggle" => "collapse", "href" => "#advanced-setting"}
|
30
27
|
= icon('fa-caret-down')
|
31
28
|
= t('terms.advanced_setting')
|
32
29
|
#advanced-setting.collapse
|
33
30
|
.form-group
|
34
|
-
=
|
35
|
-
= f.text_field :rotate_wait, class: "form-control"
|
31
|
+
= form.field(:rotate_wait)
|
36
32
|
.form-group
|
37
|
-
=
|
38
|
-
= f.label :read_from_head
|
33
|
+
= form.field(:read_from_head)
|
39
34
|
.form-group
|
40
|
-
=
|
41
|
-
= f.text_field :refresh_interval, class: "form-control"
|
42
|
-
|
35
|
+
= form.field(:refresh_interval)
|
@@ -10,7 +10,7 @@
|
|
10
10
|
= f.label :path
|
11
11
|
= f.hidden_field :path
|
12
12
|
= f.text_field :path, class: "form-control", disabled: true
|
13
|
-
= render
|
13
|
+
= render "shared/vue/in_tail_parse", setting: @setting
|
14
14
|
|
15
15
|
.card
|
16
16
|
%pre.card-body= file_tail(@setting.path, Settings.in_tail_preview_line_count).join("\n")
|
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
= link_to t('fluentd.settings.in_tail.restart_from_first'), daemon_setting_in_tail_path(@fluentds)
|
4
4
|
|
5
|
-
=
|
6
|
-
= render partial: "form", locals: {
|
5
|
+
= form_with(model: @setting, scope: "setting", url: confirm_daemon_setting_in_tail_path(@fluentd), local: true, builder: FluentdFormBuilder) do |form|
|
6
|
+
= render partial: "form", locals: { form: form, setting: @setting }
|
7
7
|
|
8
8
|
%p
|
9
|
-
=
|
10
|
-
=
|
9
|
+
= form.submit t('terms.next'), class: "btn btn-lg btn-primary float-right"
|
10
|
+
= form.submit t('terms.prev'), class: "btn btn-lg btn-secondary", name: "back"
|
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
= link_to t('fluentd.settings.in_tail.restart_from_first'), daemon_setting_in_tail_path(@fluentd)
|
4
4
|
|
5
|
-
=
|
6
|
-
= render partial: "form", locals: {
|
5
|
+
= form_with(model: @setting, scope: "setting", url: finish_daemon_setting_in_tail_path(@fluentd), local: true, builder: FluentdFormBuilder) do |form|
|
6
|
+
= render partial: "form", locals: { form: form, setting: @setting }
|
7
7
|
|
8
|
-
%pre= @setting.
|
8
|
+
%pre= @setting.to_config
|
9
9
|
|
10
10
|
%p
|
11
|
-
=
|
12
|
-
=
|
11
|
+
= form.submit t('fluentd.common.finish') , class: "btn btn-lg btn-primary float-right"
|
12
|
+
= form.submit t('terms.prev'), class: "btn btn-lg btn-secondary", name: "back"
|
13
13
|
.clearfix.float-right= t('terms.notice_restart_for_config_edit', brand: fluentd_ui_brand)
|
@@ -23,7 +23,7 @@
|
|
23
23
|
.card-header
|
24
24
|
%h4= t('.out')
|
25
25
|
.card-body
|
26
|
-
- %w|stdout
|
26
|
+
- %w|stdout tdlog s3 mongo elasticsearch forward|.each do |type|
|
27
27
|
%p
|
28
28
|
= link_to(send("daemon_setting_out_#{type}_path", @fluentd)) do
|
29
29
|
= icon('fa-file-text-o fa-lg')
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<ul class="navbar-nav navbar-sidenav" id="side-menu">
|
2
|
-
<li class="nav-item"
|
3
|
-
<a class="section">
|
2
|
+
<li class="nav-item">
|
3
|
+
<a class="section" data-toggle="tooltip" data-placement="right" title="Fluentd">
|
4
4
|
<%= icon("fa-puzzle-piece fa-fw") << "fluentd" %>
|
5
5
|
</a>
|
6
6
|
<ul class="sidenav-second-level">
|
@@ -29,8 +29,8 @@
|
|
29
29
|
</li>
|
30
30
|
|
31
31
|
<% if fluentd_exists? %>
|
32
|
-
<li class="nav-item"
|
33
|
-
<a class="section">
|
32
|
+
<li class="nav-item">
|
33
|
+
<a class="section" data-toggle="tooltip" data-placement="right" title="Plugins">
|
34
34
|
<%= icon("fa-cogs fa-fw") << t('terms.plugins') %>
|
35
35
|
</a>
|
36
36
|
<ul class="sidenav-second-level">
|
@@ -47,8 +47,8 @@
|
|
47
47
|
</li>
|
48
48
|
<% end %>
|
49
49
|
|
50
|
-
<li class="nav-item"
|
51
|
-
<a class="section">
|
50
|
+
<li class="nav-item">
|
51
|
+
<a class="section" data-toggle="tooltip" data-placement="right" title="Misc">
|
52
52
|
<%= icon('fa-coffee fa-fw') << t('terms.misc') %>
|
53
53
|
</a>
|
54
54
|
<ul class="sidenav-second-level">
|
@@ -67,8 +67,8 @@
|
|
67
67
|
</ul>
|
68
68
|
</li>
|
69
69
|
|
70
|
-
<li class="nav-item"
|
71
|
-
<a class="section">
|
70
|
+
<li class="nav-item">
|
71
|
+
<a class="section" data-toggle="tooltip" data-placement="right" title="Language">
|
72
72
|
<%= icon('fa-font') << t('terms.languages') %>
|
73
73
|
</a>
|
74
74
|
<ul class="sidenav-second-level">
|
@@ -1,18 +1,49 @@
|
|
1
1
|
= render "shared/setting_errors"
|
2
|
+
= render "shared/vue/owned_plugin_form"
|
2
3
|
|
3
|
-
|
4
|
-
= form_for(@setting, url: plugin_setting_form_action_url(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
|
5
|
-
- @setting.common_options.each do |key|
|
6
|
-
= field(f, key)
|
4
|
+
= javascript_pack_tag("plugin_setting")
|
7
5
|
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
#plugin-setting
|
7
|
+
- # NOTE: plugin_setting_form_action_url is defined at SettingConcern
|
8
|
+
= form_with(model: @setting, scope: :setting, url: plugin_setting_form_action_url(@fluentd), class: "ignore-rails-error-div", builder: FluentdFormBuilder) do |form|
|
9
|
+
- @setting.common_options.each do |key|
|
10
|
+
= form.field(key)
|
11
|
+
|
12
|
+
- if @setting.have_buffer_section?
|
13
|
+
%owned-plugin-form{"v-bind:id" => "'buffer-section'",
|
14
|
+
"v-bind:options-json" => "'#{Fluent::Plugin::BUFFER_REGISTRY.map.keys.to_json}'",
|
15
|
+
"v-bind:initial-plugin-name" => "'#{@setting.buffer_type}'",
|
16
|
+
"v-bind:plugin-type" => "'buffer'",
|
17
|
+
"v-bind:plugin-label" => "'Buffer'"}
|
18
|
+
|
19
|
+
- if @setting.have_storage_section?
|
20
|
+
%owned-plugin-form{"v-bind:id" => "'storage-section'",
|
21
|
+
"v-bind:options-json" => "'#{Fluent::Plugin::STORAGE_REGISTRY.map.keys.to_json}'",
|
22
|
+
"v-bind:initial-plugin-name" => "'#{@setting.storage_type}'",
|
23
|
+
"v-bind:plugin-type" => "'storage'",
|
24
|
+
"v-bind:plugin-label" => "'Storage'"}
|
25
|
+
|
26
|
+
- if @setting.have_parse_section?
|
27
|
+
%owned-plugin-form{"v-bind:id" => "'parse-section'",
|
28
|
+
"v-bind:options-json" => "'#{Fluent::Plugin::PARSER_REGISTRY.map.keys.to_json}'",
|
29
|
+
"v-bind:initial-plugin-name" => "'#{@setting.parse_type}'",
|
30
|
+
"v-bind:plugin-type" => "'parse'",
|
31
|
+
"v-bind:plugin-label" => "'Parse'"}
|
32
|
+
|
33
|
+
- if @setting.have_format_section?
|
34
|
+
%owned-plugin-form{"v-bind:id" => "'format-section'",
|
35
|
+
"v-bind:options-json" => "'#{Fluent::Plugin::FORMATTER_REGISTRY.map.keys.to_json}'",
|
36
|
+
"v-bind:initial-plugin-name" => "'#{@setting.format_type}'",
|
37
|
+
"v-bind:plugin-type" => "'format'",
|
38
|
+
"v-bind:plugin-label" => "'Format'"}
|
39
|
+
|
40
|
+
- if @setting.advanced_options.present?
|
41
|
+
.card.card-body.bg-light
|
11
42
|
%h4{"data-toggle" => "collapse", "href" => "#advanced-setting"}
|
12
43
|
= icon('fa-caret-down')
|
13
44
|
= t('terms.advanced_setting')
|
14
45
|
#advanced-setting.collapse
|
15
46
|
- @setting.advanced_options.each do |key|
|
16
|
-
= field(
|
17
|
-
= f.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary float-right"
|
47
|
+
= form.field(key)
|
18
48
|
|
49
|
+
= form.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary float-right mt-3"
|
@@ -5,4 +5,7 @@
|
|
5
5
|
.card-body.bg-light
|
6
6
|
= raw t("fluentd.settings.#{target_plugin_name}.option_guide")
|
7
7
|
|
8
|
-
|
8
|
+
- if lookup_context.exists?("form", controller.controller_path, true)
|
9
|
+
= render "#{controller.controller_path}/form"
|
10
|
+
- else
|
11
|
+
= render "shared/settings/form"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
- add_javascript_pack_tag("in_tail_parse")
|
2
|
+
|
3
|
+
= render "shared/vue/owned_plugin_form"
|
4
|
+
|
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"}
|
14
|
+
|
15
|
+
.card.mb-3
|
16
|
+
%pre{"class" => "card-body", "v-html" => "highlightedLines"}
|
17
|
+
|
18
|
+
.card.md-3
|
19
|
+
%p.card-body.pb-0
|
20
|
+
=raw(t("fluentd.settings.in_tail_option_guide"))
|
@@ -0,0 +1,68 @@
|
|
1
|
+
= render "shared/vue/parser_multiline_form"
|
2
|
+
|
3
|
+
%script{type: "text/x-template", id: "vue-owned-plugin-form"}
|
4
|
+
.form-group.card.bg-light.mb-3{"v-bind:id" => "id"}
|
5
|
+
.card-body
|
6
|
+
%label{"v-bind:for" => "selectId(pluginType)"}
|
7
|
+
{{ pluginLabel }}
|
8
|
+
%select{"v-bind:id" => "selectId(pluginType)",
|
9
|
+
"v-bind:class" => "selectClass(pluginType)",
|
10
|
+
"v-bind:name" => "selectName(pluginType)",
|
11
|
+
"v-model" => "pluginName",
|
12
|
+
"v-on:change" => "onChange"}
|
13
|
+
%option{"v-for" => "option in options",
|
14
|
+
"v-bind:value" => "option",
|
15
|
+
"v-bind:selected" => "pluginName===option"}
|
16
|
+
{{ option }}
|
17
|
+
%parser-multiline-form{"v-if" => 'pluginName==="multiline"',
|
18
|
+
"v-bind:plugin-type" => "pluginType",
|
19
|
+
"v-bind:common-options" => "commonOptions",
|
20
|
+
"v-on:change-formats" => "onChangeFormats"}
|
21
|
+
.form-group(v-else){"v-for" => "option in commonOptions"}
|
22
|
+
%template{"v-if" => 'option.type==="enum"'}
|
23
|
+
%label{"v-bind:for" => "inputId(pluginType, option)",
|
24
|
+
"data-toggle" => "tooltip",
|
25
|
+
"data-placement" => "right",
|
26
|
+
"v-bind:title" => "option.desc"}
|
27
|
+
{{ option.name }}
|
28
|
+
%select{"v-bind:id" => "inputId(pluginType, option)",
|
29
|
+
"v-bind:name" => "inputName(pluginType, option)",
|
30
|
+
"class" => "form-control"}
|
31
|
+
%option{"v-for" => "item in option.list",
|
32
|
+
"v-bind:value" => "item",
|
33
|
+
"v-bind:selected" => "option.default === item"}
|
34
|
+
{{ item }}
|
35
|
+
%template{"v-else-if" => 'option.type==="bool"'}
|
36
|
+
%input{"v-bind:id" => "inputId(pluginType, option)",
|
37
|
+
"v-bind:name" => "inputName(pluginType, option)",
|
38
|
+
"v-bind:checked" => "checked(option.default)",
|
39
|
+
"type" => "checkbox"}
|
40
|
+
%label{"v-bind:for" => "inputId(pluginType, option)",
|
41
|
+
"data-toggle" => "tooltip",
|
42
|
+
"data-placement" => "right",
|
43
|
+
"v-bind:title" => "option.desc"}
|
44
|
+
{{ option.name }}
|
45
|
+
%template(v-else)
|
46
|
+
%label{"v-bind:for" => "inputId(pluginType, option)",
|
47
|
+
"data-toggle" => "tooltip",
|
48
|
+
"data-placement" => "right",
|
49
|
+
"v-bind:title" => "option.desc"}
|
50
|
+
{{ option.name }}
|
51
|
+
%template{"v-if" => 'option.name === "expression"'}
|
52
|
+
%input{"v-bind:id" => "inputId(pluginType, option)",
|
53
|
+
"v-bind:name" => "inputName(pluginType, option)",
|
54
|
+
"v-model.lazy" => "expression",
|
55
|
+
"type" => "text",
|
56
|
+
"class" => "form-control"}
|
57
|
+
%template{"v-else-if" => 'option.name === "time_format"'}
|
58
|
+
%input{"v-bind:id" => "inputId(pluginType, option)",
|
59
|
+
"v-bind:name" => "inputName(pluginType, option)",
|
60
|
+
"v-model.lazy" => "timeFormat",
|
61
|
+
"type" => "text",
|
62
|
+
"class" => "form-control"}
|
63
|
+
%template(v-else)
|
64
|
+
%input{"v-bind:id" => "inputId(pluginType, option)",
|
65
|
+
"v-bind:name" => "inputName(pluginType, option)",
|
66
|
+
"v-bind:value" => "option.default",
|
67
|
+
"type" => "text",
|
68
|
+
"class" => "form-control"}
|