Merge pull request #55 from treasure-data/autoreload_log_by_default

Auto reload fluentd log by default
This commit is contained in:
uu59 2014-07-22 13:19:41 +09:00
commit ded261c68e
2 changed files with 6 additions and 2 deletions

View File

@ -6,7 +6,7 @@
new Vue({
el: "#fluent-log",
paramAttributes: ["logUrl"],
paramAttributes: ["logUrl", "initialAutoReload"],
data: {
"autoFetch": false,
"logs": [],
@ -15,6 +15,9 @@
},
created: function(){
if(this.initialAutoReload) {
this.autoFetch = true;
}
this.fetchLogs();
var self = this;

View File

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