Пример #1
0
def status():
    root = db.get()
    root._p_jar.sync()
    config = root.get('config', {})
    configured = configurator.valid(config)
    action = root.get('action', {})
    what = action.get('what')
    when = action.get('when')
    current = root.get('current_file')
    return jsonify(
        configured=configured, what=what,
        when=when, current_file=current,
        errored=root.get('errored', [])[-20:], **config)
Пример #2
0
def status():
    root = db.get()
    root._p_jar.sync()
    config = root.get('config', {})
    configured = configurator.valid(config)
    action = root.get('action', {})
    what = action.get('what')
    when = action.get('when')
    current = root.get('current_file')
    return jsonify(configured=configured,
                   what=what,
                   when=when,
                   current_file=current,
                   errored=root.get('errored', [])[-20:],
                   **config)
Пример #3
0
def index():
    if not api.get_credentials():
        url = utils.get_url('auth_callback', '/authcallback', True)
        return f.redirect(api.get_login_url(url))
    root = db.get()
    root._p_jar.sync()
    config = root.get('config', {})
    configured = configurator.valid(config)
    action = root.get('action', {})
    what = action.get('what')
    when = action.get('when')
    current = root.get('current_file')
    return f.render_template(
        'index.html', configured=configured, what=what,
        when=when, current_file=dict(current),
        errored=root.get('errored', [])[-20:], **config)
Пример #4
0
def index():
    if not api.get_credentials():
        url = utils.get_url('auth_callback', '/authcallback', True)
        return f.redirect(api.get_login_url(url))
    root = db.get()
    root._p_jar.sync()
    config = root.get('config', {})
    configured = configurator.valid(config)
    action = root.get('action', {})
    what = action.get('what')
    when = action.get('when')
    current = root.get('current_file')
    return f.render_template('index.html',
                             configured=configured,
                             what=what,
                             when=when,
                             current_file=dict(current),
                             errored=root.get('errored', [])[-20:],
                             **config)