# HG changeset patch # User cmlenz # Date 1190647829 0 # Node ID 977a6c12220542225c223dc398df574b8de8de08 # Parent 8d70918199133c89523566ee69025bd4fe349fc3 Make slave names available for use in target platform rules, and added some documentation to the admin panel. Closes #190. diff --git a/bitten/build/config.py b/bitten/build/config.py --- a/bitten/build/config.py +++ b/bitten/build/config.py @@ -49,7 +49,7 @@ def _merge_sysinfo(self, parser, properties): """Merge the platform information properties into the configuration.""" - system, node, release, version, machine, processor = platform.uname() + system, _, release, version, machine, processor = platform.uname() system, release, version = platform.system_alias(system, release, version) self.properties['machine'] = machine diff --git a/bitten/htdocs/admin.css b/bitten/htdocs/admin.css --- a/bitten/htdocs/admin.css +++ b/bitten/htdocs/admin.css @@ -1,3 +1,6 @@ table.form th { text-align: right; } div.platforms h3 { margin-top: 3em; } table#platformlist td ul { list-style: none; margin: 0; padding: 0; } + +dl.help { color: #666; font-size: 90%; margin: 1em .5em; } +dl.help dt { font-weight: bold; } diff --git a/bitten/master.py b/bitten/master.py --- a/bitten/master.py +++ b/bitten/master.py @@ -99,7 +99,7 @@ raise HTTPBadRequest('XML parser error') slavename = elem.attr['name'] - properties = {Build.IP_ADDRESS: req.remote_addr} + properties = {'name': slavename, Build.IP_ADDRESS: req.remote_addr} self.log.info('Build slave %r connected from %s', slavename, req.remote_addr) diff --git a/bitten/templates/bitten_admin_configs.cs b/bitten/templates/bitten_admin_configs.cs --- a/bitten/templates/bitten_admin_configs.cs +++ b/bitten/templates/bitten_admin_configs.cs @@ -21,7 +21,7 @@
- +

@@ -93,6 +93,29 @@ +

+ The property name can be any of a set of standard default properties, or + custom properties defined in slave configuration files. The default + properties are: +

+
+
os:
+
The name of the operating system (for example "Darwin")
+
family:
+
The type of operating system (for example "posix" or "nt")
+
version:
+
The operating system version (for example "8.10.1)
+
machine:
+
The hardware architecture (for example "i386")
+
processor:
+
The CPU model (for example "i386", this may be empty or the same as for + machine)
+
name:
+
The name of the slave
+
ipnr:
+
The IP address of the slave
+
+

The match pattern is a regular expression.