mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-10 00:07:08 +02:00
18 lines
411 B
Ruby
18 lines
411 B
Ruby
class PollingController < ApplicationController
|
|
def alerts
|
|
alerts = []
|
|
|
|
%w{ installing uninstalling }.each do |action|
|
|
send("#{action}_gems").each do |plugin|
|
|
target = plugin.gem_name.dup
|
|
target << "(#{plugin.version})" if plugin.version
|
|
alerts << {
|
|
text: I18n.t("terms.#{action}", target: target)
|
|
}
|
|
end
|
|
end
|
|
|
|
render json: alerts
|
|
end
|
|
end
|