mirror of
https://github.com/fluent/fluentd-ui.git
synced 2026-05-05 19:06:12 +02:00
fancy start/stop/reload buttons
This commit is contained in:
parent
5d85bff58c
commit
2f44b64628
@ -37,7 +37,7 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def icon(classes, inner=nil)
|
||||
%Q!<i class="fa #{classes}">#{inner}</i>!.html_safe
|
||||
%Q!<i class="fa #{classes}">#{inner}</i> !.html_safe
|
||||
end
|
||||
|
||||
def page_title(title)
|
||||
|
||||
@ -1,13 +1,21 @@
|
||||
- page_title t('.page_title', label: @fluentd.label)
|
||||
|
||||
%h4
|
||||
- if @fluentd.agent.running?
|
||||
%span.text.text-success= icon("fa-check")
|
||||
= t("fluentd.common.running")
|
||||
- else
|
||||
%span.text.text-info= icon("fa-circle-o")
|
||||
= t("fluentd.common.stopped")
|
||||
|
||||
- if flash[:error]
|
||||
%div.alert.alert-danger= flash[:error]
|
||||
|
||||
%h4
|
||||
= @fluentd.agent.running? ? t(".running") : t(".stopped")
|
||||
%p.operations
|
||||
= link_to icon("fa-play") << t("fluentd.common.start"), start_fluentd_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "disabled btn-default" : "btn-primary"}"
|
||||
= link_to icon("fa-pause") << t("fluentd.common.stop"), stop_fluentd_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-danger" : "disabled btn-default"}"
|
||||
= link_to icon("fa-refresh") << t("fluentd.common.restart"), restart_fluentd_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-warning" : "disabled btn-default"}"
|
||||
|
||||
= link_to t(".start"), start_fluentd_agent_path(@fluentd), method: :put
|
||||
= link_to t(".stop"), stop_fluentd_agent_path(@fluentd), method: :put
|
||||
= link_to t(".restart"), restart_fluentd_agent_path(@fluentd), method: :put
|
||||
= link_to t(".log"), log_fluentd_agent_path(@fluentd)
|
||||
= link_to t(".setting"), fluentd_setting_path(@fluentd)
|
||||
%p
|
||||
= link_to t("fluentd.common.log"), log_fluentd_agent_path(@fluentd)
|
||||
= link_to t("fluentd.common.config_file"), fluentd_setting_path(@fluentd)
|
||||
|
||||
@ -5,3 +5,4 @@
|
||||
= @config
|
||||
|
||||
= link_to t(".edit"), edit_fluentd_setting_path(@fluentd)
|
||||
|
||||
|
||||
12
app/views/shared/_fluentd_nav.html.haml
Normal file
12
app/views/shared/_fluentd_nav.html.haml
Normal file
@ -0,0 +1,12 @@
|
||||
%h4
|
||||
= @fluentd.agent.running? ? t("fluentd.common.running") : t("fluentd.common.stopped")
|
||||
|
||||
- if flash[:error]
|
||||
%div.alert.alert-danger= flash[:error]
|
||||
|
||||
= link_to t("fluentd.common.detail"), fluentd_agent_path(@fluentd)
|
||||
= link_to t("fluentd.common.start"), start_fluentd_agent_path(@fluentd), method: :put
|
||||
= link_to t("fluentd.common.stop"), stop_fluentd_agent_path(@fluentd), method: :put
|
||||
= link_to t("fluentd.common.restart"), restart_fluentd_agent_path(@fluentd), method: :put
|
||||
= link_to t("fluentd.common.log"), log_fluentd_agent_path(@fluentd)
|
||||
= link_to t("fluentd.common.config_file"), fluentd_setting_path(@fluentd)
|
||||
@ -16,6 +16,7 @@ ja:
|
||||
fluent_version: "fluentd %{version}"
|
||||
no_alert: なし
|
||||
update_password: パスワード更新
|
||||
detail: 詳細
|
||||
create: 作成
|
||||
update: 更新
|
||||
edit: 編集
|
||||
@ -61,6 +62,7 @@ ja:
|
||||
running: 稼働中
|
||||
operation: プロセス詳細
|
||||
setting: 設定
|
||||
config_file: 設定ファイル
|
||||
page_title: "%{label}"
|
||||
form:
|
||||
<<: *fluentd_common
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user