diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index cc1317b..6cfd7d9 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -137,3 +137,10 @@ label { padding-top: 64px; } } + +.fluentd-ui-logo { + padding: 0; + img { + height: 50px; + } +} diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 94a3afd..474cc86 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base helper_method :current_user helper_method :current_locale helper_method :installing_gem?, :installing_gems, :uninstalling_gem?, :uninstalling_gems + helper_method :fluentd_ui_title, :fluentd_ui_brand helper_method :file_tail helper_method :fluentd_exists? before_action :login_required @@ -29,6 +30,14 @@ class ApplicationController < ActionController::Base I18n.locale end + def fluentd_ui_title + ENV["FLUENTD_UI_TITLE"] || "Fluentd UI" + end + + def fluentd_ui_brand + ENV["FLUENTD_UI_BRAND"] || "fluentd" + end + def installing_gem? installing_gems.present? end @@ -53,7 +62,7 @@ class ApplicationController < ActionController::Base def notice_new_fluentd_ui_available if FluentdUI.update_available? - flash[:info] = I18n.t("messages.available_new_fluentd_ui", version: FluentdUI.latest_version, update_url: misc_information_path) + flash[:info] = I18n.t("messages.available_new_fluentd_ui", version: FluentdUI.latest_version, update_url: misc_information_path, title: fluentd_ui_title) end end diff --git a/app/controllers/fluentd/agents_controller.rb b/app/controllers/fluentd/agents_controller.rb index 8d3e156..8e573d0 100644 --- a/app/controllers/fluentd/agents_controller.rb +++ b/app/controllers/fluentd/agents_controller.rb @@ -3,23 +3,23 @@ class Fluentd::AgentsController < ApplicationController def start unless @fluentd.agent.start - flash[:error] = t("error.fluentd_start_failed") + @fluentd.agent.log_tail(1).first + flash[:error] = t("error.fluentd_start_failed", brand: fluentd_ui_title) + @fluentd.agent.log_tail(1).first end - redirect_to fluentd_path(@fluentd), status: 303 # 303 is change HTTP Verb GET + redirect_to daemon_path(@fluentd), status: 303 # 303 is change HTTP Verb GET end def stop unless @fluentd.agent.stop - flash[:error] = t("error.fluentd_stop_failed") + flash[:error] = t("error.fluentd_stop_failed", brand: fluentd_ui_title) end - redirect_to fluentd_path(@fluentd), status: 303 # 303 is change HTTP Verb GET + redirect_to daemon_path(@fluentd), status: 303 # 303 is change HTTP Verb GET end def restart unless @fluentd.agent.restart - flash[:error] = t("error.fluentd_restart_failed") + @fluentd.agent.log_tail(1).first + flash[:error] = t("error.fluentd_restart_failed", brand: fluentd_ui_title) + @fluentd.agent.log_tail(1).first end - redirect_to fluentd_path(@fluentd), status: 303 # 303 is change HTTP Verb GET + redirect_to daemon_path(@fluentd), status: 303 # 303 is change HTTP Verb GET end def log_tail diff --git a/app/controllers/fluentd/settings/in_syslog_controller.rb b/app/controllers/fluentd/settings/in_syslog_controller.rb index e799b49..9f7035e 100644 --- a/app/controllers/fluentd/settings/in_syslog_controller.rb +++ b/app/controllers/fluentd/settings/in_syslog_controller.rb @@ -22,7 +22,7 @@ class Fluentd::Settings::InSyslogController < ApplicationController return render "show" end end - redirect_to fluentd_setting_path(@fluentd) + redirect_to daemon_setting_path(@fluentd) end private diff --git a/app/controllers/fluentd/settings/in_tail_controller.rb b/app/controllers/fluentd/settings/in_tail_controller.rb index e821500..c508dc5 100644 --- a/app/controllers/fluentd/settings/in_tail_controller.rb +++ b/app/controllers/fluentd/settings/in_tail_controller.rb @@ -40,7 +40,7 @@ class Fluentd::Settings::InTailController < ApplicationController @fluentd.agent.config_append @setting.to_conf @fluentd.agent.restart if @fluentd.agent.running? - redirect_to fluentd_setting_path(@fluentd) + redirect_to daemon_setting_path(@fluentd) end private diff --git a/app/controllers/fluentd/settings/out_forward_controller.rb b/app/controllers/fluentd/settings/out_forward_controller.rb index f9f6cb4..c4d7dcb 100644 --- a/app/controllers/fluentd/settings/out_forward_controller.rb +++ b/app/controllers/fluentd/settings/out_forward_controller.rb @@ -25,7 +25,7 @@ class Fluentd::Settings::OutForwardController < ApplicationController return render "show" end end - redirect_to fluentd_setting_path(@fluentd) + redirect_to daemon_setting_path(@fluentd) end private diff --git a/app/controllers/fluentd/settings/out_mongo_controller.rb b/app/controllers/fluentd/settings/out_mongo_controller.rb index d89d247..806bd36 100644 --- a/app/controllers/fluentd/settings/out_mongo_controller.rb +++ b/app/controllers/fluentd/settings/out_mongo_controller.rb @@ -24,7 +24,7 @@ class Fluentd::Settings::OutMongoController < ApplicationController return render "show" end end - redirect_to fluentd_setting_path(@fluentd) + redirect_to daemon_setting_path(@fluentd) end private diff --git a/app/controllers/fluentd/settings/out_s3_controller.rb b/app/controllers/fluentd/settings/out_s3_controller.rb index 61f7447..31cb8f3 100644 --- a/app/controllers/fluentd/settings/out_s3_controller.rb +++ b/app/controllers/fluentd/settings/out_s3_controller.rb @@ -24,7 +24,7 @@ class Fluentd::Settings::OutS3Controller < ApplicationController return render "show" end end - redirect_to fluentd_setting_path(@fluentd) + redirect_to daemon_setting_path(@fluentd) end private diff --git a/app/controllers/fluentd/settings/out_td_controller.rb b/app/controllers/fluentd/settings/out_td_controller.rb index 4c80a54..a78825b 100644 --- a/app/controllers/fluentd/settings/out_td_controller.rb +++ b/app/controllers/fluentd/settings/out_td_controller.rb @@ -24,7 +24,7 @@ class Fluentd::Settings::OutTdController < ApplicationController return render "show" end end - redirect_to fluentd_setting_path(@fluentd) + redirect_to daemon_setting_path(@fluentd) end private diff --git a/app/controllers/fluentd/settings_controller.rb b/app/controllers/fluentd/settings_controller.rb index 946f5f4..3f37028 100644 --- a/app/controllers/fluentd/settings_controller.rb +++ b/app/controllers/fluentd/settings_controller.rb @@ -13,7 +13,7 @@ class Fluentd::SettingsController < ApplicationController def update @fluentd.agent.config_write params[:config] @fluentd.agent.restart if @fluentd.agent.running? - redirect_to fluentd_setting_path(@fluentd) + redirect_to daemon_setting_path(@fluentd) end def in_tail_after_file_choose @@ -54,7 +54,7 @@ class Fluentd::SettingsController < ApplicationController @fluentd.agent.config_append @setting.to_conf @fluentd.agent.restart if @fluentd.agent.running? - redirect_to fluentd_setting_path(@fluentd) + redirect_to daemon_setting_path(@fluentd) end private diff --git a/app/controllers/fluentd_controller.rb b/app/controllers/fluentd_controller.rb index 0e37f15..ec52c4e 100644 --- a/app/controllers/fluentd_controller.rb +++ b/app/controllers/fluentd_controller.rb @@ -1,6 +1,6 @@ class FluentdController < ApplicationController - before_action :find_fluentd, only: [:show, :edit, :update, :destroy, :log, :raw_log] - before_action :check_fluentd_exists, only: [:edit, :log, :raw_log] + before_action :find_fluentd, only: [:show, :edit, :update, :destroy, :log, :raw_log, :errors] + before_action :check_fluentd_exists, only: [:edit, :log, :raw_log, :errors] def show end @@ -15,7 +15,7 @@ class FluentdController < ApplicationController unless @fluentd.save return render :new end - redirect_to fluentd_path + redirect_to daemon_path end def edit @@ -27,16 +27,19 @@ class FluentdController < ApplicationController unless @fluentd.save return render :edit end - redirect_to fluentd_path + redirect_to daemon_path end def destroy @fluentd.agent.stop if @fluentd.agent.running? @fluentd.destroy - redirect_to root_path, flash: {success: t('messages.destroy_succeed_fluentd_setting')} + redirect_to root_path, flash: {success: t('messages.destroy_succeed_fluentd_setting', brand: fluentd_ui_brand)} end def log + end + + def errors @error_duration_days = 5 @errors = @fluentd.agent.errors_since(@error_duration_days.days.ago) end diff --git a/app/controllers/welcome_controller.rb b/app/controllers/welcome_controller.rb index 8c22ff6..01c1a43 100644 --- a/app/controllers/welcome_controller.rb +++ b/app/controllers/welcome_controller.rb @@ -1,5 +1,5 @@ class WelcomeController < ApplicationController def home - redirect_to fluentd_path + redirect_to daemon_path end end diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 3507f4a..8dbc8e7 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -5,8 +5,8 @@ module ApplicationHelper File.exist?("/etc/init.d/td-agent") end - def fluentd_ui_title - ENV["FLUENTD_UI_TITLE"] || "Fluentd UI" + def fluentd_ui_logo + image_tag(ENV["FLUENTD_UI_LOGO"] || "/fluentd-logo-right-text.png") end def language_name(locale) @@ -40,12 +40,16 @@ module ApplicationHelper %Q!#{inner} !.html_safe end - def page_title(title) - content_for(:page_title) { title } - page_head(title) unless content_for?(:page_head) + def page_title(title, &block) + content_for(:page_title) do + title + end + page_head(title, &block) unless content_for?(:page_head) end - def page_head(head) - content_for(:page_head) { head } + def page_head(head, &block) + content_for(:page_head) do + head.html_safe + block.try(:call).to_s + end end end diff --git a/app/views/fluentd/edit.html.haml b/app/views/fluentd/edit.html.haml index 3a1facb..56d9513 100644 --- a/app/views/fluentd/edit.html.haml +++ b/app/views/fluentd/edit.html.haml @@ -1,3 +1,3 @@ - page_title t('.page_title') -= render partial: "form", locals: { btn: t(".update"), url: fluentd_path(@fluentd), method: :patch } += render partial: "form", locals: { btn: t(".update"), url: daemon_path(@fluentd), method: :patch } diff --git a/app/views/fluentd/errors.html.haml b/app/views/fluentd/errors.html.haml new file mode 100644 index 0000000..9bebbbc --- /dev/null +++ b/app/views/fluentd/errors.html.haml @@ -0,0 +1,19 @@ +- page_title t('fluentd.common.recent_errors', days: @error_duration_days) do + - link_to raw_log_daemon_path(@fluentd), class: "btn btn-primary pull-right" do + = icon('fa-download') + = t('fluentd.common.raw_log_link') + +%div.row + %div.col-lg-12 + - @errors.each do |error| + %div.panel.panel-default + %div.panel-heading + %h4= error[:subject] + - if error[:notes].present? + %div.panel-body + %ul + - error[:notes].each do |stack| + %li= stack + - if @errors.empty? + %p= t('.error_is_empty') + diff --git a/app/views/fluentd/log.html.haml b/app/views/fluentd/log.html.haml index 6a6ee5d..bcb22b2 100644 --- a/app/views/fluentd/log.html.haml +++ b/app/views/fluentd/log.html.haml @@ -1,21 +1,9 @@ +- page_title t('.page_title', label: @fluentd.label) do + - link_to raw_log_daemon_path(@fluentd), class: "btn btn-primary pull-right" do + = icon('fa-download') + = t('fluentd.common.raw_log_link') -- page_title t('.page_title', label: @fluentd.label) - -= link_to t('.raw_log_link'), raw_log_fluentd_path(@fluentd), class: "btn btn-primary" - - -%h3= t('.recent_errors', days: @error_duration_days) - -%div.row - %div.col-lg-12 - - @errors.each do |error| - %div.panel.panel-default - %div.panel-heading - %h4= error[:subject] - - if error[:notes].present? - %div.panel-body - %ul - - error[:notes].each do |stack| - %li= stack - - if @errors.empty? - %p= t('.error_is_empty') +.row + .col-lg-12 + = preserve do # partial containing
, so shouldn't break indent
+      = render partial: "shared/vue/fluent_log", locals: { fluentd: @fluentd }
diff --git a/app/views/fluentd/new.html.haml b/app/views/fluentd/new.html.haml
index 466e3cb..861b7f1 100644
--- a/app/views/fluentd/new.html.haml
+++ b/app/views/fluentd/new.html.haml
@@ -1,3 +1,3 @@
 - page_title t('.page_title')
 
