From f8573766bc17af0afacc5d44d3c3d8234b426dbf Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 7 Sep 2007 03:08:44 +0000 Subject: r24985: Start to revert us back to the old-style SWAT, while trying not to loose some of the fixes in the meantime. Andrew Bartlett (This used to be commit 13acff5ed259e7b5859fd2324ea7740b8f9e5fd7) --- swat/scripting/client/status.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 swat/scripting/client/status.js (limited to 'swat/scripting/client/status.js') diff --git a/swat/scripting/client/status.js b/swat/scripting/client/status.js new file mode 100644 index 0000000000..31ee31c43b --- /dev/null +++ b/swat/scripting/client/status.js @@ -0,0 +1,40 @@ +/* + server status library for SWAT + + released under the GNU GPL Version 2 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); }); +} -- cgit