summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs/base.js
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-19 09:30:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:29:42 -0500
commit82f1a9474d85f75291d0af0e51d55fa904d42055 (patch)
treee7875ca9d28e260d4b30cd5cb5ff7a88024c952f /source4/scripting/libjs/base.js
parent0e7b9f84ce2dcd5363409acc99a7b887a29be595 (diff)
downloadsamba-82f1a9474d85f75291d0af0e51d55fa904d42055.tar.gz
samba-82f1a9474d85f75291d0af0e51d55fa904d42055.tar.bz2
samba-82f1a9474d85f75291d0af0e51d55fa904d42055.zip
r8590: added server status utility functions for checking on the status of a task via irpc
- for stream tasks, returns the number of connections - for non-stream tasks, returns "RUNNING" For both, return "DISABLED" or "NOT RESPONDING" appropriately (This used to be commit 78d6303814382f7835212f5045f12180e396b540)
Diffstat (limited to 'source4/scripting/libjs/base.js')
-rw-r--r--source4/scripting/libjs/base.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/scripting/libjs/base.js b/source4/scripting/libjs/base.js
index 181b3ca959..39b62b133e 100644
--- a/source4/scripting/libjs/base.js
+++ b/source4/scripting/libjs/base.js
@@ -87,3 +87,14 @@ function substitute_var(str, subobj)
}
return join("", list);
}
+
+/*
+ return "s" if a number should be shown as plural
+*/
+function plural(n)
+{
+ if (n == 1) {
+ return "";
+ }
+ return "s";
+}