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
3fd677f6
Commit
3fd677f6
authored
Sep 15, 2020
by
Sunjung Park
Committed by
Nicolò Maria Mezzopera
Sep 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace Glbutton in the Geo node secondary form - selecting shards
parent
06766b6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
13 deletions
+30
-13
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_shards.vue
...scripts/geo_node_form/components/geo_node_form_shards.vue
+19
-11
ee/app/assets/stylesheets/pages/geo.scss
ee/app/assets/stylesheets/pages/geo.scss
+9
-0
ee/spec/frontend/geo_node_form/components/geo_node_form_shards_spec.js
...end/geo_node_form/components/geo_node_form_shards_spec.js
+2
-2
No files found.
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_shards.vue
View file @
3fd677f6
<
script
>
import
{
GlIcon
,
Gl
DeprecatedDropdown
,
GlDeprecatedButto
n
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
,
Gl
Button
,
GlDropdow
n
}
from
'
@gitlab/ui
'
;
import
{
__
,
n__
}
from
'
~/locale
'
;
import
{
SELECTIVE_SYNC_SHARDS
}
from
'
../constants
'
;
...
...
@@ -7,8 +7,8 @@ export default {
name
:
'
GeoNodeFormShards
'
,
components
:
{
GlIcon
,
Gl
DeprecatedDropdow
n
,
GlD
eprecatedButto
n
,
Gl
Butto
n
,
GlD
ropdow
n
,
},
props
:
{
syncShardsOptions
:
{
...
...
@@ -49,13 +49,21 @@ export default {
</
script
>
<
template
>
<gl-deprecated-dropdown
:text=
"dropdownTitle"
>
<li
v-for=
"shard in syncShardsOptions"
:key=
"shard.value"
>
<gl-deprecated-button
class=
"d-flex align-items-center"
@
click=
"toggleShard(shard)"
>
<gl-icon
:class=
"[
{ invisible: !isSelected(shard) }]" name="mobile-issue-close" />
<span
class=
"ml-1"
>
{{
shard
.
label
}}
</span>
</gl-deprecated-button>
<gl-dropdown
id=
"node-synchronization-shards-field"
:text=
"dropdownTitle"
>
<li
v-for=
"shard in syncShardsOptions"
:key=
"shard.value"
class=
"gl-display-flex! gl-align-items-center"
>
<gl-icon
class=
"gl-mx-3"
:class=
"[
{ invisible: !isSelected(shard) }]"
name="mobile-issue-close"
/>
<gl-button
category=
"tertiary"
@
click=
"toggleShard(shard)"
>
<span
class=
"gl-white-space-normal"
>
{{
shard
.
label
}}
</span>
</gl-button>
</li>
<div
v-if=
"noSyncShards"
class=
"
text-secondary p-2
"
>
{{
__
(
'
Nothing found…
'
)
}}
</div>
</gl-d
eprecated-d
ropdown>
<div
v-if=
"noSyncShards"
class=
"
gl-text-gray-500 gl-p-3
"
>
{{
__
(
'
Nothing found…
'
)
}}
</div>
</gl-dropdown>
</
template
>
ee/app/assets/stylesheets/pages/geo.scss
View file @
3fd677f6
...
...
@@ -19,3 +19,12 @@
padding-left
:
1
.75rem
;
}
}
// Overrides max-width from `app/assets/stylesheets/framework/dropdowns.scss`
.geo-node-form-container
{
#node-synchronization-shards-field
{
.dropdown-menu
{
width
:
auto
;
}
}
}
ee/spec/frontend/geo_node_form/components/geo_node_form_shards_spec.js
View file @
3fd677f6
import
{
mount
}
from
'
@vue/test-utils
'
;
import
{
GlIcon
,
GlD
eprecatedD
ropdown
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
,
GlDropdown
}
from
'
@gitlab/ui
'
;
import
GeoNodeFormShards
from
'
ee/geo_node_form/components/geo_node_form_shards.vue
'
;
import
{
MOCK_SYNC_SHARDS
}
from
'
../mock_data
'
;
...
...
@@ -24,7 +24,7 @@ describe('GeoNodeFormShards', () => {
wrapper
.
destroy
();
});
const
findGlDropdown
=
()
=>
wrapper
.
find
(
GlD
eprecatedD
ropdown
);
const
findGlDropdown
=
()
=>
wrapper
.
find
(
GlDropdown
);
const
findDropdownItems
=
()
=>
findGlDropdown
().
findAll
(
'
li
'
);
describe
(
'
template
'
,
()
=>
{
...
...
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