示例#1
0
def refresh_lvm_host():
    if 'logged_in' in session:
        if config.has_option('overview', 'lvmvg'):
            lvm = lwp.host_lvm_usage(vgname=config.get('overview', 'lvmvg'))
        else:
            lvm = lwp.host_lvm_usage()
        return jsonify(lvm)
示例#2
0
def home():
    '''
    home page function
    '''
    if 'logged_in' in session:
        if config.has_option('overview', 'lvmvg'):
            lvm = lwp.host_lvm_usage(vgname=config.get('overview', 'lvmvg'))
        else:
            lvm = lwp.host_lvm_usage()
        tmpppath = None
        if config.has_option('templates', 'precreated'):
            tmpppath = config.get('templates', 'precreated')
        return render_template('index.html',
                               containers=lxc.ls(),
                               dist=lwp.check_system_version(),
                               system_version=lwp.check_system_version(True),
                               lvm=lvm,
                               templates=lwp.get_templates_list(),
                               templatesPrecreated=lwp.get_templates_precreated_list(tmpppath))
    return render_template('login.html')
示例#3
0
def home():
    '''
    home page function
    '''
    if 'logged_in' in session:
        return render_template('index.html',
                               containers=lxc.ls(),
                               dist=lwp.check_ubuntu(),
                               lvm=lwp.host_lvm_usage(vgname=config.get('overview', 'lvmvg')),
                               templates=lwp.get_templates_list())
    return render_template('login.html')
示例#4
0
def refresh_lvm_host():
    if 'logged_in' in session:
        return jsonify(lwp.host_lvm_usage(vgname=config.get('overview', 'lvmvg')))