mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-12 09:17:05 +02:00
Adding support for some plugins was hard. After this commit, easy to add a plugin that has commonly setting style. Before: - Add model, controller, and views for it. After: - Add model and controller. view is shared.
34 lines
507 B
Ruby
34 lines
507 B
Ruby
class Fluentd
|
|
module Setting
|
|
class InSyslog
|
|
include ActiveModel::Model
|
|
include Common
|
|
|
|
KEYS = [
|
|
:port, :bind, :tag, :types
|
|
].freeze
|
|
|
|
attr_accessor(*KEYS)
|
|
|
|
validates :tag, presence: true
|
|
|
|
def self.initial_params
|
|
{
|
|
bind: "0.0.0.0",
|
|
port: 5140,
|
|
}
|
|
end
|
|
|
|
def common_options
|
|
[
|
|
:tag, :bind, :port, :types,
|
|
]
|
|
end
|
|
|
|
def advanced_options
|
|
[]
|
|
end
|
|
end
|
|
end
|
|
end
|