示例#1
0
    def get_data(self, uishortname=None, **params):
        uishortnames = hosts.getAllHostUinamesSorted()
        bloat_type = params.get('bloat_type', 'table')
        order_by = params.get('order_by', 'wasted_bytes')
        limit = params.get('limit', '50')
        data = []
        if uishortname:
            if bloat_type == 'table':
                msg, data = reportdata.getBloatedTablesForHostname(uishortname, order_by, limit)
            else:
                msg, data = reportdata.getBloatedIndexesForHostname(uishortname, order_by, limit)
            if msg:
                raise Exception('Failed to get data: ' + msg)

        return data, uishortnames, bloat_type, order_by, limit
示例#2
0
    def get_data(self, selected_hostname=None, **params):
        hostnames = hosts.getAllHostNames()
        bloat_type = params.get('bloat_type', 'table')
        order_by = params.get('order_by', 'wasted_bytes')
        limit = params.get('limit', '50')
        data = []
        hostuiname = None
        if selected_hostname:
            if bloat_type == 'table':
                msg, data = reportdata.getBloatedTablesForHostname(selected_hostname, order_by, limit)
            else:
                msg, data = reportdata.getBloatedIndexesForHostname(selected_hostname, order_by, limit)
            if msg:
                raise Exception('Failed to get data: ' + msg)
            hostuiname = hosts.getHostUIShortnameByHostname(selected_hostname)

        return data, hostnames, bloat_type, order_by, limit, hostuiname
示例#3
0
    def get_data(self, uishortname=None, **params):
        uishortnames = hosts.getAllHostUinamesSorted()
        bloat_type = params.get('bloat_type', 'table')
        order_by = params.get('order_by', 'wasted_bytes')
        limit = params.get('limit', '50')
        data = []
        if uishortname:
            if bloat_type == 'table':
                msg, data = reportdata.getBloatedTablesForHostname(
                    uishortname, order_by, limit)
            else:
                msg, data = reportdata.getBloatedIndexesForHostname(
                    uishortname, order_by, limit)
            if msg:
                raise Exception('Failed to get data: ' + msg)

        return data, uishortnames, bloat_type, order_by, limit
示例#4
0
    def get_data(self, selected_hostname=None, **params):
        hostnames = hosts.getAllHostNames()
        bloat_type = params.get('bloat_type', 'table')
        order_by = params.get('order_by', 'wasted_bytes')
        limit = params.get('limit', '50')
        data = []
        hostuiname = None
        if selected_hostname:
            if bloat_type == 'table':
                msg, data = reportdata.getBloatedTablesForHostname(selected_hostname, order_by, limit)
            else:
                msg, data = reportdata.getBloatedIndexesForHostname(selected_hostname, order_by, limit)
            if msg:
                raise Exception('Failed to get data: ' + msg)
            hostuiname = hosts.getHostUIShortnameByHostname(selected_hostname)

        return data, hostnames, bloat_type, order_by, limit, hostuiname