|
@ -29,7 +29,7 @@ |
|
|
round |
|
|
round |
|
|
type="button" |
|
|
type="button" |
|
|
title="You are connected swarmlab-hybrid" |
|
|
title="You are connected swarmlab-hybrid" |
|
|
disabled |
|
|
@click="onAction('shareinfo')" |
|
|
> |
|
|
> |
|
|
</button> |
|
|
</button> |
|
|
</div> |
|
|
</div> |
|
@ -284,6 +284,7 @@ export default { |
|
|
swarmlabname_git:'', |
|
|
swarmlabname_git:'', |
|
|
// run on |
|
|
// run on |
|
|
hybridshowdata:{}, |
|
|
hybridshowdata:{}, |
|
|
|
|
|
hybridshowdatashare:{}, |
|
|
issocket:'close', |
|
|
issocket:'close', |
|
|
setFilter: {}, |
|
|
setFilter: {}, |
|
|
searchFor: {}, |
|
|
searchFor: {}, |
|
@ -303,7 +304,8 @@ export default { |
|
|
|
|
|
|
|
|
var filterju = `microservice-jupyter` |
|
|
var filterju = `microservice-jupyter` |
|
|
var grepju = new RegExp(filterju); |
|
|
var grepju = new RegExp(filterju); |
|
|
if(grepju.test(data.Networks)){ |
|
|
|
|
|
|
|
|
if(grepju.test(data.Networks) && grepju.test(data.Names)){ |
|
|
this.webinterface = true |
|
|
this.webinterface = true |
|
|
this.webinterface_port = data.Ports |
|
|
this.webinterface_port = data.Ports |
|
|
console.log(JSON.stringify(this.webinterface_port)) |
|
|
console.log(JSON.stringify(this.webinterface_port)) |
|
@ -316,7 +318,7 @@ export default { |
|
|
this.selectedNetworks = [] |
|
|
this.selectedNetworks = [] |
|
|
this.localNetworkoptions = [] |
|
|
this.localNetworkoptions = [] |
|
|
this.localNetworkdefault = '' |
|
|
this.localNetworkdefault = '' |
|
|
//console.log(JSON.stringify(this.hybridshowdata)) |
|
|
console.log(JSON.stringify(this.hybridshowdata)) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
// from available services socket run here |
|
|
// from available services socket run here |
|
@ -495,6 +497,77 @@ export default { |
|
|
//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 == 'shareinfo'){ |
|
|
|
|
|
var openuerlju = 'no' |
|
|
|
|
|
var search = 'microservice-jupyter' |
|
|
|
|
|
var extenderror = new RegExp(search); |
|
|
|
|
|
if(extenderror.test(this.hybridshowdata.Names)){ |
|
|
|
|
|
var log = await store.dispatch("pipelineLLO/getjupyterinfo",{ |
|
|
|
|
|
instance:this.hybridshowdata.Names |
|
|
|
|
|
}) |
|
|
|
|
|
if(log.data.test){ |
|
|
|
|
|
//get token |
|
|
|
|
|
var splitted = log.data.test.split('?token='); |
|
|
|
|
|
var jutoken = splitted[1]; |
|
|
|
|
|
//cut from home dir |
|
|
|
|
|
var splitted1 = jutoken.split(' '); |
|
|
|
|
|
var jutokenok = splitted1[0]; |
|
|
|
|
|
var juurl = this.webinterface_port.split('->'); |
|
|
|
|
|
// trim it |
|
|
|
|
|
var juurlok = juurl[0].trim(); |
|
|
|
|
|
//build url |
|
|
|
|
|
openuerlju = `http://${juurlok}/?token=${jutokenok}` |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
var log = await store.dispatch("pipelineLLO/getshareinfo",{ |
|
|
|
|
|
instance:this.hybridshowdata.Names |
|
|
|
|
|
}) |
|
|
|
|
|
console.log('logs---------- ' + JSON.stringify(this.hybridshowdata)) |
|
|
|
|
|
console.log('logs1---------- ' + JSON.stringify(this.hybridshowdata.Names)) |
|
|
|
|
|
console.log('logsserver---------- ' + JSON.stringify(log.data.container)) |
|
|
|
|
|
console.log('logsserver1---------- ' + JSON.stringify(log.data.network)) |
|
|
|
|
|
this.hybridshowdatashare = log.data.network |
|
|
|
|
|
var IP = this.hybridshowdatashare.IPv4Address.split('/'); |
|
|
|
|
|
var search1 = '->' |
|
|
|
|
|
var search3 = ',' |
|
|
|
|
|
var extenderror1 = new RegExp(search1); |
|
|
|
|
|
var extenderror3 = new RegExp(search3); |
|
|
|
|
|
var info = '' |
|
|
|
|
|
// url port einai polla |
|
|
|
|
|
if(extenderror1.test(this.hybridshowdata.Ports) ){ |
|
|
|
|
|
try { |
|
|
|
|
|
if(extenderror3.test(this.hybridshowdata.Ports)){ |
|
|
|
|
|
var PORTSport = this.hybridshowdata.Ports.split(','); |
|
|
|
|
|
for(var iaa = 0; iaa < PORTSport.length; iaa++){ |
|
|
|
|
|
var PORTStmp = PORTSport[iaa].split('->'); |
|
|
|
|
|
var PORTS = PORTSport[iaa].split('/'); |
|
|
|
|
|
if( openuerlju == 'no'){ |
|
|
|
|
|
info += `<h5>URL: ${IP[0]}:${PORTS[0]}</h5>` |
|
|
|
|
|
}else{ |
|
|
|
|
|
info += `<h5>URL: ${IP[0]}:${PORTS[0]}/?token=${jutokenok}</h5>` |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
var PORTStmp = this.hybridshowdata.Ports.split('->'); |
|
|
|
|
|
var PORTS = PORTStmp[1].split('/'); |
|
|
|
|
|
var info = '' |
|
|
|
|
|
if( openuerlju == 'no'){ |
|
|
|
|
|
info = `<h5>URL: ${IP[0]}:${PORTS[0]}</h5>` |
|
|
|
|
|
}else{ |
|
|
|
|
|
info = `<h5>URL: ${IP[0]}:${PORTS[0]}/?token=${jutokenok}</h5>` |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
this.$swal({ |
|
|
|
|
|
title: '<strong>Share info</strong>', |
|
|
|
|
|
type: 'info', |
|
|
|
|
|
html: info, |
|
|
|
|
|
showCloseButton: true, |
|
|
|
|
|
showLoaderOnConfirm: false, |
|
|
|
|
|
allowOutsideClick: false |
|
|
|
|
|
}) |
|
|
}else if(action == 'container-logs'){ |
|
|
}else if(action == 'container-logs'){ |
|
|
var log = await store.dispatch("pipelineLLO/getlogs",{ |
|
|
var log = await store.dispatch("pipelineLLO/getlogs",{ |
|
|
container:this.hybridshowdata.ID |
|
|
container:this.hybridshowdata.ID |
|
@ -516,8 +589,6 @@ export default { |
|
|
var juurlok = juurl[0].trim(); |
|
|
var juurlok = juurl[0].trim(); |
|
|
//build url |
|
|
//build url |
|
|
var openuerlju = `http://${juurlok}/?token=${jutokenok}` |
|
|
var openuerlju = `http://${juurlok}/?token=${jutokenok}` |
|
|
//console.log('jupyter '+ JSON.stringify(jutokenok)) |
|
|
|
|
|
//console.log('jupyter '+ JSON.stringify(openuerlju)) |
|
|
|
|
|
var info=`<h5>You can connect to the same contained process multiple times simultaneously, from different sessions.<br> |
|
|
var info=`<h5>You can connect to the same contained process multiple times simultaneously, from different sessions.<br> |
|
|
<br> |
|
|
<br> |
|
|
<b>Click |
|
|
<b>Click |
|
|