|
@ -182,28 +182,50 @@ |
|
|
</b-row> |
|
|
</b-row> |
|
|
</div> |
|
|
</div> |
|
|
<!-- col --> |
|
|
<!-- col --> |
|
|
<h2 v-if="onEvent">ON-event logs for all apps (Simplified)</h2> |
|
|
<div v-if="onEvent" class="logs"> |
|
|
<div v-if="onEvent" class="table2"> |
|
|
<h2>ON-event logs for all apps (Simplified)</h2> |
|
|
<vuetable |
|
|
<div class="input-group-append"> |
|
|
ref="vuetable" |
|
|
<button |
|
|
:api-mode="false" |
|
|
class="btn btn-outline-primary" |
|
|
:data="localData" |
|
|
round |
|
|
:fields="fields" |
|
|
type="button" |
|
|
:css="css.table" |
|
|
@click="scroll(1)" |
|
|
> |
|
|
> |
|
|
</vuetable> |
|
|
Scroll to Bottom |
|
|
</div> |
|
|
</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div id="applogs" class="table2"> |
|
|
|
|
|
<vuetable |
|
|
|
|
|
ref="vuetable" |
|
|
|
|
|
:api-mode="false" |
|
|
|
|
|
:data="localData" |
|
|
|
|
|
:fields="fields" |
|
|
|
|
|
:css="css.table" |
|
|
|
|
|
> |
|
|
|
|
|
</vuetable> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
<h2 v-if="onEvent">ON-event logs for MongoDB (RAW)</h2> |
|
|
<h2>ON-event logs for MongoDB (RAW)</h2> |
|
|
<div v-if="onEvent" class="table2"> |
|
|
<div class="input-group-append"> |
|
|
<vuetable |
|
|
<button |
|
|
ref="vuetable" |
|
|
class="btn btn-outline-primary" |
|
|
:api-mode="false" |
|
|
round |
|
|
:data="mongodata" |
|
|
type="button" |
|
|
:fields="fields2" |
|
|
@click="scroll(2)" |
|
|
:css="css.table" |
|
|
> |
|
|
> |
|
|
Scroll to Bottom |
|
|
</vuetable> |
|
|
</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div id="mongologs" class="table2"> |
|
|
|
|
|
<vuetable |
|
|
|
|
|
ref="vuetable" |
|
|
|
|
|
:api-mode="false" |
|
|
|
|
|
:data="mongodata" |
|
|
|
|
|
:fields="fields2" |
|
|
|
|
|
:css="css.table" |
|
|
|
|
|
> |
|
|
|
|
|
</vuetable> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<!-- row --> |
|
|
<!-- row --> |
|
@ -330,6 +352,15 @@ export default { |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
scroll(param) { |
|
|
|
|
|
if (param == 1) { |
|
|
|
|
|
var container = this.$el.querySelector("#applogs"); |
|
|
|
|
|
container.scrollTop = container.scrollHeight; |
|
|
|
|
|
} else { |
|
|
|
|
|
var container = this.$el.querySelector("#mongologs"); |
|
|
|
|
|
container.scrollTop = container.scrollHeight; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
async getuser(token) { |
|
|
async getuser(token) { |
|
|
var data = await this.checktoken(token); |
|
|
var data = await this.checktoken(token); |
|
|
console.log("User: " + data.user + " Token: " + data.token); |
|
|
console.log("User: " + data.user + " Token: " + data.token); |
|
@ -461,14 +492,17 @@ export default { |
|
|
console.log(JSON.stringify(this.logdata)); |
|
|
console.log(JSON.stringify(this.logdata)); |
|
|
}, |
|
|
}, |
|
|
async socketopen() { |
|
|
async socketopen() { |
|
|
|
|
|
console.log("inside socketopen()"); |
|
|
this.$socket.client.open(); |
|
|
this.$socket.client.open(); |
|
|
}, |
|
|
}, |
|
|
async socketauthenticate() { |
|
|
async socketauthenticate() { |
|
|
var tokentmp = store.getters["pipelineLLO/gettoken"]; |
|
|
var tokentmp = this.logintoken; |
|
|
// pernaw hardcoded to token |
|
|
// pernaw hardcoded to token |
|
|
|
|
|
console.log("Inside socket authenticate"); |
|
|
this.$socket.client.emit("authenticate", tokentmp); |
|
|
this.$socket.client.emit("authenticate", tokentmp); |
|
|
}, |
|
|
}, |
|
|
async socketreconnect() { |
|
|
async socketreconnect() { |
|
|
|
|
|
console.log("inside socketreconnect() --- sending to socketopen()"); |
|
|
var log = await this.socketopen(); |
|
|
var log = await this.socketopen(); |
|
|
this.socketauthenticate(); |
|
|
this.socketauthenticate(); |
|
|
}, |
|
|
}, |
|
@ -520,6 +554,7 @@ export default { |
|
|
// from AdhocView |
|
|
// from AdhocView |
|
|
this.$root.$on("SERVER_socket_connect", (v) => { |
|
|
this.$root.$on("SERVER_socket_connect", (v) => { |
|
|
this.$nextTick(function() { |
|
|
this.$nextTick(function() { |
|
|
|
|
|
console.log("socket recconect inside runllo"); |
|
|
this.socketreconnect(); |
|
|
this.socketreconnect(); |
|
|
}); |
|
|
}); |
|
|
}); |
|
|
}); |
|
@ -565,7 +600,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=5b39802077f68ac7499066391067e10535a7053a" |
|
|
"https://api-client.swarmlab.io:8088/?token=95bbe80eeae557be3e4e9fa25109bf2187f2c313" |
|
|
).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 |
|
@ -608,6 +643,7 @@ export default { |
|
|
// send to AdhocView |
|
|
// send to AdhocView |
|
|
this.$root.$emit("SERVER_socket_status", "on"); |
|
|
this.$root.$emit("SERVER_socket_status", "on"); |
|
|
this.getuser(logintoken); |
|
|
this.getuser(logintoken); |
|
|
|
|
|
//asd |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
|
* |
|
|
* |
|
@ -871,5 +907,13 @@ h2 { |
|
|
} |
|
|
} |
|
|
.rowlog { |
|
|
.rowlog { |
|
|
display: flex; /* equal height of the children */ |
|
|
display: flex; /* equal height of the children */ |
|
|
|
|
|
min-height: 500px; |
|
|
|
|
|
box-shadow: 3px 3px 10px 10px rgba(0, 0, 0, 0.281); |
|
|
|
|
|
margin-bottom: 40px; |
|
|
|
|
|
margin-top: 20px; |
|
|
|
|
|
padding: 5px; |
|
|
|
|
|
} |
|
|
|
|
|
.logs { |
|
|
|
|
|
width: 100%; |
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |
|
|