I'm writing a little product to allow plone manager role users to have
Varnish purge its cache by clicking a button in plone.


1.  Am I re-inventing the wheel here?  That is, is there already such a
product which I haven't noticed?


I already have a tested python module that telnets to the Varnish CLI,
commands the purge, and parses the response.


It seems to me that the proper place for such a button is in the
@@maintenance-controlpanel.


2.  Are there good reasons not to put it there?


I can subclass plone.app.controlpanel.maintenance.MaintenanceControlPanel to
add a an @form.action() decorated method to handle a "purgevarnish" button,
and to specify my template rather than the one in plone.app.controlpanel, so
that I can add a from/fieldset/submit button.


I don't see any hooks for plugging in, say, a structure provider to add my
form, which is why I'm using my own copy of the template.  That makes me
vulnerable to any future incompatabe tempate changes in
plone.app.controlpanel, but I'm guessing that it is pretty stable.



3.  Am I missing a cleaner way to do this (still as a new button on the
maintenance controlpanel)?



I don't add any new form data, so I presume that I can use the existing
MaintenanceControlPanelAdapter and its registration, just registering a new
browser page that uses my class instead.


4.  Are there issues with that plan?  For example, am I going to have to
come up with a way of making my registration more specific than the base
one?


Thanks in advance for any help.

Bill
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to