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
0cb4bb1a
Commit
0cb4bb1a
authored
Jun 06, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rely on presense or absense of data attribute instead of coerced boolean strings
parent
af261c1b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
...s/javascripts/pages/projects/settings/ci_cd/show/index.js
+6
-5
app/views/projects/settings/ci_cd/_autodevops_form.html.haml
app/views/projects/settings/ci_cd/_autodevops_form.html.haml
+3
-3
No files found.
app/assets/javascripts/pages/projects/settings/ci_cd/show/index.js
View file @
0cb4bb1a
...
...
@@ -28,11 +28,12 @@ document.addEventListener('DOMContentLoaded', () => {
const
autoDevOpsExtraSettings
=
document
.
querySelector
(
'
.js-extra-settings
'
);
autoDevOpsSettings
.
addEventListener
(
'
click
'
,
event
=>
{
const
targetData
=
event
.
target
&&
event
.
target
.
dataset
;
if
(
targetData
.
hideExtraSettings
===
'
true
'
)
{
autoDevOpsExtraSettings
.
classList
.
add
(
'
hidden
'
);
}
else
if
(
targetData
.
hideExtraSettings
===
'
false
'
)
{
autoDevOpsExtraSettings
.
classList
.
remove
(
'
hidden
'
);
const
target
=
event
.
target
;
if
(
target
.
classList
.
contains
(
'
js-toggle-extra-settings
'
))
{
autoDevOpsExtraSettings
.
classList
.
toggle
(
'
hidden
'
,
!!
(
target
.
dataset
&&
target
.
dataset
.
hideExtraSettings
),
);
}
});
});
app/views/projects/settings/ci_cd/_autodevops_form.html.haml
View file @
0cb4bb1a
...
...
@@ -13,7 +13,7 @@
.card.auto-devops-card
.card-body
.form-check
=
form
.
radio_button
:enabled
,
'true'
,
class:
'form-check-input
'
,
data:
{
hide_extra_settings:
false
}
=
form
.
radio_button
:enabled
,
'true'
,
class:
'form-check-input
js-toggle-extra-settings'
=
form
.
label
:enabled_true
,
class:
'form-check-label'
do
%strong
=
s_
(
'CICD|Enable Auto DevOps'
)
.form-text.text-muted
...
...
@@ -22,7 +22,7 @@
.card.auto-devops-card
.card-body
.form-check
=
form
.
radio_button
:enabled
,
''
,
class:
'form-check-input
'
,
data:
{
hide_extra_settings:
false
}
=
form
.
radio_button
:enabled
,
''
,
class:
'form-check-input
js-toggle-extra-settings'
=
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
...
...
@@ -57,7 +57,7 @@
.card.auto-devops-card
.card-body
.form-check
=
form
.
radio_button
:enabled
,
'false'
,
class:
'form-check-input'
,
data:
{
hide_extra_settings:
true
}
=
form
.
radio_button
:enabled
,
'false'
,
class:
'form-check-input
js-toggle-extra-settings
'
,
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