-= render partial: "form", locals: { btn: t(".create"), url: fluentd_path, method: :post }
+= render partial: "form", locals: { btn: t(".create"), url: daemon_path, method: :post }
diff --git a/app/views/fluentd/settings/edit.html.haml b/app/views/fluentd/settings/edit.html.haml
index 346c24a..267a2cd 100644
--- a/app/views/fluentd/settings/edit.html.haml
+++ b/app/views/fluentd/settings/edit.html.haml
@@ -1,7 +1,7 @@
 - page_title t('.page_title', label: @fluentd.label)
 
-= form_tag(fluentd_setting_path(@fluentd), method: :patch) do
+= form_tag(daemon_setting_path(@fluentd), method: :patch) do
   %div.form-group
     = text_area_tag "config", @config, class: "form-control", rows: 40
-  %p.text.text-danger= t('plugins.notice_restart_for_config_edit')
+  %p.text.text-danger= t('terms.notice_restart_for_config_edit', brand: fluentd_ui_brand)
   = submit_tag t(".update"), class: "btn btn-primary"
diff --git a/app/views/fluentd/settings/in_syslog/_form.html.haml b/app/views/fluentd/settings/in_syslog/_form.html.haml
index d786382..7b84c63 100644
--- a/app/views/fluentd/settings/in_syslog/_form.html.haml
+++ b/app/views/fluentd/settings/in_syslog/_form.html.haml
@@ -1,6 +1,6 @@
 = render "shared/setting_errors"
 
