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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
16b00297
Commit
16b00297
authored
Jan 09, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
22c7737b
c8ff1664
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
43 deletions
+66
-43
app/assets/javascripts/header.js
app/assets/javascripts/header.js
+5
-1
app/assets/javascripts/main.js
app/assets/javascripts/main.js
+50
-42
qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
...igure/auto_devops/create_project_with_auto_devops_spec.rb
+11
-0
No files found.
app/assets/javascripts/header.js
View file @
16b00297
...
@@ -23,7 +23,7 @@ export default function initTodoToggle() {
...
@@ -23,7 +23,7 @@ export default function initTodoToggle() {
});
});
}
}
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
function
initStatusTriggers
()
{
const
setStatusModalTriggerEl
=
document
.
querySelector
(
'
.js-set-status-modal-trigger
'
);
const
setStatusModalTriggerEl
=
document
.
querySelector
(
'
.js-set-status-modal-trigger
'
);
const
setStatusModalWrapperEl
=
document
.
querySelector
(
'
.js-set-status-modal-wrapper
'
);
const
setStatusModalWrapperEl
=
document
.
querySelector
(
'
.js-set-status-modal-wrapper
'
);
...
@@ -72,4 +72,8 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -72,4 +72,8 @@ document.addEventListener('DOMContentLoaded', () => {
},
},
});
});
}
}
}
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
requestIdleCallback
(
initStatusTriggers
);
});
});
app/assets/javascripts/main.js
View file @
16b00297
...
@@ -69,15 +69,11 @@ gl.lazyLoader = new LazyLoader({
...
@@ -69,15 +69,11 @@ gl.lazyLoader = new LazyLoader({
observerNode
:
'
#content-body
'
,
observerNode
:
'
#content-body
'
,
});
});
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
// Put all initialisations here that can also wait after everything is rendered and ready
function
deferredInitialisation
()
{
const
$body
=
$
(
'
body
'
);
const
$body
=
$
(
'
body
'
);
const
$document
=
$
(
document
);
const
$window
=
$
(
window
);
const
$sidebarGutterToggle
=
$
(
'
.js-sidebar-toggle
'
);
let
bootstrapBreakpoint
=
bp
.
getBreakpointSize
();
initBreadcrumbs
();
initBreadcrumbs
();
initLayoutNav
();
initImporterStatus
();
initImporterStatus
();
initTodoToggle
();
initTodoToggle
();
initLogoAnimation
();
initLogoAnimation
();
...
@@ -87,34 +83,6 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -87,34 +83,6 @@ document.addEventListener('DOMContentLoaded', () => {
if
(
document
.
querySelector
(
'
.search
'
))
initSearchAutocomplete
();
if
(
document
.
querySelector
(
'
.search
'
))
initSearchAutocomplete
();
if
(
document
.
querySelector
(
'
#js-peek
'
))
initPerformanceBar
({
container
:
'
#js-peek
'
});
if
(
document
.
querySelector
(
'
#js-peek
'
))
initPerformanceBar
({
container
:
'
#js-peek
'
});
// Set the default path for all cookies to GitLab's root directory
Cookies
.
defaults
.
path
=
gon
.
relative_url_root
||
'
/
'
;
// `hashchange` is not triggered when link target is already in window.location
$body
.
on
(
'
click
'
,
'
a[href^="#"]
'
,
function
clickHashLinkCallback
()
{
const
href
=
this
.
getAttribute
(
'
href
'
);
if
(
href
.
substr
(
1
)
===
getLocationHash
())
{
setTimeout
(
handleLocationHash
,
1
);
}
});
if
(
bootstrapBreakpoint
===
'
xs
'
)
{
const
$rightSidebar
=
$
(
'
aside.right-sidebar, .layout-page
'
);
$rightSidebar
.
removeClass
(
'
right-sidebar-expanded
'
).
addClass
(
'
right-sidebar-collapsed
'
);
}
// prevent default action for disabled buttons
$
(
'
.btn
'
).
click
(
function
clickDisabledButtonCallback
(
e
)
{
if
(
$
(
this
).
hasClass
(
'
disabled
'
))
{
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
return
false
;
}
return
true
;
});
addSelectOnFocusBehaviour
(
'
.js-select-on-focus
'
);
addSelectOnFocusBehaviour
(
'
.js-select-on-focus
'
);
$
(
'
.remove-row
'
).
on
(
'
ajax:success
'
,
function
removeRowAjaxSuccessCallback
()
{
$
(
'
.remove-row
'
).
on
(
'
ajax:success
'
,
function
removeRowAjaxSuccessCallback
()
{
...
@@ -167,6 +135,48 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -167,6 +135,48 @@ document.addEventListener('DOMContentLoaded', () => {
viewport
:
'
.layout-page
'
,
viewport
:
'
.layout-page
'
,
});
});
loadAwardsHandler
();
}
document
.
addEventListener
(
'
DOMContentLoaded
'
,
()
=>
{
const
$body
=
$
(
'
body
'
);
const
$document
=
$
(
document
);
const
$window
=
$
(
window
);
const
$sidebarGutterToggle
=
$
(
'
.js-sidebar-toggle
'
);
let
bootstrapBreakpoint
=
bp
.
getBreakpointSize
();
initLayoutNav
();
// Set the default path for all cookies to GitLab's root directory
Cookies
.
defaults
.
path
=
gon
.
relative_url_root
||
'
/
'
;
// `hashchange` is not triggered when link target is already in window.location
$body
.
on
(
'
click
'
,
'
a[href^="#"]
'
,
function
clickHashLinkCallback
()
{
const
href
=
this
.
getAttribute
(
'
href
'
);
if
(
href
.
substr
(
1
)
===
getLocationHash
())
{
setTimeout
(
handleLocationHash
,
1
);
}
});
if
(
bootstrapBreakpoint
===
'
xs
'
)
{
const
$rightSidebar
=
$
(
'
aside.right-sidebar, .layout-page
'
);
$rightSidebar
.
removeClass
(
'
right-sidebar-expanded
'
).
addClass
(
'
right-sidebar-collapsed
'
);
}
// prevent default action for disabled buttons
$
(
'
.btn
'
).
click
(
function
clickDisabledButtonCallback
(
e
)
{
if
(
$
(
this
).
hasClass
(
'
disabled
'
))
{
e
.
preventDefault
();
e
.
stopImmediatePropagation
();
return
false
;
}
return
true
;
});
localTimeAgo
(
$
(
'
abbr.timeago, .js-timeago
'
),
true
);
// Form submitter
// Form submitter
$
(
'
.trigger-submit
'
).
on
(
'
change
'
,
function
triggerSubmitCallback
()
{
$
(
'
.trigger-submit
'
).
on
(
'
change
'
,
function
triggerSubmitCallback
()
{
$
(
this
)
$
(
this
)
...
@@ -174,8 +184,6 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -174,8 +184,6 @@ document.addEventListener('DOMContentLoaded', () => {
.
submit
();
.
submit
();
});
});
localTimeAgo
(
$
(
'
abbr.timeago, .js-timeago
'
),
true
);
// Disable form buttons while a form is submitting
// Disable form buttons while a form is submitting
$body
.
on
(
'
ajax:complete, ajax:beforeSend, submit
'
,
'
form
'
,
function
ajaxCompleteCallback
(
e
)
{
$body
.
on
(
'
ajax:complete, ajax:beforeSend, submit
'
,
'
form
'
,
function
ajaxCompleteCallback
(
e
)
{
const
$buttons
=
$
(
'
[type="submit"], .js-disable-on-submit
'
,
this
);
const
$buttons
=
$
(
'
[type="submit"], .js-disable-on-submit
'
,
this
);
...
@@ -198,6 +206,10 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -198,6 +206,10 @@ document.addEventListener('DOMContentLoaded', () => {
}
}
});
});
$
(
'
.navbar-toggler
'
).
on
(
'
click
'
,
()
=>
{
$
(
'
.header-content
'
).
toggleClass
(
'
menu-expanded
'
);
});
// Commit show suppressed diff
// Commit show suppressed diff
$document
.
on
(
'
click
'
,
'
.diff-content .js-show-suppressed-diff
'
,
function
showDiffCallback
()
{
$document
.
on
(
'
click
'
,
'
.diff-content .js-show-suppressed-diff
'
,
function
showDiffCallback
()
{
const
$container
=
$
(
this
).
parent
();
const
$container
=
$
(
this
).
parent
();
...
@@ -205,10 +217,6 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -205,10 +217,6 @@ document.addEventListener('DOMContentLoaded', () => {
$container
.
remove
();
$container
.
remove
();
});
});
$
(
'
.navbar-toggler
'
).
on
(
'
click
'
,
()
=>
{
$
(
'
.header-content
'
).
toggleClass
(
'
menu-expanded
'
);
});
// Show/hide comments on diff
// Show/hide comments on diff
$body
.
on
(
'
click
'
,
'
.js-toggle-diff-comments
'
,
function
toggleDiffCommentsCallback
(
e
)
{
$body
.
on
(
'
click
'
,
'
.js-toggle-diff-comments
'
,
function
toggleDiffCommentsCallback
(
e
)
{
const
$this
=
$
(
this
);
const
$this
=
$
(
this
);
...
@@ -253,8 +261,6 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -253,8 +261,6 @@ document.addEventListener('DOMContentLoaded', () => {
$window
.
on
(
'
resize.app
'
,
fitSidebarForSize
);
$window
.
on
(
'
resize.app
'
,
fitSidebarForSize
);
loadAwardsHandler
();
$
(
'
form.filter-form
'
).
on
(
'
submit
'
,
function
filterFormSubmitCallback
(
event
)
{
$
(
'
form.filter-form
'
).
on
(
'
submit
'
,
function
filterFormSubmitCallback
(
event
)
{
const
link
=
document
.
createElement
(
'
a
'
);
const
link
=
document
.
createElement
(
'
a
'
);
link
.
href
=
this
.
action
;
link
.
href
=
this
.
action
;
...
@@ -277,4 +283,6 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -277,4 +283,6 @@ document.addEventListener('DOMContentLoaded', () => {
// initialize field errors
// initialize field errors
$
(
'
.gl-show-field-errors
'
).
each
((
i
,
form
)
=>
new
GlFieldErrors
(
form
));
$
(
'
.gl-show-field-errors
'
).
each
((
i
,
form
)
=>
new
GlFieldErrors
(
form
));
requestIdleCallback
(
deferredInitialisation
);
});
});
qa/qa/specs/features/browser_ui/7_configure/auto_devops/create_project_with_auto_devops_spec.rb
View file @
16b00297
...
@@ -98,6 +98,17 @@ module QA
...
@@ -98,6 +98,17 @@ module QA
resource
.
value
=
'You can see this application secret'
resource
.
value
=
'You can see this application secret'
end
end
# Our current Auto DevOps implementation won't update the production
# app if we only update a CI variable with no code change.
#
# Workaround: push new code and use the resultant pipeline.
Resource
::
Repository
::
ProjectPush
.
fabricate!
do
|
push
|
push
.
project
=
@project
push
.
commit_message
=
'Force a Deployment change by pushing new code'
push
.
file_name
=
'new_file.txt'
push
.
file_content
=
'new file contents'
end
@project
.
visit!
@project
.
visit!
Page
::
Project
::
Menu
.
act
{
click_ci_cd_pipelines
}
Page
::
Project
::
Menu
.
act
{
click_ci_cd_pipelines
}
Page
::
Project
::
Pipeline
::
Index
.
act
{
go_to_latest_pipeline
}
Page
::
Project
::
Pipeline
::
Index
.
act
{
go_to_latest_pipeline
}
...
...
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