Commit fa9b40b9 authored by Chris McDonough's avatar Chris McDonough

Make Control_Panel show network services.

parent 451134a9
......@@ -12,7 +12,7 @@
##############################################################################
__doc__="""System management components"""
__version__='$Revision: 1.86 $'[11:-2]
__version__='$Revision: 1.87 $'[11:-2]
import sys,os,time,Globals, Acquisition, os, Undo
from Globals import DTMLFile
......@@ -437,6 +437,21 @@ class ApplicationManager(Folder,CacheManager):
def getCLIENT_HOME(self):
return getConfiguration().clienthome
def getServers(self):
# used only for display purposes
# return a sequence of two-tuples. The first element of
# each tuple is the service name, the second is a string repr. of
# the port/socket/other on which it listens
from asyncore import socket_map
l = []
for k,v in socket_map.items():
# this is only an approximation
if hasattr(v, 'port'):
type = str(getattr(v, '__class__', 'unknown'))
port = v.port
l.append((str(type), 'Port: %s' % port))
return l
def objectIds(self, spec=None):
""" this is a patch for pre-2.4 Zope installations. Such
installations don't have an entry for the WebDAV LockManager
......
......@@ -92,6 +92,20 @@ functions such as database and product management.
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Network Services
</div>
</td>
<td align="left" valign="top">
<div class="form-text">
<dtml-in getServers>
&dtml-sequence-key; (&dtml-sequence-item;)<br>
</dtml-in>
</div>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment