Browse Source

no console

master
zeus 4 years ago
parent
commit
0c1ea310ed
  1. 2
      dist/index.html
  2. 2
      dist/js/app.12eb2668.js
  3. 1
      dist/js/app.12eb2668.js.map
  4. 2
      dist/js/app.f941fdf7.js
  5. 1
      dist/js/app.f941fdf7.js.map
  6. 3
      src-local/llo/new.js
  7. 26
      src/App.vue
  8. 8
      src/components/manageservices/calendarview.vue
  9. 2
      src/components/manageservices/deploy-bootstrap.vue
  10. 22
      src/components/manageservices/join-service.vue
  11. 26
      src/components/manageservices/llo-search.vue
  12. 14
      src/components/manageservices/llo-view.vue
  13. 26
      src/components/manageservices/manage-service.vue
  14. 4
      src/components/manageservices/view-events.vue
  15. 12
      src/components/manageservices/view-service.vue
  16. 2
      src/components/mynetwork/AdhocView.vue
  17. 49
      src/components/mynetwork/availableservices.vue
  18. 4
      src/components/mynetwork/dockerservices.vue
  19. 26
      src/components/mynetwork/myconnect-server.vue
  20. 57
      src/components/mynetwork/mytable.vue
  21. 9
      src/components/myservices.vue
  22. 70
      src/store/modules/create_pipelineLLO.js

2
dist/index.html

@ -1 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.bbdfed0d.css" rel="preload" as="style"><link href="/css/chunk-vendors.e469b508.css" rel="preload" as="style"><link href="/js/app.12eb2668.js" rel="preload" as="script"><link href="/js/chunk-vendors.d8d18fe6.js" rel="preload" as="script"><link href="/css/chunk-vendors.e469b508.css" rel="stylesheet"><link href="/css/app.bbdfed0d.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.d8d18fe6.js"></script><script src="/js/app.12eb2668.js"></script></body></html> <!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Vue App</title><link href="/css/app.bbdfed0d.css" rel="preload" as="style"><link href="/css/chunk-vendors.e469b508.css" rel="preload" as="style"><link href="/js/app.f941fdf7.js" rel="preload" as="script"><link href="/js/chunk-vendors.d8d18fe6.js" rel="preload" as="script"><link href="/css/chunk-vendors.e469b508.css" rel="stylesheet"><link href="/css/app.bbdfed0d.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.d8d18fe6.js"></script><script src="/js/app.f941fdf7.js"></script></body></html>

2
dist/js/app.12eb2668.js

File diff suppressed because one or more lines are too long

1
dist/js/app.12eb2668.js.map

File diff suppressed because one or more lines are too long

2
dist/js/app.f941fdf7.js

File diff suppressed because one or more lines are too long

1
dist/js/app.f941fdf7.js.map

File diff suppressed because one or more lines are too long

3
src-local/llo/new.js

@ -1067,6 +1067,9 @@ TEST=${service}
var services_path = './instance/'+service var services_path = './instance/'+service
var ENV_service_dir = services_path+'/'+service var ENV_service_dir = services_path+'/'+service
var ENV_service_file_path = services_path+'/'+service+'/'.env var ENV_service_file_path = services_path+'/'+service+'/'.env
var nn = {}
nn.data = 'Wait for service(s) to be available before executing a command'
io.emit('message_out', nn);
if (fs.existsSync(services_path)) { if (fs.existsSync(services_path)) {
const git = simpleGit( const git = simpleGit(
{ {

26
src/App.vue

@ -33,7 +33,7 @@
<!-- --------------- socket connection --> <!-- --------------- socket connection -->
<b-nav-item <b-nav-item
@click="onAction('check')" @click="onAction('check')"
>Connection Status:</b-nav-item> >Check Connection Status:</b-nav-item>
<b-nav-item >Agent</b-nav-item> <b-nav-item >Agent</b-nav-item>
<!-- <!--
v-if="$socket.disconnected" v-if="$socket.disconnected"
@ -266,6 +266,7 @@
<!-- ------ hybrid manage services --------------- --> <!-- ------ hybrid manage services --------------- -->
<!-- ----------------------------------- --> <!-- ----------------------------------- -->
<manage-services <manage-services
:key="componentKeyreload"
v-if="hybridmenou == 'manage_service'" v-if="hybridmenou == 'manage_service'"
style="background-color: #f8f9fa" style="background-color: #f8f9fa"
> >
@ -290,6 +291,7 @@
<!-- ------ hybrid container --------------- --> <!-- ------ hybrid container --------------- -->
<!-- ----------------------------------- --> <!-- ----------------------------------- -->
<network-table <network-table
:key="componentKeyreload"
v-show="hybridmenou == 'bootstrap'" v-show="hybridmenou == 'bootstrap'"
style="background-color: #f8f9fa" style="background-color: #f8f9fa"
> >
@ -364,6 +366,7 @@ export default {
}, },
data() { data() {
return { return {
componentKeyreload:1,
setStatusAgent:'', setStatusAgent:'',
issocket:false, //socket server issocket:false, //socket server
isconnect:false, // dockerswarm wg isconnect:false, // dockerswarm wg
@ -411,14 +414,23 @@ export default {
showCloseButton: true, showCloseButton: true,
showLoaderOnConfirm: false, showLoaderOnConfirm: false,
allowOutsideClick: false, allowOutsideClick: false,
cancelButtonText: 'No, cancel!', //cancelButtonText: 'No, cancel!',
//showCancelButton: true, showCancelButton: true,
showLoaderOnConfirm: false, showLoaderOnConfirm: false,
//reverseButtons: true, //reverseButtons: true,
focusCancel: true focusCancel: true,
//confirmButtonText: 'Yes, Connect!' confirmButtonText: 'Yes, Reconnect!'
}).then((result)=> {
this.reconnenting(result);
}) })
} }
},
async reconnenting(result) {
if(result.value){
//console.log(JSON.stringify(result))
//window.location.reload()
this.componentKeyreload += 1
}
}, },
async serverstatus(action){ async serverstatus(action){
var log = store.getters['pipelineLLO/getstatus'] var log = store.getters['pipelineLLO/getstatus']
@ -440,7 +452,7 @@ export default {
}, },
hybrid(action) { hybrid(action) {
this.hybridmenou = action this.hybridmenou = action
console.log(action) //console.log(action)
if(action == 'bootstrap'){ if(action == 'bootstrap'){
this.$root.$emit('hybrid_refresh_dockerservices') this.$root.$emit('hybrid_refresh_dockerservices')
}else if(action == 'dashboard'){ }else if(action == 'dashboard'){
@ -480,7 +492,7 @@ export default {
}, },
watch: { watch: {
socketStatus(status) { socketStatus(status) {
console.log('watchok '+status) //console.log('watchok '+status)
this.issocket = status this.issocket = status
} }
} }

8
src/components/manageservices/calendarview.vue

@ -128,15 +128,13 @@ export default {
value1.end = this.enddate value1.end = this.enddate
var llo = await store.dispatch('pipelineLLO/getevents', value1) var llo = await store.dispatch('pipelineLLO/getevents', value1)
this.items = llo.data.result; this.items = llo.data.result;
console.log('events'+JSON.stringify(llo)) //console.log('events'+JSON.stringify(llo))
}, },
periodChanged(v) { periodChanged(v) {
// range, eventSource) { // range, eventSource) {
// Demo does nothing with this information, just including the method to demonstrate how // Demo does nothing with this information, just including the method to demonstrate how
// you can listen for changes to the displayed range and react to them (by loading items, etc.) // you can listen for changes to the displayed range and react to them (by loading items, etc.)
console.log(v) //console.log(v)
//console.log(v.periodStart)
//console.log(v.periodEnd)
let t = v.periodStart let t = v.periodStart
let bd_y = t.getFullYear() let bd_y = t.getFullYear()
@ -165,7 +163,7 @@ export default {
}, },
onClickItem(e) { onClickItem(e) {
this.message = `You clicked: ${e.title}` this.message = `You clicked: ${e.title}`
console.log(e) //console.log(e)
this.$root.$emit('hybrid_labobject_view',e) this.$root.$emit('hybrid_labobject_view',e)
}, },
setShowDate(d) { setShowDate(d) {

2
src/components/manageservices/deploy-bootstrap.vue

@ -514,7 +514,7 @@ export default {
async isValidate (event) { async isValidate (event) {
this.$nextTick(() => { this.$nextTick(() => {
//await this.isValid(event) //await this.isValid(event)
console.log("keywords value: " + this.deploy.image); //console.log("keywords value: " + this.deploy.image);
}); });
}, },
*/ */

22
src/components/manageservices/join-service.vue

@ -473,7 +473,7 @@ export default {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
this.token = url.searchParams.get("token"); this.token = url.searchParams.get("token");
console.log("token "+ this.token); //console.log("token "+ this.token);
}, },
beforeDestroy () { beforeDestroy () {
@ -498,9 +498,9 @@ export default {
var index = data.bootstrapnameid var index = data.bootstrapnameid
if(res1.data.data == 'yes'){ if(res1.data.data == 'yes'){
Vue.set(this.testactionrowindex, data.bootstrapnameid, index) Vue.set(this.testactionrowindex, data.bootstrapnameid, index)
console.log('res8 YES '+JSON.stringify(res1.data)) //console.log('res8 YES '+JSON.stringify(res1.data))
}else{ }else{
console.log('res8 NO '+JSON.stringify(res1.data)) //console.log('res8 NO '+JSON.stringify(res1.data))
Vue.delete(this.testactionrowindex, data.bootstrapnameid) Vue.delete(this.testactionrowindex, data.bootstrapnameid)
} }
//console.log('res8 all '+JSON.stringify(this.testactionrowindex)) //console.log('res8 all '+JSON.stringify(this.testactionrowindex))
@ -515,7 +515,7 @@ export default {
}else{ }else{
this.isstatus = false this.isstatus = false
} }
console.log('stack-start1 ' + JSON.stringify(this.CONFIG)) //console.log('stack-start1 ' + JSON.stringify(this.CONFIG))
//console.log('stack-start3 ' + JSON.stringify(logconfig1)) //console.log('stack-start3 ' + JSON.stringify(logconfig1))
if(action == 'stack-stop' ){ if(action == 'stack-stop' ){
var info='<h5>This will leave the stack with the name<b> '+ this.hybridshowdata.bootstrapstackname +'</b> </h5>' var info='<h5>This will leave the stack with the name<b> '+ this.hybridshowdata.bootstrapstackname +'</b> </h5>'
@ -538,9 +538,9 @@ export default {
}) })
}else if(action == 'stack-start' ){ }else if(action == 'stack-start' ){
console.log('stack-start') //console.log('stack-start')
if(this.isstatus == '1'){ if(this.isstatus == '1'){
console.log(this.isstatus) //console.log(this.isstatus)
var log = await store.dispatch("pipelineLLO/hybrid_join",{ var log = await store.dispatch("pipelineLLO/hybrid_join",{
token:this.token, token:this.token,
node:this.CONFIG.swarmlabid, node:this.CONFIG.swarmlabid,
@ -551,8 +551,8 @@ export default {
}else{ }else{
} }
}else if(action == 'service-info' ){ }else if(action == 'service-info' ){
console.log(JSON.stringify(action)) //console.log(JSON.stringify(action))
console.log('CONFIG '+JSON.stringify(this.hybridshowdata)) //console.log('CONFIG '+JSON.stringify(this.hybridshowdata))
var url = this.hybridshowdata.bootstrapurl var url = this.hybridshowdata.bootstrapurl
var info=`<h5>You will be redirected to the README page of the repository (OUTSIDE Swarmlab-Hybrid)<br> var info=`<h5>You will be redirected to the README page of the repository (OUTSIDE Swarmlab-Hybrid)<br>
<a href="${url}" target="new">click here to continue</a> <a href="${url}" target="new">click here to continue</a>
@ -578,7 +578,7 @@ export default {
}, },
async onActionHybrid_stackrm(action) { async onActionHybrid_stackrm(action) {
console.log(JSON.stringify(action)) //console.log(JSON.stringify(action))
if(action.isConfirmed){ if(action.isConfirmed){
if(this.isstatus == '1'){ if(this.isstatus == '1'){
var log = await store.dispatch("pipelineLLO/hybrid_leave",{ var log = await store.dispatch("pipelineLLO/hybrid_leave",{
@ -636,11 +636,11 @@ export default {
async onAction (action, data, index) { async onAction (action, data, index) {
this.actionrowindex = index this.actionrowindex = index
//this.$root.$emit('hybrid_show_info',data) //this.$root.$emit('hybrid_show_info',data)
console.log('index '+this.actionrowindex) //console.log('index '+this.actionrowindex)
if(action == 'view-item' ){ if(action == 'view-item' ){
}else if(action == 'run-more' ){ }else if(action == 'run-more' ){
this.hybridshowdata = data this.hybridshowdata = data
console.log('hybrid '+JSON.stringify(data)) //console.log('hybrid '+JSON.stringify(data))
}else if(action == 'delete-item' ){ }else if(action == 'delete-item' ){
this.$swal({ this.$swal({
type: 'info', type: 'info',

26
src/components/manageservices/llo-search.vue

@ -520,7 +520,7 @@ export default {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
this.token = url.searchParams.get("token"); this.token = url.searchParams.get("token");
console.log("token "+ this.token); //console.log("token "+ this.token);
}, },
beforeDestroy () { beforeDestroy () {
@ -539,7 +539,7 @@ export default {
methods: { methods: {
async getprogress(course){ async getprogress(course){
console.log('course '+course) //console.log('course '+course)
var value1 = {} var value1 = {}
value1.course = this.datadir value1.course = this.datadir
var llo = await store.dispatch('pipelineLLO/getprogress', value1) var llo = await store.dispatch('pipelineLLO/getprogress', value1)
@ -609,7 +609,7 @@ export default {
this.courseshow = true this.courseshow = true
if(coursetype == 'video' ){ if(coursetype == 'video' ){
console.log(JSON.stringify(course)) //console.log(JSON.stringify(course))
var value = {} var value = {}
value.type = coursetype value.type = coursetype
value.course = course.video_file value.course = course.video_file
@ -621,7 +621,7 @@ export default {
value1.file = course.doc_file value1.file = course.doc_file
//console.log('asciidoc '+JSON.stringify(value1)) //console.log('asciidoc '+JSON.stringify(value1))
var llo = await store.dispatch('pipelineLLO/get_llo_course_ascii', value1) var llo = await store.dispatch('pipelineLLO/get_llo_course_ascii', value1)
console.log('asciidoc '+JSON.stringify(llo)) //console.log('asciidoc '+JSON.stringify(llo))
//this.courses = JSON.parse(llo.data) //this.courses = JSON.parse(llo.data)
var value = {} var value = {}
value.type = coursetype value.type = coursetype
@ -630,7 +630,7 @@ export default {
value.llo = this.datadir value.llo = this.datadir
this.$root.$emit('hybrid_llo_viecourse',value) this.$root.$emit('hybrid_llo_viecourse',value)
}else if(coursetype == 'asciinema' ){ }else if(coursetype == 'asciinema' ){
console.log(JSON.stringify(course)) //console.log(JSON.stringify(course))
var value = {} var value = {}
value.type = coursetype value.type = coursetype
value.course = course.code_file value.course = course.code_file
@ -642,7 +642,7 @@ export default {
value1.file = course.exercise_file value1.file = course.exercise_file
//console.log('asciidoc '+JSON.stringify(value1)) //console.log('asciidoc '+JSON.stringify(value1))
var llo = await store.dispatch('pipelineLLO/get_llo_course_ascii', value1) var llo = await store.dispatch('pipelineLLO/get_llo_course_ascii', value1)
console.log('asciidoc '+JSON.stringify(llo)) //console.log('asciidoc '+JSON.stringify(llo))
//this.courses = JSON.parse(llo.data) //this.courses = JSON.parse(llo.data)
var value = {} var value = {}
value.type = 'asciidoc' value.type = 'asciidoc'
@ -656,7 +656,7 @@ export default {
value1.file = course.exercise_answerfile value1.file = course.exercise_answerfile
//console.log('asciidoc '+JSON.stringify(value1)) //console.log('asciidoc '+JSON.stringify(value1))
var llo = await store.dispatch('pipelineLLO/get_llo_course_ascii', value1) var llo = await store.dispatch('pipelineLLO/get_llo_course_ascii', value1)
console.log('asciidoc '+JSON.stringify(llo)) //console.log('asciidoc '+JSON.stringify(llo))
//this.courses = JSON.parse(llo.data) //this.courses = JSON.parse(llo.data)
var value = {} var value = {}
value.type = 'asciidoc' value.type = 'asciidoc'
@ -677,10 +677,10 @@ export default {
var llo = await store.dispatch('pipelineLLO/get_llo_course', data.dir) var llo = await store.dispatch('pipelineLLO/get_llo_course', data.dir)
this.courses = llo.data this.courses = llo.data
var countchapter = Math.max.apply(Math, this.courses.map(function(o){return o.chapter;})) var countchapter = Math.max.apply(Math, this.courses.map(function(o){return o.chapter;}))
console.log('countchapter '+ JSON.stringify(countchapter)) //console.log('countchapter '+ JSON.stringify(countchapter))
var coursesnew1 = [] var coursesnew1 = []
for(var i = 1; i <= countchapter; i++) { for(var i = 1; i <= countchapter; i++) {
console.log('count '+ JSON.stringify(i)) //console.log('count '+ JSON.stringify(i))
var coursesnew = {} var coursesnew = {}
var coursetmp = this.courses.filter(x => x.chapter === i); var coursetmp = this.courses.filter(x => x.chapter === i);
var countcourse1 = coursetmp.length var countcourse1 = coursetmp.length
@ -733,11 +733,11 @@ export default {
coursesnew1.push(coursesnew) coursesnew1.push(coursesnew)
} }
this.coursesview = coursesnew1 this.coursesview = coursesnew1
console.log('new '+JSON.stringify(coursesnew1)) //console.log('new '+JSON.stringify(coursesnew1))
//this.courses = JSON.parse(llo.data) //this.courses = JSON.parse(llo.data)
}else if(action == 'run-info' ){ }else if(action == 'run-info' ){
console.log(JSON.stringify(data)) //console.log(JSON.stringify(data))
// {"title":"linux","subtitle":"Basics","level":"Intermediate","desc":"description","dir":"hybrid-linux"} // {"title":"linux","subtitle":"Basics","level":"Intermediate","desc":"description","dir":"hybrid-linux"}
var info = ` var info = `
<table class="table table-hover table-sm text-left"> <table class="table table-hover table-sm text-left">
@ -808,10 +808,6 @@ export default {
//error2 "The access token provided has expired" join-service.vue:685 //error2 "The access token provided has expired" join-service.vue:685
//error2 "Unauthorized" join-service.vue:686 //error2 "Unauthorized" join-service.vue:686
//error2 401 //error2 401
console.log('error2 '+JSON.stringify(payload.response.data.error))
console.log('error2 '+JSON.stringify(payload.response.data.error_description))
console.log('error2 '+JSON.stringify(payload.response.statusText))
console.log('error2 '+JSON.stringify(payload.response.status))
*/ */
if(payload.response.status == '401'){ if(payload.response.status == '401'){
window.location.href = 'https://api-login.swarmlab.io:8089'; window.location.href = 'https://api-login.swarmlab.io:8089';

14
src/components/manageservices/llo-view.vue

@ -183,7 +183,7 @@ export default {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
this.token = url.searchParams.get("token"); this.token = url.searchParams.get("token");
console.log("token "+ this.token); //console.log("token "+ this.token);
}, },
beforeDestroy () { beforeDestroy () {
@ -219,12 +219,12 @@ export default {
this.$root.$emit('hybrid_progress_refresh') this.$root.$emit('hybrid_progress_refresh')
}, },
dofin() { dofin() {
console.log(" dofin ") //console.log(" dofin ")
this.$wait.end('myRunInstancetutor'); this.$wait.end('myRunInstancetutor');
}, },
async addlloascii() { async addlloascii() {
var value = this.asciidoccode var value = this.asciidoccode
console.log(" ascii code 2 "+JSON.stringify(this.code)) //console.log(" ascii code 2 "+JSON.stringify(this.code))
try{ try{
var asciidoctor1 = Asciidoctor() var asciidoctor1 = Asciidoctor()
@ -252,23 +252,23 @@ export default {
} }
}) // (2) }) // (2)
console.log(" ascii "+JSON.stringify(value_compiled)) //console.log(" ascii "+JSON.stringify(value_compiled))
var llosave = await store.dispatch('pipelineLLO/save_llo_asciidoctmp', value_compiled) var llosave = await store.dispatch('pipelineLLO/save_llo_asciidoctmp', value_compiled)
console.log('no write permission 1 '+ JSON.stringify(llosave)) //console.log('no write permission 1 '+ JSON.stringify(llosave))
if(llosave.data == 'nofile'){ if(llosave.data == 'nofile'){
console.log('no write permission') console.log('no write permission')
}else{ }else{
this.asciidocurl = `http://localhost:3080/asciidoc/${llosave.data.data}.html?token=${this.token}` this.asciidocurl = `http://localhost:3080/asciidoc/${llosave.data.data}.html?token=${this.token}`
console.log('no write permission 2 '+ JSON.stringify(this.asciidocurl)) //console.log('no write permission 2 '+ JSON.stringify(this.asciidocurl))
this.hybridshow = 'no' this.hybridshow = 'no'
this.hybridshow = this.vtype this.hybridshow = this.vtype
} }
}catch (ex) { }catch (ex) {
console.log(" ascerror "+JSON.stringify(ex)) //console.log(" ascerror "+JSON.stringify(ex))
return return
} }

26
src/components/manageservices/manage-service.vue

@ -416,7 +416,7 @@ export default {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
this.token = url.searchParams.get("token"); this.token = url.searchParams.get("token");
console.log("token "+ this.token); //console.log("token "+ this.token);
}, },
beforeDestroy () { beforeDestroy () {
@ -477,7 +477,7 @@ export default {
token:this.token, token:this.token,
action:'join' action:'join'
}) })
console.log(JSON.stringify(log1)) //console.log(JSON.stringify(log1))
if(action == 'edit' ){ if(action == 'edit' ){
this.nodeadmin = true this.nodeadmin = true
@ -488,16 +488,16 @@ export default {
this.noderole = data.role this.noderole = data.role
this.nodezones = data.zones this.nodezones = data.zones
this.nodedesc = data.description this.nodedesc = data.description
console.log(JSON.stringify(data)) //console.log(JSON.stringify(data))
console.log(JSON.stringify(index)) //console.log(JSON.stringify(index))
}else if(action == 'update' ){ }else if(action == 'update' ){
await this.$refs.provider.validate().then(success => { await this.$refs.provider.validate().then(success => {
if (success.valid) { if (success.valid) {
this.valid = true this.valid = true
console.log('valid '+JSON.stringify(success)) //console.log('valid '+JSON.stringify(success))
}else{ }else{
this.valid = false this.valid = false
console.log('no valid'+JSON.stringify(success)) //console.log('no valid'+JSON.stringify(success))
} }
}); });
if (this.valid) { if (this.valid) {
@ -544,10 +544,10 @@ export default {
await this.$refs.provider.validate().then(success => { await this.$refs.provider.validate().then(success => {
if (success.valid) { if (success.valid) {
this.valid = true this.valid = true
console.log('valid '+JSON.stringify(success)) //console.log('valid '+JSON.stringify(success))
}else{ }else{
this.valid = false this.valid = false
console.log('no valid'+JSON.stringify(success)) //console.log('no valid'+JSON.stringify(success))
} }
}); });
@ -565,7 +565,7 @@ export default {
nodedesc: this.nodedesc nodedesc: this.nodedesc
}) })
Vue.nextTick( () => this.$refs.vuetable.refresh()) Vue.nextTick( () => this.$refs.vuetable.refresh())
console.log(JSON.stringify(log)) //console.log(JSON.stringify(log))
} }
}else if(action == 'cancel' ){ }else if(action == 'cancel' ){
this.nodeadmin = false this.nodeadmin = false
@ -589,8 +589,8 @@ export default {
nodedesc: this.rowdata.description nodedesc: this.rowdata.description
}) })
Vue.nextTick( () => this.$refs.vuetable.refresh()) Vue.nextTick( () => this.$refs.vuetable.refresh())
console.log(JSON.stringify(result)) //console.log(JSON.stringify(result))
console.log('rowdara '+JSON.stringify(this.rowdata)) //console.log('rowdara '+JSON.stringify(this.rowdata))
} }
}, },
@ -627,10 +627,6 @@ export default {
//error2 "The access token provided has expired" join-service.vue:685 //error2 "The access token provided has expired" join-service.vue:685
//error2 "Unauthorized" join-service.vue:686 //error2 "Unauthorized" join-service.vue:686
//error2 401 //error2 401
console.log('error2 '+JSON.stringify(payload.response.data.error))
console.log('error2 '+JSON.stringify(payload.response.data.error_description))
console.log('error2 '+JSON.stringify(payload.response.statusText))
console.log('error2 '+JSON.stringify(payload.response.status))
*/ */
if(payload.response.status == '401'){ if(payload.response.status == '401'){
window.location.href = 'https://api-login.swarmlab.io:8089'; window.location.href = 'https://api-login.swarmlab.io:8089';

4
src/components/manageservices/view-events.vue

@ -100,14 +100,14 @@ export default {
this.$root.$on('hybrid_labobject_view', (v) => { this.$root.$on('hybrid_labobject_view', (v) => {
this.hybridshowlog=true this.hybridshowlog=true
this.labtext = v this.labtext = v
console.log('object ' +JSON.stringify(this.labtext)) //console.log('object ' +JSON.stringify(this.labtext))
}) })
}, },
created() { created() {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
this.token = url.searchParams.get("token"); this.token = url.searchParams.get("token");
console.log("token "+ this.token); //console.log("token "+ this.token);
}, },
beforeDestroy () { beforeDestroy () {

12
src/components/manageservices/view-service.vue

@ -421,7 +421,7 @@ export default {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
this.token = url.searchParams.get("token"); this.token = url.searchParams.get("token");
console.log("token "+ this.token); //console.log("token "+ this.token);
}, },
beforeDestroy () { beforeDestroy () {
@ -531,7 +531,7 @@ export default {
confirmButtonText: 'Ok!' confirmButtonText: 'Ok!'
}) })
console.log('stackid '+this.hybridshowdata.bootstrapnameid) //console.log('stackid '+this.hybridshowdata.bootstrapnameid)
} }
}, },
async onActionHybrid_stackrm(action) { async onActionHybrid_stackrm(action) {
@ -587,11 +587,11 @@ console.log('stackid '+this.hybridshowdata.bootstrapnameid)
async onAction (action, data, index) { async onAction (action, data, index) {
this.actionrowindex = index this.actionrowindex = index
//this.$root.$emit('hybrid_show_info',data) //this.$root.$emit('hybrid_show_info',data)
console.log('index '+this.actionrowindex) //console.log('index '+this.actionrowindex)
if(action == 'view-item' ){ if(action == 'view-item' ){
}else if(action == 'run-more' ){ }else if(action == 'run-more' ){
this.hybridshowdata = data this.hybridshowdata = data
console.log('hybrid '+JSON.stringify(data)) //console.log('hybrid '+JSON.stringify(data))
}else if(action == 'delete-item' ){ }else if(action == 'delete-item' ){
this.$swal({ this.$swal({
type: 'info', type: 'info',
@ -639,10 +639,6 @@ console.log('stackid '+this.hybridshowdata.bootstrapnameid)
//error2 "The access token provided has expired" join-service.vue:685 //error2 "The access token provided has expired" join-service.vue:685
//error2 "Unauthorized" join-service.vue:686 //error2 "Unauthorized" join-service.vue:686
//error2 401 //error2 401
console.log('error2 '+JSON.stringify(payload.response.data.error))
console.log('error2 '+JSON.stringify(payload.response.data.error_description))
console.log('error2 '+JSON.stringify(payload.response.statusText))
console.log('error2 '+JSON.stringify(payload.response.status))
*/ */
if(payload.response.status == '401'){ if(payload.response.status == '401'){
window.location.href = 'https://api-login.swarmlab.io:8089'; window.location.href = 'https://api-login.swarmlab.io:8089';

2
src/components/mynetwork/AdhocView.vue

@ -385,7 +385,7 @@ export default {
var extenderror = new RegExp('max depth exceeded'); var extenderror = new RegExp('max depth exceeded');
if(extenderror.test(log.data)){ if(extenderror.test(log.data)){
this.extenderror = true this.extenderror = true
console.log('find'); //console.log('find');
}else{ }else{
console.log('not find'); console.log('not find');
} }

49
src/components/mynetwork/availableservices.vue

@ -333,7 +333,7 @@ export default {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
this.token = url.searchParams.get("token"); this.token = url.searchParams.get("token");
console.log("token "+ this.token); //console.log("token "+ this.token);
}, },
beforeDestroy () { beforeDestroy () {
@ -374,33 +374,33 @@ export default {
obj.token = this.token obj.token = this.token
obj.instance = data.swarmlabname obj.instance = data.swarmlabname
var res1 = await store.dispatch('pipelineLLO/getservicesstatus', obj) var res1 = await store.dispatch('pipelineLLO/getservicesstatus', obj)
console.log('res8 all '+JSON.stringify(res1)) //console.log('res8 all '+JSON.stringify(res1))
if(res1.data.data == 'yes'){ if(res1.data.data == 'yes'){
Vue.set(this.testactionrowindex, data.swarmlabname, index) Vue.set(this.testactionrowindex, data.swarmlabname, index)
console.log('res8 YES '+JSON.stringify(res1.data)) //console.log('res8 YES '+JSON.stringify(res1.data))
}else{ }else{
console.log('res8 NO '+JSON.stringify(res1.data)) //console.log('res8 NO '+JSON.stringify(res1.data))
Vue.delete(this.testactionrowindex, data.swarmlabname) Vue.delete(this.testactionrowindex, data.swarmlabname)
} }
console.log('is set '+index) //console.log('is set '+index)
}else{ }else{
console.log('not set '+index) //console.log('not set '+index)
var obj = {} var obj = {}
obj.token = this.token obj.token = this.token
obj.instance = data.swarmlabname obj.instance = data.swarmlabname
var res = await store.dispatch('pipelineLLO/getservicesinfo', obj) var res = await store.dispatch('pipelineLLO/getservicesinfo', obj)
if(res.data.data == 'yes'){ if(res.data.data == 'yes'){
console.log('resi YES '+JSON.stringify(res)) //console.log('resi YES '+JSON.stringify(res))
Vue.set(this.testactionrowindex, index, index) Vue.set(this.testactionrowindex, index, index)
var res1 = await store.dispatch('pipelineLLO/getservicesstatus', obj) var res1 = await store.dispatch('pipelineLLO/getservicesstatus', obj)
console.log('res8 all '+JSON.stringify(res1)) //console.log('res8 all '+JSON.stringify(res1))
if(res1.data.data == 'yes'){ if(res1.data.data == 'yes'){
Vue.set(this.testactionrowindex, data.swarmlabname, index) Vue.set(this.testactionrowindex, data.swarmlabname, index)
console.log('res8 YES '+JSON.stringify(res1.data)) //console.log('res8 YES '+JSON.stringify(res1.data))
}else{ }else{
console.log('res8 NO '+JSON.stringify(res1.data)) //console.log('res8 NO '+JSON.stringify(res1.data))
Vue.delete(this.testactionrowindex, data.swarmlabname) Vue.delete(this.testactionrowindex, data.swarmlabname)
} }
//console.log('resiiiiiiii yes '+JSON.stringify(this.testactionrowindex[index])) //console.log('resiiiiiiii yes '+JSON.stringify(this.testactionrowindex[index]))
@ -472,14 +472,18 @@ export default {
focusCancel: true, focusCancel: true,
confirmButtonText: 'Yes, Delete it!' confirmButtonText: 'Yes, Delete it!'
}) })
Vue.nextTick( () => this.$refs.vuetable.refresh()) //Vue.nextTick( () => this.$refs.vuetable.refresh())
this.refreshVuetable()
}else if(action == 'rm-install' ){ }else if(action == 'rm-install' ){
this.hybridoptions.swarmlabname = data.swarmlabname this.hybridoptions.swarmlabname = data.swarmlabname
this.$wait.start('myRunInstancetutor'); this.$wait.start('myRunInstancetutor');
var res = await store.dispatch('pipelineLLO/rmswarmlablocal', this.hybridoptions.swarmlabname) var res = await store.dispatch('pipelineLLO/rmswarmlablocal', this.hybridoptions.swarmlabname)
this.$wait.end('myRunInstancetutor'); this.$wait.end('myRunInstancetutor');
Vue.nextTick( () => this.$refs.vuetable.refresh()) //Vue.nextTick( () => this.$refs.vuetable.refresh())
console.log('inf res '+ JSON.stringify(res)) Vue.delete(this.testactionrowindex, data.swarmlabname)
this.refreshVuetable()
this.$root.$emit('hybrid_refresh_info_deploy_local')
//console.log('inf res '+ JSON.stringify(res))
}else if(action == 'run-install' ){ }else if(action == 'run-install' ){
this.$wait.start('myRunInstancetutor'); this.$wait.start('myRunInstancetutor');
this.hybridoptions.swarmlabname = data.swarmlabname this.hybridoptions.swarmlabname = data.swarmlabname
@ -492,10 +496,12 @@ export default {
var res = await store.dispatch('pipelineLLO/getswarmlabinfo', value.swarmlabname) var res = await store.dispatch('pipelineLLO/getswarmlabinfo', value.swarmlabname)
var swarmlab1info=res.data.swarmlabinfo var swarmlab1info=res.data.swarmlabinfo
value.git = swarmlab1info value.git = swarmlab1info
console.log('inf git 1 '+ JSON.stringify(swarmlab1info)) //console.log('inf git 1 '+ JSON.stringify(swarmlab1info))
console.log('inf '+ JSON.stringify(value)) //console.log('inf '+ JSON.stringify(value))
this.$root.$emit('hybrid_install_instance', value) this.$root.$emit('hybrid_install_instance', value)
this.$wait.end('myRunInstancetutor'); this.$wait.end('myRunInstancetutor');
//Vue.nextTick( () => this.$refs.vuetable.refresh())
this.refreshVuetable()
}else if(action == 'run-item' ){ }else if(action == 'run-item' ){
this.viewhybridoptions = true this.viewhybridoptions = true
@ -508,6 +514,7 @@ export default {
Vue.set(this.testactionrowindex, data.swarmlabname, index) Vue.set(this.testactionrowindex, data.swarmlabname, index)
Vue.nextTick( () => this.$refs.vuetable.refresh()) Vue.nextTick( () => this.$refs.vuetable.refresh())
*/ */
Vue.nextTick( () => this.$refs.vuetable.refresh())
}else if(action == 'down-item' ){ }else if(action == 'down-item' ){
this.hybridoptions.swarmlabname = data.swarmlabname this.hybridoptions.swarmlabname = data.swarmlabname
this.hybridoptions.index = index this.hybridoptions.index = index
@ -528,14 +535,15 @@ export default {
this.rmAndClose(result); this.rmAndClose(result);
}) })
console.log('RUN 1 '+ JSON.stringify(data.swarmlabname)) //console.log('RUN 1 '+ JSON.stringify(data.swarmlabname))
Vue.nextTick( () => this.$refs.vuetable.refresh())
} }
}, },
async rmAndClose(result){ async rmAndClose(result){
console.log('value 1 '+ JSON.stringify(result)) //console.log('value 1 '+ JSON.stringify(result))
console.log('value 1 '+ JSON.stringify(this.hybridoptions)) //console.log('value 1 '+ JSON.stringify(this.hybridoptions))
if (result.isConfirmed) { if (result.isConfirmed) {
console.log('yes') //console.log('yes')
// run on mytable.vue // run on mytable.vue
var value = this.hybridoptions.swarmlabname var value = this.hybridoptions.swarmlabname
this.$root.$emit('hybrid_stop_instance', value) this.$root.$emit('hybrid_stop_instance', value)
@ -544,9 +552,10 @@ export default {
}else { }else {
console.log('no') console.log('no')
} }
this.refreshVuetable()
}, },
async setHybridoptions(){ async setHybridoptions(){
console.log(JSON.stringify(this.hybridoptions)) //console.log(JSON.stringify(this.hybridoptions))
//console.log('RUN 1 '+ JSON.stringify(data.swarmlabname)) //console.log('RUN 1 '+ JSON.stringify(data.swarmlabname))
// run on mytable.vue // run on mytable.vue

4
src/components/mynetwork/dockerservices.vue

@ -251,7 +251,7 @@ export default {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
this.token = url.searchParams.get("token"); this.token = url.searchParams.get("token");
console.log("token "+ this.token); //console.log("token "+ this.token);
}, },
beforeDestroy () { beforeDestroy () {
@ -319,7 +319,7 @@ export default {
async onAction (action, data, index) { async onAction (action, data, index) {
this.actionrowindex = index this.actionrowindex = index
this.$root.$emit('hybrid_show_info',data) this.$root.$emit('hybrid_show_info',data)
console.log('index '+this.actionrowindex) //console.log('index '+this.actionrowindex)
if(action == 'view-item' ){ if(action == 'view-item' ){
}else if(action == 'delete-item' ){ }else if(action == 'delete-item' ){
this.$swal({ this.$swal({

26
src/components/mynetwork/myconnect-server.vue

@ -171,7 +171,7 @@ export default {
mounted() { mounted() {
// from mytable.vue and socket // from mytable.vue and socket
this.$root.$on('hybrid_connect_server_view', (value) => { this.$root.$on('hybrid_connect_server_view', (value) => {
console.log('from mytable' + JSON.stringify(value)) //console.log('from mytable' + JSON.stringify(value))
this.CONFIG.status = value.status this.CONFIG.status = value.status
this.CONFIG.workerkey = value.workerkey this.CONFIG.workerkey = value.workerkey
this.CONFIG.swarmlab_public_wgkey = value.swarmlab_public_wgkey this.CONFIG.swarmlab_public_wgkey = value.swarmlab_public_wgkey
@ -196,7 +196,7 @@ export default {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
this.token = url.searchParams.get("token"); this.token = url.searchParams.get("token");
console.log("token "+ this.token); //console.log("token "+ this.token);
}, },
beforeDestroy () { beforeDestroy () {
@ -210,7 +210,7 @@ export default {
methods: { methods: {
async serverstatus(action){ async serverstatus(action){
var log = store.getters['pipelineLLO/getstatus'] var log = store.getters['pipelineLLO/getstatus']
console.log('status log ' + JSON.stringify(log)) //console.log('status log ' + JSON.stringify(log))
//{"data":{"swarmlab":"active","hybrid":"Online"}} //{"data":{"swarmlab":"active","hybrid":"Online"}}
if(log.data.swarmlab == 'active' && log.data.hybrid == 'Online'){ if(log.data.swarmlab == 'active' && log.data.hybrid == 'Online'){
this.isstatus=true this.isstatus=true
@ -228,7 +228,7 @@ export default {
var log = await store.dispatch("pipelineLLO/swarmlabhybridconfig",{ var log = await store.dispatch("pipelineLLO/swarmlabhybridconfig",{
token:this.token token:this.token
}) })
console.log('settings ' + JSON.stringify(log)) //console.log('settings ' + JSON.stringify(log))
@ -247,16 +247,16 @@ export default {
}else if(this.CONFIG.status == 'off'){ }else if(this.CONFIG.status == 'off'){
this.isstatus = false this.isstatus = false
} }
console.log('swarm ' + JSON.stringify(log.data.data.workerkey)) //console.log('swarm ' + JSON.stringify(log.data.data.workerkey))
console.log('start ' + JSON.stringify('load')) //console.log('start ' + JSON.stringify('load'))
this.onAction('save') this.onAction('save')
}else if(action == 'connect'){ }else if(action == 'connect'){
console.log('start ' + JSON.stringify('connect')) //console.log('start ' + JSON.stringify('connect'))
var log = await store.dispatch("pipelineLLO/get_config",{ var log = await store.dispatch("pipelineLLO/get_config",{
token:this.token token:this.token
}) })
console.log('pwd ' + JSON.stringify(log)) //console.log('pwd ' + JSON.stringify(log))
this.isconnect = true this.isconnect = true
var winfopath = log.data.data var winfopath = log.data.data
@ -283,14 +283,14 @@ export default {
token:this.token, token:this.token,
value:this.CONFIG value:this.CONFIG
}) })
console.log('start ' + JSON.stringify(log)) //console.log('start ' + JSON.stringify(log))
console.log('start ' + JSON.stringify('createkey')) //console.log('start ' + JSON.stringify('createkey'))
}else if(action == 'disconnect'){ }else if(action == 'disconnect'){
console.log('start ' + JSON.stringify('disconnect')) //console.log('start ' + JSON.stringify('disconnect'))
var log = await store.dispatch("pipelineLLO/get_config",{ var log = await store.dispatch("pipelineLLO/get_config",{
token:this.token token:this.token
}) })
console.log('pwd ' + JSON.stringify(log)) //console.log('pwd ' + JSON.stringify(log))
var winfopath = log.data.data var winfopath = log.data.data
if(log.data.error_msg = 'ok'){ if(log.data.error_msg = 'ok'){
@ -312,7 +312,7 @@ export default {
focusCancel: true focusCancel: true
}) })
} else if(action == 'register'){ } else if(action == 'register'){
console.log('start ' + JSON.stringify('register')) //console.log('start ' + JSON.stringify('register'))
//var log = await store.dispatch("pipelineLLO/get_config",{ //var log = await store.dispatch("pipelineLLO/get_config",{
// token:this.token // token:this.token
//}) //})

57
src/components/mynetwork/mytable.vue

@ -188,13 +188,13 @@ export default {
beforeMount () { beforeMount () {
this.socketopen(); this.socketopen();
this.socketauthenticate() this.socketauthenticate()
console.log('send') //console.log('send')
}, },
mounted() { mounted() {
this.$root.$on('hybrid_show_info', (data) => { this.$root.$on('hybrid_show_info', (data) => {
this.$nextTick(function () { this.$nextTick(function () {
this.hybridshowdata = data this.hybridshowdata = data
console.log(JSON.stringify(this.hybridshowdata)) //console.log(JSON.stringify(this.hybridshowdata))
}) })
}) })
// from available services socket run here // from available services socket run here
@ -206,7 +206,7 @@ export default {
if(data.port){ if(data.port){
this.swarmlabname_port = data.port this.swarmlabname_port = data.port
} }
console.log('RUN exec '+JSON.stringify(this.swarmlabname)) //console.log('RUN exec '+JSON.stringify(this.swarmlabname))
this.onAction('start') this.onAction('start')
}) })
// from available services socket run here // from available services socket run here
@ -224,7 +224,7 @@ export default {
// from available services socket run here // from available services socket run here
this.$root.$on('hybrid_stop_instance', (data) => { this.$root.$on('hybrid_stop_instance', (data) => {
this.swarmlabname = data this.swarmlabname = data
console.log('RUN exec '+JSON.stringify(this.swarmlabname)) //console.log('RUN exec '+JSON.stringify(this.swarmlabname))
this.onAction('stop') this.onAction('stop')
}) })
}, },
@ -232,7 +232,7 @@ export default {
var url_string = window.location.href var url_string = window.location.href
var url = new URL(url_string); var url = new URL(url_string);
this.token = url.searchParams.get("token"); this.token = url.searchParams.get("token");
console.log("token "+ this.token); //console.log("token "+ this.token);
var log = store.dispatch("pipelineLLO/settoken",{ var log = store.dispatch("pipelineLLO/settoken",{
token:this.token token:this.token
}) })
@ -270,7 +270,7 @@ export default {
//this.$socket.client.emit('start', this.swarmlabname); //this.$socket.client.emit('start', this.swarmlabname);
this.$socket.client.emit('start', obj); this.$socket.client.emit('start', obj);
//console.log('start ' + JSON.stringify(log)) //console.log('start ' + JSON.stringify(log))
console.log('startobj ' + JSON.stringify(obj)) //console.log('startobj ' + JSON.stringify(obj))
//console.log(this.$socket.client.connect()) //console.log(this.$socket.client.connect())
}else if(action == 'container-connect'){ }else if(action == 'container-connect'){
var log = await store.dispatch("pipelineLLO/getmountinfo",{ var log = await store.dispatch("pipelineLLO/getmountinfo",{
@ -286,7 +286,7 @@ export default {
var container_user_swarmlab = 'docker' var container_user_swarmlab = 'docker'
} }
console.log('log ' + JSON.stringify(log)) //console.log('log ' + JSON.stringify(log))
//var Localpath = JSON.parse(log.data.test) //var Localpath = JSON.parse(log.data.test)
var info=`<h5>You can connect to the same contained process multiple times simultaneously, from different sessions on the Docker host.<br> var info=`<h5>You can connect to the same contained process multiple times simultaneously, from different sessions on the Docker host.<br>
<br> <br>
@ -308,7 +308,7 @@ info +='<tr><td><b>Local</b></td><td><i>Container</i></td></tr>'
var datajson = log.data.test[0] var datajson = log.data.test[0]
for(var i = 0; i < datajson.length; i++) { for(var i = 0; i < datajson.length; i++) {
console.log('test1 '+JSON.stringify(datajson[i])) //console.log('test1 '+JSON.stringify(datajson[i]))
if(datajson[i].Type == 'bind'){ if(datajson[i].Type == 'bind'){
info +='<tr><td><b>'+datajson[i].Source+' </b></td><td><i>' + datajson[i].Destination+' </i></td></tr>' info +='<tr><td><b>'+datajson[i].Source+' </b></td><td><i>' + datajson[i].Destination+' </i></td></tr>'
} }
@ -383,7 +383,7 @@ info +='</h5><br>'
sockets: { sockets: {
connect() { connect() {
//this.$socket.client.emit('authenticate', this.token); //this.$socket.client.emit('authenticate', this.token);
console.log('socket connected '+ 'socketdatasend' ) //console.log('socket connected '+ 'socketdatasend' )
this.issocket = 'open'; this.issocket = 'open';
var log = store.dispatch("pipelineLLO/setsocketStatus",{ var log = store.dispatch("pipelineLLO/setsocketStatus",{
status:'open' status:'open'
@ -395,7 +395,7 @@ info +='</h5><br>'
* *
*/ */
error(error) { error(error) {
console.log("socket error "+JSON.stringify(error)) //console.log("socket error "+JSON.stringify(error))
this.issocket = 'close' this.issocket = 'close'
var log = store.dispatch("pipelineLLO/setsocketStatus",{ var log = store.dispatch("pipelineLLO/setsocketStatus",{
status:'close' status:'close'
@ -407,7 +407,7 @@ info +='</h5><br>'
* *
*/ */
connect_error(error) { connect_error(error) {
console.log("socket connect_error "+JSON.stringify(error)) //console.log("socket connect_error "+JSON.stringify(error))
this.issocket = 'close' this.issocket = 'close'
var log = store.dispatch("pipelineLLO/setsocketStatus",{ var log = store.dispatch("pipelineLLO/setsocketStatus",{
status:'close' status:'close'
@ -421,7 +421,7 @@ info +='</h5><br>'
* *
*/ */
disconnect(reason) { disconnect(reason) {
console.log("socket disconnect "+JSON.stringify(reason)) //console.log("socket disconnect "+JSON.stringify(reason))
this.issocket = 'close' this.issocket = 'close'
var log = store.dispatch("pipelineLLO/setsocketStatus",{ var log = store.dispatch("pipelineLLO/setsocketStatus",{
status:'close' status:'close'
@ -434,7 +434,7 @@ info +='</h5><br>'
* *
*/ */
connect_timeout(reason) { connect_timeout(reason) {
console.log("socket timeout "+JSON.stringify(reason)) //console.log("socket timeout "+JSON.stringify(reason))
this.issocket = 'close' this.issocket = 'close'
var log = store.dispatch("pipelineLLO/setsocketStatus",{ var log = store.dispatch("pipelineLLO/setsocketStatus",{
status:'close' status:'close'
@ -447,7 +447,7 @@ info +='</h5><br>'
* *
*/ */
reconnect(attemptNumber) { reconnect(attemptNumber) {
console.log("socket reconnect attemptNumber "+JSON.stringify(attemptNumber)) //console.log("socket reconnect attemptNumber "+JSON.stringify(attemptNumber))
this.socketreconnect() this.socketreconnect()
}, },
/** /**
@ -456,7 +456,7 @@ info +='</h5><br>'
* *
*/ */
reconnect_attempt(attemptNumber) { reconnect_attempt(attemptNumber) {
console.log("socket reconnect_attempt "+JSON.stringify(attemptNumber)) //console.log("socket reconnect_attempt "+JSON.stringify(attemptNumber))
this.socketreconnect() this.socketreconnect()
}, },
/** /**
@ -465,7 +465,7 @@ info +='</h5><br>'
* *
*/ */
reconnecting(attemptNumber) { reconnecting(attemptNumber) {
console.log("socket reconnecting "+JSON.stringify(attemptNumber)) //console.log("socket reconnecting "+JSON.stringify(attemptNumber))
this.socketreconnect() this.socketreconnect()
}, },
/** /**
@ -474,7 +474,7 @@ info +='</h5><br>'
* *
*/ */
reconnect_error(error) { reconnect_error(error) {
console.log("socket reconnect_error "+JSON.stringify(error)) //console.log("socket reconnect_error "+JSON.stringify(error))
this.issocket = 'close' this.issocket = 'close'
var log = store.dispatch("pipelineLLO/setsocketStatus",{ var log = store.dispatch("pipelineLLO/setsocketStatus",{
status:'close' status:'close'
@ -487,7 +487,7 @@ info +='</h5><br>'
* *
*/ */
unauthorized(val) { unauthorized(val) {
console.log("socket unauthorized "+JSON.stringify(val)) //console.log("socket unauthorized "+JSON.stringify(val))
this.issocket = 'close' this.issocket = 'close'
var log = store.dispatch("pipelineLLO/setsocketStatus",{ var log = store.dispatch("pipelineLLO/setsocketStatus",{
status:'close' status:'close'
@ -499,7 +499,7 @@ info +='</h5><br>'
* *
*/ */
socket_id_emit(val) { socket_id_emit(val) {
console.log("socket id from server "+JSON.stringify(val)) //console.log("socket id from server "+JSON.stringify(val))
this.issocket = 'open' this.issocket = 'open'
var log = store.dispatch("pipelineLLO/setsocketStatus",{ var log = store.dispatch("pipelineLLO/setsocketStatus",{
status:'open' status:'open'
@ -512,7 +512,7 @@ info +='</h5><br>'
*/ */
/* /*
async adhocEmit(val) { async adhocEmit(val) {
console.log("socket from server "+JSON.stringify(val)) //console.log("socket from server "+JSON.stringify(val))
this.issocket = 'open' this.issocket = 'open'
//this.$wait.start('myRunInstance1'); //this.$wait.start('myRunInstance1');
// render begin // render begin
@ -535,14 +535,14 @@ info +='</h5><br>'
divascii.innerHTML = mydinfunction divascii.innerHTML = mydinfunction
this.addtask(divascii); this.addtask(divascii);
}catch (ex) { }catch (ex) {
console.log(" logi error1 "+JSON.stringify(ex)) //console.log(" logi error1 "+JSON.stringify(ex))
return return
} }
//this.$wait.end('myRunInstance1'); //this.$wait.end('myRunInstance1');
}, },
*/ */
async logdata(val) { async logdata(val) {
console.log(" socket from logdata "+JSON.stringify(val)) //console.log(" socket from logdata "+JSON.stringify(val))
// ------------------------------------- // -------------------------------------
// Save store // Save store
// ------------------------------------- // -------------------------------------
@ -569,13 +569,12 @@ info +='</h5><br>'
}, },
async message(val) { async message(val) {
console.log(" socket message "+JSON.stringify(val)) //console.log(" socket message "+JSON.stringify(val))
}, },
async message_config(value) { async message_config(value) {
// server-config {"file":"ok","data":"{\"status\":\"on\",\"privatekey\":\"wLIMh+7NjGmryQB/zqXTpc1m0SwcqE0KuiI/nMgJYHs=\",\"publickey\":\"IpeD6JISIjUn1qjr1ga8I+mGaaEABgBZV+D/iI/pu2E=\",\"server_ip\":\"83.212.77.133:51820\",\"workerkey\":\"SWMTKN-1-3099nls9my5ns1s0mnmwkx41mhpawl80hwjjbskbll7nghqhgn-asu68y4lhd1qlbpxr6oosk6wl\",\"swarmlab_public_wgkey\":\"yMTjzSFQloNH22v+sN9k4cIaOUujq/m+vB2HJdJM7GI=\",\"wg_port\":\"51820\",\"allowed_ips\":\"10.13.13.0/16, 0.0.0.0/0, ::/0\"}"}
value.data = JSON.parse(value.data); value.data = JSON.parse(value.data);
if(value.file == 'ok'){ if(value.file == 'ok'){
console.log('server-value-file-ok ' + JSON.stringify(value.data.status)) //console.log('server-value-file-ok ' + JSON.stringify(value.data.status))
this.CONFIG.status = value.data.status this.CONFIG.status = value.data.status
this.CONFIG.workerkey = value.data.workerkey this.CONFIG.workerkey = value.data.workerkey
this.CONFIG.swarmlab_public_wgkey = value.data.swarmlab_public_wgkey this.CONFIG.swarmlab_public_wgkey = value.data.swarmlab_public_wgkey
@ -600,12 +599,12 @@ info +='</h5><br>'
this.CONFIG.publickey = '' this.CONFIG.publickey = ''
} }
// send to myconnect-server.vue // send to myconnect-server.vue
console.log('server-config ' + JSON.stringify(this.CONFIG)) //console.log('server-config ' + JSON.stringify(this.CONFIG))
store.dispatch("pipelineLLO/addconfig",this.CONFIG) store.dispatch("pipelineLLO/addconfig",this.CONFIG)
this.$root.$emit('hybrid_connect_server_view', this.CONFIG) this.$root.$emit('hybrid_connect_server_view', this.CONFIG)
}, },
async message_out(val) { async message_out(val) {
console.log(" socket out "+JSON.stringify(val)) //console.log(" socket out "+JSON.stringify(val))
this.$root.$emit('hybrid_log_in',val) this.$root.$emit('hybrid_log_in',val)
// refresh adhocview.vue on console await // refresh adhocview.vue on console await
this.$root.$emit('SERVER_hybrid_table_start') this.$root.$emit('SERVER_hybrid_table_start')
@ -613,11 +612,11 @@ info +='</h5><br>'
this.hybridshowdata = {} this.hybridshowdata = {}
}, },
async message_err(val) { async message_err(val) {
console.log(" socket err "+JSON.stringify(val)) //console.log(" socket err "+JSON.stringify(val))
this.$root.$emit('hybrid_log_in',val) this.$root.$emit('hybrid_log_in',val)
}, },
async message_close(val) { async message_close(val) {
console.log(" socket close "+JSON.stringify(val)) //console.log(" socket close "+JSON.stringify(val))
this.$root.$emit('hybrid_log_in',val) this.$root.$emit('hybrid_log_in',val)
// refresh table availableservices // refresh table availableservices
this.$root.$emit('hybrid_refresh_table') this.$root.$emit('hybrid_refresh_table')

9
src/components/myservices.vue

@ -9,7 +9,9 @@
</view-network> </view-network>
--> -->
<available-services> <available-services
:key="componentKeyreloadservice"
>
</available-services> </available-services>
</div> </div>
@ -42,14 +44,19 @@ export default {
}, },
data () { data () {
return { return {
componentKeyreloadservice:1,
loading: false, loading: false,
consoleView: 'off', consoleView: 'off',
productIndex: 1 productIndex: 1
} }
}, },
mounted() { mounted() {
this.$root.$on('hybrid_refresh_info_deploy_local', () => {
this.componentKeyreloadservice += 1
})
}, },
beforeDestroy () { beforeDestroy () {
this.$root.$off('hybrid_refresh_info_deploy_local')
}, },

70
src/store/modules/create_pipelineLLO.js

@ -83,7 +83,7 @@ export default {
commit('set_status', value.status) commit('set_status', value.status)
}, },
async swarmlabstart({commit,rootGetters}, value) { async swarmlabstart({commit,rootGetters}, value) {
console.log('from '+JSON.stringify(value)) //console.log('from '+JSON.stringify(value))
try { try {
var token = value.token var token = value.token
var params = { var params = {
@ -97,7 +97,7 @@ export default {
//var p = await axios.post('http://localhost:8084/run',params,options); //var p = await axios.post('http://localhost:8084/run',params,options);
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
//console.log('error '+JSON.stringify(e)) //console.log('error '+JSON.stringify(e))
@ -128,12 +128,12 @@ export default {
var p = await axios.post('https://api.swarmlab.io/completiontracking',params,options); var p = await axios.post('https://api.swarmlab.io/completiontracking',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
@ -163,7 +163,7 @@ export default {
return info return info
} catch (e) { } catch (e) {
console.error(e); //console.error(e);
if(e.error == "invalid_token"){ if(e.error == "invalid_token"){
window.location.href = 'https://api-login.swarmlab.io:8089'; window.location.href = 'https://api-login.swarmlab.io:8089';
} }
@ -185,7 +185,7 @@ export default {
return info return info
} catch (e) { } catch (e) {
console.error(e); //console.error(e);
if(e.error == "invalid_token"){ if(e.error == "invalid_token"){
window.location.href = 'https://api-login.swarmlab.io:8089'; window.location.href = 'https://api-login.swarmlab.io:8089';
} }
@ -206,7 +206,7 @@ export default {
return info return info
} catch (e) { } catch (e) {
console.error(e); //console.error(e);
if(e.error == "invalid_token"){ if(e.error == "invalid_token"){
window.location.href = 'https://api-login.swarmlab.io:8089'; window.location.href = 'https://api-login.swarmlab.io:8089';
} }
@ -230,12 +230,12 @@ export default {
var p = await axios.post('https://api.swarmlab.io/swarmlabhybridadd',params,options); var p = await axios.post('https://api.swarmlab.io/swarmlabhybridadd',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
//console.log('error '+JSON.stringify(e)) //console.log('error '+JSON.stringify(e))
@ -267,12 +267,12 @@ export default {
var p = await axios.post('https://api.swarmlab.io/swarmlabhybridrm',params,options); var p = await axios.post('https://api.swarmlab.io/swarmlabhybridrm',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
//console.log('error '+JSON.stringify(e)) //console.log('error '+JSON.stringify(e))
@ -287,7 +287,7 @@ export default {
} }
}, },
async getmountinfo({commit,rootGetters}, value) { async getmountinfo({commit,rootGetters}, value) {
console.log('value '+JSON.stringify(value)) //console.log('value '+JSON.stringify(value))
try { try {
var token = value.token var token = value.token
var params = { var params = {
@ -318,7 +318,7 @@ export default {
} }
}, },
async getservicesinfo({commit,rootGetters}, value) { async getservicesinfo({commit,rootGetters}, value) {
console.log('value '+JSON.stringify(value)) //console.log('value '+JSON.stringify(value))
try { try {
var token = value.token var token = value.token
var params = { var params = {
@ -349,7 +349,7 @@ export default {
} }
}, },
async getserviceshybridstatus({commit,rootGetters}, value) { async getserviceshybridstatus({commit,rootGetters}, value) {
console.log('value '+JSON.stringify(value)) //console.log('value '+JSON.stringify(value))
try { try {
var token = value.token var token = value.token
var params = { var params = {
@ -378,7 +378,7 @@ export default {
} }
}, },
async getservicesstatus({commit,rootGetters}, value) { async getservicesstatus({commit,rootGetters}, value) {
console.log('value '+JSON.stringify(value)) //console.log('value '+JSON.stringify(value))
try { try {
var token = value.token var token = value.token
var params = { var params = {
@ -406,7 +406,7 @@ export default {
} }
}, },
async create_config({commit,rootGetters}, value) { async create_config({commit,rootGetters}, value) {
console.log('value '+JSON.stringify(value)) //console.log('value '+JSON.stringify(value))
try { try {
var token = value.token var token = value.token
@ -436,7 +436,7 @@ export default {
}, },
async rmswarmlablocal({commit,rootGetters}, value) { async rmswarmlablocal({commit,rootGetters}, value) {
console.log('value '+JSON.stringify(value)) //console.log('value '+JSON.stringify(value))
try { try {
var token = value.token var token = value.token
@ -589,7 +589,7 @@ export default {
async getswarmlabinfo({commit,rootGetters}, value) { async getswarmlabinfo({commit,rootGetters}, value) {
try { try {
var token = rootGetters['pipelineLLO/gettoken'] var token = rootGetters['pipelineLLO/gettoken']
console.log('token ' + token) //console.log('token ' + token)
var params = { var params = {
swarmlabname: value swarmlabname: value
} }
@ -602,7 +602,7 @@ export default {
return info return info
} catch (e) { } catch (e) {
console.error(e); //console.error(e);
if(e.error == "invalid_token"){ if(e.error == "invalid_token"){
window.location.href = 'https://api-login.swarmlab.io:8089'; window.location.href = 'https://api-login.swarmlab.io:8089';
} }
@ -623,12 +623,12 @@ export default {
var p = await axios.post('https://api.swarmlab.io/swarmlabhybridjoinstack',params,options); var p = await axios.post('https://api.swarmlab.io/swarmlabhybridjoinstack',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
return p return p
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
@ -658,12 +658,12 @@ export default {
var p = await axios.post('https://api.swarmlab.io/swarmlabhybridjoinstack',params,options); var p = await axios.post('https://api.swarmlab.io/swarmlabhybridjoinstack',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
return p return p
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
@ -690,7 +690,7 @@ export default {
var p = await axios.post('https://api.swarmlab.io/swarmlabhybridconfiginfo',params,options); var p = await axios.post('https://api.swarmlab.io/swarmlabhybridconfiginfo',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
@ -724,12 +724,12 @@ export default {
var p = await axios.post('https://api.swarmlab.io/swarmlabhybridrmservice',params,options); var p = await axios.post('https://api.swarmlab.io/swarmlabhybridrmservice',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
return p return p
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
@ -762,7 +762,7 @@ export default {
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
return p return p
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
@ -790,12 +790,12 @@ export default {
var p = await axios.post('https://api.swarmlab.io/swarmlabhybridrestartservice',params,options); var p = await axios.post('https://api.swarmlab.io/swarmlabhybridrestartservice',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
return p return p
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
@ -823,12 +823,12 @@ export default {
var p = await axios.post('https://api.swarmlab.io/swarmlabhybridlogservice',params,options); var p = await axios.post('https://api.swarmlab.io/swarmlabhybridlogservice',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
return p return p
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
@ -856,12 +856,12 @@ export default {
var p = await axios.post('https://api.swarmlab.io/swarmlabhybridjoin',params,options); var p = await axios.post('https://api.swarmlab.io/swarmlabhybridjoin',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
return p return p
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
@ -889,12 +889,12 @@ export default {
var p = await axios.post('https://api.swarmlab.io/adddeployhybrid',params,options); var p = await axios.post('https://api.swarmlab.io/adddeployhybrid',params,options);
if(p.error == "invalid_token"){ if(p.error == "invalid_token"){
console.log(p) console.log(p)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
}else{ }else{
} }
//console.log(value.token) //console.log(value.token)
//console.log(value.swarmlabname) //console.log(value.swarmlabname)
console.log(JSON.stringify(p)) //console.log(JSON.stringify(p))
return p return p
} catch (e) { } catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){ if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){

Loading…
Cancel
Save