summaryrefslogtreecommitdiffstats
path: root/funcweb
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-07-14 14:43:18 +0300
committermakkalot <makkalot@gmail.com>2008-07-14 14:43:18 +0300
commit0106b9878eeb54b95ab394ff82ab8ec74b53932e (patch)
tree1929e38b721237f5c62232f62a5ea5c530633534 /funcweb
parent52f4c3329e56521228f6e66e23d4304ac13ddfbd (diff)
downloadfunc-0106b9878eeb54b95ab394ff82ab8ec74b53932e.tar.gz
func-0106b9878eeb54b95ab394ff82ab8ec74b53932e.tar.xz
func-0106b9878eeb54b95ab394ff82ab8ec74b53932e.zip
enable multi command execution on funcweb, it is what should be
Diffstat (limited to 'funcweb')
-rw-r--r--funcweb/funcweb/controllers.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/funcweb/funcweb/controllers.py b/funcweb/funcweb/controllers.py
index 97411d9..6f99d0f 100644
--- a/funcweb/funcweb/controllers.py
+++ b/funcweb/funcweb/controllers.py
@@ -283,6 +283,13 @@ class Funcweb(object):
cmd_args[index_of_arg]=kw[arg]
#now execute the stuff
+ #at the final execute it as a multiple if the glob suits for that
+ #if not (actually there shouldnt be an option like that but who knows :))
+ #it will run as a normal single command to clicked minion
+ if self.func_cache['glob']:
+ fc = None
+ fc = Overlord(self.func_cache['glob'])
+
result = getattr(getattr(fc,module),method)(*cmd_args)
return str(result)
@@ -297,16 +304,19 @@ class Funcweb(object):
arguments so they provide only some information,executed
by pressing only the link !
"""
- if self.func_cache['minion_name'] == minion:
- fc = self.func_cache['fc_object']
+ if self.func_cache['glob']:
+ fc = Overlord(self.func_cache['glob'])
else:
- fc = Overlord(minion)
- self.func_cache['fc_object']=fc
- self.func_cache['minion_name']=minion
- #reset the children :)
- self.func_cache['module_name']=module
- self.func_cache['modules']=None
- self.func_cache['methods']=None
+ if self.func_cache['minion_name'] == minion:
+ fc = self.func_cache['fc_object']
+ else:
+ fc = Overlord(minion)
+ self.func_cache['fc_object']=fc
+ self.func_cache['minion_name']=minion
+ #reset the children :)
+ self.func_cache['module_name']=module
+ self.func_cache['modules']=None
+ self.func_cache['methods']=None
result = getattr(getattr(fc,module),method)()
return dict(result=str(result))