summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/job.js
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-02-02 10:05:37 +0000
committerPhil Hughes <me@iamphill.com>2018-02-02 10:05:37 +0000
commit645d635976ef48905c0416bd2a4a25025fef9ee4 (patch)
treecbe7a9108102647a9754c68587003782c47d2977 /app/assets/javascripts/job.js
parent135a02cf4232dd948fad4116c744279328888049 (diff)
downloadgitlab-ce-645d635976ef48905c0416bd2a4a25025fef9ee4.tar.gz
fixed issue with axios_utils not reducing activeVueResources variable when request fails
Diffstat (limited to 'app/assets/javascripts/job.js')
-rw-r--r--app/assets/javascripts/job.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/assets/javascripts/job.js b/app/assets/javascripts/job.js
index d2cbc9b82b3..d0b7ea75082 100644
--- a/app/assets/javascripts/job.js
+++ b/app/assets/javascripts/job.js
@@ -9,6 +9,7 @@ export default class Job {
constructor(options) {
this.timeout = null;
this.state = null;
+ this.fetchingStatusFavicon = false;
this.options = options || $('.js-build-options').data();
this.pagePath = this.options.pagePath;
@@ -178,7 +179,17 @@ export default class Job {
.then((res) => {
const log = res.data;
- setCiStatusFavicon(`${this.pagePath}/status.json`);
+ if (!this.fetchingStatusFavicon) {
+ this.fetchingStatusFavicon = true;
+
+ setCiStatusFavicon(`${this.pagePath}/status.json`)
+ .then(() => {
+ this.fetchingStatusFavicon = false;
+ })
+ .catch(() => {
+ this.fetchingStatusFavicon = false;
+ });
+ }
if (log.state) {
this.state = log.state;