diff --git a/app/index.js b/app/index.js index 3f69110..de42c12 100644 --- a/app/index.js +++ b/app/index.js @@ -16,6 +16,10 @@ 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"); @@ -23,11 +27,114 @@ var pingtest = function() { }; var getLocalApplications = function() { - // todo + 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($("