Package gavo :: Package web :: Module adminrender :: Class AdminRenderer
[frames] | no frames]

Class AdminRenderer

source code

                                       object --+    
                                                |    
                    imp.formal.form.ResourceMixin --+
                                                    |
                                       object --+   |
                                                |   |
                        grend.CustomTemplateMixin --+
                                                    |
                   object --+                       |
                            |                       |
       nevow.rend.DataFactory --+                   |
                                |                   |
                   object --+   |                   |
                            |   |                   |
     nevow.rend.RenderFactory --+                   |
                                |                   |
                   object --+   |                   |
                            |   |                   |
      nevow.rend.MacroFactory --+                   |
                                |                   |
                   object --+   |                   |
                            |   |                   |
 nevow.rend.ConfigurableMixin --+                   |
                                |                   |
              nevow.rend.Fragment --+               |
                                    |               |
   nevow.rend.ConfigurableFactory --+               |
                                    |               |
nevow.rend.FreeformChildMixin --+   |               |
                                |   |               |
      nevow.rend.ChildLookupMixin --+               |
                                    |               |
                      nevow.rend.Page --+           |
                                        |           |
                       object --+       |           |
                                |       |           |
           common.CommonRenderers --+   |           |
                                    |   |           |
                grend.GavoRenderMixin --+           |
                                        |           |
                           grend.GavoPage --+       |
                                            |       |
                      grend.ResourceBasedPage --+   |
                                                |   |
                           grend.ServiceBasedPage --+
                                                    |
                                                   AdminRenderer

A renderer allowing to block and/or reload services.

This renderer could really be attached to any service since it does not call it, but it usually lives on //services/overview. It will always require authentication.

It takes the id of the RD to administer from the path segments following the renderer name.

By virtue of builtin vanity, you can reach the admin renderer at /seffe, and thus you can access /seffe/foo/q to administer the foo/q RD.

Instance Methods
 
form_setDowntime(self, ctx) source code
 
setDowntime(self, ctx, form, data) source code
 
form_adminOps(self, ctx) source code
 
toggleBlock(self, ctx, form, data) source code
 
reloadRD(self, ctx, form, data) source code
 
data_blockstatus(self, ctx, data) source code
 
data_services(self, ctx, data)
returns a sequence of service items belonging to clientRD, sorted by id.
source code
 
render_svclink(self, ctx, data)
renders a link to a service info with a service title.
source code
 
render_rdId(self, ctx, data) source code
 
render_ifexc(self, ctx, data)
render children if there was an exception during RD load.
source code
 
render_exc(self, ctx, data) source code
 
render_traceback(self, ctx, data) source code
 
renderHTTP(self, ctx) source code
 
locateChild(self, ctx, segments)
Locate a child page of this one.
source code

Inherited from imp.formal.form.ResourceMixin: __providedBy__, __provides__, crash, formFactory, render_form

Inherited from grend.CustomTemplateMixin: getDocFactory

Inherited from grend.ServiceBasedPage: __init__, child, data_serviceURL, processData, renderer, runService, runServiceWithFormalData

Inherited from grend.ResourceBasedPage: data_rdId

Inherited from nevow.rend.Page: child_, flattenFactory, onPostFailure, onPostSuccess, rememberStuff, renderString, renderSynchronously, webFormPost

Inherited from nevow.rend.Fragment: get, remember, rend

Inherited from nevow.rend.RenderFactory: render_data, render_mapping, render_sequence, render_string, render_xml

Inherited from nevow.rend.MacroFactory: macro

Inherited from nevow.rend.ConfigurableMixin: getBinding, getBindingNames, getDefault, postForm

Inherited from grend.GavoRenderMixin: data_meta, data_rd, render_authinfo, render_datameta, render_explodableMeta, render_ifadmin, render_ifdata, render_ifmeta, render_ifnodata, render_ifnoslot, render_ifownmeta, render_ifslot, render_intro, render_meta, render_metahtml, render_prependsite, render_withsidebar

Inherited from common.CommonRenderers: render_commonhead, render_getconfig, render_rootlink, render_unicode, render_urlescape

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Inherited from nevow.rend.ConfigurableFactory: configurable_, configurable_original, locateConfigurable

Inherited from nevow.rend.ChildLookupMixin: childFactory, putChild

Inherited from nevow.rend.FreeformChildMixin: child_freeform_hand

Class Methods

Inherited from grend.ResourceBasedPage: isBrowseable, isCacheable, makeAccessURL

Class Variables
  name = 'admin'
hash(x)
  customTemplate = <nevow.loaders.xmlfile object>
hash(x)
  clientRD = None
hash(x)
  reloadExc = None
hash(x)
  reloadTB = None
hash(x)
  defaultDocFactory = <gavo.web.common.doctypedStan object>

Inherited from imp.formal.form.ResourceMixin: __implemented__

Inherited from grend.ServiceBasedPage: checkedRenderer, openRenderer

Inherited from grend.ResourceBasedPage: parameterStyle, preferredMethod, resultType, urlUse

Inherited from nevow.rend.Page: addSlash, afterRender, beforeRender, buffered

Inherited from nevow.rend.Fragment: original

Inherited from grend.GavoRenderMixin: macroPackage

Inherited from nevow.rend.ChildLookupMixin: children

Properties

Inherited from grend.CustomTemplateMixin: docFactory

Inherited from object: __class__

Method Details

render_svclink(self, ctx, data)

source code 

renders a link to a service info with a service title.

data must be an item returned from data_services.

renderHTTP(self, ctx)

source code 
Overrides: nevow.rend.Page.renderHTTP

locateChild(self, ctx, segments)

source code 

Locate a child page of this one. ctx is a nevow.context.PageContext representing the parent Page, and segments is a tuple of each element in the URI. An tuple (page, segments) should be returned, where page is an instance of nevow.rend.Page and segments a tuple representing the remaining segments of the URI. If the child is not found, return NotFound instead.

locateChild is designed to be easily overridden to perform fancy lookup tricks. However, the default locateChild is useful, and looks for children in three places, in this order:

  • in a dictionary, self.children
  • a member of self named child_<childname>. This can be either an attribute or a method. If an attribute, it should be an object which can be adapted to IResource. If a method, it should take the context and return an object which can be adapted to IResource.
  • by calling self.childFactory(ctx, name). Name is a single string instead of a tuple of strings. This should return an object that can be adapted to IResource.
Overrides: nevow.rend.FreeformChildMixin.locateChild