@ -100,6 +100,12 @@
Up < / button >
Up < / button >
< / div >
< / div >
< div class = "input-group-append"
v - if = "viewhybridoptions && heavy"
>
< p class = "text-danger" > { { heavytext } } < / p >
< / div >
< div class = "white h-100 flex-fixed-width-item"
< div class = "white h-100 flex-fixed-width-item"
< vuetable
< vuetable
ref = "vuetable"
ref = "vuetable"
@ -130,23 +136,29 @@ EDO
props . rowData . _id gia to pagination problem
props . rowData . _id gia to pagination problem
pass props . rowData . _id as index
pass props . rowData . _id as index
allagi tou vuetablerefresh
allagi tou vuetablerefresh
< button
class = "ti-cloud-down btn btn-outline-secondary btn-sm"
title = "Download Lab_Instance"
round
@ click = "checkactionrowindex(props.rowData,props.rowData._id)" >
update < / button >
-- >
-- >
< div slot = "actionsenabled" slot -scope = " props " >
< div slot = "actionsenabled" slot -scope = " props " >
< div class = "d-flex justify-content-center" >
< div class = "d-flex justify-content-center" >
< button
< button
v - if = "testactionrowindex[props.rowData.swarmlabname] == props.rowData._id"
v - if = "testtest[props.rowData.swarmlabname] != props.rowData.swarmlabname && testtestdir[props.rowData.swarmlabname] == props.rowData.swarmlabname "
class = "ti-thumb-up btn btn-info btn-sm"
class = "ti-thumb-down btn btn-secondary btn-sm"
title = "Stop Lab_Instance"
title = "Start Lab_Instance"
round
round
@ click = "onAction('dow n-item', props.rowData, props.rowData._id)"
@ click = "onAction('ru n-item', props.rowData, props.rowData._id)"
>
>
< / button >
< / button >
< button
< button
v - if = "testactionrowindex[props.rowData.swarmlabname] != props.rowData._id && testactionrowindex[props.rowData._id] == props.rowData._id "
v - if = "testtest[props.rowData.swarmlabname] == props.rowData.swarmlabname && testtestdir[props.rowData.swarmlabname] == props.rowData.swarmlabname "
class = "ti-thumb-down btn btn-secondary btn-sm"
class = "ti-thumb-up btn btn-info btn-sm"
title = "Start Lab_Instance"
title = "Stop Lab_Instance"
round
round
@ click = "onAction('ru n-item', props.rowData, props.rowData._id)"
@ click = "onAction('dow n-item', props.rowData, props.rowData._id)"
>
>
< / button >
< / button >
< / div >
< / div >
@ -155,7 +167,7 @@ allagi tou vuetablerefresh
: key = "vuetablekeygslot" >
: key = "vuetablekeygslot" >
< div class = "d-flex justify-content-center" >
< div class = "d-flex justify-content-center" >
< button
< button
v - if = "testactionrowindex[props.rowData._id] == props.rowData._id && testactionrowindex[props.rowData.swarmlabname] != props.rowData._id "
v - if = "testtest[props.rowData.swarmlabname] != props.rowData.swarmlabname && testtestdir[props.rowData.swarmlabname] == props.rowData.swarmlabname "
class = "ti-trash btn btn-info btn-sm"
class = "ti-trash btn btn-info btn-sm"
title = "Remove Lab_Instance"
title = "Remove Lab_Instance"
@ click = "onAction('rm-install', props.rowData, props.rowData._id)"
@ click = "onAction('rm-install', props.rowData, props.rowData._id)"
@ -167,7 +179,6 @@ allagi tou vuetablerefresh
< div slot = "actions" slot -scope = " props " >
< div slot = "actions" slot -scope = " props " >
< div class = "d-flex justify-content-center" >
< div class = "d-flex justify-content-center" >
< button
< button
v - if = "checkactionrowindex(props.rowData,props.rowData._id)"
class = "ti-cloud-down btn btn-outline-secondary btn-sm"
class = "ti-cloud-down btn btn-outline-secondary btn-sm"
title = "Download Lab_Instance"
title = "Download Lab_Instance"
round
round
@ -224,6 +235,8 @@ export default {
return {
return {
testactionrowindex : [ ] , / / d o w n l o a d e d u s e d i n i n s t a l l e d
testactionrowindex : [ ] , / / d o w n l o a d e d u s e d i n i n s t a l l e d
teststatusindex : [ ] , / / s t a t u s s t o p r u n u s e d i n s t a t u s
teststatusindex : [ ] , / / s t a t u s s t o p r u n u s e d i n s t a t u s
testtest : [ ] , / / u p o r d o w n s e r v i c e s
testtestdir : [ ] , / / i n s t a l l d o w n l o a d o r n o t s e r v i c e
hybridoptions : {
hybridoptions : {
'index' : '' ,
'index' : '' ,
'swarmlabname' : '' ,
'swarmlabname' : '' ,
@ -231,6 +244,8 @@ export default {
'port' : ''
'port' : ''
} ,
} ,
viewhybridoptions : false ,
viewhybridoptions : false ,
heavy : false ,
heavytext : '' ,
up_name : '' ,
up_name : '' ,
swarmlab : { } ,
swarmlab : { } ,
playbookInfo : { } ,
playbookInfo : { } ,
@ -349,12 +364,12 @@ export default {
} )
} )
} )
} )
} ,
} ,
created ( ) {
async 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" ) ;
await this . checkactionrowindexall ( )
/ / c o n s o l e . l o g ( " t o k e n " + t h i s . t o k e n ) ;
/ / c o n s o l e . l o g ( " t o k e n " + t h i s . t o k e n ) ;
} ,
} ,
beforeDestroy ( ) {
beforeDestroy ( ) {
this . $root . $off ( 'hybrid_refresh_availableservices' )
this . $root . $off ( 'hybrid_refresh_availableservices' )
@ -386,6 +401,42 @@ export default {
focusCancel : true ,
focusCancel : true ,
confirmButtonText : 'Ok!'
confirmButtonText : 'Ok!'
} )
} )
} ,
async checkactionrowindexall ( ) {
var obj = { }
obj . token = this . token
obj . instance = 'info'
var res1 = await store . dispatch ( 'pipelineLLO/getservicesstatusall' , obj )
if ( res1 . data . data ) {
/ / c o n s o l e . l o g ( ' r e s a l l ' + J S O N . s t r i n g i f y ( r e s 1 ) )
/ / c o n s o l e . l o g ( ' r e s a l l - - - ' + J S O N . s t r i n g i f y ( r e s 1 . d a t a . d a t a ) )
var al = res1 . data . data . length ;
for ( var arrayIndex in this . testtest ) {
Vue . delete ( this . testtest , this . testtest [ arrayIndex ] )
}
/ / c o n s o l e . l o g ( t h i s . t e s t t e s t )
for ( let index = 0 ; index < al ; ++ index ) {
var el = res1 . data . data [ index ] ;
/ / c o n s o l e . l o g ( e l . N a m e s )
var el1 = el . Names . split ( '_' ) ;
Vue . set ( this . testtest , el1 [ 0 ] , el1 [ 0 ] )
}
}
var res2 = await store . dispatch ( 'pipelineLLO/getservicesinfoall' , obj )
if ( res2 . data . data ) {
/ / c o n s o l e . l o g ( r e s 2 . d a t a . d a t a )
for ( var arrayIndex in this . testtestdir ) {
Vue . delete ( this . testtestdir , this . testtestdir [ arrayIndex ] )
}
/ / c o n s o l e . l o g ( t h i s . t e s t t e s t d i r )
var all = res2 . data . data . length ;
for ( let index = 0 ; index < all ; ++ index ) {
var el1a = res2 . data . data [ index ] ;
/ / c o n s o l e . l o g ( e l 1 a )
Vue . set ( this . testtestdir , el1a , el1a )
}
}
/ / c o n s o l e . l o g ( t h i s . t e s t t e s t d i r )
} ,
} ,
async checkactionrowindex ( data , index ) {
async checkactionrowindex ( data , index ) {
if ( data . _id == index ) {
if ( data . _id == index ) {
@ -402,11 +453,16 @@ export default {
/ / c o n s o l e . l o g ( ' r e s 8 a l l ' + J S O N . s t r i n g i f y ( r e s 1 ) )
/ / c o n s o l e . l o g ( ' r e s 8 a l l ' + J S O N . s t r i n g i f y ( r e s 1 ) )
if ( res1 . data . data == 'yes' ) {
if ( res1 . data . data == 'yes' ) {
/ / E D O
/ / E D O
Vue . set ( this . testactionrowindex , data . swarmlabname , index )
/ / V u e . s e t ( t h i s . t e s t a c t i o n r o w i n d e x , d a t a . s w a r m l a b n a m e , i n d e x )
/ / V u e . s e t ( t h i s . t e s t a c t i o n r o w i n d e x , d a t a . s w a r m l a b n a m e , d a t a . s w a r m l a b n a m e )
Vue . set ( this . testactionrowindex , index , data . swarmlabname )
/ / c o n s o l e . l o g ( ' r u n n i n g - - - - ' + d a t a . s w a r m l a b n a m e )
/ / c o n s o l e . l o g ( t h i s . t e s t a c t i o n r o w i n d e x )
} else {
} else {
/ / c o n s o l e . l o g ( ' r e s 8 N O ' + J S O N . s t r i n g i f y ( r e s 1 . d a t a ) )
/ / c o n s o l e . l o g ( ' r e s 8 N O ' + J S O N . s t r i n g i f y ( r e s 1 . d a t a ) )
Vue . delete ( this . testactionrowindex , data . swarmlabname )
/ / V u e . d e l e t e ( t h i s . t e s t a c t i o n r o w i n d e x , d a t a . s w a r m l a b n a m e )
Vue . delete ( this . testactionrowindex , index )
/ / c o n s o l e . l o g ( ' N O T r u n n i n g - - - - ' + d a t a . s w a r m l a b n a m e )
/ / c o n s o l e . l o g ( t h i s . t e s t a c t i o n r o w i n d e x )
}
}
} else {
} else {
var obj = { }
var obj = { }
@ -416,25 +472,28 @@ export default {
/ / c o n s o l e . l o g ( ' r e s i Y E S ' + J S O N . s t r i n g i f y ( r e s ) )
/ / c o n s o l e . l o g ( ' r e s i Y E S ' + J S O N . s t r i n g i f y ( r e s ) )
if ( res . data . data == 'yes' ) {
if ( res . data . data == 'yes' ) {
/ / E D O
/ / E D O
Vue . set ( this . testactionrowindex , index , index )
Vue . set ( this . testactionrowindex , index , data . swarmlabname )
var res1 = await store . dispatch ( 'pipelineLLO/getservicesstatus' , obj )
var res1 = await store . dispatch ( 'pipelineLLO/getservicesstatus' , obj )
/ / c o n s o l e . l o g ( ' r e s 8 a l l ' + J S O N . s t r i n g i f y ( r e s 1 ) )
/ / c o n s o l e . l o g ( ' r e s 8 a l l ' + J S O N . s t r i n g i f y ( r e s 1 ) )
if ( res1 . data . data == 'yes' ) {
if ( res1 . data . data == 'yes' ) {
/ / E D O
/ / E D O
Vue . set ( this . testactionrowindex , data . swarmlabname , index )
Vue . set ( this . testactionrowindex , index , data . swarmlabname )
/ / V u e . s e t ( t h i s . t e s t a c t i o n r o w i n d e x , d a t a . s w a r m l a b n a m e , d a t a . s w a r m l a b n a m e )
/ / c o n s o l e . l o g ( ' r u n n i n g 1 1 1 1 1 1 1 1 1 1 - - - - ' + d a t a . s w a r m l a b n a m e )
/ / c o n s o l e . l o g ( t h i s . t e s t a c t i o n r o w i n d e x )
/ / c o n s o l e . l o g ( ' r e s 8 Y E S ' + J S O N . s t r i n g i f y ( r e s 1 . d a t a ) )
/ / c o n s o l e . l o g ( ' r e s 8 Y E S ' + J S O N . s t r i n g i f y ( r e s 1 . d a t a ) )
} else {
} else {
/ / c o n s o l e . l o g ( ' r e s 8 N O ' + J S O N . s t r i n g i f y ( r e s 1 . d a t a ) )
/ / c o n s o l e . l o g ( ' r e s 8 N O ' + J S O N . s t r i n g i f y ( r e s 1 . d a t a ) )
Vue . delete ( this . testactionrowindex , data . swarmlabname )
Vue . delete ( this . testactionrowindex , index )
/ / c o n s o l e . l o g ( ' n o t r u n n i n g 1 1 1 1 1 1 1 1 1 1 - - - - ' + d a t a . s w a r m l a b n a m e )
/ / c o n s o l e . l o g ( t h i s . t e s t a c t i o n r o w i n d e x )
}
}
/ / c o n s o l e . l o g ( ' r e s i i i i i i i i y e s ' + J S O N . s t r i n g i f y ( t h i s . t e s t a c t i o n r o w i n d e x [ i n d e x ] ) )
/ / c o n s o l e . l o g ( ' r e s i i i i i i i i y e s ' + J S O N . s t r i n g i f y ( t h i s . t e s t a c t i o n r o w i n d e x [ i n d e x ] ) )
} else {
} else {
/ / V u e . d e l e t e ( t h i s . t e s t a c t i o n r o w i n d e x , i n d e x )
Vue . delete ( this . testactionrowindex , index )
/ / c o n s o l e . l o g ( ' r e s i N O 2 ' + J S O N . s t r i n g i f y ( r e s ) )
/ / c o n s o l e . l o g ( ' r e s i N O 2 ' + J S O N . s t r i n g i f y ( r e s ) )
}
}
}
}
/ / c o n s o l e . l o g ( ' s t r i n g Y E S ' + J S O N . s t r i n g i f y ( t h i s . t e s t a c t i o n r o w i n d e x ) )
/ / c o n s o l e . l o g ( t h i s . t e s t a c t i o n r o w i n d e x )
} ,
} ,
setFilter ( ) {
setFilter ( ) {
this . moreParams = {
this . moreParams = {
@ -514,10 +573,9 @@ export default {
} 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' ) ;
/ / c o n s o l e . l o g ( t h i s . h y b r i d o p t i o n s . s w a r m l a b n a m e )
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' ) ;
var obj = { }
var obj = { }
obj . token = this . token
obj . token = this . token
obj . instance = data . swarmlabname
obj . instance = data . swarmlabname
@ -544,13 +602,8 @@ export default {
focusCancel : true ,
focusCancel : true ,
confirmButtonText : 'Ok!'
confirmButtonText : 'Ok!'
} )
} )
/ / c o n s o l e . l o g ( ' i n f r e s 1 1 1 1 1 1 1 1 1 1 1 ' + J S O N . s t r i n g i f y ( r e s . d a t a . p a t h ) )
}
}
}
}
/ / V u e . n e x t T i c k ( ( ) = > t h i s . $ r e f s . v u e t a b l e . r e f r e s h ( ) )
Vue . delete ( this . testactionrowindex , data . swarmlabname )
this . refreshVuetable ( )
this . refreshVuetable ( )
this . $root . $emit ( 'hybrid_refresh_info_deploy_local' )
this . $root . $emit ( 'hybrid_refresh_info_deploy_local' )
} else if ( action == 'run-install' ) {
} else if ( action == 'run-install' ) {
@ -577,8 +630,16 @@ export default {
this . refreshVuetable ( )
this . refreshVuetable ( )
} else if ( action == 'run-item' ) {
} else if ( action == 'run-item' ) {
this . heavy = false
this . heavytext = ''
this . up_name = data . swarmlabname
this . up_name = data . swarmlabname
/ / c o n s o l e . l o g ( ' R U N - - - - - - - - - - - - ' + J S O N . s t r i n g i f y ( d a t a ) )
var filtermicrosfot = ` microservice-volatilitywindows `
var grepmicrosoft = new RegExp ( filtermicrosfot ) ;
var filterju = ` microservice-jupyter `
var filterju = ` microservice-jupyter `
var grepju = new RegExp ( filterju ) ;
var grepju = new RegExp ( filterju ) ;
if ( grepju . test ( data . swarmlabname ) ) {
if ( grepju . test ( data . swarmlabname ) ) {
@ -589,7 +650,14 @@ export default {
value . size = this . hybridoptions . size
value . size = this . hybridoptions . size
value . port = this . hybridoptions . port
value . port = this . hybridoptions . port
this . $root . $emit ( 'hybrid_start_instance' , value )
this . $root . $emit ( 'hybrid_start_instance' , value )
Vue . set ( this . testactionrowindex , value . swarmlabname , value . index )
/ / V u e . s e t ( t h i s . t e s t a c t i o n r o w i n d e x , v a l u e . s w a r m l a b n a m e , v a l u e . i n d e x )
/ / V u e . s e t ( t h i s . t e s t a c t i o n r o w i n d e x , v a l u e . i n d e x , v a l u e . s w a r m l a b n a m e )
} else if ( grepmicrosoft . test ( data . swarmlabname ) ) {
this . viewhybridoptions = true
this . heavy = true
this . heavytext = 'Note that this image are somewhat heavy (~2GB) since they embed some of the kernel debug symbols for Microsoft Windows. It can take some time to build the Instance'
this . hybridoptions . swarmlabname = data . swarmlabname
this . hybridoptions . index = index
} else {
} else {
this . viewhybridoptions = true
this . viewhybridoptions = true
this . hybridoptions . swarmlabname = data . swarmlabname
this . hybridoptions . swarmlabname = data . swarmlabname
@ -599,7 +667,6 @@ export default {
console . log ( 'RUN 1 ' + JSON . stringify ( data . swarmlabname ) )
console . log ( 'RUN 1 ' + JSON . stringify ( data . swarmlabname ) )
/ / r u n o n m y t a b l e . v u e
/ / r u n o n m y t a b l e . v u e
this . $root . $emit ( 'hybrid_start_instance' , data . swarmlabname )
this . $root . $emit ( 'hybrid_start_instance' , data . swarmlabname )
Vue . set ( this . testactionrowindex , data . swarmlabname , index )
Vue . nextTick ( ( ) => this . $refs . vuetable . refresh ( ) )
Vue . nextTick ( ( ) => this . $refs . vuetable . refresh ( ) )
* /
* /
}
}
@ -639,10 +706,15 @@ export default {
/ / c o n s o l e . l o g ( ' y e s ' )
/ / c o n s o l e . l o g ( ' y e s ' )
/ / r u n o n m y t a b l e . v u e
/ / r u n o n m y t a b l e . v u e
var value = this . hybridoptions . swarmlabname
var value = this . hybridoptions . swarmlabname
await this . $root . $emit ( 'hybrid_stop_instance' , value )
/ / a w a i t t h i s . $ r o o t . $ e m i t ( ' h y b r i d _ s t o p _ i n s t a n c e ' , v a l u e )
Vue . delete ( this . testactionrowindex , this . hybridoptions . index )
var log = await store . dispatch ( "pipelineLLO/stopservice" , {
token : this . token ,
instance : this . hybridoptions . swarmlabname
} )
/ / V u e . d e l e t e ( t h i s . t e s t a c t i o n r o w i n d e x , t h i s . h y b r i d o p t i o n s . i n d e x )
/ / c o n s o l e . l o g ( ' d o w n s e r v i c e ' + J S O N . s t r i n g i f y ( t h i s . h y b r i d o p t i o n s . i n d e x ) )
/ / c o n s o l e . l o g ( ' d o w n s e r v i c e ' + J S O N . s t r i n g i f y ( t h i s . h y b r i d o p t i o n s . i n d e x ) )
/ / V u e . n e x t T i c k ( ( ) = > t h i s . $ r e f s . v u e t a b l e . r e f r e s h ( ) )
/ / V u e . n e x t T i c k ( ( ) = > t h i s . $ r e f s . v u e t a b l e . r e f r e s h ( ) )
/ / c o n s o l e . l o g ( l o g )
this . refreshVuetable ( )
this . refreshVuetable ( )
} else {
} else {
console . log ( 'no' )
console . log ( 'no' )
@ -664,7 +736,8 @@ export default {
/ / c o n s o l e . l o g ( ' c h o w n ' + J S O N . s t r i n g i f y ( t h i s . h y b r i d o p t i o n s . s w a r m l a b n a m e ) )
/ / c o n s o l e . l o g ( ' c h o w n ' + J S O N . s t r i n g i f y ( t h i s . h y b r i d o p t i o n s . s w a r m l a b n a m e ) )
/ / c o n s o l e . l o g ( ' c h o w n l o g ' + J S O N . s t r i n g i f y ( l o g ) )
/ / c o n s o l e . l o g ( ' c h o w n l o g ' + J S O N . s t r i n g i f y ( l o g ) )
this . $root . $emit ( 'hybrid_start_instance' , value )
this . $root . $emit ( 'hybrid_start_instance' , value )
Vue . set ( this . testactionrowindex , value . swarmlabname , value . index )
/ / V u e . s e t ( t h i s . t e s t a c t i o n r o w i n d e x , v a l u e . s w a r m l a b n a m e , v a l u e . i n d e x )
/ / V u e . s e t ( t h i s . t e s t a c t i o n r o w i n d e x , v a l u e . i n d e x , v a l u e . s w a r m l a b n a m e )
/ / V u e . n e x t T i c k ( ( ) = > t h i s . $ r e f s . v u e t a b l e . r e f r e s h ( ) )
/ / V u e . n e x t T i c k ( ( ) = > t h i s . $ r e f s . v u e t a b l e . r e f r e s h ( ) )
/ / V u e . n e x t T i c k ( ( ) = > t h i s . $ r e f s . v u e t a b l e . r e f r e s h ( ) )
/ / V u e . n e x t T i c k ( ( ) = > t h i s . $ r e f s . v u e t a b l e . r e f r e s h ( ) )
this . refreshVuetable ( )
this . refreshVuetable ( )
@ -690,7 +763,10 @@ export default {
/ / t h i s . i n d e x s e l e c t = i n d e x
/ / t h i s . i n d e x s e l e c t = i n d e x
/ / c o n s o l e . l o g ( ' e r r o r 2 a ' + J S O N . s t r i n g i f y ( t h i s . d a t a s e l e c t ) )
/ / c o n s o l e . l o g ( ' e r r o r 2 a ' + J S O N . s t r i n g i f y ( t h i s . d a t a s e l e c t ) )
/ / c o n s o l e . l o g ( ' e r r o r 2 b ' + J S O N . s t r i n g i f y ( t h i s . i n d e x s e l e c t ) )
/ / c o n s o l e . l o g ( ' e r r o r 2 b ' + J S O N . s t r i n g i f y ( t h i s . i n d e x s e l e c t ) )
await this . checkactionrowindex ( this . dataselect , this . indexselect )
/ / t h i s v e r s i o n w i t h t h i s . c h e c k a c t i o n r o w i n d e x d o n t w o r k
/ / r e n d e r h a n g s
/ / a w a i t t h i s . c h e c k a c t i o n r o w i n d e x ( t h i s . d a t a s e l e c t , t h i s . i n d e x s e l e c t )
await this . checkactionrowindexall ( )
this . vuetablekeygslot += 1
this . vuetablekeygslot += 1
/ / } )
/ / } )
} ,
} ,