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
f71ed512
Commit
f71ed512
authored
Feb 26, 2020
by
Mike Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show secondary-only setting on only on secondaries
Also on the new feature-flagged Vue form.
parent
6ed40ca0
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
26 deletions
+32
-26
changelogs/unreleased/mk-hide-secondary-only-setting.yml
changelogs/unreleased/mk-hide-secondary-only-setting.yml
+5
-0
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_capacities.vue
...pts/geo_node_form/components/geo_node_form_capacities.vue
+9
-8
ee/app/views/admin/geo/nodes/_form.html.haml
ee/app/views/admin/geo/nodes/_form.html.haml
+6
-6
ee/spec/frontend/geo_node_form/components/geo_node_form_capacities_spec.js
...geo_node_form/components/geo_node_form_capacities_spec.js
+12
-12
No files found.
changelogs/unreleased/mk-hide-secondary-only-setting.yml
0 → 100644
View file @
f71ed512
---
title
:
'
Geo:
Show
secondary-only
setting
on
only
on
secondaries'
merge_request
:
26029
author
:
type
:
fixed
ee/app/assets/javascripts/geo_node_form/components/geo_node_form_capacities.vue
View file @
f71ed512
...
@@ -35,14 +35,6 @@ export default {
...
@@ -35,14 +35,6 @@ export default {
key
:
'
filesMaxCapacity
'
,
key
:
'
filesMaxCapacity
'
,
conditional
:
'
secondary
'
,
conditional
:
'
secondary
'
,
},
},
{
id
:
'
node-verification-capacity-field
'
,
label
:
__
(
'
Verification capacity
'
),
description
:
__
(
'
Control the maximum concurrency of verification operations for this Geo node
'
,
),
key
:
'
verificationMaxCapacity
'
,
},
{
{
id
:
'
node-container-repository-capacity-field
'
,
id
:
'
node-container-repository-capacity-field
'
,
label
:
__
(
'
Container repositories sync capacity
'
),
label
:
__
(
'
Container repositories sync capacity
'
),
...
@@ -50,6 +42,15 @@ export default {
...
@@ -50,6 +42,15 @@ export default {
'
Control the maximum concurrency of container repository operations for this Geo node
'
,
'
Control the maximum concurrency of container repository operations for this Geo node
'
,
),
),
key
:
'
containerRepositoriesMaxCapacity
'
,
key
:
'
containerRepositoriesMaxCapacity
'
,
conditional
:
'
secondary
'
,
},
{
id
:
'
node-verification-capacity-field
'
,
label
:
__
(
'
Verification capacity
'
),
description
:
__
(
'
Control the maximum concurrency of verification operations for this Geo node
'
,
),
key
:
'
verificationMaxCapacity
'
,
},
},
{
{
id
:
'
node-reverification-interval-field
'
,
id
:
'
node-reverification-interval-field
'
,
...
...
ee/app/views/admin/geo/nodes/_form.html.haml
View file @
f71ed512
...
@@ -52,18 +52,18 @@
...
@@ -52,18 +52,18 @@
=
form
.
number_field
:files_max_capacity
,
class:
'form-control col-sm-2'
,
min:
0
=
form
.
number_field
:files_max_capacity
,
class:
'form-control col-sm-2'
,
min:
0
.form-text.text-muted
=
s_
(
'Geo|Control the maximum concurrency of LFS/attachment backfill for this secondary node'
)
.form-text.text-muted
=
s_
(
'Geo|Control the maximum concurrency of LFS/attachment backfill for this secondary node'
)
.form-row.form-group.js-hide-if-geo-primary
{
class:
(
'hidden'
unless
geo_node
.
secondary?
)
}
.col-sm-8
=
form
.
label
:container_repositories_max_capacity
,
s_
(
'Geo|Container repositories sync capacity'
),
class:
'font-weight-bold'
=
form
.
number_field
:container_repositories_max_capacity
,
class:
'form-control col-sm-2'
,
min:
0
.form-text.text-muted
=
s_
(
'Geo|Control the maximum concurrency of container repository operations for this Geo node'
)
.form-row.form-group
.form-row.form-group
.col-sm-8
.col-sm-8
=
form
.
label
:verification_max_capacity
,
s_
(
'Geo|Verification capacity'
),
class:
'font-weight-bold'
=
form
.
label
:verification_max_capacity
,
s_
(
'Geo|Verification capacity'
),
class:
'font-weight-bold'
=
form
.
number_field
:verification_max_capacity
,
class:
'form-control col-sm-2'
,
min:
0
=
form
.
number_field
:verification_max_capacity
,
class:
'form-control col-sm-2'
,
min:
0
.form-text.text-muted
=
s_
(
'Geo|Control the maximum concurrency of verification operations for this Geo node'
)
.form-text.text-muted
=
s_
(
'Geo|Control the maximum concurrency of verification operations for this Geo node'
)
.form-row.form-group
.col-sm-8
=
form
.
label
:container_repositories_max_capacity
,
s_
(
'Geo|Container repositories sync capacity'
),
class:
'font-weight-bold'
=
form
.
number_field
:container_repositories_max_capacity
,
class:
'form-control col-sm-2'
,
min:
0
.form-text.text-muted
=
s_
(
'Geo|Control the maximum concurrency of container repository operations for this Geo node'
)
.form-row.form-group.js-hide-if-geo-secondary
{
class:
(
'hidden'
unless
geo_node
.
primary?
)
}
.form-row.form-group.js-hide-if-geo-secondary
{
class:
(
'hidden'
unless
geo_node
.
primary?
)
}
.col-sm-8
.col-sm-8
=
form
.
label
:minimum_reverification_interval
,
s_
(
'Geo|Re-verification interval'
),
class:
'font-weight-bold'
=
form
.
label
:minimum_reverification_interval
,
s_
(
'Geo|Re-verification interval'
),
class:
'font-weight-bold'
...
...
ee/spec/frontend/geo_node_form/components/geo_node_form_capacities_spec.js
View file @
f71ed512
...
@@ -22,17 +22,17 @@ describe('GeoNodeFormCapacities', () => {
...
@@ -22,17 +22,17 @@ describe('GeoNodeFormCapacities', () => {
const
findGeoNodeFormRepositoryCapacityField
=
()
=>
const
findGeoNodeFormRepositoryCapacityField
=
()
=>
wrapper
.
find
(
'
#node-repository-capacity-field
'
);
wrapper
.
find
(
'
#node-repository-capacity-field
'
);
const
findGeoNodeFormFileCapacityField
=
()
=>
wrapper
.
find
(
'
#node-file-capacity-field
'
);
const
findGeoNodeFormFileCapacityField
=
()
=>
wrapper
.
find
(
'
#node-file-capacity-field
'
);
const
findGeoNodeFormVerificationCapacityField
=
()
=>
wrapper
.
find
(
'
#node-verification-capacity-field
'
);
const
findGeoNodeFormContainerRepositoryCapacityField
=
()
=>
const
findGeoNodeFormContainerRepositoryCapacityField
=
()
=>
wrapper
.
find
(
'
#node-container-repository-capacity-field
'
);
wrapper
.
find
(
'
#node-container-repository-capacity-field
'
);
const
findGeoNodeFormVerificationCapacityField
=
()
=>
wrapper
.
find
(
'
#node-verification-capacity-field
'
);
const
findGeoNodeFormReverificationIntervalField
=
()
=>
const
findGeoNodeFormReverificationIntervalField
=
()
=>
wrapper
.
find
(
'
#node-reverification-interval-field
'
);
wrapper
.
find
(
'
#node-reverification-interval-field
'
);
describe
(
'
template
'
,
()
=>
{
describe
(
'
template
'
,
()
=>
{
describe
.
each
`
describe
.
each
`
primaryNode | showRepoCapacity | showFileCapacity | showVerificationCapacity | showContainerCapacity | showReverificationInterval
primaryNode | showRepoCapacity | showFileCapacity | showVerificationCapacity | showContainerCapacity | showReverificationInterval
${
true
}
|
${
false
}
|
${
false
}
|
${
true
}
|
${
true
}
|
${
true
}
${
true
}
|
${
false
}
|
${
false
}
|
${
true
}
|
${
false
}
|
${
true
}
${
false
}
|
${
true
}
|
${
true
}
|
${
true
}
|
${
true
}
|
${
false
}
${
false
}
|
${
true
}
|
${
true
}
|
${
true
}
|
${
true
}
|
${
false
}
`
(
`
(
`conditional fields`
,
`conditional fields`
,
...
@@ -40,8 +40,8 @@ describe('GeoNodeFormCapacities', () => {
...
@@ -40,8 +40,8 @@ describe('GeoNodeFormCapacities', () => {
primaryNode
,
primaryNode
,
showRepoCapacity
,
showRepoCapacity
,
showFileCapacity
,
showFileCapacity
,
showVerificationCapacity
,
showContainerCapacity
,
showContainerCapacity
,
showVerificationCapacity
,
showReverificationInterval
,
showReverificationInterval
,
})
=>
{
})
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
...
@@ -57,14 +57,6 @@ describe('GeoNodeFormCapacities', () => {
...
@@ -57,14 +57,6 @@ describe('GeoNodeFormCapacities', () => {
expect
(
findGeoNodeFormFileCapacityField
().
exists
()).
toBe
(
showFileCapacity
);
expect
(
findGeoNodeFormFileCapacityField
().
exists
()).
toBe
(
showFileCapacity
);
});
});
it
(
`it
${
showVerificationCapacity
?
'
shows
'
:
'
hides
'
}
the Verification Capacity Field`
,
()
=>
{
expect
(
findGeoNodeFormVerificationCapacityField
().
exists
()).
toBe
(
showVerificationCapacity
,
);
});
it
(
`it
${
it
(
`it
${
showContainerCapacity
?
'
shows
'
:
'
hides
'
showContainerCapacity
?
'
shows
'
:
'
hides
'
}
the Container Repository Capacity Field`
,
()
=>
{
}
the Container Repository Capacity Field`
,
()
=>
{
...
@@ -73,6 +65,14 @@ describe('GeoNodeFormCapacities', () => {
...
@@ -73,6 +65,14 @@ describe('GeoNodeFormCapacities', () => {
);
);
});
});
it
(
`it
${
showVerificationCapacity
?
'
shows
'
:
'
hides
'
}
the Verification Capacity Field`
,
()
=>
{
expect
(
findGeoNodeFormVerificationCapacityField
().
exists
()).
toBe
(
showVerificationCapacity
,
);
});
it
(
`it
${
it
(
`it
${
showReverificationInterval
?
'
shows
'
:
'
hides
'
showReverificationInterval
?
'
shows
'
:
'
hides
'
}
the Reverification Interval Field`
,
()
=>
{
}
the Reverification Interval Field`
,
()
=>
{
...
...
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