|
@ -1,6 +1,7 @@ |
|
|
import { mapState, mapActions, commit } from 'vuex' |
|
|
import { mapState, mapActions, commit } from 'vuex' |
|
|
import store from '@/store/index' |
|
|
import store from '@/store/index' |
|
|
import axios from 'axios' |
|
|
import axios from 'axios' |
|
|
|
|
|
import {ApiConfig} from "@/config/index"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
namespaced: true, |
|
|
namespaced: true, |
|
@ -58,7 +59,9 @@ export default { |
|
|
var options = { |
|
|
var options = { |
|
|
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, |
|
|
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, |
|
|
}; |
|
|
}; |
|
|
var p = await axios.post('http://localhost:8084/run',params,options); |
|
|
var sock_server_l = ApiConfig.url_80+'/run' |
|
|
|
|
|
var p = await axios.post(sock_server_l,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)) |
|
@ -160,7 +163,9 @@ export default { |
|
|
params: params, |
|
|
params: params, |
|
|
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, |
|
|
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, |
|
|
}; |
|
|
}; |
|
|
var p = await axios.get('https://localhost:3000/getservicesinfo',options); |
|
|
var sock_server_l = ApiConfig.url_80+'/getservicesinfo' |
|
|
|
|
|
var p = await axios.get(sock_server_l,options); |
|
|
|
|
|
//var p = await axios.get('https://localhost:3000/getservicesinfo',options);
|
|
|
return p |
|
|
return p |
|
|
//console.log(JSON.stringify(p))
|
|
|
//console.log(JSON.stringify(p))
|
|
|
//console.log(value.token)
|
|
|
//console.log(value.token)
|
|
@ -189,7 +194,9 @@ export default { |
|
|
params: params, |
|
|
params: params, |
|
|
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, |
|
|
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, |
|
|
}; |
|
|
}; |
|
|
var p = await axios.get('https://localhost:3000/getservicesstatus',options); |
|
|
var sock_server_l = ApiConfig.url_80+'/getservicesstatus' |
|
|
|
|
|
var p = await axios.get(sock_server_l,options); |
|
|
|
|
|
//var p = await axios.get('https://localhost:3000/getservicesstatus',options);
|
|
|
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)){ |
|
@ -216,7 +223,9 @@ export default { |
|
|
params: params, |
|
|
params: params, |
|
|
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, |
|
|
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, |
|
|
}; |
|
|
}; |
|
|
var p = await axios.get('https://localhost:3000/create_config',options); |
|
|
var sock_server_l = ApiConfig.url_80+'/create_config' |
|
|
|
|
|
var p = await axios.get(sock_server_l,options); |
|
|
|
|
|
//var p = await axios.get('https://localhost:3000/create_config',options);
|
|
|
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)){ |
|
@ -244,7 +253,9 @@ export default { |
|
|
params: params, |
|
|
params: params, |
|
|
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, |
|
|
headers: { 'content-type': 'application/x-www-form-urlencoded',Authorization: `Bearer ${token}` }, |
|
|
}; |
|
|
}; |
|
|
var p = await axios.get('https://localhost:3000/get_config',options); |
|
|
var sock_server_l = ApiConfig.url_80+'/get_config' |
|
|
|
|
|
var p = await axios.get(sock_server_l,options); |
|
|
|
|
|
//var p = await axios.get('https://localhost:3000/get_config',options);
|
|
|
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)){ |
|
|