Exemple #1
0
    def setData(self, MainWindow):
        self.records = get_records(config.LDB_FILENAME)
        if config.SIZEMODE == 'divide':
            divide = getSize(config.DIVIDE)
            self.layoutWidth = divide['width']
        else:
            self.layoutWidth = config.BASEWIDTH
        self.layoutHeight = (len(self.records) + 1) * config.BTN_HEIGHT

        self.Text_isShow = False
        self.widgetFlag=config.WIDGET_FLAG
Exemple #2
0
    def get(self):
        filters = {}
        args = request.args
        if not basic_validations(args):
            return {}, 401

        limit = int(args.get('limit', 500))
        offset = int(args.get('offset', 0))
        filters = loads(args.get('filter', "{}"))
        records = get_records('instruments', filters, offset, limit)
        if records is None:
            return {}, 401

        return jsonify(records)
Exemple #3
0
    def get(self):
        filters = {}
        args = request.args
        if not basic_validations(args):
            return {}, 401

        limit = int(args.get('limit', 500))
        offset = int(args.get('offset', 0))
        filters = loads(args.get('filter', "{}"))
        records = get_records('current_position', filters, offset, limit)
        if records is None:
            return {}, 401

        return dumps(records)
Exemple #4
0
    def get(self):
        filters = {}

        args = request.args
        if not basic_validations(args):
            return {}, 401

        limit = int(args.get('limit', 500))
        offset = int(args.get('offset', 0))
        filters = loads(args.get('filter', "{}"))
        if filters.get('issuer'):
            filters['Issuer'] = filters['Issuer'].lower()

        if filters.get('Issuer'):
            filters['Issuer'] = filters['Issuer'].lower()

        records = get_records('insyn_2018', filters, offset, limit)
        if records is None:
            return {}, 401

        return jsonify(records)