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
Léo-Paul Géneau
gitlab-ce
Commits
2b63470f
Commit
2b63470f
authored
Jan 02, 2017
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scroll to bottom on build completion if autoscroll was active
parent
3c9a3918
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
app/assets/javascripts/build.js
app/assets/javascripts/build.js
+15
-1
No files found.
app/assets/javascripts/build.js
View file @
2b63470f
...
@@ -83,6 +83,10 @@
...
@@ -83,6 +83,10 @@
return
window
.
location
.
href
.
split
(
"
#
"
)[
0
];
return
window
.
location
.
href
.
split
(
"
#
"
)[
0
];
};
};
Build
.
prototype
.
locationHash
=
function
()
{
return
window
.
location
.
href
.
split
(
"
#
"
)[
1
];
};
Build
.
prototype
.
getInitialBuildTrace
=
function
()
{
Build
.
prototype
.
getInitialBuildTrace
=
function
()
{
var
removeRefreshStatuses
=
[
'
success
'
,
'
failed
'
,
'
canceled
'
,
'
skipped
'
]
var
removeRefreshStatuses
=
[
'
success
'
,
'
failed
'
,
'
canceled
'
,
'
skipped
'
]
...
@@ -91,6 +95,9 @@
...
@@ -91,6 +95,9 @@
dataType
:
'
json
'
,
dataType
:
'
json
'
,
success
:
function
(
buildData
)
{
success
:
function
(
buildData
)
{
$
(
'
.js-build-output
'
).
html
(
buildData
.
trace_html
);
$
(
'
.js-build-output
'
).
html
(
buildData
.
trace_html
);
if
(
this
.
locationHash
()
===
'
down-build-trace
'
)
{
$
(
"
html,body
"
).
scrollTop
(
this
.
$buildTrace
.
height
());
}
if
(
removeRefreshStatuses
.
indexOf
(
buildData
.
status
)
>=
0
)
{
if
(
removeRefreshStatuses
.
indexOf
(
buildData
.
status
)
>=
0
)
{
this
.
$buildRefreshAnimation
.
remove
();
this
.
$buildRefreshAnimation
.
remove
();
return
this
.
initScrollMonitor
();
return
this
.
initScrollMonitor
();
...
@@ -105,6 +112,8 @@
...
@@ -105,6 +112,8 @@
dataType
:
"
json
"
,
dataType
:
"
json
"
,
success
:
(
function
(
_this
)
{
success
:
(
function
(
_this
)
{
return
function
(
log
)
{
return
function
(
log
)
{
var
pageUrl
;
if
(
log
.
state
)
{
if
(
log
.
state
)
{
_this
.
state
=
log
.
state
;
_this
.
state
=
log
.
state
;
}
}
...
@@ -116,7 +125,12 @@
...
@@ -116,7 +125,12 @@
}
}
return
_this
.
checkAutoscroll
();
return
_this
.
checkAutoscroll
();
}
else
if
(
log
.
status
!==
_this
.
buildStatus
)
{
}
else
if
(
log
.
status
!==
_this
.
buildStatus
)
{
return
Turbolinks
.
visit
(
_this
.
pageUrl
);
pageUrl
=
_this
.
pageUrl
;
if
(
_this
.
$autoScrollStatus
.
data
(
'
state
'
)
===
'
enabled
'
)
{
pageUrl
+=
'
#down-build-trace
'
;
}
return
Turbolinks
.
visit
(
pageUrl
);
}
}
};
};
})(
this
)
})(
this
)
...
...
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