1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
/*
server status library for SWAT
released under the GNU GPL Version 3 or later
*/
// Format for a server status table
var s = [
{ id : "server",
label : "Server",
content: "text",
defaultValue : "-",
width : 100
},
{ id : "status",
label : "Status",
content: "text",
defaultValue : "-",
width: 100
}
];
function __load_status_table(info, container)
{
var table = new QxListView(s);
var i;
for (i in info) {
table.addData( {server : i, status : info[i]} );
}
container.add(table);
container.setVisible(true);
}
function getServerStatus(container)
{
server_call_url("/scripting/server/status.esp", 'serverInfo',
function(info) { __load_status_table(info, container); });
}
|