-= form_for(@setting, url: finish_fluentd_setting_in_syslog_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
+= form_for(@setting, url: finish_daemon_setting_in_syslog_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
   = field(f, :tag)
   = field(f, :bind)
   = field(f, :port)
diff --git a/app/views/fluentd/settings/in_tail/after_file_choose.html.haml b/app/views/fluentd/settings/in_tail/after_file_choose.html.haml
index feb2c4b..5c1281f 100644
--- a/app/views/fluentd/settings/in_tail/after_file_choose.html.haml
+++ b/app/views/fluentd/settings/in_tail/after_file_choose.html.haml
@@ -1,8 +1,8 @@
 - page_title t(".page_title")
 
-= link_to t('fluentd.settings.in_tail.restart_from_first'), fluentd_setting_in_tail_path(@fluentd)
+= link_to t('fluentd.settings.in_tail.restart_from_first'), daemon_setting_in_tail_path(@fluentd)
 
-= form_for(@setting, as: "setting", url: after_format_fluentd_setting_in_tail_path(@fluentd)) do |f|
+= form_for(@setting, as: "setting", url: after_format_daemon_setting_in_tail_path(@fluentd)) do |f|
   - @setting.errors.full_messages.each do |e|
     %div.alert.alert-danger= e
 
@@ -16,4 +16,4 @@
 
   %p
     = f.submit t('terms.next'), class: "btn btn-lg btn-primary pull-right"
-    = link_to t('terms.prev'), fluentd_setting_in_tail_path(@fluentd), class: "btn btn-lg btn-default"
+    = link_to t('terms.prev'), daemon_setting_in_tail_path(@fluentd), class: "btn btn-lg btn-default"
diff --git a/app/views/fluentd/settings/in_tail/after_format.html.haml b/app/views/fluentd/settings/in_tail/after_format.html.haml
index 61f3ba2..6d518ad 100644
--- a/app/views/fluentd/settings/in_tail/after_format.html.haml
+++ b/app/views/fluentd/settings/in_tail/after_format.html.haml
@@ -1,8 +1,8 @@
 - page_title t(".page_title")
 
-= link_to t('fluentd.settings.in_tail.restart_from_first'), fluentd_setting_in_tail_path(@fluentds)
+= link_to t('fluentd.settings.in_tail.restart_from_first'), daemon_setting_in_tail_path(@fluentds)
 
-= form_for(@setting, as: "setting", url: confirm_fluentd_setting_in_tail_path(@fluentd)) do |f|
+= form_for(@setting, as: "setting", url: confirm_daemon_setting_in_tail_path(@fluentd)) do |f|
   = render partial: "form", locals: { f: f }
 
   %p
diff --git a/app/views/fluentd/settings/in_tail/confirm.html.haml b/app/views/fluentd/settings/in_tail/confirm.html.haml
index d5e9a6f..785958c 100644
--- a/app/views/fluentd/settings/in_tail/confirm.html.haml
+++ b/app/views/fluentd/settings/in_tail/confirm.html.haml
@@ -1,8 +1,8 @@
 - page_title t(".page_title")
 
-= link_to t('fluentd.settings.in_tail.restart_from_first'), fluentd_setting_in_tail_path(@fluentd)
+= link_to t('fluentd.settings.in_tail.restart_from_first'), daemon_setting_in_tail_path(@fluentd)
 
-= form_for(@setting, as: "setting", url: finish_fluentd_setting_in_tail_path(@fluentd)) do |f|
+= form_for(@setting, as: "setting", url: finish_daemon_setting_in_tail_path(@fluentd)) do |f|
   = render partial: "form", locals: { f: f }
 
   %pre= @setting.to_conf
@@ -10,4 +10,4 @@
   %p
     = f.submit t('fluentd.common.finish')   , class: "btn btn-lg btn-primary pull-right"
     = f.submit t('terms.prev'),   class: "btn btn-lg btn-default", name: "back"
-    .clearfix.pull-right= t('terms.notice_restart_for_config_edit')
+    .clearfix.pull-right= t('terms.notice_restart_for_config_edit', brand: fluentd_ui_brand)
diff --git a/app/views/fluentd/settings/in_tail/show.html.haml b/app/views/fluentd/settings/in_tail/show.html.haml
index e1cdfa9..2b399a2 100644
--- a/app/views/fluentd/settings/in_tail/show.html.haml
+++ b/app/views/fluentd/settings/in_tail/show.html.haml
@@ -1,4 +1,4 @@
 - page_title t(".page_title")
 
-= render partial: "shared/vue/treeview", locals: {name: "path", action: after_file_choose_fluentd_setting_in_tail_path(@fluentd), submit_button: t('terms.next')}
+= render partial: "shared/vue/treeview", locals: {name: "path", action: after_file_choose_daemon_setting_in_tail_path(@fluentd), submit_button: t('terms.next')}
 
diff --git a/app/views/fluentd/settings/out_forward/_form.html.haml b/app/views/fluentd/settings/out_forward/_form.html.haml
index 398f4ef..7cbce73 100644
--- a/app/views/fluentd/settings/out_forward/_form.html.haml
+++ b/app/views/fluentd/settings/out_forward/_form.html.haml
@@ -1,6 +1,6 @@
 = render "shared/setting_errors"
 
-= form_for(@setting, url: finish_fluentd_setting_out_forward_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
+= form_for(@setting, url: finish_daemon_setting_out_forward_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
   = field(f, :match)
   = field(f, :server)
   = field(f, :secondary)
diff --git a/app/views/fluentd/settings/out_mongo/_form.html.haml b/app/views/fluentd/settings/out_mongo/_form.html.haml
index 70b48dc..22c30f5 100644
--- a/app/views/fluentd/settings/out_mongo/_form.html.haml
+++ b/app/views/fluentd/settings/out_mongo/_form.html.haml
@@ -1,6 +1,6 @@
 = render "shared/setting_errors"
 
-= form_for(@setting, url: finish_fluentd_setting_out_mongo_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
+= form_for(@setting, url: finish_daemon_setting_out_mongo_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
   = field(f, :match)
   = field(f, :host)
   = field(f, :port)
diff --git a/app/views/fluentd/settings/out_s3/_form.html.haml b/app/views/fluentd/settings/out_s3/_form.html.haml
index 1678bb2..d1b025f 100644
--- a/app/views/fluentd/settings/out_s3/_form.html.haml
+++ b/app/views/fluentd/settings/out_s3/_form.html.haml
@@ -1,6 +1,6 @@
 = render "shared/setting_errors"
 
-= form_for(@setting, url: finish_fluentd_setting_out_s3_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
+= form_for(@setting, url: finish_daemon_setting_out_s3_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
   = field(f, :match)
   = field(f, :aws_key_id)
   = field(f, :aws_sec_key)
diff --git a/app/views/fluentd/settings/out_td/_form.html.haml b/app/views/fluentd/settings/out_td/_form.html.haml
index 062bdeb..c5df913 100644
--- a/app/views/fluentd/settings/out_td/_form.html.haml
+++ b/app/views/fluentd/settings/out_td/_form.html.haml
@@ -1,6 +1,6 @@
 = render "shared/setting_errors"
 
-= form_for(@setting, url: finish_fluentd_setting_out_td_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
+= form_for(@setting, url: finish_daemon_setting_out_td_path(@fluentd), html: {class: "ignore-rails-error-div"}) do |f|
   = field(f, :match)
   = field(f, :apikey)
   = field(f, :auto_create_table)
diff --git a/app/views/fluentd/settings/show.html.haml b/app/views/fluentd/settings/show.html.haml
index cf0f2d7..3f7b45d 100644
--- a/app/views/fluentd/settings/show.html.haml
+++ b/app/views/fluentd/settings/show.html.haml
@@ -1,9 +1,10 @@
-- page_title t('.page_title')
+- page_title t('.page_title') do
+  - link_to edit_daemon_setting_path(@fluentd), class: "btn btn-primary pull-right" do
+    = icon('fa-pencil')
+    = t("terms.edit")
 
 .row
   .col-lg-12
-    %p
-      = link_to t("terms.edit"), edit_fluentd_setting_path(@fluentd), class: "btn btn-primary"
     %pre
       = preserve do
         = @config
diff --git a/app/views/fluentd/settings/source_and_output.html.haml b/app/views/fluentd/settings/source_and_output.html.haml
index ec69074..3e79e32 100644
--- a/app/views/fluentd/settings/source_and_output.html.haml
+++ b/app/views/fluentd/settings/source_and_output.html.haml
@@ -3,17 +3,17 @@
 %h2
 
 .row.fluentd-setting-inout
-  .col-lg-2
+  .col-lg-4
     .panel.panel-default
       .panel-heading
         %h4= t('.in')
       .panel-body
         %p
-          = link_to(fluentd_setting_in_tail_path(@fluentd)) do
+          = link_to(daemon_setting_in_tail_path(@fluentd)) do
             = icon('fa-file-text-o fa-lg')
             = t("fluentd.common.setup_in_tail")
         %p
-          = link_to(fluentd_setting_in_syslog_path(@fluentd)) do
+          = link_to(daemon_setting_in_syslog_path(@fluentd)) do
             = icon('fa-file-text-o fa-lg')
             = t("fluentd.common.setup_in_syslog")
   .col-lg-1.arrow-right
@@ -22,24 +22,24 @@
     = image_tag "/fluentd-logo.png", style: "max-width: 100%"
   .col-lg-1.arrow-right
     = icon "fa-arrow-circle-right"
-  .col-lg-2
+  .col-lg-4
     .panel.panel-default
       .panel-heading
         %h4= t('.out')
       .panel-body
         %p
-          = link_to(fluentd_setting_out_td_path(@fluentd)) do
+          = link_to(daemon_setting_out_td_path(@fluentd)) do
             = icon('fa-file-text-o fa-lg')
             = t("fluentd.common.setup_out_td")
         %p
-          = link_to(fluentd_setting_out_s3_path(@fluentd)) do
+          = link_to(daemon_setting_out_s3_path(@fluentd)) do
             = icon('fa-file-text-o fa-lg')
             = t("fluentd.common.setup_out_s3")
         %p
-          = link_to(fluentd_setting_out_mongo_path(@fluentd)) do
+          = link_to(daemon_setting_out_mongo_path(@fluentd)) do
             = icon('fa-file-text-o fa-lg')
             = t("fluentd.common.setup_out_mongo")
         %p
-          = link_to(fluentd_setting_out_forward_path(@fluentd)) do
+          = link_to(daemon_setting_out_forward_path(@fluentd)) do
             = icon('fa-file-text-o fa-lg')
             = t("fluentd.common.setup_out_forward")
diff --git a/app/views/fluentd/show.html.haml b/app/views/fluentd/show.html.haml
index c003564..1be8d04 100644
--- a/app/views/fluentd/show.html.haml
+++ b/app/views/fluentd/show.html.haml
@@ -14,14 +14,14 @@
         .panel-body
           - if flash[:error]
             %div.alert.alert-danger= flash[:error]
-          = 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 icon("fa-play") << t("fluentd.common.start"), start_daemon_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_daemon_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_daemon_agent_path(@fluentd), method: :put, class: "btn #{@fluentd.agent.running? ? "btn-warning" : "disabled btn-default"}"
     .col-lg-6
       .panel.panel-default
         .panel-heading
           .pull-right
-            = link_to t('terms.edit'), edit_fluentd_path, class: "btn btn-default"
+            = link_to t('terms.edit'), edit_daemon_path, class: "btn btn-default"
             = link_to t('terms.destroy'), "#", class: "btn btn-danger", data: { toggle: "modal", target: "#setting-destroy-modal" }
           %h4= t('fluentd.common.fluentd_info')
           .modal.fade{id: "setting-destroy-modal"}
@@ -31,11 +31,11 @@
                   %button.close{"data-dismiss" => "modal"}
                     = raw "×"
                   %h4.modal-title
-                    = t('fluentd.common.destroy_fluentd_setting')
+                    = t('fluentd.common.destroy_fluentd_setting', brand: fluentd_ui_brand)
                 .modal-body
-                  = raw t('fluentd.common.destroy_fluentd_setting_warning')
+                  = raw t('fluentd.common.destroy_fluentd_setting_warning', brand: fluentd_ui_brand)
                 .modal-footer
-                  = form_tag(fluentd_path(@fluentd), method: :delete) do
+                  = form_tag(daemon_path(@fluentd), method: :delete) do
                     %button.btn.btn-default{"data-dismiss" => "modal"}
                       Close
                     = submit_tag t('terms.destroy'), class: "btn btn-danger"
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index c00f5c9..9906d77 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -7,11 +7,11 @@
     
 
     
-      <% fluentd_ui_title %>
       <% if content_for?(:page_title) %>
-        |
         <%= content_for(:page_title)  %>
+        |
       <% end %>
+      <%= fluentd_ui_title %>
     
   <%= stylesheet_link_tag    'application', media: 'all'%>
   <%= javascript_include_tag 'application' %>
@@ -32,7 +32,7 @@
                     
                     
                 
-                <%= link_to fluentd_ui_title, root_path, class: "navbar-brand" %>
+                <%= link_to fluentd_ui_logo, root_path, class: "navbar-brand fluentd-ui-logo" %>
             
             
 
diff --git a/app/views/misc/information.html.haml b/app/views/misc/information.html.haml
index 7d4ca41..e9787e4 100644
--- a/app/views/misc/information.html.haml
+++ b/app/views/misc/information.html.haml
@@ -1,18 +1,15 @@
-- page_title t('.page_title')
+- page_title t('.page_title') do
+  - link_to misc_download_info_path, class: "btn btn-primary pull-right" do
+    = icon('fa-download')
+    = t('.download_system_information')
 
 - if FluentdUI.update_available?
   .row
     .col-lg-12
       %p
-        = link_to misc_update_fluentd_ui_path, class: "btn btn-primary btn-lg", method: :post do
-          = t('.update_fluentd_ui', version: FluentdUI.latest_version)
-        = t('.update_fluentd_ui_caution')
-
-.row
-  .col-lg-12
-    %p
-      =link_to misc_download_info_path, class: "btn btn-primary" do
-        = t('.download_system_information')
+        = link_to misc_update_daemon_ui_path, class: "btn btn-primary btn-lg", method: :post do
+          = t('.update_fluentd_ui', version: FluentdUI.latest_version, title: fluentd_ui_title)
+        = t('.update_fluentd_ui_caution', brand: fluentd_ui_brand)
 
 .row
   %div.col-lg-6
diff --git a/app/views/misc/update_fluentd_ui.html.haml b/app/views/misc/update_fluentd_ui.html.haml
index 4d345bb..6f924df 100644
--- a/app/views/misc/update_fluentd_ui.html.haml
+++ b/app/views/misc/update_fluentd_ui.html.haml
@@ -1,6 +1,6 @@
 .panel.panel-default
   .panel-heading
-    = t('.update_title')
+    = t('.update_title', title: fluentd_ui_title)
   .panel-body
     #processing
       = icon('fa-lg fa-gear fa-spin')
@@ -11,7 +11,7 @@
       %p= link_to t('misc.information.page_title'), misc_information_path
     #failed{style: "display: none"}
       = icon('fa-lg fa-exclamation-circle')
-      = t('.failed')
+      = t('.failed', title: fluentd_ui_title)
       %p= link_to t('misc.information.page_title'), misc_information_path
 
 :javascript
diff --git a/app/views/shared/_fluentd_nav.html.haml b/app/views/shared/_fluentd_nav.html.haml
index ec4243c..9e838c0 100644
--- a/app/views/shared/_fluentd_nav.html.haml
+++ b/app/views/shared/_fluentd_nav.html.haml
@@ -4,9 +4,9 @@
 - if flash[:error]
   %div.alert.alert-danger= flash[:error]
 
-= link_to t("fluentd.common.detail"), fluentd_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)
+= link_to t("fluentd.common.detail"), daemon_path(@fluentd)
+= link_to t("fluentd.common.start"), start_daemon_agent_path(@fluentd), method: :put
+= link_to t("fluentd.common.stop"), stop_daemon_agent_path(@fluentd), method: :put
+= link_to t("fluentd.common.restart"), restart_daemon_agent_path(@fluentd), method: :put
+= link_to t("fluentd.common.log"), log_daemon_agent_path(@fluentd)
+= link_to t("fluentd.common.config_file"), daemon_setting_path(@fluentd)
diff --git a/app/views/shared/_global_nav.html.erb b/app/views/shared/_global_nav.html.erb
index c46c4fb..2958272 100644
--- a/app/views/shared/_global_nav.html.erb
+++ b/app/views/shared/_global_nav.html.erb
@@ -6,16 +6,19 @@
     <% if fluentd_exists? %>
     
     <% end %>
@@ -51,9 +54,12 @@
       
  • <%= link_to_other t('users.show.page_title'), user_path %>
  • + diff --git a/app/views/shared/_initial_setup.html.haml b/app/views/shared/_initial_setup.html.haml index 7d64e2e..da664fd 100644 --- a/app/views/shared/_initial_setup.html.haml +++ b/app/views/shared/_initial_setup.html.haml @@ -3,11 +3,11 @@ %div.row %div.col-lg-6 %div.well - %span= link_to icon("fa-cog") << t("terms.setup", target: "fluentd"), new_fluentd_path(variant: "fluentd_gem"), class: "btn btn-primary btn-lg" + %span= link_to icon("fa-cog") << t("terms.setup", target: "fluentd"), new_daemon_path(variant: "fluentd_gem"), class: "btn btn-primary btn-lg" %div.col-lg-6 %div.well %span - = link_to icon("fa-cog") << t("terms.setup", target: "td-agent"), new_fluentd_path(variant: "td-agent"), class: "btn btn-lg #{has_td_agent_system? ? "btn-primary" : "btn-default disabled"}" + = link_to icon("fa-cog") << t("terms.setup", target: "td-agent"), new_daemon_path(variant: "td-agent"), class: "btn btn-lg #{has_td_agent_system? ? "btn-primary" : "btn-default disabled"}" - unless has_td_agent_system? = link_to t('terms.install_it', target: "td-agent"), "http://docs.treasuredata.com/articles/td-agent" diff --git a/app/views/shared/_restart.html.haml b/app/views/shared/_restart.html.haml deleted file mode 100644 index c3bc7a8..0000000 --- a/app/views/shared/_restart.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -- if need_restart? - %p.alert - = t("messages.need_restart") diff --git a/app/views/shared/vue/_fluent_log.html.erb b/app/views/shared/vue/_fluent_log.html.erb index 86a1145..95a8da1 100644 --- a/app/views/shared/vue/_fluent_log.html.erb +++ b/app/views/shared/vue/_fluent_log.html.erb @@ -1,6 +1,6 @@ -<% auto_reload ||= false %> -
    "> +<% auto_reload ||= true %> +
    ">