<s> from tornado . web import authenticated <EOL> from amonone . web . apps . core . baseview import BaseView <EOL> from amonone . web . apps . core . models import server_model <EOL> from amonone . web . apps . dashboard . models import dashboard_model <EOL> from amonone . utils . dates import ( <EOL> utc_now_to_localtime , <EOL> datestring_to_utc_datetime , <EOL> utc_unixtime_to_localtime , <EOL> localtime_utc_timedelta , <EOL> datetime_to_unixtime <EOL> ) <EOL> class DashboardView ( BaseView ) : <EOL> def initialize ( self ) : <EOL> self . current_page = '<STR_LIT>' <EOL> super ( DashboardView , self ) . initialize ( ) <EOL> @ authenticated <EOL> def get ( self ) : <EOL> snapshot_param = self . get_argument ( '<STR_LIT>' , None ) <EOL> snapshot = None <EOL> if snapshot_param : <EOL> snapshot = datestring_to_utc_datetime ( snapshot_param ) <EOL> snapshot = datetime_to_unixtime ( snapshot ) <EOL> system_check = dashboard_model . get_system_check ( snapshot ) <EOL> process_check = dashboard_model . get_process_check ( snapshot ) <EOL> max_date = utc_now_to_localtime ( ) <EOL> self . render ( "<STR_LIT>" , <EOL> system_check = system_check , <EOL> process_check = process_check , <EOL> max_date = max_date , <EOL> snapshot = snapshot_param <EOL> ) </s>
