Merge pull request #57 from treasure-data/feedbacks

Feedbacks
This commit is contained in:
uu59 2014-07-24 16:08:53 +09:00
commit a8f0c18392
45 changed files with 186 additions and 157 deletions

View File

@ -137,3 +137,10 @@ label {
padding-top: 64px;
}
}
.fluentd-ui-logo {
padding: 0;
img {
height: 50px;
}
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,5 +1,5 @@
class WelcomeController < ApplicationController
def home
redirect_to fluentd_path
redirect_to daemon_path
end
end

View File

@ -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!<i class="fa #{classes}">#{inner}</i> !.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

View File

@ -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 }

View File

@ -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')

View File

@ -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 <pre>, so shouldn't break indent
= render partial: "shared/vue/fluent_log", locals: { fluentd: @fluentd }

View File

@ -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 }

View File

@ -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"

View File

@ -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)

View File

@ -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"

View File

@ -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

View File

@ -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)

View File

@ -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')}

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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")

View File

@ -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 "&times;"
%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"

View File

@ -7,11 +7,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
<% fluentd_ui_title %>
<% if content_for?(:page_title) %>
|
<%= content_for(:page_title) %>
|
<% end %>
<%= fluentd_ui_title %>
</title>
<%= stylesheet_link_tag 'application', media: 'all'%>
<%= javascript_include_tag 'application' %>
@ -32,7 +32,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<%= link_to fluentd_ui_title, root_path, class: "navbar-brand" %>
<%= link_to fluentd_ui_logo, root_path, class: "navbar-brand fluentd-ui-logo" %>
</div>
<!-- /.navbar-header -->

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -6,16 +6,19 @@
<% if fluentd_exists? %>
<ul class="nav nav-second-level">
<li>
<%= link_to_other t('fluentd.show.page_title'), fluentd_path %>
<%= link_to_other t('fluentd.show.page_title'), daemon_path %>
</li>
<li>
<%= link_to_other t('fluentd.settings.source_and_output.page_title'), source_and_output_fluentd_setting_path %>
<%= link_to_other t('fluentd.settings.source_and_output.page_title'), source_and_output_daemon_setting_path %>
</li>
<li>
<%= link_to_other t('fluentd.settings.show.page_title'), fluentd_setting_path %>
<%= link_to_other t('fluentd.settings.show.page_title'), daemon_setting_path %>
</li>
<li>
<%= link_to_other t('fluentd.common.log'), log_fluentd_path %>
<%= link_to_other t('fluentd.common.log'), log_daemon_path %>
</li>
<li>
<%= link_to_other t('fluentd.errors.page_title'), errors_daemon_path %>
</li>
</ul>
<% end %>
@ -51,9 +54,12 @@
<li>
<%= link_to_other t('users.show.page_title'), user_path %>
</li>
<!--
Not used for now (0.0.1 pre)
<li>
<%= link_to_other t('tutorials.index.page_title'), tutorials_path %>
</li>
-->
</ul>
</li>

View File

@ -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"

View File

@ -1,3 +0,0 @@
- if need_restart?
%p.alert
= t("messages.need_restart")

View File

@ -1,6 +1,6 @@
<!-- vue.js -->
<% auto_reload ||= false %>
<div id="fluent-log" logUrl="<%= log_tail_fluentd_agent_path(fluentd) %>" initialAutoReload="<%= auto_reload ? "true" : "" %>">
<% auto_reload ||= true %>
<div id="fluent-log" logUrl="<%= log_tail_daemon_agent_path(fluentd) %>" initialAutoReload="<%= auto_reload ? "true" : "" %>">
<p>
<button class="btn btn-primary" v-on="click: fetchLogs">
<%= t "terms.reload_log" %>

View File

@ -5,7 +5,7 @@
= link_to t('tutorials.chapter4.page_title') << " >>", tutorials_chapter4_path, class: "pull-right"
:markdown
#{t(".lesson_markdown", edit_config_url: edit_fluentd_setting_path(@fluentd))}
#{t(".lesson_markdown", edit_config_url: edit_daemon_setting_path(@fluentd))}
%p.clearfix
= link_to "<< " << t('tutorials.chapter2.page_title'), tutorials_chapter2_path, class: "pull-left"

View File

@ -10,7 +10,7 @@
= t('.step1')
- else
= icon('fa-warning text text-danger')
= link_to t('.step1'), fluentd_path
= link_to t('.step1'), daemon_path
%li
- if @fluentd && @fluentd.agent.running?
= icon('fa-check text text-success')
@ -18,7 +18,7 @@
- else
= icon('fa-warning text text-danger')
- if @fluentd
= link_to t('.step2'), fluentd_path(@fluentd)
= link_to t('.step2'), daemon_path(@fluentd)
- else
= t('.step2')

View File

