Browse Source

http changes

master
zeus 3 years ago
parent
commit
f3ae839fea
  1. 21
      src/store/modules/create_pipelineLLO.js

21
src/store/modules/create_pipelineLLO.js

@ -1,6 +1,7 @@
import { mapState, mapActions, commit } from 'vuex'
import store from '@/store/index'
import axios from 'axios'
import {ApiConfig} from "@/config/index";
export default {
namespaced: true,
@ -58,7 +59,9 @@ export default {
var options = {
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.swarmlabname)
console.log(JSON.stringify(p))
@ -160,7 +163,9 @@ export default {
params: params,
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
//console.log(JSON.stringify(p))
//console.log(value.token)
@ -189,7 +194,9 @@ export default {
params: params,
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
} catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
@ -216,7 +223,9 @@ export default {
params: params,
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
} catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){
@ -244,7 +253,9 @@ export default {
params: params,
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
} catch (e) {
if(e.message == "Request failed with status code 401" || /401/i.test(e.message)){

Loading…
Cancel
Save