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 {
class="col-12 col-sm-6"
:label="__('Internal URL (optional)')"
label-for="node-internal-url-field"
:description="internalUrlDescription"
>
<template #description>
<gl-sprintf
......
......@@ -138,7 +138,7 @@ export default {
</template>
<!-- eslint-disable vue/no-mutating-props -->
<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>
<!-- eslint-enable vue/no-mutating-props -->
</gl-form-group>
......
......@@ -22,7 +22,7 @@ export const receiveSyncNamespacesSuccess = ({ commit }, data) =>
commit(types.RECEIVE_SYNC_NAMESPACES_SUCCESS, data);
export const receiveSyncNamespacesError = ({ commit }) => {
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);
};
......@@ -45,7 +45,7 @@ export const receiveSaveGeoNodeSuccess = ({ commit, state }) => {
visitUrl(state.nodesPath);
};
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) {
errorMessage += ` ${getSaveErrorMessage(data.message)}`;
......
......@@ -3,9 +3,9 @@ import { sprintf, s__ } from '~/locale';
export const validateName = (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) {
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 '';
......
......@@ -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}',
),
addSite: s__('Geo|Add site'),
modalTitle: s__('Geo|Remove node'),
modalTitle: s__('Geo|Remove site'),
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'),
secondarySite: s__('Geo|Secondary site'),
......@@ -60,7 +60,7 @@ export default {
},
GEO_INFO_URL,
MODAL_PRIMARY_ACTION: {
text: s__('Geo|Remove node'),
text: s__('Geo|Remove site'),
attributes: {
variant: 'danger',
},
......
......@@ -21,7 +21,7 @@ export const fetchNodes = ({ commit }) => {
commit(types.RECEIVE_NODES_SUCCESS, inflatedNodes);
})
.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);
});
};
......@@ -42,7 +42,7 @@ export const removeNode = ({ commit, state }) => {
commit(types.RECEIVE_NODE_REMOVAL_SUCCESS);
})
.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);
});
};
......@@ -175,7 +175,7 @@ RSpec.describe 'admin Geo Nodes', :js, :geo do
page.click_button('Remove')
page.within('.gl-modal') do
page.click_button('Remove node')
page.click_button('Remove site')
end
expect(current_path).to eq admin_geo_nodes_path
......
......@@ -101,9 +101,9 @@ describe('GeoNodeFormCore', () => {
describe('errors', () => {
describe.each`
data | showError | errorMessage
${null} | ${true} | ${"Node name can't be blank"}
${''} | ${true} | ${"Node name can't be blank"}
${STRING_OVER_255} | ${true} | ${'Node name should be between 1 and 255 characters'}
${null} | ${true} | ${"Site name can't be blank"}
${''} | ${true} | ${"Site name can't be blank"}
${STRING_OVER_255} | ${true} | ${'Site name should be between 1 and 255 characters'}
${'Test'} | ${false} | ${null}
`(`Name Field`, ({ data, showError, errorMessage }) => {
beforeEach(() => {
......
......@@ -76,7 +76,7 @@ describe('GeoNodeForm Store Actions', () => {
});
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', () => {
return testAction(
......
......@@ -4,9 +4,9 @@ import { STRING_OVER_255 } from './mock_data';
describe('GeoNodeForm Validations', () => {
describe.each`
data | errorMessage
${null} | ${"Node name can't be blank"}
${''} | ${"Node name can't be blank"}
${STRING_OVER_255} | ${'Node name should be between 1 and 255 characters'}
${null} | ${"Site name can't be blank"}
${''} | ${"Site name can't be blank"}
${STRING_OVER_255} | ${'Site name should be between 1 and 255 characters'}
${'Test'} | ${''}
`(`validateName`, ({ data, errorMessage }) => {
let validateNameRes = '';
......
......@@ -124,7 +124,7 @@ export const MOCK_SECONDARY_SYNC_INFO = [
export const MOCK_NODES = [
{
id: 1,
name: 'Test Node 1',
name: 'Test Site 1',
url: 'http://127.0.0.1:3001/',
primary: true,
enabled: true,
......@@ -144,7 +144,7 @@ export const MOCK_NODES = [
},
{
id: 2,
name: 'Test Node 2',
name: 'Test Site 2',
url: 'http://127.0.0.1:3002/',
primary: false,
enabled: true,
......@@ -181,7 +181,7 @@ export const MOCK_NODES = [
export const MOCK_NODES_RES = [
{
id: 1,
name: 'Test Node 1',
name: 'Test Site 1',
url: 'http://127.0.0.1:3001/',
primary: true,
enabled: true,
......@@ -189,7 +189,7 @@ export const MOCK_NODES_RES = [
},
{
id: 2,
name: 'Test Node 2',
name: 'Test Site 2',
url: 'http://127.0.0.1:3002/',
primary: false,
enabled: true,
......
......@@ -3542,7 +3542,7 @@ msgstr ""
msgid "Allow this key to push to this repository"
msgstr ""
msgid "Allow this secondary node to replicate content on Object Storage"
msgid "Allow this secondary site to replicate content on Object Storage"
msgstr ""
msgid "Allow use of licensed EE features"
......@@ -15842,12 +15842,6 @@ msgstr ""
msgid "Geo|No available replication slots"
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"
msgstr ""
......@@ -15902,13 +15896,13 @@ msgstr ""
msgid "Geo|Remove entry"
msgstr ""
msgid "Geo|Remove node"
msgid "Geo|Remove site"
msgstr ""
msgid "Geo|Remove tracking database entry"
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 ""
msgid "Geo|Replicated data is verified with the secondary site(s) using checksums"
......@@ -15971,6 +15965,12 @@ msgstr ""
msgid "Geo|Selective (%{syncLabel})"
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}."
msgstr ""
......@@ -16007,10 +16007,10 @@ msgstr ""
msgid "Geo|There are no %{replicable_type} to show"
msgstr ""
msgid "Geo|There was an error deleting the Geo Node"
msgid "Geo|There was an error deleting the Geo Site"
msgstr ""
msgid "Geo|There was an error fetching the Geo Nodes"
msgid "Geo|There was an error fetching the Geo Sites"
msgstr ""
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 ""
msgid "There was an error fetching the Geo Settings"
msgstr ""
msgid "There was an error fetching the Node's Groups"
msgid "There was an error fetching the Sites's Groups"
msgstr ""
msgid "There was an error fetching the deploy freezes."
......@@ -36191,7 +36191,7 @@ msgstr ""
msgid "There was an error retrieving the Jira users."
msgstr ""
msgid "There was an error saving this Geo Node."
msgid "There was an error saving this Geo Site"
msgstr ""
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