def about(): """ about page """ return render_template('about.html', containers=lxc.ls(), version=lwp.check_version())
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')
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')
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)
def check_version(): return jsonify(lwp.check_version())
def check_version(): if 'logged_in' in session: return jsonify(lwp.check_version())
def check_version(): if 'logged_in' in session: return jsonify(lwp.check_version(url=config.get('version', 'url')))