mirror of
https://github.com/fluent/fluentd-ui.git
synced 2025-08-13 17:57:10 +02:00
fluentd log tail url to be HTML attr for prepare log tail display on fluentd#show
This commit is contained in:
parent
15d3d3248f
commit
f0eaf8f486
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
new Vue({
|
new Vue({
|
||||||
el: "#fluent-log",
|
el: "#fluent-log",
|
||||||
|
paramAttributes: ["logUrl"],
|
||||||
data: {
|
data: {
|
||||||
"logs": [],
|
"logs": [],
|
||||||
},
|
},
|
||||||
@ -18,7 +19,7 @@
|
|||||||
fetchLogs: function() {
|
fetchLogs: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
new Promise(function(resolve, reject) {
|
new Promise(function(resolve, reject) {
|
||||||
$.getJSON("/tutorials/log_tail", resolve).fail(reject);
|
$.getJSON(self.logUrl, resolve).fail(reject);
|
||||||
}).then(function(logs){
|
}).then(function(logs){
|
||||||
self.logs = logs;
|
self.logs = logs;
|
||||||
});
|
});
|
||||||
|
10
app/views/shared/vue/_fluent_log.html.erb
Normal file
10
app/views/shared/vue/_fluent_log.html.erb
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!-- vue.js -->
|
||||||
|
<div id="fluent-log" logUrl="/tutorials/log_tail">
|
||||||
|
<pre>
|
||||||
|
<button class="btn btn-primary" v-on="click: fetchLogs"><%= t "terms.reload_log" %></button>
|
||||||
|
|
||||||
|
<span v-repeat="logs">{{ $value }}
|
||||||
|
</span></pre>
|
||||||
|
</div>
|
||||||
|
<!-- /vue.js -->
|
||||||
|
|
@ -23,15 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- /vue.js -->
|
<!-- /vue.js -->
|
||||||
|
|
||||||
<!-- vue.js -->
|
<%= render partial: "shared/vue/fluent_log", locals: { fluentd: @fluentd } %>
|
||||||
<div id="fluent-log">
|
|
||||||
<pre>
|
|
||||||
<button class="btn btn-primary" v-on="click: fetchLogs"><%= t ".reload_log" %></button>
|
|
||||||
|
|
||||||
<span v-repeat="logs">{{ $value }}
|
|
||||||
</span></pre>
|
|
||||||
</div>
|
|
||||||
<!-- /vue.js -->
|
|
||||||
|
|
||||||
<p class="clearfix">
|
<p class="clearfix">
|
||||||
<%= link_to t('tutorials.chapter2.page_title') << " >>", tutorials_chapter2_path, class: "pull-right" %>
|
<%= link_to t('tutorials.chapter2.page_title') << " >>", tutorials_chapter2_path, class: "pull-right" %>
|
||||||
|
@ -31,6 +31,7 @@ en:
|
|||||||
destroy_confirm_title: "%{target} Deletion"
|
destroy_confirm_title: "%{target} Deletion"
|
||||||
destroy_confirm_body: |
|
destroy_confirm_body: |
|
||||||
Really delete?
|
Really delete?
|
||||||
|
reload_log: Reload fluend log
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
common: &plugin_common
|
common: &plugin_common
|
||||||
@ -117,7 +118,6 @@ en:
|
|||||||
chapter1:
|
chapter1:
|
||||||
<<: *tutorials_common
|
<<: *tutorials_common
|
||||||
page_title: "Chapter 1 | Try to send data"
|
page_title: "Chapter 1 | Try to send data"
|
||||||
reload_log: Reload fluend log
|
|
||||||
description: You can send an arbitrary JSON data via HTTP. URL path will be tag name.
|
description: You can send an arbitrary JSON data via HTTP. URL path will be tag name.
|
||||||
send: Send
|
send: Send
|
||||||
chapter2:
|
chapter2:
|
||||||
|
@ -31,6 +31,7 @@ ja:
|
|||||||
destroy_confirm_title: "%{target}を削除"
|
destroy_confirm_title: "%{target}を削除"
|
||||||
destroy_confirm_body: |
|
destroy_confirm_body: |
|
||||||
削除しますか?
|
削除しますか?
|
||||||
|
reload_log: fluentdのログを更新
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
common: &plugin_common
|
common: &plugin_common
|
||||||
@ -117,7 +118,6 @@ ja:
|
|||||||
chapter1:
|
chapter1:
|
||||||
<<: *tutorials_common
|
<<: *tutorials_common
|
||||||
page_title: "Chapter 1 | データを渡してみる"
|
page_title: "Chapter 1 | データを渡してみる"
|
||||||
reload_log: fluentdのログを更新
|
|
||||||
description: fluentdに任意のデータをJSONで送ることができます。URLのパスがタグの名前になります。
|
description: fluentdに任意のデータをJSONで送ることができます。URLのパスがタグの名前になります。
|
||||||
learn_more: |
|
learn_more: |
|
||||||
他にもin_tail, in_syslogなどのinputプラグインがあります。
|
他にもin_tail, in_syslogなどのinputプラグインがあります。
|
||||||
|
Loading…
Reference in New Issue
Block a user