Browse Source

mongo feedback - next step overflow fix

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

85
src/components/doclive/runLlo.vue

@ -183,6 +183,7 @@
</div> </div>
<!-- col --> <!-- col -->
<div v-if="onEvent" class="table2"> <div v-if="onEvent" class="table2">
<h1>App Logs - Simplified (ON EVENT)</h1>
<vuetable <vuetable
ref="vuetable" ref="vuetable"
:api-mode="false" :api-mode="false"
@ -191,6 +192,18 @@
:css="css.table" :css="css.table"
> >
</vuetable> </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>
</div> </div>
<!-- row --> <!-- row -->
@ -248,6 +261,43 @@ export default {
// 'process_id', // 'process_id',
// 'app_name', // '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: [],
log_path_lenght: [], log_path_lenght: [],
log_path_lenghtstatus: [], log_path_lenghtstatus: [],
@ -273,6 +323,7 @@ export default {
logintoken: "", logintoken: "",
code: [], code: [],
logdata: [], logdata: [],
mongodata: [],
localData: [], localData: [],
}; };
}, },
@ -512,7 +563,7 @@ export default {
created() { created() {
//var logintoken = new URL(location.href).searchParams.get("token"); //var logintoken = new URL(location.href).searchParams.get("token");
var logintoken = new URL( var logintoken = new URL(
"https://api-client.swarmlab.io:8088/?token=93f60f0fa6c7288420b4eea844b61252c49dc1c3" "https://api-client.swarmlab.io:8088/?token=741662728073939963b63bb0b90da41e706333e6"
).searchParams.get("token"); ).searchParams.get("token");
this.logintoken = logintoken; this.logintoken = logintoken;
// === We get the user + check for the token if exists // === We get the user + check for the token if exists
@ -770,7 +821,30 @@ export default {
log: val, 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> <style scoped>
.table { .table {
overflow: scroll;
min-height: 0px; min-height: 0px;
max-width: 600px;
} }
.table2 { .table2 {
overflow: scroll; overflow: auto;
min-width: 700px;
max-width: 1200px;
max-height: 550px;
} }
.CodeMirror { .CodeMirror {
font-family: monospace; font-family: monospace;

Loading…
Cancel
Save