Browse Source

add reload and console debug

master
zeus 2 years ago
parent
commit
7985aac836
  1. 34
      src-local/llo/new.js
  2. 6
      src/App.vue
  3. 10
      src/components/dashboard.vue
  4. 6
      src/components/manageservices/manage-service.vue
  5. 35
      src/components/mynetwork/availablemicroservices.vue
  6. 59
      src/components/mynetwork/availablemicroservicescustom.vue
  7. 4
      src/components/mynetwork/availablepoc.vue
  8. 7
      src/components/mynetwork/availableservices.vue
  9. 8
      src/components/mynetwork/availablestorage.vue
  10. 2
      src/components/mynetwork/images.vue
  11. 17
      src/components/mynetwork/mytable.vue
  12. 2
      src/components/mynetwork/networks.vue
  13. 33
      src/store/modules/create_pipelineLLO.js

34
src-local/llo/new.js

@ -1086,6 +1086,40 @@ app.get('/getservicesinfo', (req, res, next) => {
});
app.get('/getservicesinfocustom', (req, res, next) => {
var mydir = process.cwd()
var RES = new Object();
var obj = JSON.parse(req.query["instance"])
//console.log(obj)
RES.service = obj.instance.service
RES.baseservice = obj.instance.baseservice
RES.user = obj.instance.user
var baseservicetmp1 = RES.user.split('@')
var baseservice = `${baseservicetmp1[0]}-${RES.service}`
var myservice = `${RES.user}_${RES.service}_${RES.baseservice}/${baseservice}`
var services_path = './community/'+myservice
if (fs.existsSync(services_path)) {
var found = 'yes'
RES.error = false
RES.error_msg = "ok"
RES.data = found;
RES.pathdir = mydir;
RES.path = myservice;
res.json(RES)
}else{
var found = 'no'
RES.error = false
RES.error_msg = "ok"
RES.data = found;
RES.pathdir = mydir;
RES.path = false;
res.json(RES)
}
});
app.get('/getjupyterinfo', (req, res, next) => {
var RES = new Object();

6
src/App.vue

@ -264,15 +264,15 @@
<!-- Menou private -->
<b-list-group-item v-b-toggle.hybrid-private variant="light" name="Private" class="ti-home list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_microservice')" style="cursor: pointer;" :class="{ active: isActive('private') }" @click="hybrid('microservice')" > Labs@Home</b-list-group-item>
<b-collapse id="hybrid-private" class="m-subm" accordion="m-sidebar" role="tabpanel">
<b-list-group-item variant="light" name="Microservice" class="ti-cloud m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_microservice')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_microservice') }" @click="hybrid('microservice')"> MicroServices</b-list-group-item>
<b-list-group-item variant="light" name="Container" class="ti-harddrive m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_private')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_private') }" @click="hybrid('services')"> LabRoom</b-list-group-item>
<b-list-group-item variant="light" name="Storage" class="ti-server m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_storage')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_storage') }" @click="hybrid('storage')"> Storage</b-list-group-item>
<b-list-group-item variant="light" name="Proof_of_concept" class=" ti-light-bulb m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_proofofconcept')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_proofofconcept') }" @click="hybrid('proofofconcept')"> Proof_of_concept</b-list-group-item>
<!--
<b-list-group-item variant="light" name="communityMicroservice" class="ti-user m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_mymicroservice')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_mymicroservice') }" @click="hybrid('mymicroservice')"> User Micorservices</b-list-group-item>
-->
<b-list-group-item variant="light" name="Microservice" class="ti-cloud m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_microservice')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_microservice') }" @click="hybrid('microservice')"> MicroServices</b-list-group-item>
</b-collapse>
@ -358,13 +358,13 @@
<b-list-group-item v-b-toggle.hybrid-private1 variant="light" name="Private" class="ti-home list-group-item list-group-item-action" v-on:click="setActive('private','')" style="cursor: pointer;" :class="{ active: isActive('private') }" @click="hybrid('services')" title="Private"> </b-list-group-item>
<b-collapse id="hybrid-private1" class="m-subm" accordion="m-sidebar" role="tabpanel">
<b-list-group-item variant="light" name="Microservice" class="ti-cloud m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_microservice')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_microservice') }" @click="hybrid('microservice')" title="Microservices"> </b-list-group-item>
<b-list-group-item variant="light" name="Container" class="ti-harddrive m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_private')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_private') }" @click="hybrid('services')" title="LabRoom"> </b-list-group-item>
<b-list-group-item variant="light" name="Storage" class="ti-server m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_storage')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_storage') }" @click="hybrid('storage')" title="Storage"> </b-list-group-item>
<b-list-group-item variant="light" name="Proof_of_concept" class="ti-light-bulb m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_proofofconcept')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_proofofconcept') }" @click="hybrid('proofofconcept')" title="Proof_of_concept"> </b-list-group-item>
<!--
<b-list-group-item variant="light" name="communityMicroservice" class="ti-user m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_mymicroservice')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_mymicroservice') }" @click="hybrid('mymicroservice')" title="User Microservices"> </b-list-group-item>
-->
<b-list-group-item variant="light" name="Microservice" class="ti-cloud m-subm-listgroup list-group-item list-group-item-action" v-on:click="setActive('private','hybrid_microservice')" style="cursor: pointer;" :class="{ active: isActiveSub('hybrid_microservice') }" @click="hybrid('microservice')" title="Microservices"> </b-list-group-item>
</b-collapse>

10
src/components/dashboard.vue

@ -22,13 +22,13 @@
</div>
</div>
</b-container>
<!--
<calendar-view-events
v-show="hybridshowlog==2"
>
</calendar-view-events>
-->
</div>
</div>
@ -40,12 +40,12 @@ import {mapState, mapGetters, mapActions} from 'vuex'
import card from '@/components/Card.vue'
import CalendarView from "./manageservices/calendarview.vue";
//import CalendarView from "./manageservices/view-service.vue";
import CalendarViewEvents from "./manageservices/view-events.vue";
//import CalendarViewEvents from "./manageservices/view-events.vue";
export default {
components: {
card,
CalendarView,
CalendarViewEvents
CalendarView
// CalendarViewEvents
},
data () {
return {

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

@ -618,8 +618,10 @@ export default {
loadsuccess(response) {
var data = response.data.data
this.fielddata=data
var n = data.length
n=n-1
if(data.length){
var n = data.length
n=n-1
}
},
onLoadError(payload) {
/*

35
src/components/mynetwork/availablemicroservices.vue

@ -160,6 +160,7 @@
>
Save</button>
<button
v-if="startservice"
class=" btn btn-outline-danger btn-sm"
title="Remove Lab_Instance"
@click="onActionstopcheck()"
@ -167,6 +168,15 @@
>
Remove
</button>
<button
v-else
class=" btn btn-outline-danger btn-sm"
title="Remove Lab_Instance"
round
disabled
>
Remove
</button>
<button
v-if="actionrowindexmore"
class="ti-more btn btn-info btn-sm"
@ -287,7 +297,7 @@
<div slot="actions" slot-scope="props">
<div class="d-flex justify-content-center">
<button
class="ti-cloud-down btn btn-sm"
class="ti-cloud-down btn btn-sm text-muted"
title="Download Lab_Instance"
round
@click="onAction('run-install', props.rowData, props.rowData._id)">
@ -295,7 +305,7 @@
<button
class="ti-info btn btn-sm"
title="Lab_Instance Info"
name="Lab_Instance_microservice_Info"
name="Lab_Instance_microservice_Info text-muted"
round
@click="onAction('view-item', props.rowData, props.rowData._id)">
</button>
@ -850,7 +860,7 @@ export default {
if(obWEB.name == this.hybridoptions.swarmlabname){
if(obWEB.hasOwnProperty('custom')){
if(obWEB.custom != 'no'){
console.log(obWEB.custom)
//console.log(obWEB.custom)
this.customedit = true
this.custom.os = obWEB.customos
this.custom.sh = obWEB.customsh
@ -936,7 +946,7 @@ export default {
})
this.custommenouopen = false
this.custommenou = false
console.log('chown ok '+ JSON.stringify(log.data))
//console.log('chown ok '+ JSON.stringify(log.data))
},
async setcustom(){
let value = {}
@ -978,8 +988,8 @@ export default {
//this.custom.sh = log.data.extrashtext
Vue.set(this.custom, 'sh', log.data.extrashtext)
}
console.log('chown extrapackages1 '+ JSON.stringify(this.custom.os))
console.log('chown sh1 '+ JSON.stringify(this.custom.sh))
//console.log('chown extrapackages1 '+ JSON.stringify(this.custom.os))
//console.log('chown sh1 '+ JSON.stringify(this.custom.sh))
}
}else{
@ -1117,11 +1127,11 @@ info +=' <b>Click on hyperlink opens Directory in new tab</b></p>'
async onActionstop(result) {
if (result.isConfirmed) {
this.$wait.start('myRunInstancetutorremove');
console.log('yes delete')
//console.log('yes delete')
//v-if="testtest[props.rowData.swarmlabname] != props.rowData.swarmlabname && testtestdir[props.rowData.swarmlabname] == props.rowData.swarmlabname"
//title="Remove Lab_Instance"
//@click="onAction('rm-install', props.rowData, props.rowData._id)"
console.log(this.hybridoptions)
//console.log(this.hybridoptions)
this.resetcustom()
this.$wait.start('myRunInstancetutor');
var res = await store.dispatch('pipelineLLO/rmswarmlablocal', this.hybridoptions.swarmlabname)
@ -1175,15 +1185,16 @@ info +=' <b>Click on hyperlink opens Directory in new tab</b></p>'
>
</button>
*/
console.log(row)
console.log(event)
//console.log(row)
//console.log(this.testtest)
//console.log(this.testtestdir)
// -----------------------------
// check status run start it
// -----------------------------
if(this.testtest[row.swarmlabname] != row.swarmlabname && this.testtestdir[row.swarmlabname] == row.swarmlabname){
if(!this.swarmlabinfonow){
this.hybridoptions = row
console.log('start '+row.swarmlabname)
//console.log('start '+row.swarmlabname)
this.startservice = true
this.onAction ('run-item', row, row._id)
}
@ -1194,7 +1205,7 @@ info +=' <b>Click on hyperlink opens Directory in new tab</b></p>'
// -----------------------------
// check status run is running stop it
// -----------------------------
console.log('stop ' + row.swarmlabname)
//console.log('stop ' + row.swarmlabname)
this.hybridoptions = row
this.startservice = false
this.onAction ('run-item', row, row._id)

59
src/components/mynetwork/availablemicroservicescustom.vue

@ -7,7 +7,7 @@
<b-container fluid class="bv-example-row">
<v-wait for="myRunInstancetutor">
<v-wait for="myRunInstancetutorcustom">
<template slot="waiting">
<div>
<img src="@/assets/loading.gif" />
@ -157,6 +157,7 @@
Save</button>
<button
v-if="startservice"
class=" btn btn-outline-danger btn-sm"
title="Remove Lab_Instance"
@click="onActionstopcheck()"
@ -164,6 +165,15 @@
>
Remove
</button>
<button
v-else
class=" btn btn-outline-danger btn-sm"
title="Remove Lab_Instance"
round
disabled
>
Remove
</button>
<button
v-if="actionrowindexmore"
class="ti-more btn btn-info btn-sm"
@ -287,13 +297,13 @@
<div slot="actions" slot-scope="props">
<div class="d-flex justify-content-center">
<button
class="ti-cloud-down btn btn-sm"
class="ti-cloud-down btn btn-sm text-muted"
title="Download Lab_Instance"
round
@click="onAction('run-install', props.rowData, props.rowData._id)">
</button>
<button
class="ti-info btn btn-sm"
class="ti-info btn btn-smtext-muted "
title="Lab_Instance Info"
round
@click="onAction('view-item', props.rowData, props.rowData._id)">
@ -574,21 +584,21 @@ export default {
async onActionstop(result) {
if (result.isConfirmed) {
this.resetcustom()
this.$wait.start('myRunInstancetutor');
this.$wait.start('myRunInstancetutorcustom');
var res = await store.dispatch('pipelineLLO/rmswarmlablocaluser', this.hybridoptions)
this.$wait.end('myRunInstancetutor');
this.$wait.end('myRunInstancetutorcustom');
var obj = {}
obj.token = this.token
obj.instance = this.hybridoptions
//check if exists
var res2 = await store.dispatch('pipelineLLO/getservicesinfo', obj)
var res2 = await store.dispatch('pipelineLLO/getservicesinfocustom', obj)
if(res2.data.data == 'yes'){
if(res2.data.data == 'yes'){
var winfo='<h6 class="text-warning"> swarmlab encountered a problem while deleting your labroom files. <br> This propably means that you have created some files while operating the labroom. <br> To remove those files please run the following command as root. </h6> <h5><i>Copy-and-run-command </i></h5><br> '
winfo += '<span class="text-success">sudo rm -rf '+res.data.path+'/community/'+data.swarmlabname+' </span><br><br>'
winfo += '<span class="text-success">sudo rm -rf '+res.data.mydir+'/community/'+res.data.path+' </span><br><br>'
winfo += '<span class="text-secondary"> You can back up content using: </span><br>'
winfo += '<span class="text-warning">sudo tar -zcvf /home/\$USER/swarmlabbackup_'+data.swarmlabname+'.tar.gz '+res.data.path+'/community/'+data.swarmlabname+' </span>'
var info='<h5>Labroom remove</h5>'
winfo += '<span class="text-warning">sudo tar -zcvf /home/\$USER/swarmlabbackup_'+data.service+'.tar.gz '+res.data.mydir+'/community/'+res.data.path+' </span>'
var info='<h5>Microservice remove</h5>'
this.$swal({
type: 'info',
html: info+winfo,
@ -789,22 +799,29 @@ export default {
}else if(action == 'rm-install' ){
this.resetcustom()
this.hybridoptions.swarmlabname = data.swarmlabname
this.$wait.start('myRunInstancetutor');
this.$wait.start('myRunInstancetutorcustom');
//console.log(this.hybridoptions.swarmlabname)
var res = await store.dispatch('pipelineLLO/rmswarmlablocaluser', data)
this.$wait.end('myRunInstancetutor');
this.$wait.end('myRunInstancetutorcustom');
var obj = {}
obj.token = this.token
obj.instance = data.swarmlabname
obj.instance = this.hybridoptions
//check if exists
var res2 = await store.dispatch('pipelineLLO/getservicesinfo', obj)
var res2 = await store.dispatch('pipelineLLO/getservicesinfocustom', obj)
if(res2.data.data == 'yes'){
if(res2.data.data == 'yes'){
/*
var winfo='<h6 class="text-warning"> swarmlab encountered a problem while deleting your labroom files. <br> This propably means that you have created some files while operating the labroom. <br> To remove those files please run the following command as root. </h6> <h5><i>Copy-and-run-command </i></h5><br> '
winfo += '<span class="text-success">sudo rm -rf '+res.data.path+'/instance/'+data.swarmlabname+' </span><br><br>'
winfo += '<span class="text-secondary"> You can back up content using: </span><br>'
winfo += '<span class="text-warning">sudo tar -zcvf /home/\$USER/swarmlabbackup_'+data.swarmlabname+'.tar.gz '+res.data.path+'/instance/'+data.swarmlabname+' </span>'
var info='<h5>Labroom remove</h5>'
*/
var winfo='<h6 class="text-warning"> swarmlab encountered a problem while deleting your labroom files. <br> This propably means that you have created some files while operating the labroom. <br> To remove those files please run the following command as root. </h6> <h5><i>Copy-and-run-command </i></h5><br> '
winfo += '<span class="text-success">sudo rm -rf '+res.data.mydir+'/community/'+res.data.path+' </span><br><br>'
winfo += '<span class="text-secondary"> You can back up content using: </span><br>'
winfo += '<span class="text-warning">sudo tar -zcvf /home/\$USER/swarmlabbackup_'+data.service+'.tar.gz '+res.data.mydir+'/community/'+res.data.path+' </span>'
var info='<h5>Microservice remove</h5>'
this.$swal({
type: 'info',
html: info+winfo,
@ -825,7 +842,7 @@ export default {
this.$root.$emit('hybrid_refresh_info_deploy_local')
}else if(action == 'run-install' ){
this.swarmlabinfonow = true
this.$wait.start('myRunInstancetutor');
this.$wait.start('myRunInstancetutorcustom');
this.hybridoptions.swarmlabname = data.swarmlabname
this.hybridoptions.baseservice = data.baseservice
this.hybridoptions.service = data.service
@ -872,14 +889,14 @@ export default {
this.$root.$emit('hybrid_install_instance_custom', value)
this.$wait.end('myRunInstancetutor');
this.$wait.end('myRunInstancetutorcustom');
//Vue.nextTick( () => this.$refs.vuetable.refresh())
this.refreshVuetable()
}else if(action == 'run-item' ){
console.log('log1')
console.log(this.hybridoptions)
//console.log('log1')
//console.log(this.hybridoptions)
this.swarmlabinfonow = true
this.resetcustom()
@ -904,8 +921,8 @@ export default {
this.hybridoptions.url3 = data.url3
this.hybridoptions.name3 = data.name3
console.log('log')
console.log(data)
//console.log('log')
//console.log(data)
//this.custom.sh = ''
this.heavy = false
@ -1219,12 +1236,12 @@ info +=' <b>Click on hyperlink opens Directory in new tab</b></p>'
return this.playbookInfo=value
},
async rowClicked(row, event) {
console.log(row)
//console.log(row)
if(this.testtest[row.service] != row.service && this.testtestdir[row.service] == row.service && this.testtestdiruser[row.service] == row.user){
if(!this.swarmlabinfonow){
this.hybridoptions = row
this.startservice = true
console.log('start '+row.service)
//console.log('start '+row.service)
await this.onAction ('run-item', row, row._id)
this.swarmlabinfonow = false
}

4
src/components/mynetwork/availablepoc.vue

@ -145,14 +145,14 @@
<div class="d-flex justify-content-center">
<button
v-if="checkactionrowindex(props.rowData,props.rowIndex)"
class="ti-cloud-down btn btn-sm"
class="ti-cloud-down btn btn-sm text-muted"
title="Download Lab_Instance"
round
@click="onAction('run-install', props.rowData, props.rowIndex)">
</button>
<button
class="ti-info btn btn-sm"
title="Lab_Instance Info"
title="Lab_Instance Info text-muted"
round
@click="onAction('view-item', props.rowData, props.rowIndex)">
</button>

7
src/components/mynetwork/availableservices.vue

@ -197,13 +197,13 @@
<div class="d-flex justify-content-center">
<button
v-if="checkactionrowindex(props.rowData,props.rowData._id)"
class="ti-cloud-down btn btn-sm"
class="ti-cloud-down btn btn-sm text-muted"
title="Download Lab_Instance"
round
@click="onAction('run-install', props.rowData, props.rowData._id)">
</button>
<button
class="ti-info btn btn-sm"
class="ti-info btn btn-sm text-muted"
title="Lab_Instance Info"
round
@click="onAction('view-item', props.row, props.row._id)">
@ -457,7 +457,8 @@ export default {
//console.log('resiiiiiiii yes '+JSON.stringify(this.testactionrowindex[index]))
}else{
//Vue.delete(this.testactionrowindex, index)
console.log('resi NO data '+JSON.stringify(res))
//console.log('resi NO data '+JSON.stringify(res))
console.log('resi NO data ')
}
}
},

8
src/components/mynetwork/availablestorage.vue

@ -113,7 +113,7 @@
<div class="d-flex justify-content-center">
<button
v-if="testactionrowindex[props.rowData.swarmlabname] == props.rowIndex"
class="ti-thumb-up btn btn-sm"
class="ti-thumb-up btn btn-sm text-success"
title="Stop Lab_Instance"
round
@click="onAction('down-item', props.rowData, props.rowIndex)"
@ -121,7 +121,7 @@
</button>
<button
v-if="testactionrowindex[props.rowData.swarmlabname] != props.rowIndex && testactionrowindex[props.rowIndex] == props.rowIndex"
class="ti-thumb-down btn btn-sm"
class="ti-thumb-down btn btn-sm text-muted"
title="Start Lab_Instance"
round
@click="onAction('run-item', props.rowData, props.rowIndex)"
@ -145,13 +145,13 @@
<div class="d-flex justify-content-center">
<button
v-if="checkactionrowindex(props.rowData,props.rowIndex)"
class="ti-cloud-down btn btn-sm"
class="ti-cloud-down btn btn-sm text-muted"
title="Download Lab_Instance"
round
@click="onAction('run-install', props.rowData, props.rowIndex)">
</button>
<button
class="ti-info btn btn-sm"
class="ti-info btn btn-sm text-muted"
title="Lab_Instance Info"
round
@click="onAction('view-item', props.rowData, props.rowIndex)">

2
src/components/mynetwork/images.vue

@ -217,7 +217,7 @@
<div slot="actions" slot-scope="props">
<button
class="ti-trash btn btn-sm"
class="ti-trash btn btn-sm text-warning"
round
@click="onAction('rm-item', props.rowData, props.rowIndex)">
</button>

17
src/components/mynetwork/mytable.vue

@ -103,6 +103,14 @@
disabled
>
stop</button>
<button
v-if="actionrowindexconsole"
class="btn btn-warning"
round
type="button"
@click="onAction('container-logsclose')"
>
Close Console</button>
</div>
</div>
@ -1505,6 +1513,8 @@ info +='This permits the docker user on the local machine to connect to X window
this.$socket.client.open();
this.$socket.client.emit('installcustom', obj);
}else if(action == 'container-stop'){
this.actionrowindexconsole = true
this.$root.$emit('hybrid_show_instance_images','console')
// refresh adhocview.vue on console await
this.$root.$emit('SERVER_hybrid_table_start')
this.$socket.client.emit('container-stop', this.swarmlabname, this.hybridshowdata.ID);
@ -1842,7 +1852,12 @@ info +='This permits the docker user on the local machine to connect to X window
// data: 0 gia na doume ean ine afto
// to lathos exafanistike
if(val.data != 0){
this.$root.$emit('hybrid_log_in',val)
if(val.data){
//console.log(val)
//console.log(val.data)
this.$root.$emit('hybrid_log_in',val)
}
//console.log(val)
}
// refresh table availableservices
this.$root.$emit('hybrid_refresh_table')

2
src/components/mynetwork/networks.vue

@ -160,7 +160,7 @@
<div slot="actions" slot-scope="props">
<button
class="ti-trash btn btn-sm"
class="ti-trash btn btn-sm text-warning"
round
@click="onAction('rm-item', props.rowData, props.rowIndex)">
</button>

33
src/store/modules/create_pipelineLLO.js

@ -598,6 +598,37 @@ export default {
return R;
}
}
},
async getservicesinfocustom({commit,rootGetters}, value) {
//console.log('value '+JSON.stringify(value))
try {
var token = value.token
var params = {
instance: value
}
var options = {
params: params,
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` },
};
var sock_server_l = ApiConfig.url_80+'/getservicesinfocustom'
var p = await axios.get(sock_server_l,options);
//var p = await axios.get('https://localhost:3000/getservicesinfo',options);
return p
//console.log(JSON.stringify(p))
//console.log(value.token)
//console.log(value.swarmlabname)
} catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
//console.log('error '+JSON.stringify(e))
window.location.href = 'https://api-login.swarmlab.io:8089';
}else{
var R = {
ERROR_str: e,
ERROR: 'yes'
}
return R;
}
}
},
async get_stats_imagescontainers({commit,rootGetters}, value) {
//console.log('value '+JSON.stringify(value))
@ -724,7 +755,7 @@ export default {
}
},
async chowncustom({commit,rootGetters}, value) {
console.log('value '+JSON.stringify(value))
//console.log('value '+JSON.stringify(value))
try {
var token = value.token
var params = {

Loading…
Cancel
Save