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
96825378
Commit
96825378
authored
May 15, 2020
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide old form when feature flag is enabled
Add checkbox titles to fix spec
parent
c976e8d3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
8 deletions
+14
-8
app/assets/javascripts/integrations/edit/components/dynamic_field.vue
...avascripts/integrations/edit/components/dynamic_field.vue
+9
-6
app/views/shared/_service_settings.html.haml
app/views/shared/_service_settings.html.haml
+3
-2
spec/features/admin/services/admin_activates_prometheus_spec.rb
...eatures/admin/services/admin_activates_prometheus_spec.rb
+2
-0
No files found.
app/assets/javascripts/integrations/edit/components/dynamic_field.vue
View file @
96825378
<
script
>
import
{
start
Case
,
isEmpty
}
from
'
lodash
'
;
import
{
capitalize
,
lower
Case
,
isEmpty
}
from
'
lodash
'
;
import
{
__
,
sprintf
}
from
'
~/locale
'
;
import
{
GlFormGroup
,
GlFormCheckbox
,
GlFormInput
,
GlFormSelect
,
GlFormTextarea
}
from
'
@gitlab/ui
'
;
...
...
@@ -73,14 +73,15 @@ export default {
return
this
.
isPassword
&&
!
isEmpty
(
this
.
value
);
},
label
()
{
const
title
=
this
.
title
||
startCase
(
this
.
name
);
if
(
this
.
isNonEmptyPassword
)
{
return
sprintf
(
__
(
'
Enter new %{field_title}
'
),
{
password
:
t
itle
,
field_title
:
this
.
humanizedT
itle
,
});
}
return
title
;
return
this
.
humanizedTitle
;
},
humanizedTitle
()
{
return
this
.
title
||
capitalize
(
lowerCase
(
this
.
name
));
},
passwordRequired
()
{
return
isEmpty
(
this
.
value
)
&&
this
.
required
;
...
...
@@ -118,7 +119,9 @@ export default {
<gl-form-group
:label=
"label"
:label-for=
"fieldId"
:description=
"help"
>
<template
v-if=
"isCheckbox"
>
<input
:name=
"fieldName"
type=
"hidden"
value=
"false"
/>
<gl-form-checkbox
v-model=
"model"
v-bind=
"sharedProps"
/>
<gl-form-checkbox
v-model=
"model"
v-bind=
"sharedProps"
>
{{
humanizedTitle
}}
</gl-form-checkbox>
</
template
>
<gl-form-select
v-else-if=
"isSelect"
v-model=
"model"
v-bind=
"sharedProps"
:options=
"options"
/>
<gl-form-textarea
...
...
app/views/shared/_service_settings.html.haml
View file @
96825378
...
...
@@ -34,5 +34,6 @@ commit_events: @service.commit_events.to_s, enable_comments: @service.comment_on
%p
.text-muted
=
@service
.
class
.
event_description
(
event
)
-
@service
.
global_fields
.
each
do
|
field
|
=
render
'shared/field'
,
form:
form
,
field:
field
-
if
Feature
.
disabled?
(
:integration_form_refactor
)
-
@service
.
global_fields
.
each
do
|
field
|
=
render
'shared/field'
,
form:
form
,
field:
field
spec/features/admin/services/admin_activates_prometheus_spec.rb
View file @
96825378
...
...
@@ -6,6 +6,8 @@ describe 'Admin activates Prometheus' do
let
(
:admin
)
{
create
(
:user
,
:admin
)
}
before
do
stub_feature_flags
(
integration_form_refactor:
false
)
sign_in
(
admin
)
visit
(
admin_application_settings_services_path
)
...
...
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