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
d5041184
Commit
d5041184
authored
Jan 30, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converted job.js to axios
parent
7c659e5b
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
131 deletions
+144
-131
app/assets/javascripts/job.js
app/assets/javascripts/job.js
+7
-5
spec/javascripts/job_spec.js
spec/javascripts/job_spec.js
+137
-126
No files found.
app/assets/javascripts/job.js
View file @
d5041184
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
(()
=>
{
...
...
spec/javascripts/job_spec.js
View file @
d5041184
This diff is collapsed.
Click to expand it.
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