Example #1
0
    def post(self):
        offset = int(self.request.get('offset'))

        devices = Device.all().fetch(10, offset)
        for device in devices:
            logging.debug("Device: %s" % device.key().name())
            if not device.carrier:
                device.carrier = "Unknown"
            DeviceCarriers.increment(device.carrier)
Example #2
0
    def post(self):
        offset = int(self.request.get('offset'))

        devices = Device.all().fetch(10, offset)
        for device in devices:
            logging.debug("Device: %s" % device.key().name())
            if not device.carrier:
                device.carrier = "Unknown"
            DeviceCarriers.increment(device.carrier)
Example #3
0
    def get(self):
        db.delete(DeviceCarriers.all().fetch(1000))

        total = (Device.all().count() / 10) + 1
        for x in xrange(total):
            offset = x * 10
            taskqueue.add(url='/tasks/AggregateCarriersWorker', params={'offset': offset})
Example #4
0
    def get(self):
        db.delete(DeviceCarriers.all().fetch(1000))

        total = (Device.all().count() / 10) + 1
        for x in xrange(total):
            offset = x * 10
            taskqueue.add(url='/tasks/AggregateCarriersWorker',
                          params={'offset': offset})
Example #5
0
    def get(self):
        tpl_values = {
            'device_count': Device.getCount(),
            'devices_count': DeviceAggregate.getKeyCount(),
            'device_data': DeviceAggregate.generateGraphData(),
            'carrier_count': DeviceCarriers.getKeyCount(),
            'country_count': DeviceCountries.getKeyCount(),
        }

        self.render(tpl_values)
Example #6
0
    def get(self):
        tpl_values = {
            'device_count': Device.getCount(),
            'devices_count': DeviceAggregate.getKeyCount(),
            'device_data': DeviceAggregate.generateGraphData(),
            'carrier_count': DeviceCarriers.getKeyCount(),
            'country_count': DeviceCountries.getKeyCount(),
        }

        self.render(tpl_values)
Example #7
0
 def html(self):
     self.render({
         'carrier_data_len': len(DeviceCarriers.generateGraphData()),
         'carrier_data': DeviceCarriers.generateGraphData()
     })
Example #8
0
 def json(self):
     json = simplejson.dumps(DeviceCarriers.generateGraphData())
     self.response.out.write(json)