Commit 6d75ee4a authored by Gabriel Mazetto's avatar Gabriel Mazetto

Geo Node: Rename Disable/Enable to Pause/Resume replication

With the renamed buttons, icons were also added.
parent e88198f4
...@@ -31,7 +31,10 @@ export default { ...@@ -31,7 +31,10 @@ export default {
return !this.node.primary && this.nodeEditAllowed; return !this.node.primary && this.nodeEditAllowed;
}, },
nodeToggleLabel() { nodeToggleLabel() {
return this.node.enabled ? __('Disable') : __('Enable'); return this.node.enabled ? __('Pause replication') : __('Resume replication');
},
nodeToggleIcon() {
return this.node.enabled ? 'pause' : 'play';
}, },
isSecondaryNode() { isSecondaryNode() {
return !this.node.primary; return !this.node.primary;
...@@ -42,7 +45,7 @@ export default { ...@@ -42,7 +45,7 @@ export default {
eventHub.$emit('showNodeActionModal', { eventHub.$emit('showNodeActionModal', {
actionType: NODE_ACTIONS.TOGGLE, actionType: NODE_ACTIONS.TOGGLE,
node: this.node, node: this.node,
modalMessage: s__('GeoNodes|Disabling a node stops the sync process. Are you sure?'), modalMessage: s__('GeoNodes|Pausing replication stops the sync process.'),
modalActionLabel: this.nodeToggleLabel, modalActionLabel: this.nodeToggleLabel,
}); });
}, },
...@@ -98,6 +101,7 @@ export default { ...@@ -98,6 +101,7 @@ export default {
class="btn btn-sm btn-node-action" class="btn btn-sm btn-node-action"
@click="onToggleNode" @click="onToggleNode"
> >
<icon :name="nodeToggleIcon" />
{{ nodeToggleLabel }} {{ nodeToggleLabel }}
</button> </button>
</div> </div>
......
---
title: 'Geo: Rename "Disable" to "Pause|Resume" (Admin > Geo Nodes)'
merge_request: 10297
author:
type: changed
...@@ -53,13 +53,13 @@ describe('GeoNodeActionsComponent', () => { ...@@ -53,13 +53,13 @@ describe('GeoNodeActionsComponent', () => {
let mockNode = Object.assign({}, mockNodes[1]); let mockNode = Object.assign({}, mockNodes[1]);
let vmX = createComponent(mockNode); let vmX = createComponent(mockNode);
expect(vmX.nodeToggleLabel).toBe('Disable'); expect(vmX.nodeToggleLabel).toBe('Pause replication');
vmX.$destroy(); vmX.$destroy();
mockNode = Object.assign({}, mockNodes[1], { enabled: false }); mockNode = Object.assign({}, mockNodes[1], { enabled: false });
vmX = createComponent(mockNode); vmX = createComponent(mockNode);
expect(vmX.nodeToggleLabel).toBe('Enable'); expect(vmX.nodeToggleLabel).toBe('Resume replication');
vmX.$destroy(); vmX.$destroy();
}); });
}); });
...@@ -74,7 +74,7 @@ describe('GeoNodeActionsComponent', () => { ...@@ -74,7 +74,7 @@ describe('GeoNodeActionsComponent', () => {
expect(eventHub.$emit).toHaveBeenCalledWith('showNodeActionModal', { expect(eventHub.$emit).toHaveBeenCalledWith('showNodeActionModal', {
actionType: NODE_ACTIONS.TOGGLE, actionType: NODE_ACTIONS.TOGGLE,
node: vm.node, node: vm.node,
modalMessage: 'Disabling a node stops the sync process. Are you sure?', modalMessage: 'Pausing replication stops the sync process.',
modalActionLabel: vm.nodeToggleLabel, modalActionLabel: vm.nodeToggleLabel,
}); });
}); });
......
...@@ -4926,9 +4926,6 @@ msgstr "" ...@@ -4926,9 +4926,6 @@ msgstr ""
msgid "GeoNodes|Data replication lag" msgid "GeoNodes|Data replication lag"
msgstr "" msgstr ""
msgid "GeoNodes|Disabling a node stops the sync process. Are you sure?"
msgstr ""
msgid "GeoNodes|Does not match the primary storage configuration" msgid "GeoNodes|Does not match the primary storage configuration"
msgstr "" msgstr ""
...@@ -4995,6 +4992,9 @@ msgstr "" ...@@ -4995,6 +4992,9 @@ msgstr ""
msgid "GeoNodes|Out of sync" msgid "GeoNodes|Out of sync"
msgstr "" msgstr ""
msgid "GeoNodes|Pausing replication stops the sync process."
msgstr ""
msgid "GeoNodes|Removing a primary node stops the sync process for all nodes. Syncing cannot be resumed without losing some data on all secondaries. In this case we would recommend setting up all nodes from scratch. Are you sure?" msgid "GeoNodes|Removing a primary node stops the sync process for all nodes. Syncing cannot be resumed without losing some data on all secondaries. In this case we would recommend setting up all nodes from scratch. Are you sure?"
msgstr "" msgstr ""
...@@ -7836,6 +7836,9 @@ msgstr "" ...@@ -7836,6 +7836,9 @@ msgstr ""
msgid "Pause" msgid "Pause"
msgstr "" msgstr ""
msgid "Pause replication"
msgstr ""
msgid "Paused Runners don't accept new jobs" msgid "Paused Runners don't accept new jobs"
msgstr "" msgstr ""
...@@ -9300,6 +9303,9 @@ msgstr "" ...@@ -9300,6 +9303,9 @@ msgstr ""
msgid "Resume" msgid "Resume"
msgstr "" msgstr ""
msgid "Resume replication"
msgstr ""
msgid "Retry" msgid "Retry"
msgstr "" msgstr ""
......
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