mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-14 18:27:06 +02:00
Merge pull request #55 from treasure-data/autoreload_log_by_default
Auto reload fluentd log by default
This commit is contained in:
commit
ded261c68e
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#fluent-log",
|
el: "#fluent-log",
|
||||||
paramAttributes: ["logUrl"],
|
paramAttributes: ["logUrl", "initialAutoReload"],
|
||||||
data: {
|
data: {
|
||||||
"autoFetch": false,
|
"autoFetch": false,
|
||||||
"logs": [],
|
"logs": [],
|
||||||
@ -15,6 +15,9 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
created: function(){
|
created: function(){
|
||||||
|
if(this.initialAutoReload) {
|
||||||
|
this.autoFetch = true;
|
||||||
|
}
|
||||||
this.fetchLogs();
|
this.fetchLogs();
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<!-- vue.js -->
|
<!-- 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>
|
<p>
|
||||||
<button class="btn btn-primary" v-on="click: fetchLogs">
|
<button class="btn btn-primary" v-on="click: fetchLogs">
|
||||||
<%= t "terms.reload_log" %>
|
<%= t "terms.reload_log" %>
|
||||||
|
Loading…
Reference in New Issue
Block a user