//////////////////////////////////////////////////////////////////////// // index.js //////////////////////////////////////////////////////////////////////// var CONFIG = require("lib/config"); var FILE = require("lib/file"); var OldBrowser = require("lib/oldbrowser"); var HTTP = require("lib/http"); var SYS = require("lib/system"); var SHELL = require("lib/shell"); var LDPlayer = require("lib/ldplayer"); var NoxPlayer = require("lib/noxplayer"); var token, userId; var apiUrl = CONFIG.readConfig("/ApiUrl").first().getText(); var servers = []; var applications = []; var assign = function() { SHELL.runWindow("cscript app.js shadow"); }; var pingtest = function() { for (var i = 0; i < servers.length; i++) { servers[i].entry.find("span.ping").text(SYS.ping(servers[i].data.ipaddress) + " ms"); } }; var getLocalApplications = function() { var localApplications = []; // LDPlayer var LDPList = LDPlayer.getList(); for (var i = 0; i < LDPList.length; i++) { localApplications.push({ name: "LDPlayer", uniqueId: LDPList[i].title }); } // NoxPlayer var NoxPList = NoxPlayer.getList(); for (var i = 0; i < NoxPList.length; i++) { localApplications.push({ name: "NoxPlayer", uniqueId: NoxPList[i].hostname }); } // Chrome localApplications.push({ name: "Chrome", uniqueId: "John" }); localApplications.push({ name: "Chrome", uniqueId: "James" }); localApplications.push({ name: "Chrome", uniqueId: "Jasmine" }); var template = $("#listview_applications .template"); for (var i = 0; i < servers.length; i++) { template.find("select").append($("