Display a message for the daemon start/stop/restart could take a long time

This commit is contained in:
uu59 2014-07-31 11:42:17 +09:00
parent 144cfdeeef
commit 3d750a0c7a
3 changed files with 5 additions and 0 deletions

View File

@ -5,6 +5,7 @@ class Fluentd::AgentsController < ApplicationController
unless @fluentd.agent.start
flash[:error] = t("messages.fluentd_start_failed", brand: fluentd_ui_title) + @fluentd.agent.log_tail(1).first
end
flash[:success] = t("messages.fluentd_start_stop_delay_notice", action: t('fluentd.common.start'))
redirect_to daemon_path(@fluentd), status: 303 # 303 is change HTTP Verb GET
end
@ -12,6 +13,7 @@ class Fluentd::AgentsController < ApplicationController
unless @fluentd.agent.stop
flash[:error] = t("messages.fluentd_stop_failed", brand: fluentd_ui_title)
end
flash[:success] = t("messages.fluentd_start_stop_delay_notice", action: t('fluentd.common.stop'))
redirect_to daemon_path(@fluentd), status: 303 # 303 is change HTTP Verb GET
end
@ -19,6 +21,7 @@ class Fluentd::AgentsController < ApplicationController
unless @fluentd.agent.restart
flash[:error] = t("messages.fluentd_restart_failed", brand: fluentd_ui_title) + @fluentd.agent.log_tail(1).first
end
flash[:success] = t("messages.fluentd_start_stop_delay_notice", action: t('fluentd.common.restart'))
redirect_to daemon_path(@fluentd), status: 303 # 303 is change HTTP Verb GET
end

View File

@ -7,6 +7,7 @@ en:
fluentd_start_failed: Failed to start fluentd
fluentd_stop_failed: Failed to stop fluentd
fluentd_restart_failed: Failed to restart fluentd
fluentd_start_stop_delay_notice: "'%{action} daemon' is accepted. That operation could take a minute for complete."
terms: &terms
sign_in: Sign in

View File

@ -7,6 +7,7 @@ ja:
fluentd_start_failed: "%{brand}の起動に失敗しました。"
fluentd_stop_failed: "%{brand}の停止に失敗しました。"
fluentd_restart_failed: "%{brand}の再起動に失敗しました。"
fluentd_start_stop_delay_notice: "デーモンの%{action}を受け付けました。処理が完了するまで時間がかかる場合があります。"
terms: &terms
sign_in: ログイン