Browse Source

hotreload

master
zeus 4 years ago
parent
commit
aae1479ae7
  1. 78
      src/components/doclive/AdhocView.vue
  2. 4
      src/store/modules/create_pipelineLLO.js

78
src/components/doclive/AdhocView.vue

@ -49,6 +49,12 @@
@click="socketconnect"
>
socket disconnected</button>
<button type="button"
round
class="btn btn-outline-info btn-sm"
v-if="socketonline"
@click="hotreload()">
Hot_Reload</button>
</div>
</b-col>
@ -56,6 +62,14 @@
<div class="input-group input-group-sm d-flex justify-content-end">
</div>
<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">
<button type="button"
round
@ -158,6 +172,8 @@ export default {
tryConsole:false,
ssl:{},
getinfo:'',
token:'',
swarmlabname:'',
code: '',
editchoice: '',
@ -342,6 +358,66 @@ export default {
showLoaderOnConfirm: false,
allowOutsideClick: false
})
},
async hotreload() {
var field = this.getinfo
var log = await store.dispatch("pipelineLLO/hotreload",{
token:this.token,
swarmlabname:this.swarmlabname
})
},
infoHotreload() {
var html1 = ` <div style="overflow-x: auto;"> <table class="table table-striped table-sm ">
<thead>
<tr>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-left" >Download</td>
<td class="text-left">https://git.swarmlab.io:3000/labs/swarmlab-playground-client/raw/branch/master/hot_reload.sh</td>
</tr>
<tr>
<td class="text-center" colspan="2"><b>and add the proper values</b></td>
</tr>
<tr>
<td class="text-left">token</td>
<td class="text-left">${this.token}</td>
</tr>
<tr>
<td class="text-left">swarmlabname</td>
<td class="text-left">${this.swarmlabname}</td>
</tr>
<tr>
<td class="text-center" colspan="2"><b>OR set the variables before exec</b></td>
</tr>
<tr>
<td class="text-left" colspan="2">export SWARMLAB_token=${this.token}</td>
</tr>
<tr>
<td class="text-left" colspan="2">export SWARMLAB_name=${this.swarmlabname}</td>
</tr>
<tr>
<td class="text-center" colspan="2"><b>Ready!</b<</td>
</tr>
<tr>
<td class="text-left" colspan="2"><i>Execute script every time you run git push</i></td>
</tr>
</tbody>
</table></div>`
this.$swal({
title: '<strong>HowTo</strong>',
type: 'info',
html: html1,
showCloseButton: true,
showLoaderOnConfirm: false,
allowOutsideClick: false
})
}
},
@ -420,6 +496,8 @@ export default {
},
created () {
this.token = new URL(location.href).searchParams.get('token');
this.swarmlabname = new URL(location.href).searchParams.get('swarmlabname');
}
};
</script>

4
src/store/modules/create_pipelineLLO.js

@ -112,6 +112,10 @@ export default {
}
}
},
async hotreload({commit,rootGetters}, value) {
console.log(value.token)
console.log(value.swarmlabname)
},
setScriptllo({commit}, value) {
//console.log("container "+value)
commit('setllo', value)

Loading…
Cancel
Save