fluentd-ui/app/models/fluentd/setting/in_syslog.rb
uu59 3c7786f262 Refactor plugin setting
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.
2014-11-04 14:29:31 +09:00

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