Beispiel #1
0
def get_app_or_404(app_id):
    heroku = get_heroku_client_for_session()
    try:
        app = heroku.apps()[app_id]
    except KeyError:
        abort(404, message="App {} doesn't exist".format(app_id))

    return app
Beispiel #2
0
    def get_app(self, app_id):
        heroku = utils.get_heroku_client_for_session()
        try:
            app = heroku.apps()[app_id]
        except KeyError:
            raise NotFoundError('app', app_id)

        return app
Beispiel #3
0
def get_app_or_404(app_id):
    heroku = get_heroku_client_for_session()
    try:
        app = heroku.apps()[app_id]
    except KeyError:
        abort(404, message="App {} doesn't exist".format(app_id))

    return app
Beispiel #4
0
    def get_app(self, app_id):
        heroku = utils.get_heroku_client_for_session()
        try:
            app = heroku.apps()[app_id]
        except KeyError:
            raise NotFoundError('app', app_id)

        return app
Beispiel #5
0
def app(app_id):
    heroku = utils.get_heroku_client_for_session()
    apps = heroku.apps()  # getto permissions check

    if app_id not in apps:
        raise NotFoundError('app', app_id)

    app = models.App.query.filter_by(id=app_id).first()
    if not app:
        app = apps[app_id]

    return AppSchema().jsonify(app)
Beispiel #6
0
def app(app_id):
    heroku = utils.get_heroku_client_for_session()
    apps = heroku.apps()  # getto permissions check

    if app_id not in apps:
        raise NotFoundError('app', app_id)

    app = models.App.query.filter_by(id=app_id).first()
    if not app:
        app = apps[app_id]

    return AppSchema().jsonify(app)
Beispiel #7
0
    def get(self, app_id):

        heroku = get_heroku_client_for_session()
        apps = heroku.apps()  # getto permissions check
        if app_id not in apps:
            abort(404, message="App {} doesn't exist".format(app_id))

        app = models.App.query.filter_by(id=app_id).first()
        if app:
            checks = {c.dynotype: str(c.id) for c in app.checks}
        else:
            app = apps[app_id]
            checks = {}

        return {
            'name': app.name,
            'id': app_id,
            'checks': checks,
        }
Beispiel #8
0
    def get(self, app_id):

        heroku = get_heroku_client_for_session()
        apps = heroku.apps()  # getto permissions check
        if app_id not in apps:
            abort(404, message="App {} doesn't exist".format(app_id))

        app = models.App.query.filter_by(id=app_id).first()
        if app:
            checks = {c.dynotype: str(c.id) for c in app.checks}
        else:
            app = apps[app_id]
            checks = {}

        return {
            'name': app.name,
            'id': app_id,
            'checks': checks,
        }
Beispiel #9
0
 def get(self):
     heroku = get_heroku_client_for_session()
     return {a.name: a.id for a in heroku.apps()}
Beispiel #10
0
 def get(self):
     heroku = get_heroku_client_for_session()
     return {a.name: a.id for a in heroku.apps()}
Beispiel #11
0
def apps():
    heroku = utils.get_heroku_client_for_session()
    apps = heroku.apps()
    return jsonify({'apps': AppSchema(many=True).dump(apps).data})
Beispiel #12
0
def apps():
    heroku = utils.get_heroku_client_for_session()
    apps = heroku.apps()
    return jsonify({'apps': AppSchema(many=True).dump(apps).data})