|
@ -149,14 +149,6 @@ |
|
|
|
|
|
|
|
|
<div class="col-1"></div> |
|
|
<div class="col-1"></div> |
|
|
<!-- col --> |
|
|
<!-- col --> |
|
|
|
|
|
|
|
|
<vuetable |
|
|
|
|
|
ref="vuetable" |
|
|
|
|
|
:api-mode="false" |
|
|
|
|
|
:data="localData" |
|
|
|
|
|
:fields="['message', 'timestamp', 'type', 'process_id', 'app_name']" |
|
|
|
|
|
> |
|
|
|
|
|
</vuetable> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
<!-- row --> |
|
|
<!-- row --> |
|
|
<!-- <vuetable |
|
|
<!-- <vuetable |
|
@ -200,6 +192,15 @@ |
|
|
</b-row> |
|
|
</b-row> |
|
|
</div> |
|
|
</div> |
|
|
<!-- col --> |
|
|
<!-- col --> |
|
|
|
|
|
<div class="table"> |
|
|
|
|
|
<vuetable |
|
|
|
|
|
ref="vuetable" |
|
|
|
|
|
:api-mode="false" |
|
|
|
|
|
:data="localData" |
|
|
|
|
|
:fields="['message', 'timestamp', 'type', 'process_id', 'app_name']" |
|
|
|
|
|
> |
|
|
|
|
|
</vuetable> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<!-- row --> |
|
|
<!-- row --> |
|
|
</div> |
|
|
</div> |
|
@ -250,6 +251,43 @@ export default { |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
async getuser(token) { |
|
|
|
|
|
var data = await this.checktoken(token); |
|
|
|
|
|
console.log("User: " + data.user + " Token: " + data.token); |
|
|
|
|
|
this.$socket.client.emit("onevent", data.user); |
|
|
|
|
|
}, |
|
|
|
|
|
async checktoken(value) { |
|
|
|
|
|
try { |
|
|
|
|
|
var token = value; |
|
|
|
|
|
var pipelines = { |
|
|
|
|
|
source: "ssologin", |
|
|
|
|
|
}; |
|
|
|
|
|
var params = { |
|
|
|
|
|
pipeline: pipelines, |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var options = { |
|
|
|
|
|
headers: { |
|
|
|
|
|
"content-type": "application/x-www-form-urlencoded", |
|
|
|
|
|
Authorization: `Bearer ${token}`, |
|
|
|
|
|
}, |
|
|
|
|
|
}; |
|
|
|
|
|
var res = await axios.post( |
|
|
|
|
|
"https://api.swarmlab.io/istokenvalidsso", |
|
|
|
|
|
params, |
|
|
|
|
|
options |
|
|
|
|
|
); |
|
|
|
|
|
return res.data; |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
if ( |
|
|
|
|
|
e.message == "Request failed with status code 401" || |
|
|
|
|
|
/401/i.test(e.message) |
|
|
|
|
|
) { |
|
|
|
|
|
window.location.href = "https://api-login.swarmlab.io:8089"; |
|
|
|
|
|
} |
|
|
|
|
|
console.error(e); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
Hotlog() { |
|
|
Hotlog() { |
|
|
this.Clearlog(); |
|
|
this.Clearlog(); |
|
|
var restapi = "off"; |
|
|
var restapi = "off"; |
|
@ -392,12 +430,12 @@ export default { |
|
|
* == Socket subscribe |
|
|
* == Socket subscribe |
|
|
* |
|
|
* |
|
|
* [source,javascript] |
|
|
* [source,javascript] |
|
|
* ---- |
|
|
* ---- |
|
|
* ... |
|
|
* ... |
|
|
* }) |
|
|
* }) |
|
|
* sdfsf |
|
|
* sdfsf |
|
|
den to perni sdfsf |
|
|
den to perni sdfsf |
|
|
* ---- |
|
|
* ---- |
|
|
* <1> EventBus is used for parent/child component communication. |
|
|
* <1> EventBus is used for parent/child component communication. |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
@ -450,13 +488,16 @@ 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=8ee68923f567ad2fb5835f579c4d74f0cad6b1d1" |
|
|
"https://api-client.swarmlab.io:8088/?token=b2758b309c8aba70588987ebd0faa99beb412ff3" |
|
|
).searchParams.get("token"); |
|
|
).searchParams.get("token"); |
|
|
this.logintoken = logintoken; |
|
|
this.logintoken = logintoken; |
|
|
|
|
|
// === We get the user + check for the token if exists |
|
|
|
|
|
this.checktoken(this.logintoken); |
|
|
|
|
|
//console.log(" from created ", data); |
|
|
var log = store.dispatch("pipelineLLO/settoken", { |
|
|
var log = store.dispatch("pipelineLLO/settoken", { |
|
|
token: logintoken, |
|
|
token: logintoken, |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
this.socketopen(); |
|
|
this.socketopen(); |
|
|
//var tokentmp =store.getters['pipelineLLO/gettoken']; |
|
|
//var tokentmp =store.getters['pipelineLLO/gettoken']; |
|
|
//console.log("tokennnn "+tokentmp); |
|
|
//console.log("tokennnn "+tokentmp); |
|
@ -488,6 +529,8 @@ export default { |
|
|
this.issocket = "open"; |
|
|
this.issocket = "open"; |
|
|
// send to AdhocView |
|
|
// send to AdhocView |
|
|
this.$root.$emit("SERVER_socket_status", "on"); |
|
|
this.$root.$emit("SERVER_socket_status", "on"); |
|
|
|
|
|
//call to start on event logs |
|
|
|
|
|
this.getuser(logintoken); |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
|
* |
|
|
* |
|
@ -711,7 +754,7 @@ export default { |
|
|
|
|
|
|
|
|
<style> |
|
|
<style> |
|
|
.table { |
|
|
.table { |
|
|
overflow: scroll; |
|
|
/* overflow: scroll; */ |
|
|
max-height: 400px; |
|
|
max-height: 400px; |
|
|
} |
|
|
} |
|
|
.CodeMirror { |
|
|
.CodeMirror { |
|
|