mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-01-21 15:11:02 +01:00
57 lines
3.1 KiB
Plaintext
57 lines
3.1 KiB
Plaintext
= render "shared/setting_errors"
|
|
= render "shared/vue/owned_plugin_form"
|
|
= render "shared/vue/parser_plugin_form"
|
|
|
|
= javascript_pack_tag("plugin_setting")
|
|
|
|
#plugin-setting
|
|
- # NOTE: plugin_setting_form_action_url is defined at SettingConcern
|
|
= form_with(model: setting, scope: :setting, url: plugin_setting_form_action_url(fluentd), local: true, class: "ignore-rails-error-div", builder: FluentdFormBuilder) do |form|
|
|
- setting.common_options.each do |key|
|
|
= form.field(key)
|
|
|
|
- if setting.have_buffer_section?
|
|
%owned-plugin-form{"v-bind:id" => "'buffer-section'",
|
|
"v-bind:options-json" => "'#{Fluent::Plugin::BUFFER_REGISTRY.map.keys.to_json}'",
|
|
"v-bind:initial-plugin-name" => "'#{setting.buffer_type}'",
|
|
"v-bind:initial-params-json" => "'#{setting.class.initial_params[:buffer]["0"].to_json}'",
|
|
"v-bind:plugin-type" => "'buffer'",
|
|
"v-bind:plugin-label" => "'Buffer'"}
|
|
|
|
- if setting.have_storage_section?
|
|
%owned-plugin-form{"v-bind:id" => "'storage-section'",
|
|
"v-bind:options-json" => "'#{Fluent::Plugin::STORAGE_REGISTRY.map.keys.to_json}'",
|
|
"v-bind:initial-plugin-name" => "'#{setting.storage_type}'",
|
|
"v-bind:initial-params-json" => "'#{setting.class.initial_params[:storage]["0"].to_json}'",
|
|
"v-bind:plugin-type" => "'storage'",
|
|
"v-bind:plugin-label" => "'Storage'"}
|
|
|
|
- if setting.have_parse_section?
|
|
%parser-plugin-form{"v-bind:id" => "'parse-section'",
|
|
"v-bind:options-json" => "'#{Fluent::Plugin::PARSER_REGISTRY.map.keys.to_json}'",
|
|
"v-bind:initial-plugin-name" => "'#{setting.parse_type}'",
|
|
"v-bind:initial-params-json" => "'#{setting.class.initial_params[:parse]["0"].to_json}'",
|
|
"v-bind:plugin-type" => "'parse'",
|
|
"v-bind:plugin-label" => "'Parse'"}
|
|
|
|
- if setting.have_format_section?
|
|
%owned-plugin-form{"v-bind:id" => "'format-section'",
|
|
"v-bind:options-json" => "'#{Fluent::Plugin::FORMATTER_REGISTRY.map.keys.to_json}'",
|
|
"v-bind:initial-plugin-name" => "'#{setting.format_type}'",
|
|
"v-bind:initial-params-json" => "'#{setting.class.initial_params[:format]["0"].to_json}'",
|
|
"v-bind:plugin-type" => "'format'",
|
|
"v-bind:plugin-label" => "'Format'"}
|
|
|
|
- if setting.advanced_options.present?
|
|
%b-card(no-body){"bg-variant" => "light"}
|
|
%template{"slot" => "header"}
|
|
%h4{"v-b-toggle" => "'advanced-setting'"}
|
|
= icon('fa-caret-down')
|
|
= t('terms.advanced_setting')
|
|
%b-collapse{"id" => "advanced-setting"}
|
|
%b-card-body
|
|
- setting.advanced_options.each do |key|
|
|
= form.field(key)
|
|
|
|
= form.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary float-right mt-3"
|