示例#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')))