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
Boxiang Sun
gitlab-ce
Commits
2044af6c
Commit
2044af6c
authored
Jul 06, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue with build auto-refresh not working
parent
cfd5870b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/assets/javascripts/ci/build.coffee
app/assets/javascripts/ci/build.coffee
+4
-4
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+1
-1
No files found.
app/assets/javascripts/ci/build.coffee
View file @
2044af6c
...
...
@@ -2,7 +2,7 @@ class @CiBuild
@
interval
:
null
@
state
:
null
constructor
:
(
@
build_url
,
@
build_status
,
@
state
)
->
constructor
:
(
@
page_url
,
@
build_url
,
@
build_status
,
@
state
)
->
clearInterval
(
CiBuild
.
interval
)
# Init breakpoint checker
...
...
@@ -41,7 +41,7 @@ class @CiBuild
# Only valid for runnig build when output changes during time
#
CiBuild
.
interval
=
setInterval
=>
if
window
.
location
.
href
.
split
(
"#"
).
first
()
is
@
build
_url
if
window
.
location
.
href
.
split
(
"#"
).
first
()
is
@
page
_url
@
getBuildTrace
()
,
4000
...
...
@@ -57,7 +57,7 @@ class @CiBuild
getBuildTrace
:
->
$
.
ajax
url
:
"
#{
@
build
_url
}
/trace.json?state=
#{
encodeURIComponent
(
@
state
)
}
"
url
:
"
#{
@
page
_url
}
/trace.json?state=
#{
encodeURIComponent
(
@
state
)
}
"
dataType
:
"json"
success
:
(
log
)
=>
if
log
.
state
...
...
@@ -70,7 +70,7 @@ class @CiBuild
$
(
'.js-build-output'
).
html
log
.
html
@
checkAutoscroll
()
else
if
log
.
status
isnt
@
build_status
Turbolinks
.
visit
@
build
_url
Turbolinks
.
visit
@
page
_url
checkAutoscroll
:
->
$
(
"html,body"
).
scrollTop
$
(
"#build-trace"
).
height
()
if
"enabled"
is
$
(
"#autoscroll-button"
).
data
(
"state"
)
...
...
app/views/projects/builds/show.html.haml
View file @
2044af6c
...
...
@@ -67,4 +67,4 @@
=
render
"sidebar"
:javascript
new
CiBuild
(
"
#{
namespace_project_build_url
(
@project
.
namespace
,
@project
,
@build
,
:json
)
}
"
,
"
#{
@build
.
status
}
"
,
"
#{
trace_with_state
[
:state
]
}
"
)
new
CiBuild
(
"
#{
namespace_project_build_url
(
@project
.
namespace
,
@project
,
@build
)
}
"
,
"
#{
namespace_project_build_url
(
@project
.
namespace
,
@project
,
@build
,
:json
)
}
"
,
"
#{
@build
.
status
}
"
,
"
#{
trace_with_state
[
:state
]
}
"
)
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