summaryrefslogtreecommitdiff
path: root/webapps/scripting/client/status.js
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2007-01-03 20:17:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:36:09 -0500
commit626bb8efb0c825f332c937ffaaadc9b402079539 (patch)
tree1c95f69d157b24f64edff470143f5f55a09cfca6 /webapps/scripting/client/status.js
parenteeddcf8cc8eb655d7c40f1fd5f7fd422529f4f98 (diff)
downloadsamba-626bb8efb0c825f332c937ffaaadc9b402079539.tar.gz
samba-626bb8efb0c825f332c937ffaaadc9b402079539.tar.bz2
samba-626bb8efb0c825f332c937ffaaadc9b402079539.zip
r20517: re-add cleaned-up webapps
(This used to be commit 5a3d6ad0b7cf0ecf8b57b4088b19f7d4291c990b)
Diffstat (limited to 'webapps/scripting/client/status.js')
-rw-r--r--webapps/scripting/client/status.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/webapps/scripting/client/status.js b/webapps/scripting/client/status.js
new file mode 100644
index 0000000000..31ee31c43b
--- /dev/null
+++ b/webapps/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); });
+}