Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
645d6359
Commit
645d6359
authored
Feb 02, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue with axios_utils not reducing activeVueResources variable when request fails
parent
135a02cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
app/assets/javascripts/job.js
app/assets/javascripts/job.js
+12
-1
app/assets/javascripts/lib/utils/axios_utils.js
app/assets/javascripts/lib/utils/axios_utils.js
+4
-0
No files found.
app/assets/javascripts/job.js
View file @
645d6359
...
...
@@ -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
;
...
...
app/assets/javascripts/lib/utils/axios_utils.js
View file @
645d6359
...
...
@@ -19,6 +19,10 @@ axios.interceptors.response.use((config) => {
window
.
activeVueResources
-=
1
;
return
config
;
},
(
e
)
=>
{
window
.
activeVueResources
-=
1
;
return
Promise
.
reject
(
e
);
});
export
default
axios
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment