diff --git a/assets/css/index.css b/assets/css/index.css index 9aafdaff99..277190e914 100644 --- a/assets/css/index.css +++ b/assets/css/index.css @@ -579,6 +579,11 @@ html { scrollbar-gutter: stable; } +/* Auto-clickable for standalone images */ +img:not(a img):not(.image-card-img):not([src*="#no-click"]) { + cursor: pointer; +} + /* Chroma syntax highlighting */ /* Background */ diff --git a/content/operate/rs/7.8/clusters/change-node-role.md b/content/operate/rs/7.8/clusters/change-node-role.md index 351f39de20..b39cdcc21b 100644 --- a/content/operate/rs/7.8/clusters/change-node-role.md +++ b/content/operate/rs/7.8/clusters/change-node-role.md @@ -17,7 +17,7 @@ A Redis Software cluster contains a primary node, which coordinates cluster-wide To demote the primary node to a secondary node using the Cluster Manager UI: -1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote. +1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the primary node you want to demote. {{Click the more actions button for a node to access node actions.}} @@ -37,7 +37,7 @@ To demote the primary node to a secondary node using the Cluster Manager UI: To promote a secondary node to become the primary node using the Cluster Manager UI: -1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote. +1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the secondary node you want to promote. {{Click the more actions button for a node to access node actions.}} diff --git a/content/operate/rs/clusters/change-node-role.md b/content/operate/rs/clusters/change-node-role.md index 7849da8509..0f62723acf 100644 --- a/content/operate/rs/clusters/change-node-role.md +++ b/content/operate/rs/clusters/change-node-role.md @@ -14,11 +14,15 @@ A Redis Software cluster contains a primary node, which coordinates cluster-wide ## Demote primary node +{{< multitabs id="demote-node" +tab1="Cluster Manager UI" +tab2="rladmin" >}} + To demote the primary node to a secondary node using the Cluster Manager UI: -1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote. +1. On the **Nodes** screen, click the **More actions** button (**⋮**) for the primary node you want to demote. - {{Click the more actions button for a node to access node actions.}} + Click the more actions button for a node to access node actions. 1. Select **Set as a secondary node** from the list. @@ -28,20 +32,73 @@ To demote the primary node to a secondary node using the Cluster Manager UI: - **Choose specific node**: You can manually select which node becomes the new primary node. - {{The Set as a secondary node dialog has two options to select the new primary node, either automatically or manually.}} + The Set as a secondary node dialog has two options to select the new primary node, either automatically or manually. 1. Click **Confirm**. +-tab-sep- + +To demote the primary node to a secondary node using `rladmin`: + +1. Identify the primary node's ID with [`rladmin cluster master`]({{}}): + + ```sh + $ rladmin cluster master + Node is the cluster master node + ``` + +1. Run [`rladmin node enslave`]({{}}) with the `demote_node` option: + + ```sh + rladmin node enslave demote_node + ``` + + Replace `` with the ID returned by `rladmin cluster master`. + +{{< /multitabs >}} + ## Promote secondary node +{{< multitabs id="promote-node" +tab1="Cluster Manager UI" +tab2="rladmin" >}} + To promote a secondary node to become the primary node using the Cluster Manager UI: -1. On the **Nodes** screen, click {{< image filename="/images/rs/buttons/button-toggle-actions-vertical.png#no-click" alt="More actions button" width="22px" class="inline" >}} for the node you want to promote. +1. On the **Nodes** screen, click the **More actions** button (**⋮**) for the secondary node you want to promote. - {{Click the more actions button for a node to access node actions.}} + Click the more actions button for a node to access node actions. 1. Select **Set as the primary node** from the list. 1. Click **Confirm**. + +-tab-sep- + +To promote a secondary node to become the primary node using `rladmin`: + +1. To find the IDs of secondary nodes, run [`rladmin status nodes`]({{}}): + + ```sh + $ rladmin status nodes + CLUSTER NODES: + NODE:ID ROLE ADDRESS EXTERNAL_ADDRESS HOSTNAME SHARDS CORES FREE_RAM PROVISIONAL_RAM VERSION STATUS + node:1 master 198.51.100.2 3d99db1fdf4b 4/100 6 14.74GB/19.54GB 10.73GB/16.02GB 7.22.0-250 OK + *node:3 slave 198.51.100.4 b87cc06c830f 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 7.22.0-250 OK + node:2 slave 198.51.100.3 fc7a3d332458 0/100 6 14.74GB/19.54GB 11.22GB/16.02GB 7.22.0-250 OK + ``` + + Nodes with the `slave` role are secondary nodes. + +1. Run [`rladmin cluster master set`]({{}}): + + ```sh + rladmin cluster master set + ``` + + Replace `` with the ID of the secondary node you want to promote. + +{{< /multitabs >}} + After this node becomes the primary node, all cluster management traffic is directed to it. diff --git a/static/js/index.js b/static/js/index.js index fd0c66ffd0..23a1ef2b2d 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -184,4 +184,17 @@ const mobileMenu = (() => { document.addEventListener('click', clickHandler, false) document.addEventListener('keydown', keyHandler, false) -})() \ No newline at end of file +})() + +// Simple click-to-open for standalone images +document.addEventListener('click', function(e) { + // Check if clicked element is a standalone img (not inside an anchor, not image-card, not no-click) + if (e.target.tagName === 'IMG' && + !e.target.closest('a') && + !e.target.classList.contains('image-card-img') && + !e.target.src.includes('#no-click')) { + + // Open image in same tab, just like clicking a regular link + window.location.href = e.target.src + } +}) \ No newline at end of file