diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/rrdui-cgi.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tools/rrdui-cgi.py b/tools/rrdui-cgi.py index 282d428..175502e 100755 --- a/tools/rrdui-cgi.py +++ b/tools/rrdui-cgi.py @@ -82,12 +82,6 @@ def listGraphs(): graphs = loadGraphs() categories = {} - for item in graphs: - if not item.valid: - continue - if not categories.has_key(item.category): - categories[item.category] = [] - categories[item.category].append(item) groups = categories.keys() groups.sort() @@ -95,13 +89,9 @@ def listGraphs(): print "Content-Type: text/xml\n" print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" print "<data>" - for group in groups: - print " <category name=\"%s\">" % group - categories[group].sort() - for item in categories[group]: - print " <graph name=\"%s\" width=\"%d\" height=\"%d\" title=\"%s\" interval=\"%s\"/>" % \ - (item.name, item.width, item.height, item.title, item.interval) - print " </category>" + for item in graphs: + print " <graph name=\"%s\" category=\"%s\" width=\"%d\" height=\"%d\" title=\"%s\" interval=\"%s\"/>" % \ + (item.name, item.category, item.width, item.height, item.title, item.interval) print "</data>" |