summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--funcweb/funcweb/controllers.py5
-rw-r--r--funcweb/funcweb/templates/minions.html2
2 files changed, 3 insertions, 4 deletions
diff --git a/funcweb/funcweb/controllers.py b/funcweb/funcweb/controllers.py
index c08844f..eb2327f 100644
--- a/funcweb/funcweb/controllers.py
+++ b/funcweb/funcweb/controllers.py
@@ -2,7 +2,7 @@ import logging
log = logging.getLogger(__name__)
from turbogears import controllers, expose, flash, identity, redirect
-from func.overlord.client import Client
+from func.overlord.client import Client, Minions
class Root(controllers.RootController):
@@ -10,8 +10,7 @@ class Root(controllers.RootController):
@identity.require(identity.not_anonymous())
def minions(self, glob='*'):
""" Return a list of our minions that match a given glob """
- fc = Client(glob)
- return dict(minions=fc.system.list_methods())
+ return dict(minions=Minions(glob).get_all_hosts())
index = minions # start with our minion view, for now
diff --git a/funcweb/funcweb/templates/minions.html b/funcweb/funcweb/templates/minions.html
index f303a43..94ccbc1 100644
--- a/funcweb/funcweb/templates/minions.html
+++ b/funcweb/funcweb/templates/minions.html
@@ -9,7 +9,7 @@
<div class="col" id="col1">
<ul>
<li><h2>minions</h2></li>
- <li py:for="minion in minions.keys()">
+ <li py:for="minion in minions">
<a onclick="$('#col3').hide();$('#col4').hide();$('#col2').hide().load('/minion/${minion}').show('slow');" href="#">${minion}</a>
</li>
</ul>