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
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
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