web/views/management.py
branchstable
changeset 4714 fccda6dd91bf
parent 4713 785299dfc2c0
child 5232 78c1a531f7b3
child 5421 8167de96c523
--- a/web/views/management.py	Fri Feb 26 08:46:27 2010 +0100
+++ b/web/views/management.py	Fri Feb 26 09:54:03 2010 +0100
@@ -273,76 +273,6 @@
     return binfo
 
 
-class ProcessInformationView(StartupView):
-    __regid__ = 'info'
-    __select__ = none_rset() & match_user_groups('users', 'managers')
-
-    title = _('server information')
-
-    def call(self, **kwargs):
-        """display server information"""
-        vcconf = self._cw.vreg.config.vc_config()
-        req = self._cw
-        _ = req._
-        # display main information
-        self.w(u'<h3>%s</h3>' % _('Application'))
-        self.w(u'<table border="1">')
-        self.w(u'<tr><th align="left">%s</th><td>%s</td></tr>' % (
-            'CubicWeb', vcconf.get('cubicweb', _('no version information'))))
-        for pkg in self._cw.vreg.config.cubes():
-            pkgversion = vcconf.get(pkg, _('no version information'))
-            self.w(u'<tr><th align="left">%s</th><td>%s</td></tr>' % (
-                pkg, pkgversion))
-        self.w(u'<tr><th align="left">%s</th><td>%s</td></tr>' % (
-            _('home'), self._cw.vreg.config.apphome))
-        self.w(u'<tr><th align="left">%s</th><td>%s</td></tr>' % (
-            _('base url'), req.base_url()))
-        self.w(u'<tr><th align="left">%s</th><td>%s</td></tr>' % (
-            _('data directory url'), req.datadir_url))
-        self.w(u'</table>')
-        self.w(u'<br/>')
-        self.w(u'<h3>%s</h3>' % _('Repository'))
-        self.w(u'<table border="1">')
-        stats = self._cw.vreg.config.repository(None).stats()
-        for element in stats:
-            self.w(u'<tr><th align="left">%s</th><td>%s %s</td></tr>'
-                   % (element, stats[element],
-                      element.endswith('percent') and '%' or '' ))
-        self.w(u'</table>')
-
-        # environment and request and server information
-        try:
-            # need to remove our adapter and then modpython-apache wrapper...
-            env = req._areq._req.subprocess_env
-        except AttributeError:
-            return
-        self.w(u'<h3>%s</h3>' % _('Environment'))
-        self.w(u'<table border="1">')
-        for attr in env.keys():
-            self.w(u'<tr><th align="left">%s</th><td>%s</td></tr>'
-                   % (attr, xml_escape(env[attr])))
-        self.w(u'</table>')
-        self.w(u'<h3>%s</h3>' % _('Request'))
-        self.w(u'<table border="1">')
-        for attr in ('filename', 'form', 'hostname', 'main', 'method',
-                     'path_info', 'protocol',
-                     'search_state', 'the_request', 'unparsed_uri', 'uri'):
-            val = getattr(req, attr)
-            self.w(u'<tr><th align="left">%s</th><td>%s</td></tr>'
-                   % (attr, xml_escape(val)))
-        self.w(u'</table>')
-        server = req.server
-        self.w(u'<h3>%s</h3>' % _('Server'))
-        self.w(u'<table border="1">')
-        for attr in dir(server):
-            val = getattr(server, attr)
-            if attr.startswith('_') or callable(val):
-                continue
-            self.w(u'<tr><th align="left">%s</th><td>%s</td></tr>'
-                   % (attr, xml_escape(val)))
-        self.w(u'</table>')
-
-
 class CwStats(View):
     """A textual stats output for monitoring tools such as munin """