diff --git a/src/components/doclive/AdhocView.vue b/src/components/doclive/AdhocView.vue index d504bfc..e4c424c 100644 --- a/src/components/doclive/AdhocView.vue +++ b/src/components/doclive/AdhocView.vue @@ -76,8 +76,8 @@ -
-
+
+

History of all app logs

diff --git a/src/components/doclive/runLlo.vue b/src/components/doclive/runLlo.vue index 37c35ec..b5b39cd 100644 --- a/src/components/doclive/runLlo.vue +++ b/src/components/doclive/runLlo.vue @@ -405,9 +405,10 @@ export default { } else if (param == 2) { var container = this.$el.querySelector("#mongologs"); container.scrollTop = container.scrollHeight; - } else { + } else if (param == 3) { + console.log("moving scroll bar of raw logs"); var container = this.$el.querySelector("#rawlogs"); - container.scrollTOp = container.scrollHeight; + container.scrollTop = container.scrollHeight; } }, async getuser(token) { @@ -657,7 +658,7 @@ export default { created() { //var logintoken = new URL(location.href).searchParams.get("token"); var logintoken = new URL( - "https://api-client.swarmlab.io:8088/?token=06227b41168224d853a1863d3195cff946f15217" + "https://api-client.swarmlab.io:8088/?token=191f43c5b28084805e7f7b66ceed9c2657a817a3" ).searchParams.get("token"); this.logintoken = logintoken; // === We get the user + check for the token if exists @@ -916,13 +917,28 @@ export default { log: val, }); - this.rawdata = val; + if (val.source == "stdout") { + val.source = '
' + val.source + "
"; + } else { + val.source = '
' + val.source + "
"; + } + this.rawdata.push(val); if (val.log.includes("app_name")) { var test = JSON.parse(val.log); - + if (test.type == "out") { + test.type = '
' + test.type + "
"; + } else if (test.type == "err") { + test.type = '
' + test.type + "
"; + } this.localData.push(test); } else if (val.container_name == "/mongo") { - this.mongodata.push(JSON.parse(val.log)); + var tmp = JSON.parse(val.log); + if (tmp.s == "I") { + tmp.s = '
' + tmp.s + "
"; + } else { + tmp.s = '
' + tmp.s + "
"; + } + this.mongodata.push(tmp); //msg var tmplog = JSON.parse(val.log); @@ -934,7 +950,7 @@ export default { var tmp = { message: msg2, timestamp: time, - type: "out - mongo", + type: "
out - mongo
", process_id: "Unknown", app_name: "Mongo", }; @@ -946,13 +962,22 @@ export default { }; -