@ -1,8 +1,7 @@
en:
messages:
need_restart: need to restart fluentd-ui
please_sign_in: Sign in
destroy_succeed_fluentd_setting: Deleted fluentd setting
destroy_succeed_fluentd_setting: "Deleted %{brand} setting"
available_new_fluentd_ui: 'fluentd-ui %{version} is available. <a href="%{update_url}">Go to system information page</a>'
terms: &terms
@ -42,12 +41,11 @@ en:
next: Next
prev: Prev
advanced_setting: Advanced Settings
notice_restart_for_config_edit: "NOTICE: fluentd will restart after update config"
notice_restart_for_config_edit: "NOTICE: running %{brand} will restart after update config"
lines: Lines
languages: Language
plugins:
notice_restart_for_config_edit: "NOTICE: fluentd will restart after update config"
view_on_rubygems_org: View on rubygems.org
common: &plugin_common
<<: *terms
@ -104,24 +102,25 @@ en:
fluentd_info: Setting info
recent_errors: "Errors within recent %{days} days"
raw_log_link: Download
destroy_fluentd_setting: Delete fluentd setting
destroy_fluentd_setting: "Delete %{brand} setting"
destroy_fluentd_setting_warning: |
Delete fluentd setting.
Delete %{brand} setting.
<p>Running fluentd will be stopped, but log and config file are still exists.</p>
<p>Running %{brand} will be stopped, but log and config file are still exists.</p>
form:
<<: *fluentd_common
show:
page_title: Dashboard
new:
<<: *fluentd_common
page_title: fluentd | New
page_title: New
edit:
<<: *fluentd_common
page_title: fluentd | Edit
page_title: Edit
log:
<<: *fluentd_common
page_title: fluentd log
page_title: log
errors:
page_title: エラーログ
error_is_empty: No errors
settings:
source_and_output:
@ -223,15 +222,15 @@ en:
env_key: Key
env_value: Value
page_title: System Information
update_fluentd_ui: Update fluentd-ui
update_fluentd_ui_caution: "Note: fluentd will not restart"
update_fluentd_ui: "Update %{title}"
update_fluentd_ui_caution: "Note: %{brand} will not restart"
download_system_information: Download System Information
update_fluentd_ui:
<<: *misc_common
update_title: Updating fluentd-ui
update_title: "Updating %{title}"
updating: Updating..
update_finish: Update finished!
failed: Failed to update. Please see fluentd-ui log
failed: "Failed to update. Please see %{title} log"
tutorials:
common: &tutorials_common

View File

@ -1,9 +1,8 @@
ja:
messages:
need_restart: fluentd-uiの再起動が必要です
please_sign_in: ログイン
destroy_succeed_fluentd_setting: fluentdの設定を削除しました
available_new_fluentd_ui: 'fluentd-ui %{version}にアップデートできます。<a href="%{update_url}">システム情報ページへ</a>'
destroy_succeed_fluentd_setting: "%{brand}の設定を削除しました"
available_new_fluentd_ui: '%{title} %{version}にアップデートできます。<a href="%{update_url}">システム情報ページへ</a>'
terms: &terms
sign_in: ログイン
@ -42,12 +41,11 @@ ja:
next: 次へ
prev: 前へ
advanced_setting: 高度な設定
notice_restart_for_config_edit: ※更新するとfluentdが再起動されます
notice_restart_for_config_edit: "※更新すると稼働中の%{brand}が再起動されます"
lines:
languages: 言語
plugins:
notice_restart_for_config_edit: ※更新するとfluentdが再起動されます
view_on_rubygems_org: rubygems.orgで見る
common: &plugin_common
<<: *terms
@ -103,24 +101,25 @@ ja:
fluentd_info: 設定情報
recent_errors: "直近 %{days} 日内のエラー"
raw_log_link: ログファイルをダウンロード
destroy_fluentd_setting: fluentdの設定情報を削除
destroy_fluentd_setting: "%{brand}の設定情報を削除"
destroy_fluentd_setting_warning: |
fluentdの設定を削除します。
%{brand}の設定を削除します。
<p>起動中のfluentdは停止し、ログや設定ファイルはそのまま残存します。</p>
<p>起動中の%{brand}は停止し、ログや設定ファイルはそのまま残存します。</p>
form:
<<: *fluentd_common
show:
page_title: "ダッシュボード"
new:
<<: *fluentd_common
page_title: fluentd | 追加
page_title: 追加
edit:
<<: *fluentd_common
page_title: fluentd | 編集
page_title: 編集
log:
<<: *fluentd_common
page_title: fluentd ログ
page_title: ログ
errors:
page_title: エラーログ
error_is_empty: エラーはありません
settings:
<<: *fluentd_common
@ -220,15 +219,14 @@ ja:
env_key: キー
env_value:
page_title: システム情報
update_fluentd_ui: fluentd-uiを更新
update_fluentd_ui_caution: ※fluentdは再起動されません
update_fluentd_ui: "%{title}を更新"
update_fluentd_ui_caution: "※%{brand}は再起動されません"
download_system_information: システム情報をダウンロード
update_fluentd_ui:
<<: *misc_common
update_title: fluentd-ui 更新
update_title: "%{title} 更新"
updating: 更新中
update_finish: 更新が完了しました
failed: 更新に失敗しました。fluentd-uiのログをご確認ください
failed: "更新に失敗しました。%{title}のログをご確認ください"
tutorials:
common: &tutorials_common
@ -359,9 +357,9 @@ ja:
error:
login_failed: ログインに失敗しました。
fluentd_start_failed: fluentdの起動に失敗しました。
fluentd_stop_failed: fluentdの停止に失敗しました。
fluentd_restart_failed: fluentdの再起動に失敗しました。
fluentd_start_failed: "%{brand}の起動に失敗しました。"
fluentd_stop_failed: "%{brand}の停止に失敗しました。"
fluentd_restart_failed: "%{brand}の再起動に失敗しました。"
errors:
messages: &error_messages

View File

@ -1,9 +1,10 @@
Rails.application.routes.draw do
root "welcome#home"
resource :fluentd, controller: :fluentd do
resource :daemon, controller: :fluentd do
get "log"
get "raw_log"
get "errors"
resource :agent, only: [], module: :fluentd do
put "start"

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -14,8 +14,8 @@ describe "sessions" do
context "sign in with exists user" do
let(:user) { exists_user }
it "login success, then redirect to root_path, and redirect_to fluentd_path from root_path" do
current_path.should == fluentd_path
it "login success, then redirect to root_path, and redirect_to daemon_path from root_path" do
current_path.should == daemon_path
end
end