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
d9c67a70
Commit
d9c67a70
authored
Jun 06, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
show/hide the extra auto devops settings when appropriate
parent
2c11cab3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
...s/javascripts/pages/projects/settings/ci_cd/show/index.js
+13
-0
app/views/projects/settings/ci_cd/_autodevops_form.html.haml
app/views/projects/settings/ci_cd/_autodevops_form.html.haml
+4
-4
No files found.
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
View file @
d9c67a70
...
...
@@ -22,4 +22,17 @@ document.addEventListener('DOMContentLoaded', () => {
errorBox
:
variableListEl
.
querySelector
(
'
.js-ci-variable-error-box
'
),
saveEndpoint
:
variableListEl
.
dataset
.
saveEndpoint
,
});
// hide extra auto devops settings based on data-attributes
const
autoDevOpsSettings
=
document
.
querySelectorAll
(
'
input[data-hide-extra-settings]
'
);
const
autoDevOpsExtraSettings
=
document
.
querySelector
(
'
.js-extra-settings
'
);
autoDevOpsSettings
.
forEach
(
input
=>
{
input
.
addEventListener
(
'
click
'
,
()
=>
autoDevOpsExtraSettings
.
classList
.
toggle
(
'
hidden
'
,
input
.
dataset
.
hideExtraSettings
===
'
true
'
,
),
);
});
});
app/views/projects/settings/ci_cd/_autodevops_form.html.haml
View file @
d9c67a70
...
...
@@ -13,7 +13,7 @@
.card
.card-body
.form-check
=
form
.
radio_button
:enabled
,
'true'
,
class:
'form-check-input'
=
form
.
radio_button
:enabled
,
'true'
,
class:
'form-check-input'
,
data:
{
hide_extra_settings:
false
}
=
form
.
label
:enabled_true
,
class:
'form-check-label'
do
%strong
=
s_
(
'CICD|Enable Auto DevOps'
)
.form-text.text-muted
...
...
@@ -22,13 +22,13 @@
.card
.card-body
.form-check
=
form
.
radio_button
:enabled
,
''
,
class:
'form-check-input'
=
form
.
radio_button
:enabled
,
''
,
class:
'form-check-input'
,
data:
{
hide_extra_settings:
false
}
=
form
.
label
:enabled_
,
class:
'form-check-label'
do
%strong
=
s_
(
'CICD|Instance default (%{state})'
)
%
{
state:
"
#{
Gitlab
::
CurrentSettings
.
auto_devops_enabled?
?
_
(
'enabled'
)
:
_
(
'disabled'
)
}
"
}
.form-text.text-muted
=
s_
(
'CICD|Follow the instance default to either have Auto DevOps enabled or disabled when there is no project specific %{ci_file}.'
).
html_safe
%
{
ci_file:
ci_file_formatted
}
.card
.card
.js-extra-settings
{
class:
form
.
object
.
enabled
==
false
?
'hidden'
:
nil
}
.card-body.bg-light
=
form
.
label
:domain
do
%strong
=
_
(
'Domain'
)
...
...
@@ -42,7 +42,7 @@
.card
.card-body
.form-check
=
form
.
radio_button
:enabled
,
'false'
,
class:
'form-check-input'
=
form
.
radio_button
:enabled
,
'false'
,
class:
'form-check-input'
,
data:
{
hide_extra_settings:
true
}
=
form
.
label
:enabled_false
,
class:
'form-check-label'
do
%strong
=
s_
(
'CICD|Disable Auto DevOps'
)
.form-text.text-muted
...
...
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