diff options
author | Phil Hughes <me@iamphill.com> | 2018-01-30 16:33:23 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-01-30 16:33:23 +0000 |
commit | d504118402668872d4acc67c10a40cd03d8f8e99 (patch) | |
tree | b2ddf3d87570e24dc2842252f63819fe228c2d5a /app/assets/javascripts/job.js | |
parent | 7c659e5b533d4b2ee73a3ff0a013cac9366f6ace (diff) | |
download | gitlab-ce-d504118402668872d4acc67c10a40cd03d8f8e99.tar.gz |
Converted job.js to axios
Diffstat (limited to 'app/assets/javascripts/job.js')
-rw-r--r-- | app/assets/javascripts/job.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/assets/javascripts/job.js b/app/assets/javascripts/job.js index 9b5092c5e3f..d2cbc9b82b3 100644 --- a/app/assets/javascripts/job.js +++ b/app/assets/javascripts/job.js @@ -1,4 +1,5 @@ import _ from 'underscore'; +import axios from './lib/utils/axios_utils'; import { visitUrl } from './lib/utils/url_utility'; import bp from './breakpoints'; import { numberToHumanSize } from './lib/utils/number_utils'; @@ -171,11 +172,12 @@ export default class Job { } getBuildTrace() { - return $.ajax({ - url: `${this.pagePath}/trace.json`, - data: { state: this.state }, + return axios.get(`${this.pagePath}/trace.json`, { + params: { state: this.state }, }) - .done((log) => { + .then((res) => { + const log = res.data; + setCiStatusFavicon(`${this.pagePath}/status.json`); if (log.state) { @@ -217,7 +219,7 @@ export default class Job { visitUrl(this.pagePath); } }) - .fail(() => { + .catch(() => { this.$buildRefreshAnimation.remove(); }) .then(() => { |