#NEWLINE# @ webapp . route ( '/' ) #NEWLINE# def index( ) : #NEWLINE# #INDENT# sysinfo = current_service . get_sysinfo ( ) #NEWLINE# netifs = current_service . get_network_interfaces ( ) . values ( ) #NEWLINE# netifs . sort ( key = ( lambda x : x . get ( 'bytes_sent' ) ) , reverse = True ) #NEWLINE# data = { #NEWLINE# #INDENT# 'load_avg' : sysinfo [ 'load_avg' ] , #NEWLINE# 'num_cpus' : sysinfo [ 'num_cpus' ] , #NEWLINE# 'memory' : current_service . get_memory ( ) , #NEWLINE# 'swap' : current_service . get_swap_space ( ) , #NEWLINE# 'disks' : current_service . get_disks ( ) , #NEWLINE# 'cpu' : current_service . get_cpu ( ) , #NEWLINE# 'users' : current_service . get_users ( ) , #NEWLINE# 'net_interfaces' : netifs , #NEWLINE# 'page' : 'overview' , #NEWLINE# 'is_xhr' : request . is_xhr , #NEWLINE# #UNINDENT# } #NEWLINE# return render_template ( 'index.html' , ** sysinfo )