def users_per_city(request, wsid): """ """ query = queries.users_per_city limit = datetime.now() - timedelta(minutes = 10) return GeoRequestAdapter(db.execute(query, wsid)[[limit.year, limit.month, limit.day, limit.hour, limit.minute]:]).process()[:5]
def users_locations(request, wsid, ne_lat, ne_lng, sw_lat, sw_lng): """ """ query = queries.users_locations limit = datetime.now() - timedelta(minutes = 10) result = db.execute(query, wsid, limit = 500)[:[limit.year, limit.month, limit.day, limit.hour, limit.minute]] resp = MapAdapter(result) return resp.process()
def request_count(request, wsid, grouping, limit): """ """ res = ChartResolutionParser.get(grouping) query = queries.request_count resp = RequestResultAdapter( db.execute(query, wsid, group_level = res.group_level, limit = limit), int(limit), res) return resp.process()
def users_per_os(request, wsid): """ """ query = queries.users_per_os return PieChartAdapter(db.execute(query, wsid)).process()