def get_data(self, hostname, **params): data = [] from_date = params.get('from_date', datetime.datetime.now().strftime('%Y-%m-%d')) to_date = params.get('to_date', (datetime.datetime.now() + datetime.timedelta(1)).strftime('%Y-%m-%d')) if 'show' in params: data = reportdata.getLocksReport(hostname, from_date, to_date) host_names = hosts.getHostsWithFeature('blockingStatsGatherInterval').items() return data, from_date, to_date, host_names
def get_data(self, selected_hostname, **params): data = {} filter = params.get('filter', 'api') from_date = params.get('from_date', (datetime.datetime.now() - datetime.timedelta(14)).strftime('%Y-%m-%d')) to_date = params.get('to_date', (datetime.datetime.now() + datetime.timedelta(1)).strftime('%Y-%m-%d')) if selected_hostname: data = reportdata.get_unused_schemas(selected_hostname, from_date, to_date, filter) host_names = hosts.getHostsWithFeature('schemaStatsGatherInterval').items() return data, from_date, to_date, host_names, filter
def get_data(self, selected_hostname, **params): data = {} filter = params.get('filter', 'api') from_date = params.get('from_date', (datetime.datetime.now() - datetime.timedelta(14)).strftime('%Y-%m-%d')) to_date = params.get('to_date', (datetime.datetime.now() + datetime.timedelta(1)).strftime('%Y-%m-%d')) if selected_hostname: data = reportdata.get_unused_schemas(selected_hostname, from_date, to_date, filter) host_names = hosts.getHostsWithFeature('schemaStatsGatherInterval').items() host_names.sort(key=lambda x: x[1]['host_name']) return data, from_date, to_date, host_names, filter