[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/MailHost/
better wording
Andreas Jung
andreas at andreas-jung.com
Sun Aug 19 07:38:53 EDT 2007
Log message for revision 78989:
better wording
Changed:
U Zope/trunk/lib/python/Products/MailHost/MailHost.py
U Zope/trunk/lib/python/Products/MailHost/dtml/manageMailHost.dtml
-=-
Modified: Zope/trunk/lib/python/Products/MailHost/MailHost.py
===================================================================
--- Zope/trunk/lib/python/Products/MailHost/MailHost.py 2007-08-19 11:32:53 UTC (rev 78988)
+++ Zope/trunk/lib/python/Products/MailHost/MailHost.py 2007-08-19 11:38:53 UTC (rev 78989)
@@ -231,14 +231,18 @@
return False
security.declareProtected(change_configuration, 'manage_restartQueueThread')
- def manage_restartQueueThread(self, REQUEST=None):
+ def manage_restartQueueThread(self, action='start', REQUEST=None):
""" Restart the queue processor thread """
- self._stopQueueProcessorThread()
- self._startQueueProcessorThread()
+ if action == 'stop':
+ self._stopQueueProcessorThread()
+ elif action == 'start':
+ self._startQueueProcessorThread()
+ else:
+ raise ValueError('Unsupported action %s' % action)
if REQUEST is not None:
- msg = 'Queue processor thread restarted'
+ msg = 'Queue processor thread %sed' % action
return self.manage_main(self, REQUEST, manage_tabs_message=msg)
Modified: Zope/trunk/lib/python/Products/MailHost/dtml/manageMailHost.dtml
===================================================================
--- Zope/trunk/lib/python/Products/MailHost/dtml/manageMailHost.dtml 2007-08-19 11:32:53 UTC (rev 78988)
+++ Zope/trunk/lib/python/Products/MailHost/dtml/manageMailHost.dtml 2007-08-19 11:38:53 UTC (rev 78989)
@@ -128,14 +128,22 @@
<tr>
<td align="left" valign="top">
<div class="form-label">
- Queue processor thread alive?<br/>
+ Status of queue processor thread<br/>
</div>
</td>
<td align="left" valign="top">
<div class="form-help">
- <dtml-var queueThreadAlive>
- <br/>
- <a href="manage_restartQueueThread">Restart queue processor thread</a> (this may take some seconds)
+
+ <dtml-if "queueThreadAlive()">
+ Running
+ <br/>
+ <a href="manage_restartQueueThread?action=stop">Stop queue processor thread</a> (this may take some seconds)
+ </dtml-if>
+ <dtml-if "not queueThreadAlive()">
+ Stopped
+ <br/>
+ <a href="manage_restartQueueThread?action=start">Start queue processor thread</a> (this may take some seconds)
+ </dtml-if>
</div>
</td>
</tr>
More information about the Zope-Checkins
mailing list