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
bd6b75ed
Commit
bd6b75ed
authored
Oct 28, 2020
by
Marvin Karegyeya
Committed by
Olena Horal-Koretska
Oct 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace GlDeprecatedDropdown in app/assets/javascripts/monitoring
parent
f7384cc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
13 deletions
+15
-13
app/assets/javascripts/monitoring/components/variables/dropdown_field.vue
...cripts/monitoring/components/variables/dropdown_field.vue
+7
-10
changelogs/unreleased/Replace-GlDeprecatedDropdown-with-GlDropdown-in-app-assets-javascripts-mo.yml
...Dropdown-with-GlDropdown-in-app-assets-javascripts-mo.yml
+5
-0
spec/frontend/monitoring/components/variables/dropdown_field_spec.js
...nd/monitoring/components/variables/dropdown_field_spec.js
+3
-3
No files found.
app/assets/javascripts/monitoring/components/variables/dropdown_field.vue
View file @
bd6b75ed
<
script
>
import
{
GlFormGroup
,
GlD
eprecatedDropdown
,
GlDeprecated
DropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlFormGroup
,
GlD
ropdown
,
Gl
DropdownItem
}
from
'
@gitlab/ui
'
;
export
default
{
components
:
{
GlFormGroup
,
GlD
eprecatedD
ropdown
,
GlD
eprecatedD
ropdownItem
,
GlDropdown
,
GlDropdownItem
,
},
props
:
{
name
:
{
...
...
@@ -41,16 +41,13 @@ export default {
</
script
>
<
template
>
<gl-form-group
:label=
"label"
>
<gl-deprecated-dropdown
toggle-class=
"dropdown-menu-toggle"
:text=
"text || s__('Metrics|Select a value')"
>
<gl-deprecated-dropdown-item
<gl-dropdown
toggle-class=
"dropdown-menu-toggle"
:text=
"text || s__('Metrics|Select a value')"
>
<gl-dropdown-item
v-for=
"val in options.values"
:key=
"val.value"
@
click=
"onUpdate(val.value)"
>
{{
val
.
text
}}
</gl-d
eprecated-d
ropdown-item
>
{{
val
.
text
}}
</gl-dropdown-item
>
</gl-d
eprecated-d
ropdown>
</gl-dropdown>
</gl-form-group>
</
template
>
changelogs/unreleased/Replace-GlDeprecatedDropdown-with-GlDropdown-in-app-assets-javascripts-mo.yml
0 → 100644
View file @
bd6b75ed
---
title
:
Replace-GlDeprecatedDropdown-with-GlDropdown-in-app/assets/javascripts/monitoring
merge_request
:
41422
author
:
nuwe1
type
:
other
spec/frontend/monitoring/components/variables/dropdown_field_spec.js
View file @
bd6b75ed
import
{
shallowMount
}
from
'
@vue/test-utils
'
;
import
{
GlD
eprecatedDropdown
,
GlDeprecated
DropdownItem
}
from
'
@gitlab/ui
'
;
import
{
GlD
ropdown
,
Gl
DropdownItem
}
from
'
@gitlab/ui
'
;
import
DropdownField
from
'
~/monitoring/components/variables/dropdown_field.vue
'
;
describe
(
'
Custom variable component
'
,
()
=>
{
...
...
@@ -23,8 +23,8 @@ describe('Custom variable component', () => {
});
};
const
findDropdown
=
()
=>
wrapper
.
find
(
GlD
eprecatedD
ropdown
);
const
findDropdownItems
=
()
=>
wrapper
.
findAll
(
GlD
eprecatedD
ropdownItem
);
const
findDropdown
=
()
=>
wrapper
.
find
(
GlDropdown
);
const
findDropdownItems
=
()
=>
wrapper
.
findAll
(
GlDropdownItem
);
it
(
'
renders dropdown element when all necessary props are passed
'
,
()
=>
{
createShallowWrapper
();
...
...
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