(self, rdb)
return self.monitors
Returns a list of monitor id's that this user owns
Returns a list of monitor id's that this user owns
Returns a list of monitor id s that this user owns
def getMonitors(self, rdb):
        ''' Returns a list of monitor id's that this user owns '''
        from monitors import Monitor
        # Get Monitors
        results = r.table('monitors').filter(
            {'uid': self.uid}).order_by('name').run(rdb)
        monitors = {}
        for x in results:
            if "encrypted" in x:
                if x['encrypted'] is True:
                    crypto = Fernet(self.config['CRYPTO_KEY'])
                    x['data'] = json.loads(crypto.decrypt(bytes(x['data'])))
            monitors[x['id']] = x
        self.monitors = monitors
        return self.monitors
def getMonitors ( self , rdb ) : from monitors import Monitor # Get Monitors results = r . table ( 'monitors' ) . filter ( { 'uid' : self . uid } ) . order_by ( 'name' ) . run ( rdb ) monitors = { } for x in results : if "encrypted" in x : if x [ 'encrypted' ] is True : crypto = Fernet ( self . config [ 'CRYPTO_KEY' ] ) x [ 'data' ] = json . loads ( crypto . decrypt ( bytes ( x [ 'data' ] ) ) ) monitors [ x [ 'id' ] ] = x self . monitors = monitors return self . monitors