hashicorp/serf

Website Simulator Alert for Number of Nodes Check is Off-by-One

justinTM opened this issue · 0 comments

Hi All!

Simple UI bug: in the Serf Convergence Simulator, when you specify the integer number of nodes as 1, an alert pops up saying You must specify at least 1 node!, which is simply off by one.

This HTML element: <input type="text" id="nodes" value="30" class="simulator-input">

This script logic (line 11378):

return isNaN(t) || 1 >= t ? void alert("Must have at least one node!") : (simulator.nodes = t, void simulator.draw())

I believe simply needs to become:

return isNaN(t) || 2 > t ? void alert("Must have at least one node!") : (simulator.nodes = t, void simulator.draw())

Tada! simple :)