AnnouncerInfo API command for tracker status
This commit is contained in:
parent
8e93470b94
commit
0e84bf95da
1 changed files with 8 additions and 0 deletions
|
@ -334,6 +334,9 @@ class UiWebsocket(object):
|
||||||
"plugins": PluginManager.plugin_manager.plugin_names
|
"plugins": PluginManager.plugin_manager.plugin_names
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def formatAnnouncerInfo(self, site):
|
||||||
|
return {"address": site.address, "stats": site.announcer.stats}
|
||||||
|
|
||||||
# - Actions -
|
# - Actions -
|
||||||
|
|
||||||
def actionAs(self, to, address, cmd, params=[]):
|
def actionAs(self, to, address, cmd, params=[]):
|
||||||
|
@ -379,6 +382,11 @@ class UiWebsocket(object):
|
||||||
ret = self.formatServerInfo()
|
ret = self.formatServerInfo()
|
||||||
self.response(to, ret)
|
self.response(to, ret)
|
||||||
|
|
||||||
|
|
||||||
|
def actionAnnouncerInfo(self, to):
|
||||||
|
ret = self.formatAnnouncerInfo(self.site)
|
||||||
|
self.response(to, ret)
|
||||||
|
|
||||||
# Sign content.json
|
# Sign content.json
|
||||||
def actionSiteSign(self, to, privatekey=None, inner_path="content.json", remove_missing_optional=False, update_changed_files=False, response_ok=True):
|
def actionSiteSign(self, to, privatekey=None, inner_path="content.json", remove_missing_optional=False, update_changed_files=False, response_ok=True):
|
||||||
self.log.debug("Signing: %s" % inner_path)
|
self.log.debug("Signing: %s" % inner_path)
|
||||||
|
|
Loading…
Reference in a new issue