mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Fixed headers replication on UDS Reports
This commit is contained in:
parent
ec29371b41
commit
c73dae361f
@ -46,7 +46,7 @@ import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__updated__ = '2016-01-20'
|
||||
__updated__ = '2016-05-17'
|
||||
|
||||
|
||||
class UDSGeraldoReport(Report):
|
||||
@ -65,7 +65,7 @@ class UDSGeraldoReport(Report):
|
||||
|
||||
class band_page_header(ReportBand):
|
||||
height = 1.8 * cm
|
||||
elements = [
|
||||
bElements = [
|
||||
SystemField(expression='%(report_title)s', top=0.5 * cm, left=0, width=BAND_WIDTH,
|
||||
style={'fontName': 'Helvetica-Bold', 'fontSize': 14, 'alignment': TA_CENTER}),
|
||||
|
||||
@ -77,7 +77,7 @@ class UDSGeraldoReport(Report):
|
||||
|
||||
class band_page_footer(ReportBand):
|
||||
height = 0.5 * cm
|
||||
elements = [
|
||||
bElements = [
|
||||
Label(text=_('Generated by UDS'), top=0.1 * cm),
|
||||
SystemField(expression=_('Printed in %(now:%Y, %b %d)s at %(now:%H:%M)s'), top=0.1 * cm,
|
||||
width=BAND_WIDTH, style={'alignment': TA_RIGHT}),
|
||||
@ -85,7 +85,7 @@ class UDSGeraldoReport(Report):
|
||||
borders = {'top': True}
|
||||
|
||||
def __init__(self, queryset=None):
|
||||
self.band_page_header.elements += self.header_elements
|
||||
self.band_page_header.elements = self.band_page_header.bElements + self.header_elements
|
||||
self.band_page_header.height = self.header_height
|
||||
Report.__init__(self, queryset=queryset)
|
||||
|
||||
|
@ -60,7 +60,7 @@ import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__updated__ = '2015-09-04'
|
||||
__updated__ = '2016-05-17'
|
||||
|
||||
# several constants as Width height, margins, ..
|
||||
WIDTH, HEIGHT = 1800, 1000
|
||||
@ -69,6 +69,7 @@ GERALDO_HEIGHT = GERALDO_WIDTH * HEIGHT / WIDTH
|
||||
|
||||
|
||||
class AccessReport(UDSGeraldoReport):
|
||||
header_elements = []
|
||||
|
||||
class band_detail(ReportBand):
|
||||
height = 400 * mm # Height bigger than a page, so a new page is launched
|
||||
@ -225,7 +226,7 @@ class StatsReportLogin(StatsReport):
|
||||
# User access by date graph
|
||||
#
|
||||
|
||||
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, WIDTH, HEIGHT)
|
||||
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, WIDTH, HEIGHT) # @UndefinedVariable
|
||||
|
||||
dataset = ((ugettext('Users access to UDS'), data),)
|
||||
|
||||
|
@ -64,7 +64,7 @@ import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__updated__ = '2016-05-04'
|
||||
__updated__ = '2016-05-17'
|
||||
|
||||
# several constants as Width height, margins, ..
|
||||
WIDTH, HEIGHT = 1800, 1000
|
||||
@ -74,6 +74,8 @@ GERALDO_HEIGHT = GERALDO_WIDTH * HEIGHT / WIDTH
|
||||
|
||||
class AccessReport(UDSGeraldoReport):
|
||||
|
||||
header_elements = []
|
||||
|
||||
class band_detail(ReportBand):
|
||||
height = 400 * mm # Height bigger than a page, so a new page is launched for listings
|
||||
# auto_expand_height = True
|
||||
@ -244,7 +246,7 @@ class PoolPerformanceReport(StatsReport):
|
||||
|
||||
xLabelFormat, poolsData, reportData = self.getRangeData()
|
||||
|
||||
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, WIDTH, HEIGHT)
|
||||
surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, WIDTH, HEIGHT) # @UndefinedVariable
|
||||
|
||||
options = {
|
||||
'encoding': 'utf-8',
|
||||
|
@ -56,7 +56,7 @@ import logging
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
__updated__ = '2016-01-20'
|
||||
__updated__ = '2016-05-17'
|
||||
|
||||
# several constants as Width height, margins, ..
|
||||
WIDTH, HEIGHT = 1800, 1000
|
||||
|
@ -40,7 +40,7 @@ from uds.core.util import OsDetector
|
||||
import six
|
||||
import os
|
||||
|
||||
__updated__ = '2015-08-31'
|
||||
__updated__ = '2016-05-13'
|
||||
|
||||
|
||||
class RDPFile(object):
|
||||
@ -141,7 +141,7 @@ class RDPFile(object):
|
||||
Note that server is not added
|
||||
'''
|
||||
|
||||
params = ['-TUDS Connection', '-P', '-rclipboard:PRIMARYCLIPBOARD]']
|
||||
params = ['-TUDS Connection', '-P', '-rclipboard:PRIMARYCLIPBOARD']
|
||||
|
||||
if self.redirectSmartcards:
|
||||
params.append('-rsdcard')
|
||||
@ -152,7 +152,6 @@ class RDPFile(object):
|
||||
params.append('-rsound:off')
|
||||
|
||||
if self.redirectDrives is True:
|
||||
params.append('-rdisk:home=' + os.environ['HOME'])
|
||||
params.append('-rdisk:media=/media')
|
||||
|
||||
if self.redirectSerials is True:
|
||||
|
Loading…
Reference in New Issue
Block a user