This commit is contained in:
uu59 2014-07-31 17:30:21 +09:00
parent b7a7b0a797
commit ec44ba10d6
8 changed files with 18 additions and 20 deletions

View File

@ -13,6 +13,7 @@ class User
ENCRYPTED_PASSWORD_FILE = Rails.root + "db/#{Rails.env}-user.txt"
attr_accessor :name, :password, :password_confirmation, :current_password
attr_writer :password_digest
validates :name, presence: true
validates :password, length: { minimum: 8 }
@ -28,10 +29,6 @@ class User
end
end
def password_digest=(digest)
@password_digest = digest
end
def update_attributes(params)
params.each_pair do |key, value|
send("#{key}=", value)

View File

@ -5,5 +5,5 @@
= field(f, :bind)
= field(f, :port)
= field(f, :types)
= f.submit t('fluentd.common.finish') , class: "btn btn-lg btn-primary pull-right"
= f.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary pull-right"

View File

@ -17,6 +17,6 @@
= field(f, :heartbeat_interval)
= field(f, :phi_threshold)
= field(f, :hard_timeout)
= f.submit t('fluentd.common.finish') , class: "btn btn-lg btn-primary pull-right"
= f.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary pull-right"

View File

@ -26,5 +26,5 @@
= field(f, :retry_limit)
= field(f, :max_retry_wait)
= field(f, :num_threads)
= f.submit t('fluentd.common.finish') , class: "btn btn-lg btn-primary pull-right"
= f.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary pull-right"

View File

@ -34,6 +34,6 @@
= field(f, :retry_limit)
= field(f, :max_retry_wait)
= field(f, :num_threads)
= f.submit t('fluentd.common.finish') , class: "btn btn-lg btn-primary pull-right"
= f.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary pull-right"

View File

@ -15,4 +15,4 @@
= field(f, :flush_interval)
= field(f, :buffer_type)
= field(f, :buffer_path)
= f.submit t('fluentd.common.finish') , class: "btn btn-lg btn-primary pull-right"
= f.submit t('fluentd.common.finish'), class: "btn btn-lg btn-primary pull-right"

View File

@ -2,20 +2,21 @@
<% 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" %>
</button>
<input type="text" v-model="limit" size="4" v-on="keyup: fetchLogs | key enter" />
<%= t('terms.lines') %>
<label>
<input type="checkbox" v-model="autoFetch" /> <%= t "terms.auto_reload", seconds: 1 %>
</label>
<span v-if="processing"><%= icon('fa-spin fa-refresh') %></span>
</p>
<button class="btn btn-primary" v-on="click: fetchLogs">
<%= t "terms.reload_log" %>
</button>
<input type="text" v-model="limit" size="4" v-on="keyup: fetchLogs | key enter" />
<%= t('terms.lines') %>
<label>
<input type="checkbox" v-model="autoFetch" /> <%= t "terms.auto_reload", seconds: 1 %>
</label>
<span v-if="processing"><%= icon('fa-spin fa-refresh') %></span>
</p>
<pre v-if="isPresentedLogs"><!-- be careful indent -->
<div class="log"><span v-repeat="logs">{{ $value }}
</span></div></pre>
<div v-if="!isPresentedLogs && !processing">
<p>[log is empty]</p>
</div>

View File

@ -7,7 +7,7 @@
</p>
<p>
<%= t ".description" %>
<%= t ".description" %>
</p>
<!-- vue.js -->