@app.route('/global/view/states', defaults={'state': None})
@app.route('/global/view/states/<state>/')
@login_required
def view_global(state):
    """Global view of provided state [alerting/pending/suspended]"""
    if state:
        if state in VALID_STATES:
            return render_template('globalstates.html', state=state)
        else:
            abort(404)
    else:
        return render_template('globalstates.html', state='alerting')
dataset/ETHPy150Open pandemicsyn/stalker/stalkerweb/stalkerweb/views.py/view_global/original