summaryrefslogtreecommitdiffstats
path: root/funcweb
diff options
context:
space:
mode:
authorLuke Macken <lmacken@redhat.com>2008-03-10 19:58:43 -0400
committerLuke Macken <lmacken@redhat.com>2008-03-10 19:58:43 -0400
commit0da3314271a7d3013c5817268f80a179e936c5ee (patch)
tree1f77335b17d4f5dd20da29597db8a63732ca2f7d /funcweb
parentfb6af3e1cc08b5505ec928e46b1c5f13a261e38d (diff)
downloadthird_party-func-0da3314271a7d3013c5817268f80a179e936c5ee.tar.gz
third_party-func-0da3314271a7d3013c5817268f80a179e936c5ee.tar.xz
third_party-func-0da3314271a7d3013c5817268f80a179e936c5ee.zip
Use Minions(glob).get_all_hosts() to fetch our minion list in funcweb
Diffstat (limited to 'funcweb')
-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>