diff options
author | Luke Macken <lmacken@redhat.com> | 2008-03-10 19:58:43 -0400 |
---|---|---|
committer | Luke Macken <lmacken@redhat.com> | 2008-03-10 19:58:43 -0400 |
commit | 0da3314271a7d3013c5817268f80a179e936c5ee (patch) | |
tree | 1f77335b17d4f5dd20da29597db8a63732ca2f7d /funcweb | |
parent | fb6af3e1cc08b5505ec928e46b1c5f13a261e38d (diff) | |
download | third_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.py | 5 | ||||
-rw-r--r-- | funcweb/funcweb/templates/minions.html | 2 |
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> |