def tracker_detail_request(handler, tracker_id): track_info = get_track(handler, tracker_id) error_message = "" if not track_info: error_message = "tracker record with id={0}, does not exist".format( tracker_id) scenario = track_info.get('scenario') _stub_count = stub_count(get_hostname(handler.request), scenario)['data'].get('count') tracking_data = track_info or {} trace = tracking_data.pop('trace', {}) return handler.render_string("tracker_record.html", page_title='Tracker Record', tracking_data=tracking_data, stub_count=_stub_count, error_message=error_message, pretty_format=pretty_format, client_data=convert_to_script(trace), human_size=human_size)
def analytics_request(handler): status = get_status(handler) return handler.render_string("analytics.html", client_data=convert_to_script(status))