예제 #1
0
    def get_data(self, **params):
        data = []
        interval = {}
        if 'show' in params:
            data = reportdata.getIndexIssues(params.get('uishortname'))

        if 'uishortname' in params:
            interval['uishortname'] = params['uishortname']
        else:
            interval['uishortname'] = 'all'

        uishortnames = hosts.getAllHostUinamesSorted()
        return data, interval, uishortnames
예제 #2
0
    def get_data(self, **params):
        data = []
        interval = {}
        if 'show' in params:
            data = reportdata.getIndexIssues(params.get('uishortname'))

        if 'uishortname' in params:
            interval['uishortname'] = params['uishortname']
        else:
            interval['uishortname'] = 'all'

        uishortnames = hosts.getAllHostUinamesSorted()
        return data, interval, uishortnames
예제 #3
0
    def index(self,**params):
        data = {}
        interval = {}
        if 'show' in params:            
            data = reportdata.getIndexIssues(params['hostname'])

        if 'hostname' in params:
            interval['hostname'] = params['hostname']
        else:
            interval['hostname'] = 'all'
        table = tplE.env.get_template('perf_indexes.html')
        host_names = sorted(hosts.hosts.items(), key = lambda h : h[1]['host_name'])
        return table.render(data=data, interval=interval, host_names=host_names)
예제 #4
0
    def get_data(self, **params):
        data = {}
        interval = {}
        if 'show' in params:
            data = reportdata.getIndexIssues(params['hostname'])
            for s in data:
                for d in data[s]:
                    d['hostuiname'] = hosts.hostIdToUiShortname(d['host_id'])

        if 'hostname' in params:
            interval['hostname'] = params['hostname']
        else:
            interval['hostname'] = 'all'
        host_names = sorted(hosts.hosts.items(), key = lambda h : h[1]['host_name'])
        return data, interval, host_names
예제 #5
0
    def get_data(self, **params):
        data = {}
        interval = {}
        if 'show' in params:
            data = reportdata.getIndexIssues(params['hostname'])
            for s in data:
                for d in data[s]:
                    d['hostuiname'] = hosts.hostIdToUiShortname(d['host_id'])

        if 'hostname' in params:
            interval['hostname'] = params['hostname']
        else:
            interval['hostname'] = 'all'
        host_names = sorted(hosts.hosts.items(), key = lambda h : h[1]['host_name'])
        return data, interval, host_names
예제 #6
0
    def index(self, **params):
        data = {}
        interval = {}
        if 'show' in params:
            data = reportdata.getIndexIssues(params['hostname'])

        if 'hostname' in params:
            interval['hostname'] = params['hostname']
        else:
            interval['hostname'] = 'all'
        table = tplE.env.get_template('perf_indexes.html')
        host_names = sorted(hosts.hosts.items(),
                            key=lambda h: h[1]['host_name'])
        return table.render(data=data,
                            interval=interval,
                            host_names=host_names)