/* Pi-hole: A black hole for Internet advertisements * (c) 2017 Pi-hole, LLC (https://pi-hole.net) * Network-wide ad blocking via your own hardware. * * This file is copyright under the latest version of the EUPL. * Please see LICENSE file for your rights under this license. */ /* global utils:false */ var table; var groups = []; var token = $("#token").text(); function reloadClientSuggestions() { $.post( "scripts/pi-hole/php/groups.php", { action: "get_unconfigured_clients", token: token }, function (data) { var sel = $("#select"); var customWasSelected = sel.val() === "custom"; sel.empty(); for (var key in data) { if (!Object.prototype.hasOwnProperty.call(data, key)) { continue; } var text = key; if (data[key].length > 0) { text += " (" + data[key] + ")"; } sel.append($("