Пример #1
0
def about():
    """
    about page
    """
    return render_template('about.html',
                           containers=lxc.ls(),
                           version=lwp.check_version())
Пример #2
0
def about():
    '''
    about page
    '''
    if 'logged_in' in session:
        return render_template('about.html', containers=lxc.ls(), version=lwp.check_version())
    return render_template('login.html')
Пример #3
0
def about():
    '''
    about page
    '''
    if 'logged_in' in session:
        return render_template('about.html',
                               containers=lxc.ls(),
                               version=lwp.check_version())
    return render_template('login.html')
Пример #4
0
def about():
    '''
    about page
    '''
    if 'logged_in' in session:
        return render_template('about.html',
                               containers=lxc.ls(),
                               version=lwp.check_version(url=config.get('version', 'url'), proxy=proxy))
    return render_template('login.html')
Пример #5
0
def get_host_info():
    """
    Returns lxc containers on the current machine and brief status information.
    """
    info = {
        'hostname': socket.gethostname(),
        'distribution': lwp.name_distro(),
        'version': lwp.check_version(),
        'network': lwp.get_net_settings(),
        'memory': lwp.host_memory_usage(),
        'cpu': lwp.host_cpu_percent(),
        'disk': lwp.host_disk_usage(),
        'uptime': lwp.host_uptime(),
    }
    return jsonify(info)
Пример #6
0
def check_version():
    return jsonify(lwp.check_version())
Пример #7
0
def check_version():
    if 'logged_in' in session:
        return jsonify(lwp.check_version())
Пример #8
0
def about():
    """
    about page
    """
    return render_template('about.html', containers=lxc.ls(), version=lwp.check_version())
Пример #9
0
def check_version():
    return jsonify(lwp.check_version())
Пример #10
0
def check_version():
    if 'logged_in' in session:
        return jsonify(lwp.check_version())
Пример #11
0
def check_version():
    if 'logged_in' in session:
        return jsonify(lwp.check_version(url=config.get('version', 'url')))