diff templates/spartan/graph.tmpl @ 8236:9f53e203a09b

webcommands: move nonempty logic from JavaScript to Python This avoids hard-coding the '(none)' string in the JavaScript for each style and avoids the {nonexisting|nonempty} hack which only works since the template system don't complain about undefined variables.
author Martin Geisler <mg@lazybytes.net>
date Tue, 28 Apr 2009 17:28:00 +0200
parents 89bc3946c8f3
children d974a32b59dc
line wrap: on
line diff
--- a/templates/spartan/graph.tmpl	Mon Apr 20 12:10:04 2009 +0200
+++ b/templates/spartan/graph.tmpl	Tue Apr 28 17:28:00 2009 +0200
@@ -70,10 +70,7 @@
 	item = item.replace(/_PARITY/, 'parity' + parity);
 	item = item.replace(/_NODEID/, cur[0]);
 	item = item.replace(/_NODEID/, cur[0]);
-	if (cur[3] != '')
-	    item = item.replace(/_DESC/, cur[3]);
-	else
-	    item = item.replace(/_DESC/, '(none)');
+	item = item.replace(/_DESC/, cur[3]);
 	item = item.replace(/_USER/, cur[4]);
 	item = item.replace(/_DATE/, cur[5]);