Commit bdee564d authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch '339711-geo-nodes-rename' into 'master'

Geo UI - Rename Nodes to Sites

See merge request gitlab-org/gitlab!78310
parents faf66196 42540178
...@@ -139,7 +139,6 @@ export default { ...@@ -139,7 +139,6 @@ export default {
class="col-12 col-sm-6" class="col-12 col-sm-6"
:label="__('Internal URL (optional)')" :label="__('Internal URL (optional)')"
label-for="node-internal-url-field" label-for="node-internal-url-field"
:description="internalUrlDescription"
> >
<template #description> <template #description>
<gl-sprintf <gl-sprintf
......
...@@ -138,7 +138,7 @@ export default { ...@@ -138,7 +138,7 @@ export default {
</template> </template>
<!-- eslint-disable vue/no-mutating-props --> <!-- eslint-disable vue/no-mutating-props -->
<gl-form-checkbox id="node-object-storage-field" v-model="nodeData.syncObjectStorage">{{ <gl-form-checkbox id="node-object-storage-field" v-model="nodeData.syncObjectStorage">{{
__('Allow this secondary node to replicate content on Object Storage') __('Allow this secondary site to replicate content on Object Storage')
}}</gl-form-checkbox> }}</gl-form-checkbox>
<!-- eslint-enable vue/no-mutating-props --> <!-- eslint-enable vue/no-mutating-props -->
</gl-form-group> </gl-form-group>
......
...@@ -22,7 +22,7 @@ export const receiveSyncNamespacesSuccess = ({ commit }, data) => ...@@ -22,7 +22,7 @@ export const receiveSyncNamespacesSuccess = ({ commit }, data) =>
commit(types.RECEIVE_SYNC_NAMESPACES_SUCCESS, data); commit(types.RECEIVE_SYNC_NAMESPACES_SUCCESS, data);
export const receiveSyncNamespacesError = ({ commit }) => { export const receiveSyncNamespacesError = ({ commit }) => {
createFlash({ createFlash({
message: __("There was an error fetching the Node's Groups"), message: __("There was an error fetching the Sites's Groups"),
}); });
commit(types.RECEIVE_SYNC_NAMESPACES_ERROR); commit(types.RECEIVE_SYNC_NAMESPACES_ERROR);
}; };
...@@ -45,7 +45,7 @@ export const receiveSaveGeoNodeSuccess = ({ commit, state }) => { ...@@ -45,7 +45,7 @@ export const receiveSaveGeoNodeSuccess = ({ commit, state }) => {
visitUrl(state.nodesPath); visitUrl(state.nodesPath);
}; };
export const receiveSaveGeoNodeError = ({ commit }, data) => { export const receiveSaveGeoNodeError = ({ commit }, data) => {
let errorMessage = __('There was an error saving this Geo Node.'); let errorMessage = __('There was an error saving this Geo Site');
if (data?.message) { if (data?.message) {
errorMessage += ` ${getSaveErrorMessage(data.message)}`; errorMessage += ` ${getSaveErrorMessage(data.message)}`;
......
...@@ -3,9 +3,9 @@ import { sprintf, s__ } from '~/locale'; ...@@ -3,9 +3,9 @@ import { sprintf, s__ } from '~/locale';
export const validateName = (data) => { export const validateName = (data) => {
if (!data) { if (!data) {
return s__("Geo|Node name can't be blank"); return s__("Geo|Site name can't be blank");
} else if (data.length > 255) { } else if (data.length > 255) {
return s__('Geo|Node name should be between 1 and 255 characters'); return s__('Geo|Site name should be between 1 and 255 characters');
} }
return ''; return '';
......
...@@ -14,9 +14,9 @@ export default { ...@@ -14,9 +14,9 @@ export default {
'Geo|With GitLab Geo, you can install a special read-only and replicated instance anywhere. %{linkStart}Learn more%{linkEnd}', 'Geo|With GitLab Geo, you can install a special read-only and replicated instance anywhere. %{linkStart}Learn more%{linkEnd}',
), ),
addSite: s__('Geo|Add site'), addSite: s__('Geo|Add site'),
modalTitle: s__('Geo|Remove node'), modalTitle: s__('Geo|Remove site'),
modalBody: s__( modalBody: s__(
'Geo|Removing a Geo node stops the synchronization to and from that node. Are you sure?', 'Geo|Removing a Geo site stops the synchronization to and from that site. Are you sure?',
), ),
primarySite: s__('Geo|Primary site'), primarySite: s__('Geo|Primary site'),
secondarySite: s__('Geo|Secondary site'), secondarySite: s__('Geo|Secondary site'),
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
}, },
GEO_INFO_URL, GEO_INFO_URL,
MODAL_PRIMARY_ACTION: { MODAL_PRIMARY_ACTION: {
text: s__('Geo|Remove node'), text: s__('Geo|Remove site'),
attributes: { attributes: {
variant: 'danger', variant: 'danger',
}, },
......
...@@ -21,7 +21,7 @@ export const fetchNodes = ({ commit }) => { ...@@ -21,7 +21,7 @@ export const fetchNodes = ({ commit }) => {
commit(types.RECEIVE_NODES_SUCCESS, inflatedNodes); commit(types.RECEIVE_NODES_SUCCESS, inflatedNodes);
}) })
.catch(() => { .catch(() => {
createFlash({ message: s__('Geo|There was an error fetching the Geo Nodes') }); createFlash({ message: s__('Geo|There was an error fetching the Geo Sites') });
commit(types.RECEIVE_NODES_ERROR); commit(types.RECEIVE_NODES_ERROR);
}); });
}; };
...@@ -42,7 +42,7 @@ export const removeNode = ({ commit, state }) => { ...@@ -42,7 +42,7 @@ export const removeNode = ({ commit, state }) => {
commit(types.RECEIVE_NODE_REMOVAL_SUCCESS); commit(types.RECEIVE_NODE_REMOVAL_SUCCESS);
}) })
.catch(() => { .catch(() => {
createFlash({ message: s__('Geo|There was an error deleting the Geo Node') }); createFlash({ message: s__('Geo|There was an error deleting the Geo Site') });
commit(types.RECEIVE_NODE_REMOVAL_ERROR); commit(types.RECEIVE_NODE_REMOVAL_ERROR);
}); });
}; };
...@@ -175,7 +175,7 @@ RSpec.describe 'admin Geo Nodes', :js, :geo do ...@@ -175,7 +175,7 @@ RSpec.describe 'admin Geo Nodes', :js, :geo do
page.click_button('Remove') page.click_button('Remove')
page.within('.gl-modal') do page.within('.gl-modal') do
page.click_button('Remove node') page.click_button('Remove site')
end end
expect(current_path).to eq admin_geo_nodes_path expect(current_path).to eq admin_geo_nodes_path
......
...@@ -101,9 +101,9 @@ describe('GeoNodeFormCore', () => { ...@@ -101,9 +101,9 @@ describe('GeoNodeFormCore', () => {
describe('errors', () => { describe('errors', () => {
describe.each` describe.each`
data | showError | errorMessage data | showError | errorMessage
${null} | ${true} | ${"Node name can't be blank"} ${null} | ${true} | ${"Site name can't be blank"}
${''} | ${true} | ${"Node name can't be blank"} ${''} | ${true} | ${"Site name can't be blank"}
${STRING_OVER_255} | ${true} | ${'Node name should be between 1 and 255 characters'} ${STRING_OVER_255} | ${true} | ${'Site name should be between 1 and 255 characters'}
${'Test'} | ${false} | ${null} ${'Test'} | ${false} | ${null}
`(`Name Field`, ({ data, showError, errorMessage }) => { `(`Name Field`, ({ data, showError, errorMessage }) => {
beforeEach(() => { beforeEach(() => {
......
...@@ -76,7 +76,7 @@ describe('GeoNodeForm Store Actions', () => { ...@@ -76,7 +76,7 @@ describe('GeoNodeForm Store Actions', () => {
}); });
describe('receiveSaveGeoNodeError', () => { describe('receiveSaveGeoNodeError', () => {
const defaultErrorMessage = 'There was an error saving this Geo Node.'; const defaultErrorMessage = 'There was an error saving this Geo Site';
it('when message passed it builds the error message correctly', () => { it('when message passed it builds the error message correctly', () => {
return testAction( return testAction(
......
...@@ -4,9 +4,9 @@ import { STRING_OVER_255 } from './mock_data'; ...@@ -4,9 +4,9 @@ import { STRING_OVER_255 } from './mock_data';
describe('GeoNodeForm Validations', () => { describe('GeoNodeForm Validations', () => {
describe.each` describe.each`
data | errorMessage data | errorMessage
${null} | ${"Node name can't be blank"} ${null} | ${"Site name can't be blank"}
${''} | ${"Node name can't be blank"} ${''} | ${"Site name can't be blank"}
${STRING_OVER_255} | ${'Node name should be between 1 and 255 characters'} ${STRING_OVER_255} | ${'Site name should be between 1 and 255 characters'}
${'Test'} | ${''} ${'Test'} | ${''}
`(`validateName`, ({ data, errorMessage }) => { `(`validateName`, ({ data, errorMessage }) => {
let validateNameRes = ''; let validateNameRes = '';
......
...@@ -124,7 +124,7 @@ export const MOCK_SECONDARY_SYNC_INFO = [ ...@@ -124,7 +124,7 @@ export const MOCK_SECONDARY_SYNC_INFO = [
export const MOCK_NODES = [ export const MOCK_NODES = [
{ {
id: 1, id: 1,
name: 'Test Node 1', name: 'Test Site 1',
url: 'http://127.0.0.1:3001/', url: 'http://127.0.0.1:3001/',
primary: true, primary: true,
enabled: true, enabled: true,
...@@ -144,7 +144,7 @@ export const MOCK_NODES = [ ...@@ -144,7 +144,7 @@ export const MOCK_NODES = [
}, },
{ {
id: 2, id: 2,
name: 'Test Node 2', name: 'Test Site 2',
url: 'http://127.0.0.1:3002/', url: 'http://127.0.0.1:3002/',
primary: false, primary: false,
enabled: true, enabled: true,
...@@ -181,7 +181,7 @@ export const MOCK_NODES = [ ...@@ -181,7 +181,7 @@ export const MOCK_NODES = [
export const MOCK_NODES_RES = [ export const MOCK_NODES_RES = [
{ {
id: 1, id: 1,
name: 'Test Node 1', name: 'Test Site 1',
url: 'http://127.0.0.1:3001/', url: 'http://127.0.0.1:3001/',
primary: true, primary: true,
enabled: true, enabled: true,
...@@ -189,7 +189,7 @@ export const MOCK_NODES_RES = [ ...@@ -189,7 +189,7 @@ export const MOCK_NODES_RES = [
}, },
{ {
id: 2, id: 2,
name: 'Test Node 2', name: 'Test Site 2',
url: 'http://127.0.0.1:3002/', url: 'http://127.0.0.1:3002/',
primary: false, primary: false,
enabled: true, enabled: true,
......
...@@ -3542,7 +3542,7 @@ msgstr "" ...@@ -3542,7 +3542,7 @@ msgstr ""
msgid "Allow this key to push to this repository" msgid "Allow this key to push to this repository"
msgstr "" msgstr ""
msgid "Allow this secondary node to replicate content on Object Storage" msgid "Allow this secondary site to replicate content on Object Storage"
msgstr "" msgstr ""
msgid "Allow use of licensed EE features" msgid "Allow use of licensed EE features"
...@@ -15842,12 +15842,6 @@ msgstr "" ...@@ -15842,12 +15842,6 @@ msgstr ""
msgid "Geo|No available replication slots" msgid "Geo|No available replication slots"
msgstr "" msgstr ""
msgid "Geo|Node name can't be blank"
msgstr ""
msgid "Geo|Node name should be between 1 and 255 characters"
msgstr ""
msgid "Geo|Not synced yet" msgid "Geo|Not synced yet"
msgstr "" msgstr ""
...@@ -15902,13 +15896,13 @@ msgstr "" ...@@ -15902,13 +15896,13 @@ msgstr ""
msgid "Geo|Remove entry" msgid "Geo|Remove entry"
msgstr "" msgstr ""
msgid "Geo|Remove node" msgid "Geo|Remove site"
msgstr "" msgstr ""
msgid "Geo|Remove tracking database entry" msgid "Geo|Remove tracking database entry"
msgstr "" msgstr ""
msgid "Geo|Removing a Geo node stops the synchronization to and from that node. Are you sure?" msgid "Geo|Removing a Geo site stops the synchronization to and from that site. Are you sure?"
msgstr "" msgstr ""
msgid "Geo|Replicated data is verified with the secondary site(s) using checksums" msgid "Geo|Replicated data is verified with the secondary site(s) using checksums"
...@@ -15971,6 +15965,12 @@ msgstr "" ...@@ -15971,6 +15965,12 @@ msgstr ""
msgid "Geo|Selective (%{syncLabel})" msgid "Geo|Selective (%{syncLabel})"
msgstr "" msgstr ""
msgid "Geo|Site name can't be blank"
msgstr ""
msgid "Geo|Site name should be between 1 and 255 characters"
msgstr ""
msgid "Geo|Site's status was updated %{timeAgo}." msgid "Geo|Site's status was updated %{timeAgo}."
msgstr "" msgstr ""
...@@ -16007,10 +16007,10 @@ msgstr "" ...@@ -16007,10 +16007,10 @@ msgstr ""
msgid "Geo|There are no %{replicable_type} to show" msgid "Geo|There are no %{replicable_type} to show"
msgstr "" msgstr ""
msgid "Geo|There was an error deleting the Geo Node" msgid "Geo|There was an error deleting the Geo Site"
msgstr "" msgstr ""
msgid "Geo|There was an error fetching the Geo Nodes" msgid "Geo|There was an error fetching the Geo Sites"
msgstr "" msgstr ""
msgid "Geo|This will resync all %{replicableType}. It may take some time to complete. Are you sure you want to continue?" msgid "Geo|This will resync all %{replicableType}. It may take some time to complete. Are you sure you want to continue?"
...@@ -36140,7 +36140,7 @@ msgstr "" ...@@ -36140,7 +36140,7 @@ msgstr ""
msgid "There was an error fetching the Geo Settings" msgid "There was an error fetching the Geo Settings"
msgstr "" msgstr ""
msgid "There was an error fetching the Node's Groups" msgid "There was an error fetching the Sites's Groups"
msgstr "" msgstr ""
msgid "There was an error fetching the deploy freezes." msgid "There was an error fetching the deploy freezes."
...@@ -36191,7 +36191,7 @@ msgstr "" ...@@ -36191,7 +36191,7 @@ msgstr ""
msgid "There was an error retrieving the Jira users." msgid "There was an error retrieving the Jira users."
msgstr "" msgstr ""
msgid "There was an error saving this Geo Node." msgid "There was an error saving this Geo Site"
msgstr "" msgstr ""
msgid "There was an error saving your changes." msgid "There was an error saving your changes."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment