From ab40e4734c1d225fe2af2f9d335ad3d17a2cca0e Mon Sep 17 00:00:00 2001 From: Kenji Okimoto Date: Fri, 18 May 2018 14:56:52 +0900 Subject: [PATCH] Set logUrl Signed-off-by: Kenji Okimoto --- app/javascript/packs/fluent_log.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/javascript/packs/fluent_log.js b/app/javascript/packs/fluent_log.js index 4270029..4ac8aa6 100644 --- a/app/javascript/packs/fluent_log.js +++ b/app/javascript/packs/fluent_log.js @@ -2,7 +2,7 @@ $(document).ready(()=> { new Vue({ el: "#fluent-log", - paramAttributes: ["logUrl", "initialAutoReload"], + props: ["logUrl", "initialAutoReload"], data: { "autoFetch": false, "logs": [], @@ -10,6 +10,11 @@ $(document).ready(()=> { "processing": false }, + beforeMount: function() { + this.logUrl = this.$el.attributes.logUrl.nodeValue; + this.initialAutoReload = this.$el.attributes.initialAutoReload.nodeValue; + }, + mounted: function(){ this.fetchLogs();