/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ function openTrackingInfoPage(id) { if (typeof id == "undefined" || id == null || id == "") { app.input.validate("#deviceid"); return; } router.navigate("/track/" + id); } function addClientMachineSuggestions() { $("#client-link-account-message").addClass("display-none"); $("#client-machine-suggestion-list").addClass("display-none"); $("#client-machine-suggestion-list-preloader").addClass("display-none"); $("#client-machine-suggestion-list ul").html(""); if (inStorage("client_uuid")) { $("#client-machine-suggestion-list-preloader").removeClass("display-none"); apirequest( SETTINGS.apis.getmachines, { clientuuid: getStorage("client_uuid") }, function (resp) { if (resp.status == "OK") { if (resp.machines.length > 0) { for (var i = 0; i < resp.machines.length; i++) { var id = resp.machines[i].id; var type = resp.machines[i].type.label; var icon = resp.machines[i].icon; $("#client-machine-suggestion-list ul").append('