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
Show 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
>
<
script
>
import
{
GlIcon
,
Gl
DeprecatedDropdown
,
GlDeprecatedButto
n
}
from
'
@gitlab/ui
'
;
import
{
GlIcon
,
Gl
Button
,
GlDropdow
n
}
from
'
@gitlab/ui
'
;
import
{
__
,
n__
}
from
'
~/locale
'
;
import
{
__
,
n__
}
from
'
~/locale
'
;
import
{
SELECTIVE_SYNC_SHARDS
}
from
'
../constants
'
;
import
{
SELECTIVE_SYNC_SHARDS
}
from
'
../constants
'
;
...
@@ -7,8 +7,8 @@ export default {
...
@@ -7,8 +7,8 @@ export default {
name
:
'
GeoNodeFormShards
'
,
name
:
'
GeoNodeFormShards
'
,
components
:
{
components
:
{
GlIcon
,
GlIcon
,
Gl
DeprecatedDropdow
n
,
Gl
Butto
n
,
GlD
eprecatedButto
n
,
GlD
ropdow
n
,
},
},
props
:
{
props
:
{
syncShardsOptions
:
{
syncShardsOptions
:
{
...
@@ -49,13 +49,21 @@ export default {
...
@@ -49,13 +49,21 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<gl-deprecated-dropdown
:text=
"dropdownTitle"
>
<gl-dropdown
id=
"node-synchronization-shards-field"
:text=
"dropdownTitle"
>
<li
v-for=
"shard in syncShardsOptions"
:key=
"shard.value"
>
<li
<gl-deprecated-button
class=
"d-flex align-items-center"
@
click=
"toggleShard(shard)"
>
v-for=
"shard in syncShardsOptions"
<gl-icon
:class=
"[
{ invisible: !isSelected(shard) }]" name="mobile-issue-close" />
:key=
"shard.value"
<span
class=
"ml-1"
>
{{
shard
.
label
}}
</span>
class=
"gl-display-flex! gl-align-items-center"
</gl-deprecated-button>
>
<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>
</li>
<div
v-if=
"noSyncShards"
class=
"
text-secondary p-2
"
>
{{
__
(
'
Nothing found…
'
)
}}
</div>
<div
v-if=
"noSyncShards"
class=
"
gl-text-gray-500 gl-p-3
"
>
{{
__
(
'
Nothing found…
'
)
}}
</div>
</gl-d
eprecated-d
ropdown>
</gl-dropdown>
</
template
>
</
template
>
ee/app/assets/stylesheets/pages/geo.scss
View file @
3fd677f6
...
@@ -19,3 +19,12 @@
...
@@ -19,3 +19,12 @@
padding-left
:
1
.75rem
;
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
{
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
GeoNodeFormShards
from
'
ee/geo_node_form/components/geo_node_form_shards.vue
'
;
import
{
MOCK_SYNC_SHARDS
}
from
'
../mock_data
'
;
import
{
MOCK_SYNC_SHARDS
}
from
'
../mock_data
'
;
...
@@ -24,7 +24,7 @@ describe('GeoNodeFormShards', () => {
...
@@ -24,7 +24,7 @@ describe('GeoNodeFormShards', () => {
wrapper
.
destroy
();
wrapper
.
destroy
();
});
});
const
findGlDropdown
=
()
=>
wrapper
.
find
(
GlD
eprecatedD
ropdown
);
const
findGlDropdown
=
()
=>
wrapper
.
find
(
GlDropdown
);
const
findDropdownItems
=
()
=>
findGlDropdown
().
findAll
(
'
li
'
);
const
findDropdownItems
=
()
=>
findGlDropdown
().
findAll
(
'
li
'
);
describe
(
'
template
'
,
()
=>
{
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