plugin interface changed: now we use classes (inherited by CryptoBoxPlugin) instead of plain scripts
added some log entries use threading module instead of "fork" for background formatting redirection for "network" plugin fixed empty return value of plugins defaults to plugin overview page
This commit is contained in:
parent
52ccaeb530
commit
56e954d1c4
11 changed files with 545 additions and 436 deletions
|
@ -1,20 +1,23 @@
|
|||
import CryptoBoxPlugin
|
||||
|
||||
def doAction(hdf, cbox):
|
||||
__prepareFormData(hdf,cbox)
|
||||
return "show_log"
|
||||
class logs(CryptoBoxPlugin.CryptoBoxPlugin):
|
||||
|
||||
def doAction(self):
|
||||
self.__prepareFormData()
|
||||
return "show_log"
|
||||
|
||||
|
||||
def getStatus(cbox):
|
||||
return "%s:%s:%s" % (
|
||||
cbox.prefs["Log"]["Level"],
|
||||
cbox.prefs["Log"]["Destination"],
|
||||
cbox.prefs["Log"]["Details"])
|
||||
def getStatus(self):
|
||||
return "%s:%s:%s" % (
|
||||
self.cbox.prefs["Log"]["Level"],
|
||||
self.cbox.prefs["Log"]["Destination"],
|
||||
self.cbox.prefs["Log"]["Details"])
|
||||
|
||||
|
||||
def __prepareFormData(hdf, cbox):
|
||||
hdf["Data.Plugins.logs.Content"] = __getLogContent(cbox)
|
||||
def __prepareFormData(self):
|
||||
self.hdf[self.hdf_prefix + "Content"] = self.__getLogContent()
|
||||
|
||||
|
||||
def __getLogContent(cbox, lines=30, maxSize=2000):
|
||||
return "<br/>".join(cbox.getLogData(lines, maxSize))
|
||||
def __getLogContent(self, lines=30, maxSize=2000):
|
||||
return "<br/>".join(self.cbox.getLogData(lines, maxSize))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue