@ -55,13 +55,17 @@
Web < / button >
< button
v - if = "webinterfacegeneric && hybridshowdata.Names"
class = "btn btn-outline- info"
class = "btn btn-info"
round
type = "button"
@ click = "onAction('startwebgeneric')"
>
openGui < / button >
{ { webinterfacegeneric_text } } < / button >
< / div >
< div class = "input-group-prepend" >
< button
v - if = "hybridshowdata.Names"
@ -204,13 +208,111 @@
< / div > <!-- row -- >
< div class = "row"
v - if = "webinterfacegeneric && webinterfacegeneric_menou1 && hybridshowdata.Names"
>
< div class = "col-12" >
< hr >
< / div >
< / div >
< div class = "row"
v - if = "webinterfacegeneric && webinterfacegeneric_menou1 && hybridshowdata.Names"
>
< div class = "col-5" >
< div class = "input-group input-group-sm sm-3" >
<!-- menou 1 -- -- -- -- -- -- -- -- -- -- -- -- -- - -- >
< div class = "input-group-prepend" >
< a :href ="webinterfacegeneric_menou1_url" :target ="webinterfacegeneric_menou1_url_target1"
v - if = "webinterfacegeneric && webinterfacegeneric_menou1 && hybridshowdata.Names && !webinterfacegeneric_menou1typelog"
class = "btn btn-outline-secondary"
role = "button" > { { webinterfacegeneric_menou1_text } }
< / a >
< button
v - if = "webinterfacegeneric && webinterfacegeneric_menou1 && hybridshowdata.Names && webinterfacegeneric_menou1typelog && !webinterfacegeneric_menou1typelog_active"
class = "btn btn-outline-secondary"
round
type = "button"
@ click = "guilogs(1)"
>
{ { webinterfacegeneric_menou1_text } }
< / button >
< button
v - if = "webinterfacegeneric && webinterfacegeneric_menou1 && hybridshowdata.Names && webinterfacegeneric_menou1typelog && webinterfacegeneric_menou1typelog_active"
class = "btn btn-outline-warning"
round
type = "button"
@ click = "guilogsclose(1)"
>
{ { webinterfacegeneric_menou1_text } }
< / button >
< / div >
<!-- menou 2 -- -- -- -- -- -- -- -- -- -- -- -- -- - -- >
< div class = "input-group-prepend" >
< a :href ="webinterfacegeneric_menou2_url" :target ="webinterfacegeneric_menou1_url_target2"
v - if = "webinterfacegeneric && webinterfacegeneric_menou2 && hybridshowdata.Names && !webinterfacegeneric_menou2typelog"
class = "btn btn-outline-secondary"
role = "button" > { { webinterfacegeneric_menou2_text } }
< / a >
< button
v - if = "webinterfacegeneric && webinterfacegeneric_menou2 && hybridshowdata.Names && webinterfacegeneric_menou2typelog && !webinterfacegeneric_menou2typelog_active"
class = "btn btn-outline-secondary"
round
type = "button"
@ click = "guilogs(2)"
>
{ { webinterfacegeneric_menou2_text } }
< / button >
< button
v - if = "webinterfacegeneric && webinterfacegeneric_menou2 && hybridshowdata.Names && webinterfacegeneric_menou2typelog && webinterfacegeneric_menou2typelog_active"
class = "btn btn-outline-warning"
round
type = "button"
@ click = "guilogsclose(2)"
>
{ { webinterfacegeneric_menou2_text } }
< / button >
< / div >
<!-- menou 3 -- -- -- -- -- -- -- -- -- -- -- -- -- - -- >
< div class = "input-group-prepend" >
< a :href ="webinterfacegeneric_menou3_url" :target ="webinterfacegeneric_menou1_url_target3"
v - if = "webinterfacegeneric && webinterfacegeneric_menou3 && hybridshowdata.Names && !webinterfacegeneric_menou3typelog"
class = "btn btn-outline-secondary"
role = "button" > { { webinterfacegeneric_menou3_text } }
< / a >
< button
v - if = "webinterfacegeneric && webinterfacegeneric_menou3 && hybridshowdata.Names && webinterfacegeneric_menou3typelog && !webinterfacegeneric_menou3typelog_active"
class = "btn btn-outline-secondary"
round
type = "button"
@ click = "guilogs(3)"
>
{ { webinterfacegeneric_menou3_text } }
< / button >
< button
v - if = "webinterfacegeneric && webinterfacegeneric_menou3 && hybridshowdata.Names && webinterfacegeneric_menou3typelog && webinterfacegeneric_menou3typelog_active"
class = "btn btn-outline-warning"
round
type = "button"
@ click = "guilogsclose(3)"
>
{ { webinterfacegeneric_menou3_text } }
< / button >
< / div >
< / div >
< / div >
< / div >
< / b - c o n t a i n e r >
< / b - c o n t a i n e r >
< b -container fluid >
< div class = "row" >
< div class = "col-2 text-info" >
@ -387,6 +489,39 @@ export default {
localNetworkdefault : '' ,
webinterface : false ,
webinterfacegeneric : false ,
webinterfacegeneric_text : 'openGui' ,
webinterfacegeneric_menou1_url_target1 : '_blank' ,
webinterfacegeneric_menou1_url_target2 : '_blank' ,
webinterfacegeneric_menou1_url_target3 : '_blank' ,
webinterfacegeneric_menou_exec : '' ,
webinterfacegeneric_menou_basedir : '' ,
swarmlab_services_type : 'swarmlab' ,
webinterfacegeneric_menou1 : false ,
webinterfacegeneric_menou1_text : '' ,
webinterfacegeneric_menou1_url : '' ,
webinterfacegeneric_menou1typelog : false ,
webinterfacegeneric_menou1typelog_active : false ,
webinterfacegeneric_menou1typedir : '' ,
webinterfacegeneric_menou1typedir_log : '' ,
webinterfacegeneric_menou2 : false ,
webinterfacegeneric_menou2_text : '' ,
webinterfacegeneric_menou2_url : '' ,
webinterfacegeneric_menou2typelog : false ,
webinterfacegeneric_menou2typelog_active : false ,
webinterfacegeneric_menou2typedir : '' ,
webinterfacegeneric_menou2typedir_log : '' ,
webinterfacegeneric_menou3 : false ,
webinterfacegeneric_menou3_text : '' ,
webinterfacegeneric_menou3_url : '' ,
webinterfacegeneric_menou3typelog : false ,
webinterfacegeneric_menou3typelog_active : false ,
webinterfacegeneric_menou3typedir : '' ,
webinterfacegeneric_menou3typedir_log : '' ,
webinterfacegenericedit : false ,
webinterface_port : '' ,
STATUS : { } ,
@ -422,6 +557,7 @@ export default {
swarmlabname_git : '' ,
/ / r u n o n
hybridshowdata : { } ,
hybridshowdata_user : { } ,
hybridshowdatashare : { } ,
issocket : 'close' ,
setFilter : { } ,
@ -437,29 +573,25 @@ export default {
} ,
mounted ( ) {
this . $root . $on ( 'hybrid_show_info' , ( data ) => {
/ / - - - - - - - - - - - - - - n e w m e n o u
( async ( ) => {
/ / - - - - - - - - - - - - - - n e w m e n o u
this . actionrowindex = false
this . actionrowindexselect = true
this . addNetworkMenou = false
this . actionrowindexconsole = false
this . $root . $emit ( 'hybrid_show_instance_images' , 'images' )
/ / - - - - - - - - - - - - - - n e w m e n o u
/ / - - - - - - - - - - - - - - n e w m e n o u
this . webinterface = false
this . webinterfacegeneric = false
this . webinterfacegenericedit = false
this . $nextTick ( function ( ) {
/ / t h i s . $ n e x t T i c k ( f u n c t i o n ( ) {
this . hybridshowdata = data
var filterju = ` microservice-jupyter `
var grepju = new RegExp ( filterju ) ;
if ( grepju . test ( data . Networks ) && grepju . test ( data . Names ) ) {
this . webinterface = true
this . webinterface_port = data . Ports
/ / c o n s o l e . l o g ( J S O N . s t r i n g i f y ( t h i s . w e b i n t e r f a c e _ p o r t ) )
} else {
this . webinterface = false
this . webinterface_port = ''
@ -473,8 +605,7 @@ export default {
}
}
/ / E D I T O R c u s t o m
( async ( ) => {
/ / E D I T O R c u s t o m
var strbase = '_masterservice_1'
var sRegExInput1 = new RegExp ( strbase , 'g' ) ;
var getcustomnames = this . hybridshowdata . Names . replace ( sRegExInput1 , '' ) ;
@ -484,38 +615,80 @@ export default {
} )
/ / c o n s o l e . l o g ( l o g d a t a c u s t o m . d a t a ) ;
if ( logdatacustom . data && logdatacustom . data . data ) {
/ / c o n s o l e . l o g ( l o g d a t a c u s t o m . d a t a . d a t a ) ;
this . hybridshowdata_user = JSON . parse ( logdatacustom . data . data )
console . log ( this . hybridshowdata_user ) ;
var urlgeniGUIEDITOR = this . hybridshowdata . Names . split ( '_' ) ;
this . webinterfacegenericedit = true
var urlgeniGUI = this . hybridshowdata_user . servicedata . baseservice
this . swarmlab_services_type = 'custom'
} else {
var urlgeniGUItmp = this . hybridshowdata . Names . split ( '_' ) ;
var urlgeniGUI = urlgeniGUItmp [ 0 ]
this . swarmlab_services_type = 'swarmlab'
}
} ) ( ) ;
var urlgeniGUI = this . hybridshowdata . Names . split ( '_' ) ;
/ / G U I f i r e f o x
for ( var i = 0 ; i < ApiConfigGUI . length ; i ++ ) {
var obGUI = ApiConfigGUI [ i ] ;
if ( obGUI . name == urlgeniGUI [ 0 ] ) {
if ( obGUI . name == urlgeniGUI ) {
this . webinterfacegeneric = true
this . webinterfacegeneric_text = obGUI . menou
this . webinterfacegeneric_menou_exec = obGUI . exec
/ / c o n s o l e . l o g ( o b G U I . n a m e ) ;
if ( this . hybridshowdata_user . servicedata && this . swarmlab_services_type == 'custom' ) {
var baseservicetmp1 = this . hybridshowdata_user . servicedata . user . split ( '@' )
var baseservicecustom = ` ${ baseservicetmp1 [ 0 ] } - ${ this . hybridshowdata_user . servicedata . service } `
this . webinterfacegeneric_menou_basedir = ` community/ ${ this . hybridshowdata_user . servicedata . user } _ ${ this . hybridshowdata_user . servicedata . service } _ ${ this . hybridshowdata_user . servicedata . baseservice } / ${ baseservicecustom } `
} else {
var baseservicetmp1 = this . hybridshowdata . Names . split ( '_' )
this . webinterfacegeneric_menou_basedir = ` instance/ ${ baseservicetmp1 [ 0 ] } / ${ baseservicetmp1 [ 0 ] } `
}
if ( obGUI . menou1 ) {
this . webinterfacegeneric_menou1 = true
this . webinterfacegeneric_menou1_text = obGUI . menou1
this . webinterfacegeneric_menou1_url = ` ${ obGUI . menou1server } / ${ this . webinterfacegeneric_menou_basedir } / ${ obGUI . menou1url } `
this . webinterfacegeneric_menou1_url_target1 = urlgeniGUI + '_1'
if ( obGUI . menou1type == 'log' ) {
this . webinterfacegeneric_menou1typelog = true
this . webinterfacegeneric_menou1typedir = ` ${ this . webinterfacegeneric_menou_basedir } / ${ obGUI . menou2url } `
}
}
if ( obGUI . menou2 ) {
this . webinterfacegeneric_menou2 = true
this . webinterfacegeneric_menou2_text = obGUI . menou2
this . webinterfacegeneric_menou2_url = ` ${ obGUI . menou2server } / ${ this . webinterfacegeneric_menou_basedir } / ${ obGUI . menou2url } `
this . webinterfacegeneric_menou1_url_target2 = urlgeniGUI + '_2'
if ( obGUI . menou2type ) {
if ( obGUI . menou2type == 'log' ) {
this . webinterfacegeneric_menou2typelog = true
this . webinterfacegeneric_menou2typedir = ` ${ this . webinterfacegeneric_menou_basedir } / ${ obGUI . menou2url } `
}
}
}
if ( obGUI . menou3 ) {
this . webinterfacegeneric_menou3 = true
this . webinterfacegeneric_menou3_text = obGUI . menou3
this . webinterfacegeneric_menou3_url = ` ${ obGUI . menou3server } / ${ this . webinterfacegeneric_menou_basedir } / ${ obGUI . menou3url } `
this . webinterfacegeneric_menou1_url_target2 = urlgeniGUI + '_3'
if ( obGUI . menou3type == 'log' ) {
this . webinterfacegeneric_menou3typelog = true
this . webinterfacegeneric_menou3typedir = ` ${ this . webinterfacegeneric_menou_basedir } / ${ obGUI . menou2url } `
}
}
}
/ *
var filterjugeneric = ` microservice-firefox `
var grepju1 = new RegExp ( filterjugeneric ) ;
if ( grepju1 . test ( data . Networks ) && grepju1 . test ( data . Names ) ) {
this . webinterfacegeneric = true
} else {
this . webinterfacegeneric = false
}
* /
this . addNetworkMenou = false
this . localNetworks = [ ]
this . selectedNetworks = [ ]
this . localNetworkoptions = [ ]
this . localNetworkdefault = ''
/ / c o n s o l e . l o g ( J S O N . s t r i n g i f y ( t h i s . h y b r i d s h o w d a t a ) )
/ / } )
} ) ( ) ;
} )
} )
/ / f r o m a v a i l a b l e s e r v i c e s s o c k e t r u n h e r e
this . $root . $on ( 'hybrid_start_instance' , ( data ) => {
this . swarmlabname = data . swarmlabname
@ -671,6 +844,57 @@ export default {
} ,
methods : {
async guilogsclose ( action ) {
this . webinterfacegeneric_menou1typelog_active = false
this . webinterfacegeneric_menou2typelog_active = false
this . webinterfacegeneric_menou3typelog_active = false
this . actionrowindexconsole = false
this . $root . $emit ( 'hybrid_show_instance_images' , 'images' )
} ,
async guilogs ( action ) {
var logdatacustom = await store . dispatch ( "pipelineLLO/getlog4gui" , {
token : this . token ,
instance : this . webinterfacegeneric_menou2typedir
} )
if ( ! logdatacustom . data . error ) {
if ( logdatacustom . data . log != 'no' ) {
if ( action == 1 ) {
this . webinterfacegeneric_menou1typedir_log = logdatacustom . data . log
this . webinterfacegeneric_menou1typelog_active = true
this . actionrowindexconsole = true
this . $root . $emit ( 'hybrid_show_instance_images' , 'console' )
var val = { }
val . data = this . webinterfacegeneric_menou1typedir_log
var log = await store . dispatch ( "pipelineLLO/getlogs" , {
container : this . hybridshowdata . ID
} )
this . $root . $emit ( 'hybrid_log_in' , val )
} else if ( action == 2 ) {
this . webinterfacegeneric_menou2typedir_log = logdatacustom . data . log
this . webinterfacegeneric_menou2typelog_active = true
this . actionrowindexconsole = true
this . $root . $emit ( 'hybrid_show_instance_images' , 'console' )
var val = { }
val . data = this . webinterfacegeneric_menou2typedir_log
var log = await store . dispatch ( "pipelineLLO/getlogs" , {
container : this . hybridshowdata . ID
} )
this . $root . $emit ( 'hybrid_log_in' , val )
} else if ( action == 3 ) {
this . webinterfacegeneric_menou3typedir_log = logdatacustom . data . log
this . webinterfacegeneric_menou3typelog_active = true
this . actionrowindexconsole = true
this . $root . $emit ( 'hybrid_show_instance_images' , 'console' )
var val = { }
val . data = this . webinterfacegeneric_menou3typedir_log
var log = await store . dispatch ( "pipelineLLO/getlogs" , {
container : this . hybridshowdata . ID
} )
this . $root . $emit ( 'hybrid_log_in' , val )
}
}
}
} ,
async updateNetwork ( container , action ) {
/ / c o n s o l e . l o g ( J S O N . s t r i n g i f y ( c o n t a i n e r ) ) ;
/ / c o n s o l e . l o g ( J S O N . s t r i n g i f y ( ' s e l e c t e d : ' + t h i s . s e l e c t e d N e t w o r k s ) ) ;
@ -929,13 +1153,29 @@ info += '</p>'
} else if ( action == 'container-logsclose' ) {
this . actionrowindexconsole = false
this . $root . $emit ( 'hybrid_show_instance_images' , 'images' )
this . webinterfacegeneric_menou1typelog_active = false
this . webinterfacegeneric_menou2typelog_active = false
this . webinterfacegeneric_menou3typelog_active = false
} else if ( action == 'startwebgeneric' ) {
this . $wait . start ( 'myRunInstanceeditor' ) ;
var urlgen = this . hybridshowdata . Names . split ( '_' ) ;
/ / c o n s o l e . l o g ( ' l o g s - - - - - - - - - - ' + J S O N . s t r i n g i f y ( t h i s . h y b r i d s h o w d a t a ) )
/ / c o n s o l e . l o g ( ' l o g s - - - - - - - - - - ' + J S O N . s t r i n g i f y ( u r l g e n [ 0 ] ) )
if ( this . swarmlab_services_type == 'swarmlab' ) {
var log = await store . dispatch ( "pipelineLLO/rungui" , {
instance : urlgen [ 0 ]
} )
} else if ( this . swarmlab_services_type == 'custom' ) {
var baseservicetmp1as = this . hybridshowdata_user . servicedata . user . split ( '@' )
var baseservicecustomas = ` ${ baseservicetmp1as [ 0 ] } - ${ this . hybridshowdata_user . servicedata . service } `
var guicustom = ` community/ ${ this . hybridshowdata_user . servicedata . user } _ ${ this . hybridshowdata_user . servicedata . service } _ ${ this . hybridshowdata_user . servicedata . baseservice } / ${ baseservicecustomas } `
var log = await store . dispatch ( "pipelineLLO/runguicustom" , {
instance : guicustom ,
exec : this . webinterfacegeneric_menou_exec ,
id : baseservicecustomas
} )
}
this . $wait . end ( 'myRunInstanceeditor' ) ;
} else if ( action == 'startweb' ) {
var log = await store . dispatch ( "pipelineLLO/getjupyterinfo" , {
instance : this . hybridshowdata . Names
@ -1175,13 +1415,16 @@ if(pocurlcodeserver != 'no'){
token : this . token ,
instance : getcustomnames
} )
console . log ( '---------------------' )
console . log ( logdatacustom . data )
/ / c o n s o l e . l o g ( ' - - - - - - - - - - - - - - - - - - - - - ' )
/ / c o n s o l e . l o g ( l o g d a t a c u s t o m . d a t a )
if ( logdatacustom . data && logdatacustom . data . data ) {
/ / E D I T O R c u s t o m
var logdatacustomres = JSON . parse ( logdatacustom . data . data )
/ / c o n s o l e . l o g ( J S O N . p a r s e ( l o g d a t a c u s t o m . d a t a . d a t a ) )
/ / c o n s o l e . l o g ( ' - - - - - - 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 - - - - - - - - - - - - - - - ' )
var swarmlabinstance1cda1 = new RegExp ( "(->)" ) ;
if ( swarmlabinstance1cda1 . test ( this . hybridshowdata . Ports ) ) {
var splitcda1split = this . hybridshowdata . Ports . split ( ',' )