mirror of
https://github.com/gryf/ferrit.git
synced 2026-02-17 15:45:46 +01:00
Fix version string and http server output
This commit is contained in:
@@ -1,70 +1,85 @@
|
|||||||
import bottle
|
import bottle
|
||||||
|
|
||||||
|
|
||||||
@bottle.route('/plugins/events-log/')
|
@bottle.route('/plugins/events-log/')
|
||||||
def events(params=None):
|
def events(params=None):
|
||||||
return """
|
return bottle.redirect('/plugins/events-log/Documentation/index.html', code=302)
|
||||||
)]}'
|
|
||||||
{
|
@bottle.route('/plugins/events-log/Documentation/index.html')
|
||||||
"name": "plugins/events-log",
|
def events(params=None):
|
||||||
"clone_url": "http://localhost:8181/plugins/events-log",
|
return """
|
||||||
"description": "This plugin listens to stream events and stores them in a database. The events can be retrieved through REST API."
|
<html><head><title>Plugin events-log</title></head><body>
|
||||||
}"""
|
<h1 id="plugin-events-log">Plugin events-log</h1>
|
||||||
|
<table class="plugin_info"><tr><th>Name</th><td>events-log plugin</td></tr>
|
||||||
|
<tr><th>Version</th><td>v2.13-178-g68fcb6a4b1</td></tr>
|
||||||
@bottle.route('/a/projects/')
|
</table>
|
||||||
def projects(params=None):
|
<h2><a href="#about" id="about">About</a></h2>
|
||||||
"""
|
<p>This plugin listens to stream events and stores them in a database. The events can be retrieved through REST API. Some use cases for this plugin include debugging for admins; also users who use scripts which listen to stream events can query for any events that they might have missed.</p>
|
||||||
Possible params (accessible via bottle.request.params) is 'd'
|
<h2><a href="#documentation" id="documentation">Documentation</a></h2>
|
||||||
"""
|
<ul>
|
||||||
print(params)
|
<li><a href="build.md">Build</a></li>
|
||||||
return {
|
<li><a href="config.md">events-log Configuration</a></li>
|
||||||
"All-Projects": {
|
</ul>
|
||||||
"id": "All-Projects",
|
<h2><a href="#rest-apis" id="rest-apis">REST APIs</a></h2>
|
||||||
"description": "Rights inherited by all other projects.",
|
<ul>
|
||||||
"state": "ACTIVE",
|
<li><a href="rest-api-events.md">events-log - /events/ REST API</a></li>
|
||||||
"web_links": [
|
</ul>
|
||||||
{
|
</body></html>
|
||||||
"name": "browse",
|
"""
|
||||||
"url": "/plugins/gitiles/All-Projects",
|
|
||||||
"target": "_blank"
|
@bottle.route('/a/projects/')
|
||||||
}
|
def projects(params=None):
|
||||||
]
|
"""
|
||||||
},
|
Possible params (accessible via bottle.request.params) is 'd'
|
||||||
"All-Users": {
|
"""
|
||||||
"id": "All-Users",
|
print(params)
|
||||||
"description": "Individual user settings and preferences.",
|
return {
|
||||||
"state": "ACTIVE",
|
"All-Projects": {
|
||||||
"web_links": [
|
"id": "All-Projects",
|
||||||
{
|
"description": "Rights inherited by all other projects.",
|
||||||
"name": "browse",
|
"state": "ACTIVE",
|
||||||
"url": "/plugins/gitiles/All-Users",
|
"web_links": [
|
||||||
"target": "_blank"
|
{
|
||||||
}
|
"name": "browse",
|
||||||
]
|
"url": "/plugins/gitiles/All-Projects",
|
||||||
},
|
"target": "_blank"
|
||||||
"DEDICATED": {
|
}
|
||||||
"id": "DEDICATED",
|
]
|
||||||
"state": "ACTIVE",
|
},
|
||||||
"web_links": [
|
"All-Users": {
|
||||||
{
|
"id": "All-Users",
|
||||||
"name": "browse",
|
"description": "Individual user settings and preferences.",
|
||||||
"url": "/plugins/gitiles/DEDICATED",
|
"state": "ACTIVE",
|
||||||
"target": "_blank"
|
"web_links": [
|
||||||
}
|
{
|
||||||
]
|
"name": "browse",
|
||||||
},
|
"url": "/plugins/gitiles/All-Users",
|
||||||
"DEDICATED/ironic": {
|
"target": "_blank"
|
||||||
"id": "DEDICATED%2Fironic",
|
}
|
||||||
"state": "ACTIVE",
|
]
|
||||||
"web_links": [
|
},
|
||||||
{
|
"DEDICATED": {
|
||||||
"name": "browse",
|
"id": "DEDICATED",
|
||||||
"url": "/plugins/gitiles/DEDICATED/ironic",
|
"state": "ACTIVE",
|
||||||
"target": "_blank"
|
"web_links": [
|
||||||
}
|
{
|
||||||
]
|
"name": "browse",
|
||||||
}
|
"url": "/plugins/gitiles/DEDICATED",
|
||||||
}
|
"target": "_blank"
|
||||||
|
}
|
||||||
bottle.run(host='localhost', port=8181, debug=True)
|
]
|
||||||
|
},
|
||||||
|
"DEDICATED/ironic": {
|
||||||
|
"id": "DEDICATED%2Fironic",
|
||||||
|
"state": "ACTIVE",
|
||||||
|
"web_links": [
|
||||||
|
{
|
||||||
|
"name": "browse",
|
||||||
|
"url": "/plugins/gitiles/DEDICATED/ironic",
|
||||||
|
"target": "_blank"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bottle.run(host='localhost', port=8181, debug=True)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ openstack
|
|||||||
openstack/nova
|
openstack/nova
|
||||||
openstack/neutron
|
openstack/neutron
|
||||||
"""
|
"""
|
||||||
GERRIT_CMD_VERSION = "ferrit version 1.0.0\n"
|
GERRIT_CMD_VERSION = "ferrit version 2.16.7\n"
|
||||||
GERRIT_SHELL_MSG = """\r
|
GERRIT_SHELL_MSG = """\r
|
||||||
**** Welcome to Ferrit Code Review ****\r
|
**** Welcome to Ferrit Code Review ****\r
|
||||||
\r
|
\r
|
||||||
@@ -99,7 +99,7 @@ class Server(paramiko.ServerInterface):
|
|||||||
|
|
||||||
def check_global_request(self, kind, msg):
|
def check_global_request(self, kind, msg):
|
||||||
LOG.debug('%s', inspect.stack()[0][3])
|
LOG.debug('%s', inspect.stack()[0][3])
|
||||||
LOG.debug('kind: %s, msg: %s', kind, msg)
|
LOG.debug('kind: %s, msg: %s', kind, str(msg))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def check_channel_env_request(self, channel, name, value):
|
def check_channel_env_request(self, channel, name, value):
|
||||||
|
|||||||
Reference in New Issue
Block a user