summaryrefslogtreecommitdiffstats
path: root/funcweb/funcweb
diff options
context:
space:
mode:
authormakkalot <makkalot@gmail.com>2008-07-09 16:35:07 +0300
committermakkalot <makkalot@gmail.com>2008-07-09 16:35:07 +0300
commit4dec35682b12316cba55276abae8008b7c269be2 (patch)
tree2e735b885bd822823352cb4012e7923eb8dbe55b /funcweb/funcweb
parent2742dfac90365b00394a7e1d1b28747e2e425125 (diff)
downloadfunc-4dec35682b12316cba55276abae8008b7c269be2.tar.gz
func-4dec35682b12316cba55276abae8008b7c269be2.tar.xz
func-4dec35682b12316cba55276abae8008b7c269be2.zip
serving the static resources under /funcweb to match to apache's configuration, easy and dirty solution :) but it works
Diffstat (limited to 'funcweb/funcweb')
-rw-r--r--funcweb/funcweb/config/app.cfg6
-rw-r--r--funcweb/funcweb/templates/master.html16
-rw-r--r--funcweb/funcweb/templates/method_args.html2
-rw-r--r--funcweb/funcweb/templates/minion.html2
-rw-r--r--funcweb/funcweb/templates/minions.html2
-rw-r--r--funcweb/funcweb/templates/module.html2
-rw-r--r--funcweb/funcweb/widget_automation.py32
7 files changed, 19 insertions, 43 deletions
diff --git a/funcweb/funcweb/config/app.cfg b/funcweb/funcweb/config/app.cfg
index 336dc84..a33826c 100644
--- a/funcweb/funcweb/config/app.cfg
+++ b/funcweb/funcweb/config/app.cfg
@@ -80,7 +80,7 @@ identity.on=True
# [REQUIRED] URL to which CherryPy will internally redirect when an access
# control check fails. If Identity management is turned on, a value for this
# option must be specified.
-identity.failure_url="/login"
+identity.failure_url="/funcweb/login"
identity.provider='pam'
@@ -125,10 +125,10 @@ identity.provider='pam'
# gzip_filter.on = True
# gzip_filter.mime_types = ["application/x-javascript", "text/javascript", "text/html", "text/css", "text/plain"]
-[/static]
+[/funcweb/static]
static_filter.on = True
static_filter.dir = "%(top_level_dir)s/static"
-[/favicon.ico]
+[/funcweb/favicon.ico]
static_filter.on = True
static_filter.file = "%(top_level_dir)s/static/images/favicon.ico"
diff --git a/funcweb/funcweb/templates/master.html b/funcweb/funcweb/templates/master.html
index 0ac8ebb..e06cad5 100644
--- a/funcweb/funcweb/templates/master.html
+++ b/funcweb/funcweb/templates/master.html
@@ -8,22 +8,22 @@
py:replace="''" />
<title py:content="'Your Title Goes Here'"></title>
- <script type="text/javascript" src="${tg.url('/static/javascript/jquery.js')}" />
+ <script type="text/javascript" src="${tg.url('/funcweb/static/javascript/jquery.js')}" />
<link py:for="js in tg_js_head" py:strip="">${ET(js.display())}</link>
<link py:for="css in tg_css" py:strip="">${ET(css.display())}</link>
- <script type="text/javascript" src="${tg.url('/static/javascript/ajax.js')}" />
+ <script type="text/javascript" src="${tg.url('/funcweb/static/javascript/ajax.js')}" />
- <link href="${tg.url('/static/images/favicon.ico')}"
+ <link href="${tg.url('/funcweb/static/images/favicon.ico')}"
type="image/vnd.microsoft.icon" rel="shortcut icon" />
- <link href="${tg.url('/static/images/favicon.ico')}"
+ <link href="${tg.url('/funcweb/static/images/favicon.ico')}"
type="image/x-icon" rel="shortcut icon"/>
<style type="text/css" media="screen">
- @import url("/static/css/style.css");
+ @import url("/funcweb/static/css/style.css");
</style>
- <link media="screen" href="/static/css/expanding_form.css" type="text/css" rel="stylesheet"/>
- <script src="../static/javascript/expanding_form.js" type="text/javascript"></script>
+ <link media="screen" href="/funcweb/static/css/expanding_form.css" type="text/css" rel="stylesheet"/>
+ <script src="${tg.url('/funcweb/static/javascript/expanding_form.js')}" type="text/javascript"/>
<script type="text/javascript">
jQuery._$ = MochiKit.DOM.getElement;
@@ -59,7 +59,7 @@
</div>
<div id="bottom">
<div id="footer">
- <img src="${tg.url('/static/images/under_the_hood_blue.png')}"/>
+ <img src="${tg.url('/funcweb/static/images/under_the_hood_blue.png')}"/>
<center>
Powered by <a href="http://fedorahosted.org/func">func</a>.
</center>
diff --git a/funcweb/funcweb/templates/method_args.html b/funcweb/funcweb/templates/method_args.html
index 870d562..e05c67b 100644
--- a/funcweb/funcweb/templates/method_args.html
+++ b/funcweb/funcweb/templates/method_args.html
@@ -9,7 +9,7 @@
${ET(minion_form.display(displays_on='genshi'))}
</div>
<div py:if="not minion_form" id="men">
- <a href="#" onclick="myj('#results').hide().load('/execute_link/${minion}/${module}/${method}/').show('slow');">Run Method</a>
+ <a href="#" onclick="myj('#results').hide().load('/funcweb/execute_link/${minion}/${module}/${method}/').show('slow');">Run Method</a>
<div class="results" id="results" />
</div>
</body>
diff --git a/funcweb/funcweb/templates/minion.html b/funcweb/funcweb/templates/minion.html
index a526764..7b725ba 100644
--- a/funcweb/funcweb/templates/minion.html
+++ b/funcweb/funcweb/templates/minion.html
@@ -8,7 +8,7 @@
<ul py:for="minion, mods in modules.items()">
<h2>${minion[:13]}</h2>
<li py:for="module in mods">
- <a href="#" onclick="myj('#col5').hide();myj('#col3').hide().load('/minion/${minion}/${module}').show('slow');">${module}</a>
+ <a href="#" onclick="myj('#col5').hide();myj('#col3').hide().load('/funcweb/minion/${minion}/${module}').show('slow');">${module}</a>
</li>
</ul>
</div>
diff --git a/funcweb/funcweb/templates/minions.html b/funcweb/funcweb/templates/minions.html
index 1db0f38..c2f4b12 100644
--- a/funcweb/funcweb/templates/minions.html
+++ b/funcweb/funcweb/templates/minions.html
@@ -10,7 +10,7 @@
<ul>
<li><h2>minions</h2></li>
<li py:for="minion in minions">
- <a onclick="jQuery('#col3').hide();myj('#col4').hide();myj('#col5').hide();getElement('col2').innerHTML=toHTML(IMG({src:'../static/images/loading.gif',width:'100',height:'100'}));myj('#col2').hide().load('/minion/${minion}').show('slow');" href="#">${minion}</a>
+ <a onclick="jQuery('#col3').hide();myj('#col4').hide();myj('#col5').hide();getElement('col2').innerHTML=toHTML(IMG({src:'../funcweb/static/images/loading.gif',width:'100',height:'100'}));myj('#col2').hide().load('/funcweb/minion/${minion}').show('slow');" href="#">${minion}</a>
</li>
</ul>
</div>
diff --git a/funcweb/funcweb/templates/module.html b/funcweb/funcweb/templates/module.html
index a4794d0..b05ba00 100644
--- a/funcweb/funcweb/templates/module.html
+++ b/funcweb/funcweb/templates/module.html
@@ -7,7 +7,7 @@
<ul py:for="minion, methods in modules.items()">
<h2>${module}</h2>
<li py:for="method in methods">
- <a href="#" onclick="myj('#col2').hide();myj('#col5').hide().show('slow');myj('#col4').hide().load('/method_display/${minion}/${module}/${method}').show('slow')">${method}</a>
+ <a href="#" onclick="myj('#col2').hide();myj('#col5').hide().show('slow');myj('#col4').hide().load('/funcweb/method_display/${minion}/${module}/${method}').show('slow')">${method}</a>
</li>
</ul>
</div>
diff --git a/funcweb/funcweb/widget_automation.py b/funcweb/funcweb/widget_automation.py
index 351603b..aeacef8 100644
--- a/funcweb/funcweb/widget_automation.py
+++ b/funcweb/funcweb/widget_automation.py
@@ -240,7 +240,7 @@ class RemoteFormAutomation(CoreWD):
template = """
<div>
- ${for_widget.display(action='post_form')}
+ ${for_widget.display(action='/funcweb/post_form')}
<div id="loading"></div>
<div id="post_data"></div>
</div>
@@ -261,7 +261,7 @@ class RemoteFormAutomation(CoreWD):
validator = validator_schema,
name = "minion_form",
update = "col5",
- before='getElement(\'loading\').innerHTML=toHTML(IMG({src:\'../static/images/loading.gif\',width:\'100\',height:\'100\'}));',
+ before='getElement(\'loading\').innerHTML=toHTML(IMG({src:\'../funcweb/static/images/loading.gif\',width:\'100\',height:\'100\'}));',
on_complete='getElement(\'loading\' ).innerHTML=\'Done!\';',
)
@@ -275,10 +275,10 @@ class RemoteFormFactory(object):
#some values that may want to change later
name = "minion_form",
update = "col5",
- before='getElement(\'loading\').innerHTML=toHTML(IMG({src:\'../static/images/loading.gif\',width:\'100\',height:\'100\'}));',
+ before='getElement(\'loading\').innerHTML=toHTML(IMG({src:\'../funcweb/static/images/loading.gif\',width:\'100\',height:\'100\'}));',
on_complete='getElement(\'loading\' ).innerHTML=\'Done!\';',
submit_text = "Send Minion Form"
- action = "/post_form"
+ action = "/funcweb/post_form"
def __init__(self,wlist_object,validator_schema):
self.wlist_object = wlist_object
@@ -299,30 +299,6 @@ class RemoteFormFactory(object):
validator = self.validator_schema
)
-class RemoteLinkFactory(CoreWD):
- """
- A rpc executer for the methods without arguments
- """
-
- name = "Minion Remote Link Executer"
-
- template ="""
- <div>
- ${for_widget.display()}
- <div id="items">Minion Result</div>
- </div>
- """
-
- def __init__(self,*args,**kwargs):
- """The init part here"""
- super(SomeRemoteLink,self).__init__(*args,**kwargs)
- self.for_widget = LinkRemoteFunction(
- name = "catexecuter",
- action = "/catlister",
- data = dict(give_all="all"),
- update = "items"
- )
-
#############################################################################################
def pretty_label(name_to_label):