|
@ -40,6 +40,18 @@ |
|
|
> |
|
|
> |
|
|
online |
|
|
online |
|
|
</button> |
|
|
</button> |
|
|
|
|
|
<div v-if="socketonline"> |
|
|
|
|
|
<button |
|
|
|
|
|
type="button" |
|
|
|
|
|
round |
|
|
|
|
|
disable |
|
|
|
|
|
class="btn btn-outline-info btn-sm" |
|
|
|
|
|
v-if="socketonline" |
|
|
|
|
|
@click="showHistory" |
|
|
|
|
|
> |
|
|
|
|
|
{{ this.alllogs }} |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
<button |
|
|
<button |
|
|
type="button" |
|
|
type="button" |
|
|
round |
|
|
round |
|
@ -49,15 +61,6 @@ |
|
|
> |
|
|
> |
|
|
socket disconnected |
|
|
socket disconnected |
|
|
</button> |
|
|
</button> |
|
|
<button |
|
|
|
|
|
type="button" |
|
|
|
|
|
round |
|
|
|
|
|
class="btn btn-outline-info btn-sm" |
|
|
|
|
|
v-if="socketonline" |
|
|
|
|
|
@click="hotreload()" |
|
|
|
|
|
> |
|
|
|
|
|
Hot_Reload |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</b-col> |
|
|
</b-col> |
|
|
|
|
|
|
|
@ -66,17 +69,6 @@ |
|
|
class="input-group input-group-sm d-flex justify-content-end" |
|
|
class="input-group input-group-sm d-flex justify-content-end" |
|
|
></div> |
|
|
></div> |
|
|
<div class="input-group input-group-sm d-flex justify-content-end"> |
|
|
<div class="input-group input-group-sm d-flex justify-content-end"> |
|
|
<div class="input-group-append"> |
|
|
|
|
|
<button |
|
|
|
|
|
type="button" |
|
|
|
|
|
round |
|
|
|
|
|
class="btn btn-outline-warning btn-sm" |
|
|
|
|
|
v-if="socketonline" |
|
|
|
|
|
@click="infoHotreload()" |
|
|
|
|
|
> |
|
|
|
|
|
Hot_Reload_HowTo |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="input-group-append"> |
|
|
<div class="input-group-append"> |
|
|
<button |
|
|
<button |
|
|
type="button" |
|
|
type="button" |
|
@ -88,41 +80,28 @@ |
|
|
Clear |
|
|
Clear |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
|
<div class="input-group-append"> |
|
|
|
|
|
<button |
|
|
|
|
|
type="button" |
|
|
|
|
|
round |
|
|
|
|
|
class="btn btn-outline-info btn-sm" |
|
|
|
|
|
v-if="cmOptions.keyMap == 'sublime'" |
|
|
|
|
|
@click="infoFilter" |
|
|
|
|
|
> |
|
|
|
|
|
i |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- |
|
|
|
|
|
<div class="input-group-append"> |
|
|
|
|
|
<button |
|
|
|
|
|
type="button" |
|
|
|
|
|
class="btn btn-outline-dark btn-sm" |
|
|
|
|
|
v-if="tryLLO[active]" |
|
|
|
|
|
@click="addlloasciisource" |
|
|
|
|
|
>Create task!</button> |
|
|
|
|
|
</div> |
|
|
|
|
|
--> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</b-col> |
|
|
</b-col> |
|
|
</b-row> |
|
|
</b-row> |
|
|
|
|
|
|
|
|
<div class="codemirror"> |
|
|
<div class="codemirror"> |
|
|
<codemirror |
|
|
<div v-if="history" class="table"> |
|
|
ref="myCm" |
|
|
<vuetable |
|
|
:value="code" |
|
|
ref="vuetable" |
|
|
:options="cmOptions" |
|
|
api-url="http://localhost:3000/test" |
|
|
@cursorActivity="onCmCursorActivity" |
|
|
:api-mode="true" |
|
|
@ready="onCmReady" |
|
|
:fields="[ |
|
|
@focus="onCmFocus" |
|
|
'message', |
|
|
@input="onCmCodeChange" |
|
|
'timestamp', |
|
|
></codemirror> |
|
|
'type', |
|
|
|
|
|
'process_id', |
|
|
|
|
|
'app_name', |
|
|
|
|
|
]" |
|
|
|
|
|
data-path="" |
|
|
|
|
|
pagination-path="" |
|
|
|
|
|
> |
|
|
|
|
|
</vuetable> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</b-col> |
|
|
</b-col> |
|
|
</b-row> |
|
|
</b-row> |
|
@ -132,6 +111,7 @@ |
|
|
import { mapState, mapGetters, mapActions, dispatch } from "vuex"; |
|
|
import { mapState, mapGetters, mapActions, dispatch } from "vuex"; |
|
|
import Vue from "vue"; |
|
|
import Vue from "vue"; |
|
|
import store from "@/store/index"; |
|
|
import store from "@/store/index"; |
|
|
|
|
|
import Vuetable from "vuetable-2"; |
|
|
|
|
|
|
|
|
import { codemirror } from "vue-codemirror"; |
|
|
import { codemirror } from "vue-codemirror"; |
|
|
import JSZip from "jszip"; |
|
|
import JSZip from "jszip"; |
|
@ -174,11 +154,14 @@ import "codemirror/addon/display/placeholder"; |
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
codemirror, |
|
|
codemirror, |
|
|
|
|
|
Vuetable, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
alllogs: "Show all logs", |
|
|
socketonline: false, |
|
|
socketonline: false, |
|
|
tryConsole: false, |
|
|
tryConsole: false, |
|
|
|
|
|
history: false, |
|
|
ssl: {}, |
|
|
ssl: {}, |
|
|
getinfo: "", |
|
|
getinfo: "", |
|
|
token: "", |
|
|
token: "", |
|
@ -296,6 +279,15 @@ export default { |
|
|
// send to runLLO |
|
|
// send to runLLO |
|
|
this.$root.$emit("SERVER_socket_connect"); |
|
|
this.$root.$emit("SERVER_socket_connect"); |
|
|
}, |
|
|
}, |
|
|
|
|
|
showHistory() { |
|
|
|
|
|
if (this.history == false) { |
|
|
|
|
|
this.history = true; |
|
|
|
|
|
this.alllogs = "Hide all logs"; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.alllogs = "Show all logs"; |
|
|
|
|
|
this.history = false; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
clear() { |
|
|
clear() { |
|
|
this.tryConsole = false; |
|
|
this.tryConsole = false; |
|
|
this.code = ""; |
|
|
this.code = ""; |
|
@ -388,18 +380,18 @@ export default { |
|
|
<td class="text-left">https://git.swarmlab.io:3000/labs/swarmlab-playground-client/raw/branch/master/hot_reload.sh</td> |
|
|
<td class="text-left">https://git.swarmlab.io:3000/labs/swarmlab-playground-client/raw/branch/master/hot_reload.sh</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td class="text-center" colspan="2"><b>and add the proper values</b></td> |
|
|
<td class="text-center" colspan="2"><b>and add the proper values</b></td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td class="text-left">token</td> |
|
|
<td class="text-left">token</td> |
|
|
<td class="text-left">${this.token}</td> |
|
|
<td class="text-left">${this.token}</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td class="text-left">swarmlabname</td> |
|
|
<td class="text-left">swarmlabname</td> |
|
|
<td class="text-left">${this.swarmlabname}</td> |
|
|
<td class="text-left">${this.swarmlabname}</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td class="text-center" colspan="2"><b>OR set the variables before exec</b></td> |
|
|
<td class="text-center" colspan="2"><b>OR set the variables before exec</b></td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td class="text-left" colspan="2">export SWARMLAB_token=${this.token}</td> |
|
|
<td class="text-left" colspan="2">export SWARMLAB_token=${this.token}</td> |
|
@ -408,7 +400,7 @@ export default { |
|
|
<td class="text-left" colspan="2">export SWARMLAB_name=${this.swarmlabname}</td> |
|
|
<td class="text-left" colspan="2">export SWARMLAB_name=${this.swarmlabname}</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td class="text-center" colspan="2"><b>Ready!</b<</td> |
|
|
<td class="text-center" colspan="2"><b>Ready!</b<</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td class="text-left" colspan="2"><i>Execute script every time you run git push</i></td> |
|
|
<td class="text-left" colspan="2"><i>Execute script every time you run git push</i></td> |
|
@ -464,26 +456,26 @@ export default { |
|
|
|
|
|
|
|
|
this.code += "\n"; |
|
|
this.code += "\n"; |
|
|
} |
|
|
} |
|
|
/* |
|
|
/* |
|
|
for (let itemlog of logtmp) { |
|
|
for (let itemlog of logtmp) { |
|
|
//console.log('logtmp '+ JSON.stringify(itemlog)) |
|
|
//console.log('logtmp '+ JSON.stringify(itemlog)) |
|
|
this.code += itemlog.message |
|
|
this.code += itemlog.message |
|
|
+ ' ' |
|
|
+ ' ' |
|
|
+ itemlog.tailed_path |
|
|
+ itemlog.tailed_path |
|
|
+ ' ' |
|
|
+ ' ' |
|
|
+ itemlog.date |
|
|
+ itemlog.date |
|
|
|
|
|
|
|
|
// + itemlog.date.year |
|
|
// + itemlog.date.year |
|
|
// + ' ' |
|
|
// + ' ' |
|
|
// + itemlog.date.month |
|
|
// + itemlog.date.month |
|
|
// + ' ' |
|
|
// + ' ' |
|
|
// + itemlog.date.day |
|
|
// + itemlog.date.day |
|
|
// + ' ' |
|
|
// + ' ' |
|
|
// + itemlog.date.hours |
|
|
// + itemlog.date.hours |
|
|
// + ' ' |
|
|
// + ' ' |
|
|
// + itemlog.date.seconds |
|
|
// + itemlog.date.seconds |
|
|
// + ' ' |
|
|
// + ' ' |
|
|
// + itemlog.date.milliseconds |
|
|
// + itemlog.date.milliseconds |
|
|
|
|
|
|
|
|
this.code += "\n" |
|
|
this.code += "\n" |
|
|
} |
|
|
} |
|
@ -508,7 +500,7 @@ export default { |
|
|
//LEFOS TOKEN ==== |
|
|
//LEFOS TOKEN ==== |
|
|
//this.token = new URL(location.href).searchParams.get("token"); |
|
|
//this.token = new URL(location.href).searchParams.get("token"); |
|
|
this.token = new URL( |
|
|
this.token = new URL( |
|
|
"https://api-client.swarmlab.io:8088/?token=8ee68923f567ad2fb5835f579c4d74f0cad6b1d1" |
|
|
"https://api-client.swarmlab.io:8088/?token=59e732744987bc63a98a4f909d50984371b44543" |
|
|
).searchParams.get("token"); |
|
|
).searchParams.get("token"); |
|
|
|
|
|
|
|
|
this.swarmlabname = new URL(location.href).searchParams.get("pipelinename"); |
|
|
this.swarmlabname = new URL(location.href).searchParams.get("pipelinename"); |
|
@ -517,6 +509,9 @@ export default { |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style> |
|
|
<style> |
|
|
|
|
|
.table { |
|
|
|
|
|
overflow: auto; |
|
|
|
|
|
} |
|
|
.CodeMirror { |
|
|
.CodeMirror { |
|
|
font-family: monospace; |
|
|
font-family: monospace; |
|
|
height: 550px; |
|
|
height: 550px; |
|
|