|
@ -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)){ |
|
|