Browse Source

mongo feedback - next step overflow fix

master
lefteris 3 years ago
parent
commit
8668b3cb7a
  1. 85
      src/components/doclive/runLlo.vue

85
src/components/doclive/runLlo.vue

@ -183,6 +183,7 @@
</div>
<!-- col -->
<div v-if="onEvent" class="table2">
<h1>App Logs - Simplified (ON EVENT)</h1>
<vuetable
ref="vuetable"
:api-mode="false"
@ -191,6 +192,18 @@
:css="css.table"
>
</vuetable>
<hr />
</div>
<div v-if="onEvent" class="table2">
<h1>Mongo Logs - RAW (More details - ON EVENT)</h1>
<vuetable
ref="vuetable"
:api-mode="false"
:data="mongodata"
:fields="fields2"
:css="css.table"
>
</vuetable>
</div>
</div>
<!-- row -->
@ -248,6 +261,43 @@ export default {
// 'process_id',
// 'app_name',
],
fields2: [
{
name: "t",
title: "t",
visible: true,
},
{
name: "s",
title: "s",
visible: true,
},
{
name: "c",
titleClass: "center aligned",
},
{
name: "id",
visible: true,
},
{
name: "ctx",
visible: true,
title: "ctx",
},
{
name: "msg",
title: "msg",
},
{
name: "attr",
title: "attr",
},
// 'timestamp',
// 'type',
// 'process_id',
// 'app_name',
],
log_path: [],
log_path_lenght: [],
log_path_lenghtstatus: [],
@ -273,6 +323,7 @@ export default {
logintoken: "",
code: [],
logdata: [],
mongodata: [],
localData: [],
};
},
@ -512,7 +563,7 @@ export default {
created() {
//var logintoken = new URL(location.href).searchParams.get("token");
var logintoken = new URL(
"https://api-client.swarmlab.io:8088/?token=93f60f0fa6c7288420b4eea844b61252c49dc1c3"
"https://api-client.swarmlab.io:8088/?token=741662728073939963b63bb0b90da41e706333e6"
).searchParams.get("token");
this.logintoken = logintoken;
// === We get the user + check for the token if exists
@ -770,7 +821,30 @@ export default {
log: val,
});
this.localData.push(val);
if (val.log.includes("app_name")) {
var test = JSON.parse(val.log);
this.localData.push(test);
} else if (val.container_name == "/mongo") {
this.mongodata.push(JSON.parse(val.log));
//msg
var tmplog = JSON.parse(val.log);
var msg2 = tmplog.msg;
//timestam
var time = tmplog.t;
time = time.$date;
var tmp = {
message: msg2,
timestamp: time,
type: "out - mongo",
process_id: "Unknown",
app_name: "Mongo",
};
this.localData.push(tmp);
console.log("HEY " + JSON.stringify(test));
}
},
},
};
@ -778,14 +852,11 @@ export default {
<style scoped>
.table {
overflow: scroll;
min-height: 0px;
max-width: 600px;
}
.table2 {
overflow: scroll;
min-width: 700px;
max-width: 1200px;
max-height: 550px;
overflow: auto;
}
.CodeMirror {
font-family: monospace;

Loading…
Cancel
Save