Merge "Add a config_errors info to {tenant}/config-errors endpoint"
This commit is contained in:
@@ -272,6 +272,17 @@ class ZuulWebAPI(object):
|
||||
resp.headers['Access-Control-Allow-Origin'] = '*'
|
||||
return ret
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.tools.save_params()
|
||||
@cherrypy.tools.json_out(content_type='application/json; charset=utf-8')
|
||||
def config_errors(self, tenant):
|
||||
config_errors = self.rpc.submitJob(
|
||||
'zuul:config_errors_list', {'tenant': tenant})
|
||||
ret = json.loads(config_errors.data[0])
|
||||
resp = cherrypy.response
|
||||
resp.headers['Access-Control-Allow-Origin'] = '*'
|
||||
return ret
|
||||
|
||||
@cherrypy.expose
|
||||
@cherrypy.tools.save_params()
|
||||
def key(self, tenant, project):
|
||||
@@ -457,6 +468,8 @@ class ZuulWeb(object):
|
||||
controller=api, action='console_stream')
|
||||
route_map.connect('api', '/api/tenant/{tenant}/builds',
|
||||
controller=api, action='builds')
|
||||
route_map.connect('api', '/api/tenant/{tenant}/config-errors',
|
||||
controller=api, action='config_errors')
|
||||
|
||||
for connection in connections.connections.values():
|
||||
controller = connection.getWebController(self)
|
||||
|
||||
Reference in New Issue
Block a user