Exemplo n.º 1
0
def projectsJson(callback):
    projects = getProjectsList()

    if projects:
        content = projects
    else:
        content = {'error': 'No projects is monitored at the moment.'}

    return jsonOutput(content, callback)
Exemplo n.º 2
0
def projectJson(project, callback):
    version = getVersion(project)

    if version:
        status = 200
        content = {"project": project, "version": version}
    else:
        status = 404
        content = {"error": "No data for " + project}

    content = jsonOutput(content, callback)

    return (content, status)
Exemplo n.º 3
0
def indexJson(callback):
    content = jsonOutput({'message': 'Invalid Request'}, callback)

    return (content, 400)