fluentd-ui 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/Gemfile.lock +15 -8
- data/README.md +5 -5
- data/app/controllers/application_controller.rb +2 -2
- data/app/controllers/plugins_controller.rb +2 -2
- data/app/controllers/sessions_controller.rb +5 -8
- data/app/controllers/users_controller.rb +3 -3
- data/app/decorators/plugin_decorator.rb +13 -0
- data/app/models/plugin.rb +5 -1
- data/app/models/user.rb +1 -0
- data/app/views/fluentd/_form.html.haml +6 -6
- data/app/views/fluentd/errors.html.haml +5 -5
- data/app/views/fluentd/settings/_form.html.haml +8 -8
- data/app/views/fluentd/settings/edit.html.haml +1 -1
- data/app/views/fluentd/settings/in_tail/_form.html.haml +8 -8
- data/app/views/fluentd/settings/in_tail/after_file_choose.html.haml +2 -2
- data/app/views/fluentd/show.html.haml +1 -1
- data/app/views/misc/information.html.haml +13 -13
- data/app/views/plugins/recommended.html.haml +4 -5
- data/app/views/sessions/new.html.haml +2 -2
- data/app/views/shared/_fluentd_nav.html.haml +1 -1
- data/app/views/shared/_initial_setup.html.haml +5 -5
- data/app/views/users/show.html.haml +10 -7
- data/config/application.rb +1 -0
- data/config/locales/translation_en.yml +3 -1
- data/config/locales/translation_ja.yml +2 -0
- data/{fluentd-ui-ss01.png → docs/screenshots/01.png} +0 -0
- data/{fluentd-ui-ss02.png → docs/screenshots/02.png} +0 -0
- data/{fluentd-ui-ss03.png → docs/screenshots/03.png} +0 -0
- data/{fluentd-ui-ss04.png → docs/screenshots/04.png} +0 -0
- data/{fluentd-ui-ss05.png → docs/screenshots/05.png} +0 -0
- data/fluentd-ui.gemspec +1 -0
- data/lib/fluentd-ui/command.rb +2 -0
- data/lib/fluentd-ui/version.rb +1 -1
- data/spec/decorators/plugin_decorator_spec.rb +37 -0
- data/spec/models/fluentd/setting/common_spec.rb +2 -2
- metadata +24 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7eac024b627f727c53f8429ab3bb81b2fcb75875
|
|
4
|
+
data.tar.gz: 5ecc8f5e6a65da1879b456fb727c0ef31a62deff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 84004c0b946e7844e380cda52be386e74cf44f14892b1803d5000151ca54d7b06453b05ddfe87204c06c93c30bfbccae2a792d2317fa8d04d142ccbabb313735
|
|
7
|
+
data.tar.gz: 4ff2e1e07a0d5d8522b4f39e6b496723893bf330ccb94172820b6ba529803633dc8ab71f66f8866ce13cc5c4d58f67235073a2451f5ffea911a15522224996bf
|
data/ChangeLog
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
Release 0.3.0 - 2014/10/22
|
|
2
|
+
|
|
3
|
+
* [feature] Potentially support for multiple user name (not have UI to do it)
|
|
4
|
+
* [improve] Improve installing plugin processing experience
|
|
5
|
+
* [improve] Some messages added or fixed
|
|
6
|
+
|
|
1
7
|
Release 0.2.0 - 2014/09/02
|
|
2
8
|
|
|
3
9
|
* [compatibility] Login password is reset as default if v0.1.x user who updates thier password.
|
data/Gemfile.lock
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
fluentd-ui (0.
|
|
4
|
+
fluentd-ui (0.3.0)
|
|
5
5
|
addressable
|
|
6
6
|
bundler
|
|
7
|
+
draper (~> 1.3)
|
|
7
8
|
fluentd (~> 0.10.51)
|
|
8
9
|
font-awesome-rails
|
|
9
10
|
haml-rails (~> 0.5.3)
|
|
@@ -69,20 +70,25 @@ GEM
|
|
|
69
70
|
diff-lcs (1.2.5)
|
|
70
71
|
domain_name (0.5.19)
|
|
71
72
|
unf (>= 0.0.5, < 1.0.0)
|
|
73
|
+
draper (1.4.0)
|
|
74
|
+
actionpack (>= 3.0)
|
|
75
|
+
activemodel (>= 3.0)
|
|
76
|
+
activesupport (>= 3.0)
|
|
77
|
+
request_store (~> 1.0)
|
|
72
78
|
erubis (2.7.0)
|
|
73
79
|
factory_girl (4.4.0)
|
|
74
80
|
activesupport (>= 3.0.0)
|
|
75
81
|
factory_girl_rails (4.4.1)
|
|
76
82
|
factory_girl (~> 4.4.0)
|
|
77
83
|
railties (>= 3.0.0)
|
|
78
|
-
fluentd (0.10.
|
|
84
|
+
fluentd (0.10.53)
|
|
79
85
|
cool.io (>= 1.1.1, < 2.0.0, != 1.2.0)
|
|
80
86
|
http_parser.rb (>= 0.5.1, < 0.7.0)
|
|
81
87
|
json (>= 1.4.3)
|
|
82
88
|
msgpack (>= 0.4.4, < 0.6.0, != 0.5.3, != 0.5.2, != 0.5.1, != 0.5.0)
|
|
83
89
|
sigdump (~> 0.2.2)
|
|
84
90
|
yajl-ruby (~> 1.0)
|
|
85
|
-
font-awesome-rails (4.
|
|
91
|
+
font-awesome-rails (4.2.0.0)
|
|
86
92
|
railties (>= 3.2, < 5.0)
|
|
87
93
|
haml (4.0.5)
|
|
88
94
|
tilt
|
|
@@ -95,19 +101,19 @@ GEM
|
|
|
95
101
|
http-cookie (1.0.2)
|
|
96
102
|
domain_name (~> 0.5)
|
|
97
103
|
http_parser.rb (0.6.0)
|
|
98
|
-
httpclient (2.
|
|
104
|
+
httpclient (2.5.1)
|
|
99
105
|
i18n (0.6.9)
|
|
100
106
|
i18n_generators (1.2.1)
|
|
101
107
|
mechanize
|
|
102
108
|
rails (>= 3.0.0)
|
|
103
|
-
jbuilder (2.1.
|
|
109
|
+
jbuilder (2.1.3)
|
|
104
110
|
activesupport (>= 3.0.0, < 5)
|
|
105
111
|
multi_json (~> 1.2)
|
|
106
|
-
jquery-rails (3.1.
|
|
112
|
+
jquery-rails (3.1.2)
|
|
107
113
|
railties (>= 3.0, < 5.0)
|
|
108
114
|
thor (>= 0.14, < 2.0)
|
|
109
115
|
json (1.8.1)
|
|
110
|
-
kramdown (1.4.
|
|
116
|
+
kramdown (1.4.2)
|
|
111
117
|
kramdown-haml (0.0.3)
|
|
112
118
|
haml
|
|
113
119
|
mail (2.5.4)
|
|
@@ -143,7 +149,7 @@ GEM
|
|
|
143
149
|
coderay (~> 1.1.0)
|
|
144
150
|
method_source (~> 0.8.1)
|
|
145
151
|
slop (~> 3.4)
|
|
146
|
-
puma (2.9.
|
|
152
|
+
puma (2.9.1)
|
|
147
153
|
rack (>= 1.1, < 2.0)
|
|
148
154
|
rack (1.5.2)
|
|
149
155
|
rack-test (0.6.2)
|
|
@@ -164,6 +170,7 @@ GEM
|
|
|
164
170
|
rake (>= 0.8.7)
|
|
165
171
|
thor (>= 0.18.1, < 2.0)
|
|
166
172
|
rake (10.3.2)
|
|
173
|
+
request_store (1.1.0)
|
|
167
174
|
rspec-collection_matchers (1.0.0)
|
|
168
175
|
rspec-expectations (>= 2.99.0.beta1)
|
|
169
176
|
rspec-core (2.99.1)
|
data/README.md
CHANGED
|
@@ -59,8 +59,8 @@ fluentd-ui has the same tasks of `bundle gem foobar; cd foobar; rake -T`.
|
|
|
59
59
|
|
|
60
60
|
(v0.1.0)
|
|
61
61
|
|
|
62
|
-

|
|
63
|
+

|
|
64
|
+

|
|
65
|
+

|
|
66
|
+

|
|
@@ -15,8 +15,8 @@ class ApplicationController < ActionController::Base
|
|
|
15
15
|
private
|
|
16
16
|
|
|
17
17
|
def current_user
|
|
18
|
-
return unless session[:
|
|
19
|
-
@current_user ||= User.new(name:
|
|
18
|
+
return unless session[:password]
|
|
19
|
+
@current_user ||= User.new(name: session[:user_name]).authenticate(session[:password])
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def login_required
|
|
@@ -4,11 +4,11 @@ class PluginsController < ApplicationController
|
|
|
4
4
|
end
|
|
5
5
|
|
|
6
6
|
def installed
|
|
7
|
-
@plugins = Plugin.installed
|
|
7
|
+
@plugins = Plugin.installed.reject{|plugin| plugin.processing? }
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def recommended
|
|
11
|
-
@plugins = Plugin.recommended
|
|
11
|
+
@plugins = PluginDecorator.decorate_collection(Plugin.recommended)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def updated
|
|
@@ -4,11 +4,6 @@ class SessionsController < ApplicationController
|
|
|
4
4
|
before_action :set_user
|
|
5
5
|
|
|
6
6
|
def create
|
|
7
|
-
if session_params[:name] != "admin" # NOTE: Application user is "admin" only, other user name is invalid for now.
|
|
8
|
-
flash.now[:notice] = I18n.t("messages.login_failed")
|
|
9
|
-
return render :new
|
|
10
|
-
end
|
|
11
|
-
|
|
12
7
|
unless @user.authenticate(session_params[:password])
|
|
13
8
|
flash.now[:notice] = I18n.t("messages.login_failed")
|
|
14
9
|
return render :new
|
|
@@ -21,14 +16,15 @@ class SessionsController < ApplicationController
|
|
|
21
16
|
end
|
|
22
17
|
|
|
23
18
|
def destroy
|
|
24
|
-
session.delete :
|
|
19
|
+
session.delete :user_name
|
|
20
|
+
session.delete :password
|
|
25
21
|
redirect_to new_sessions_path
|
|
26
22
|
end
|
|
27
23
|
|
|
28
24
|
private
|
|
29
25
|
|
|
30
26
|
def set_user
|
|
31
|
-
@user = User.new(name:
|
|
27
|
+
@user = User.new(name: (params[:session] || {})[:name])
|
|
32
28
|
end
|
|
33
29
|
|
|
34
30
|
def session_params
|
|
@@ -41,6 +37,7 @@ class SessionsController < ApplicationController
|
|
|
41
37
|
#
|
|
42
38
|
# Currently, only store to session if default password is used.
|
|
43
39
|
# TODO: How to keep a login session to be decide
|
|
44
|
-
session[:
|
|
40
|
+
session[:user_name] = user.name
|
|
41
|
+
session[:password] = session_params[:password]
|
|
45
42
|
end
|
|
46
43
|
end
|
|
@@ -8,14 +8,14 @@ class UsersController < ApplicationController
|
|
|
8
8
|
unless @user.update_attributes(user_params)
|
|
9
9
|
return render :show
|
|
10
10
|
end
|
|
11
|
-
session[:
|
|
12
|
-
redirect_to user_path
|
|
11
|
+
session[:password] = user_params[:password]
|
|
12
|
+
redirect_to user_path, notice: I18n.t("messages.password_successfully_updated")
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
private
|
|
16
16
|
|
|
17
17
|
def find_user
|
|
18
|
-
@user = User.new(name:
|
|
18
|
+
@user = User.new(name: session[:user_name])
|
|
19
19
|
end
|
|
20
20
|
|
|
21
21
|
def user_params
|
data/app/models/plugin.rb
CHANGED
|
@@ -8,6 +8,7 @@ class Plugin
|
|
|
8
8
|
WORKING = []
|
|
9
9
|
|
|
10
10
|
include ActiveModel::Model
|
|
11
|
+
include Draper::Decoratable
|
|
11
12
|
|
|
12
13
|
attr_accessor :gem_name, :version, :category
|
|
13
14
|
validates :gem_name, presence: true
|
|
@@ -88,7 +89,9 @@ class Plugin
|
|
|
88
89
|
def self.installed
|
|
89
90
|
Rails.cache.fetch("installed_gems", expires_in: 3.seconds) do
|
|
90
91
|
Bundler.with_clean_env do
|
|
91
|
-
|
|
92
|
+
fluent_gem = fluent_gem_path
|
|
93
|
+
return [] unless fluent_gem
|
|
94
|
+
gems = `#{fluent_gem} list`.try(:lines)
|
|
92
95
|
return [] unless gems
|
|
93
96
|
gems.grep(/fluent-plugin/).map do |gem|
|
|
94
97
|
name, versions_str = gem.strip.split(" ")
|
|
@@ -149,6 +152,7 @@ class Plugin
|
|
|
149
152
|
/opt/td-agent/embedded/bin/fluent-gem
|
|
150
153
|
/usr/lib/fluent/ruby/bin/fluent-gem
|
|
151
154
|
/usr/lib64/fluent/ruby/bin/fluent-gem
|
|
155
|
+
fluent-gem
|
|
152
156
|
).find do |path|
|
|
153
157
|
system("which #{path}", out: File::NULL, err: File::NULL)
|
|
154
158
|
end
|
data/app/models/user.rb
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
|
|
1
|
+
.col-xs-6
|
|
2
2
|
- @fluentd.errors.full_messages.each do |e|
|
|
3
|
-
|
|
3
|
+
.alert.alert-danger= e
|
|
4
4
|
|
|
5
5
|
= form_for(:fluentd, url: url, method: method) do |f|
|
|
6
|
-
|
|
6
|
+
.form-group
|
|
7
7
|
= f.label :variant
|
|
8
8
|
= f.hidden_field :variant
|
|
9
9
|
= @fluentd.variant
|
|
10
|
-
|
|
10
|
+
.form-group
|
|
11
11
|
= f.label :pid_file
|
|
12
12
|
- if @fluentd.td_agent?
|
|
13
13
|
= f.text_field :pid_file, class: "form-control", disabled: true
|
|
14
14
|
= f.hidden_field :pid_file
|
|
15
15
|
- else
|
|
16
16
|
= f.text_field :pid_file, class: "form-control"
|
|
17
|
-
|
|
17
|
+
.form-group
|
|
18
18
|
= f.label :log_file
|
|
19
19
|
- if @fluentd.td_agent?
|
|
20
20
|
= f.text_field :log_file, class: "form-control", disabled: true
|
|
21
21
|
= f.hidden_field :log_file
|
|
22
22
|
- else
|
|
23
23
|
= f.text_field :log_file, class: "form-control"
|
|
24
|
-
|
|
24
|
+
.form-group
|
|
25
25
|
= f.label :config_file
|
|
26
26
|
- if @fluentd.td_agent?
|
|
27
27
|
= f.text_field :config_file, class: "form-control", disabled: true
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
= icon('fa-download')
|
|
4
4
|
= t('fluentd.common.raw_log_link')
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
.row
|
|
7
|
+
.col-xs-12
|
|
8
8
|
- @errors.each do |error|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
.panel.panel-default
|
|
10
|
+
.panel-heading
|
|
11
11
|
%h4= error[:subject]
|
|
12
12
|
- if error[:notes].present?
|
|
13
|
-
|
|
13
|
+
.panel-body
|
|
14
14
|
%ul
|
|
15
15
|
- error[:notes].each do |stack|
|
|
16
16
|
%li= stack
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
- @setting.errors.full_messages.each do |e|
|
|
3
|
-
|
|
3
|
+
.alert.alert-danger= e
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
.form-group
|
|
6
6
|
= f.label :path
|
|
7
7
|
= f.hidden_field :path
|
|
8
8
|
= f.text_field :path, class: "form-control", disabled: true
|
|
9
|
-
|
|
9
|
+
.form-group
|
|
10
10
|
= f.label :format
|
|
11
11
|
= f.hidden_field :format
|
|
12
12
|
= f.text_field :format, class: "form-control", disabled: true
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
%label= @setting.format
|
|
21
21
|
= f.hidden_field :regexp
|
|
22
22
|
= @setting.regexp
|
|
23
|
-
|
|
23
|
+
.form-group
|
|
24
24
|
= f.label :tag
|
|
25
25
|
= f.text_field :tag, class: "form-control"
|
|
26
|
-
|
|
26
|
+
.form-group
|
|
27
27
|
= f.label :pos_file
|
|
28
28
|
= f.text_field :pos_file, class: "form-control"
|
|
29
29
|
.well.well-sm
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
= icon('fa-caret-down')
|
|
32
32
|
= t('terms.advanced_setting')
|
|
33
33
|
#advanced-setting.collapse
|
|
34
|
-
|
|
34
|
+
.form-group
|
|
35
35
|
= f.label :rotate_wait
|
|
36
36
|
= f.text_field :rotate_wait, class: "form-control"
|
|
37
|
-
|
|
37
|
+
.form-group
|
|
38
38
|
= f.label :read_from_head
|
|
39
39
|
= f.check_box :read_from_head, class: "form-control"
|
|
40
|
-
|
|
40
|
+
.form-group
|
|
41
41
|
= f.label :refresh_interval
|
|
42
42
|
= f.text_field :refresh_interval, class: "form-control"
|
|
43
43
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
- page_title t('.page_title', label: @fluentd.label)
|
|
2
2
|
|
|
3
3
|
= form_tag(daemon_setting_path(@fluentd), method: :patch) do
|
|
4
|
-
|
|
4
|
+
.form-group
|
|
5
5
|
= text_area_tag "config", @config, class: "form-control", rows: 40
|
|
6
6
|
%p.text.text-danger= t('terms.notice_restart_for_config_edit', brand: fluentd_ui_brand)
|
|
7
7
|
= submit_tag t("terms.update"), class: "btn btn-primary"
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
- @setting.errors.full_messages.each do |e|
|
|
2
|
-
|
|
2
|
+
.alert.alert-danger= e
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
.form-group
|
|
5
5
|
= f.label :path
|
|
6
6
|
= f.hidden_field :path
|
|
7
7
|
= f.text_field :path, class: "form-control", disabled: true
|
|
8
|
-
|
|
8
|
+
.form-group
|
|
9
9
|
= f.label :format
|
|
10
10
|
= f.hidden_field :format
|
|
11
11
|
= f.text_field :format, class: "form-control", disabled: true
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
%label= @setting.format
|
|
20
20
|
= f.hidden_field :regexp
|
|
21
21
|
= @setting.regexp
|
|
22
|
-
|
|
22
|
+
.form-group
|
|
23
23
|
= f.label :tag
|
|
24
24
|
= f.text_field :tag, class: "form-control"
|
|
25
|
-
|
|
25
|
+
.form-group
|
|
26
26
|
= f.label :pos_file
|
|
27
27
|
= f.text_field :pos_file, class: "form-control"
|
|
28
28
|
.well.well-sm
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
= icon('fa-caret-down')
|
|
31
31
|
= t('terms.advanced_setting')
|
|
32
32
|
#advanced-setting.collapse
|
|
33
|
-
|
|
33
|
+
.form-group
|
|
34
34
|
= f.label :rotate_wait
|
|
35
35
|
= f.text_field :rotate_wait, class: "form-control"
|
|
36
|
-
|
|
36
|
+
.form-group
|
|
37
37
|
= f.label :read_from_head
|
|
38
38
|
= f.check_box :read_from_head, class: "form-control"
|
|
39
|
-
|
|
39
|
+
.form-group
|
|
40
40
|
= f.label :refresh_interval
|
|
41
41
|
= f.text_field :refresh_interval, class: "form-control"
|
|
42
42
|
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
= form_for(@setting, as: "setting", url: after_format_daemon_setting_in_tail_path(@fluentd)) do |f|
|
|
6
6
|
- @setting.errors.full_messages.each do |e|
|
|
7
|
-
|
|
7
|
+
.alert.alert-danger= e
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
.form-group
|
|
10
10
|
= f.label :path
|
|
11
11
|
= f.hidden_field :path
|
|
12
12
|
= f.text_field :path, class: "form-control", disabled: true
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
= t("fluentd.common.stopped")
|
|
14
14
|
.panel-body
|
|
15
15
|
- if flash[:error]
|
|
16
|
-
|
|
16
|
+
.alert.alert-danger= flash[:error]
|
|
17
17
|
= 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"}"
|
|
18
18
|
= 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"}"
|
|
19
19
|
= 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"}"
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
= t('.update_fluentd_ui_caution', brand: fluentd_ui_brand)
|
|
13
13
|
|
|
14
14
|
.row
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
%h4= t
|
|
19
|
-
|
|
15
|
+
.col-xs-6
|
|
16
|
+
.panel.panel-default
|
|
17
|
+
.panel-heading
|
|
18
|
+
%h4= t("terms.version")
|
|
19
|
+
.panel-body
|
|
20
20
|
%dl{class: "dl-horizontal"}
|
|
21
21
|
%dt ruby
|
|
22
22
|
%dd= RUBY_DESCRIPTION
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
%dt fluentd-ui
|
|
27
27
|
%dd= FluentdUI::VERSION
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
%h4= t('.installed_plugins')
|
|
33
|
-
|
|
29
|
+
.col-xs-6
|
|
30
|
+
.panel.panel-default
|
|
31
|
+
.panel-heading
|
|
32
|
+
%h4= t('terms.installed_plugins')
|
|
33
|
+
.panel-body
|
|
34
34
|
- if @plugins.present?
|
|
35
35
|
%table{class: "table table-hover", id: "plugins-table"}
|
|
36
36
|
%thead
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
= t "plugins.common.no_installed"
|
|
47
47
|
|
|
48
48
|
.row
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
.col-xs-12
|
|
50
|
+
.panel.panel-default
|
|
51
|
+
.panel-heading
|
|
52
52
|
%h4{"data-toggle" => "collapse", "href" => "#env-table"}
|
|
53
53
|
= icon('fa-caret-down')
|
|
54
54
|
= t('.env')
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
- @plugins.each do |plugin|
|
|
13
13
|
%tr
|
|
14
14
|
%td
|
|
15
|
-
- unless plugin.installed?
|
|
15
|
+
- unless plugin.installed? || plugin.processing?
|
|
16
16
|
= link_to t("terms.install"), install_plugins_path, class: "js-install btn btn-primary", data: { url: install_plugins_path, name: plugin.gem_name}
|
|
17
17
|
%td
|
|
18
18
|
%label{for: "plugin_#{plugin.gem_name}"}
|
|
@@ -20,10 +20,7 @@
|
|
|
20
20
|
%td
|
|
21
21
|
= plugin.category
|
|
22
22
|
%td
|
|
23
|
-
|
|
24
|
-
= t("plugins.common.installed")
|
|
25
|
-
- else
|
|
26
|
-
= t(".not_installed")
|
|
23
|
+
= plugin.status
|
|
27
24
|
%td
|
|
28
25
|
= link_to t('plugins.view_on_rubygems_org'), plugin.rubygems_org_page, target: "_blank"
|
|
29
26
|
|
|
@@ -54,6 +51,8 @@
|
|
|
54
51
|
method: "POST"
|
|
55
52
|
}).done(function(){
|
|
56
53
|
$anchor.fadeOut();
|
|
54
|
+
var status = $anchor.parent().closest('tr').children()[3];
|
|
55
|
+
$(status).text("#{t("terms.processing")}");
|
|
57
56
|
});;
|
|
58
57
|
});
|
|
59
58
|
});
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
.panel-body
|
|
6
6
|
= render partial: "shared/error"
|
|
7
7
|
= form_for(:session, url: sessions_path) do |f|
|
|
8
|
-
|
|
8
|
+
.form-group
|
|
9
9
|
= f.text_field :name, placeholder: t('terms.name')
|
|
10
|
-
|
|
10
|
+
.form-group
|
|
11
11
|
= f.password_field :password, placeholder: t('terms.password')
|
|
12
12
|
|
|
13
13
|
= submit_tag t("terms.sign_in"), class: "btn btn-success"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
= @fluentd.agent.running? ? t("fluentd.common.running") : t("fluentd.common.stopped")
|
|
3
3
|
|
|
4
4
|
- if flash[:error]
|
|
5
|
-
|
|
5
|
+
.alert.alert-danger= flash[:error]
|
|
6
6
|
|
|
7
7
|
= link_to t("fluentd.common.detail"), daemon_path(@fluentd)
|
|
8
8
|
= link_to t("fluentd.common.start"), start_daemon_agent_path(@fluentd), method: :put
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
- page_title "fluentd"
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
.row
|
|
4
|
+
.col-xs-6
|
|
5
|
+
.well
|
|
6
6
|
%span= link_to icon("fa-cog") << t("terms.setup", target: "fluentd"), new_daemon_path(variant: "fluentd_gem"), class: "btn btn-primary btn-lg"
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
.col-xs-6
|
|
8
|
+
.well
|
|
9
9
|
%span
|
|
10
10
|
= 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"}"
|
|
11
11
|
- unless has_td_agent_system?
|
|
@@ -2,21 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
-
|
|
7
|
-
|
|
5
|
+
.col-xs-6
|
|
6
|
+
- if notice
|
|
7
|
+
.alert.alert-success= notice
|
|
8
|
+
- else
|
|
9
|
+
- @user.errors.full_messages.each do |e|
|
|
10
|
+
.alert.alert-danger= e
|
|
8
11
|
|
|
9
12
|
= form_for(:user, url: user_path, method: :patch) do |f|
|
|
10
|
-
|
|
13
|
+
.form-group
|
|
11
14
|
= f.label :name
|
|
12
15
|
= f.text_field :name, class: "form-control", disabled: true
|
|
13
|
-
|
|
16
|
+
.form-group
|
|
14
17
|
= f.label :current_password
|
|
15
18
|
= f.password_field :current_password, class: "form-control"
|
|
16
|
-
|
|
19
|
+
.form-group
|
|
17
20
|
= f.label :password
|
|
18
21
|
= f.password_field :password, class: "form-control"
|
|
19
|
-
|
|
22
|
+
.form-group
|
|
20
23
|
= f.label :password_confirmation
|
|
21
24
|
= f.password_field :password_confirmation, class: "form-control"
|
|
22
25
|
= f.submit t("terms.update_password"), class: "btn btn-primary"
|
data/config/application.rb
CHANGED
|
@@ -8,6 +8,7 @@ en:
|
|
|
8
8
|
fluentd_stop_failed: Failed to stop fluentd
|
|
9
9
|
fluentd_restart_failed: Failed to restart fluentd
|
|
10
10
|
fluentd_start_stop_delay_notice: "'%{action} daemon' is accepted. That operation could take a minute for complete."
|
|
11
|
+
password_successfully_updated: "Your password has been changed successfully."
|
|
11
12
|
|
|
12
13
|
terms: &terms
|
|
13
14
|
name: Name
|
|
@@ -19,6 +20,7 @@ en:
|
|
|
19
20
|
upgrade: Upgrade
|
|
20
21
|
installed: Installed
|
|
21
22
|
not_installed: Not Installed
|
|
23
|
+
processing: Processing
|
|
22
24
|
new_version: "%{version} is available"
|
|
23
25
|
install_latest: Install latest
|
|
24
26
|
installed_plugins: Installed Plugins
|
|
@@ -70,7 +72,7 @@ en:
|
|
|
70
72
|
installed:
|
|
71
73
|
page_title: Installed Plugins
|
|
72
74
|
recommended:
|
|
73
|
-
page_title:
|
|
75
|
+
page_title: Recommended Plugins
|
|
74
76
|
updated:
|
|
75
77
|
page_title: Updated Plugins
|
|
76
78
|
|
|
@@ -8,6 +8,7 @@ ja:
|
|
|
8
8
|
fluentd_stop_failed: "%{brand}の停止に失敗しました。"
|
|
9
9
|
fluentd_restart_failed: "%{brand}の再起動に失敗しました。"
|
|
10
10
|
fluentd_start_stop_delay_notice: "デーモンの%{action}を受け付けました。処理が完了するまで時間がかかる場合があります。"
|
|
11
|
+
password_successfully_updated: "パスワードを変更しました。"
|
|
11
12
|
|
|
12
13
|
terms: &terms
|
|
13
14
|
name: アカウント名
|
|
@@ -21,6 +22,7 @@ ja:
|
|
|
21
22
|
upgrade: アップグレード
|
|
22
23
|
installed: インストール済み
|
|
23
24
|
not_installed: 未インストール
|
|
25
|
+
processing: 処理中
|
|
24
26
|
new_version: "%{version}があります"
|
|
25
27
|
plugins: プラグイン
|
|
26
28
|
misc: その他
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/fluentd-ui.gemspec
CHANGED
|
@@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
spec.add_dependency "haml-rails", "~> 0.5.3"
|
|
34
34
|
spec.add_dependency 'jquery-rails', "~> 3.1.0"
|
|
35
35
|
spec.add_dependency 'jbuilder', '~> 2.0'
|
|
36
|
+
spec.add_dependency "draper", '~> 1.3'
|
|
36
37
|
spec.add_dependency "bundler"
|
|
37
38
|
spec.add_dependency "httpclient"
|
|
38
39
|
spec.add_dependency "settingslogic"
|
data/lib/fluentd-ui/command.rb
CHANGED
|
@@ -8,6 +8,7 @@ module FluentdUI
|
|
|
8
8
|
option :pidfile, type: :string, default: File.expand_path('tmp/fluentd-ui.pid', ROOT)
|
|
9
9
|
option :daemonize, type: :boolean, default: false
|
|
10
10
|
def start
|
|
11
|
+
trap(:INT) { puts "\nStopping..." }
|
|
11
12
|
system(*%W(bundle exec rackup #{options[:daemonize] ? "-D" : ""} --pid #{options[:pidfile]} -p #{options[:port]} -E production #{ROOT}/config.ru))
|
|
12
13
|
end
|
|
13
14
|
|
|
@@ -40,6 +41,7 @@ module FluentdUI
|
|
|
40
41
|
install dependency gems
|
|
41
42
|
DESC
|
|
42
43
|
def setup
|
|
44
|
+
trap(:INT) { puts "\nStopping..." }
|
|
43
45
|
system(*%W(bundle install))
|
|
44
46
|
end
|
|
45
47
|
|
data/lib/fluentd-ui/version.rb
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
describe PluginDecorator do
|
|
4
|
+
let(:decorated_plugin) { build(:plugin).decorate }
|
|
5
|
+
|
|
6
|
+
describe "#status" do
|
|
7
|
+
subject { decorated_plugin.status }
|
|
8
|
+
|
|
9
|
+
context "plugin is processing" do
|
|
10
|
+
before { decorated_plugin.stub(:processing?).and_return(true) }
|
|
11
|
+
|
|
12
|
+
it "returns the term for processing" do
|
|
13
|
+
expect(subject).to eq I18n.t("terms.processing")
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
context "plugin isn't while processing" do
|
|
18
|
+
before { decorated_plugin.stub(:processing?).and_return(false) }
|
|
19
|
+
|
|
20
|
+
context "plugin is already installed" do
|
|
21
|
+
before { decorated_plugin.stub(:installed?).and_return(true) }
|
|
22
|
+
|
|
23
|
+
it "returns the term for installed" do
|
|
24
|
+
expect(subject).to eq I18n.t("terms.installed")
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
context "plugin isn't installed yet" do
|
|
29
|
+
before { decorated_plugin.stub(:installed?).and_return(false) }
|
|
30
|
+
|
|
31
|
+
it "returns the term for not installed" do
|
|
32
|
+
expect(subject).to eq I18n.t("terms.not_installed")
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -121,8 +121,8 @@ describe Fluentd::Setting::Common do
|
|
|
121
121
|
end
|
|
122
122
|
@klass = Class.new do
|
|
123
123
|
include Fluentd::Setting::Common
|
|
124
|
-
KEYS
|
|
125
|
-
attr_accessor(*KEYS)
|
|
124
|
+
const_set(:KEYS, [:key1, :key2, :flag1, :hide, :ch, :child, :string])
|
|
125
|
+
attr_accessor(*const_get(:KEYS))
|
|
126
126
|
booleans :key1, :key2
|
|
127
127
|
flags :flag1
|
|
128
128
|
hidden :hide
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fluentd-ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Masahiro Nakagawa
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-10-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: fluentd
|
|
@@ -137,6 +137,20 @@ dependencies:
|
|
|
137
137
|
- - "~>"
|
|
138
138
|
- !ruby/object:Gem::Version
|
|
139
139
|
version: '2.0'
|
|
140
|
+
- !ruby/object:Gem::Dependency
|
|
141
|
+
name: draper
|
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
|
143
|
+
requirements:
|
|
144
|
+
- - "~>"
|
|
145
|
+
- !ruby/object:Gem::Version
|
|
146
|
+
version: '1.3'
|
|
147
|
+
type: :runtime
|
|
148
|
+
prerelease: false
|
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
150
|
+
requirements:
|
|
151
|
+
- - "~>"
|
|
152
|
+
- !ruby/object:Gem::Version
|
|
153
|
+
version: '1.3'
|
|
140
154
|
- !ruby/object:Gem::Dependency
|
|
141
155
|
name: bundler
|
|
142
156
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -301,6 +315,7 @@ files:
|
|
|
301
315
|
- app/controllers/tutorials_controller.rb
|
|
302
316
|
- app/controllers/users_controller.rb
|
|
303
317
|
- app/controllers/welcome_controller.rb
|
|
318
|
+
- app/decorators/plugin_decorator.rb
|
|
304
319
|
- app/helpers/application_helper.rb
|
|
305
320
|
- app/helpers/fluentd/settings_helper.rb
|
|
306
321
|
- app/helpers/miscs_helper.rb
|
|
@@ -423,11 +438,11 @@ files:
|
|
|
423
438
|
- config/secrets.yml
|
|
424
439
|
- db/schema.rb
|
|
425
440
|
- db/seeds.rb
|
|
426
|
-
-
|
|
427
|
-
-
|
|
428
|
-
-
|
|
429
|
-
-
|
|
430
|
-
-
|
|
441
|
+
- docs/screenshots/01.png
|
|
442
|
+
- docs/screenshots/02.png
|
|
443
|
+
- docs/screenshots/03.png
|
|
444
|
+
- docs/screenshots/04.png
|
|
445
|
+
- docs/screenshots/05.png
|
|
431
446
|
- fluentd-ui.gemspec
|
|
432
447
|
- lib/assets/.keep
|
|
433
448
|
- lib/file_reverse_reader.rb
|
|
@@ -451,6 +466,7 @@ files:
|
|
|
451
466
|
- spec/controllers/polling_controller_spec.rb
|
|
452
467
|
- spec/controllers/sessions_controller_spec.rb
|
|
453
468
|
- spec/controllers/tutorials_controller_spec.rb
|
|
469
|
+
- spec/decorators/plugin_decorator_spec.rb
|
|
454
470
|
- spec/factories/fluentd.rb
|
|
455
471
|
- spec/factories/plugins.rb
|
|
456
472
|
- spec/factories/user.rb
|
|
@@ -612,6 +628,7 @@ test_files:
|
|
|
612
628
|
- spec/controllers/polling_controller_spec.rb
|
|
613
629
|
- spec/controllers/sessions_controller_spec.rb
|
|
614
630
|
- spec/controllers/tutorials_controller_spec.rb
|
|
631
|
+
- spec/decorators/plugin_decorator_spec.rb
|
|
615
632
|
- spec/factories/fluentd.rb
|
|
616
633
|
- spec/factories/plugins.rb
|
|
617
634
|
- spec/factories/user.rb
|