|
|
@@ -49,7 +49,11 @@
|
|
|
state: 0,
|
|
|
output: '',
|
|
|
estimatedDuration: 0,
|
|
|
- startTime: 0
|
|
|
+ startTime: 0,
|
|
|
+ auth: {
|
|
|
+ username: 'admin',
|
|
|
+ password: '3edc#EDC'
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -65,15 +69,14 @@
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
return axios.post('http://121.43.171.110:8000/job/信牧基础平台/build', null, {
|
|
|
- auth: {
|
|
|
- username: 'admin',
|
|
|
- password: '3edc#EDC'
|
|
|
- }
|
|
|
+ auth: this.auth
|
|
|
})
|
|
|
}).then(res => {
|
|
|
if (res.status === 201) {
|
|
|
this.startTime = new Date().getTime();
|
|
|
- return axios.get(`${res.headers['location']}api/json`)
|
|
|
+ return axios.get(`${res.headers['location']}api/json`, null, {
|
|
|
+ auth: this.auth
|
|
|
+ })
|
|
|
} else {
|
|
|
throw ''
|
|
|
}
|
|
|
@@ -87,7 +90,9 @@
|
|
|
});
|
|
|
},
|
|
|
pollingStatus() {
|
|
|
- axios.get(`${this.url}api/json`).then(res => {
|
|
|
+ axios.get(`${this.url}api/json`, null, {
|
|
|
+ auth: this.auth
|
|
|
+ }).then(res => {
|
|
|
if (res.status === 200) {
|
|
|
if (res.data.building) {
|
|
|
if (!this.estimatedDuration) {
|
|
|
@@ -127,7 +132,9 @@
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
- axios.get(`${this.url}/logText/progressiveText?start=0`).then(res => {
|
|
|
+ axios.get(`${this.url}/logText/progressiveText?start=0`, null, {
|
|
|
+ auth: this.auth
|
|
|
+ }).then(res => {
|
|
|
if (res.status === 200) {
|
|
|
this.output = res.data;
|
|
|
setTimeout(() => {
|