diff options
author | Yiting.Li <liyiting@huawei.com> | 2016-01-19 14:39:31 +0800 |
---|---|---|
committer | Yiting.Li <liyiting@huawei.com> | 2016-01-19 14:39:31 +0800 |
commit | 5b4f794932cb9b28ec679e6dd88e6febb2a5db7b (patch) | |
tree | d7b2615275a93ef1c2c878a0732b687832267174 /vstf/vstf/controller/reporters/report/pdf/styles.py | |
parent | 827a986f4abc404dc803380a25d5e9ade7448f67 (diff) |
JIRA: BOTTLENECKS-29
add the performance test framework
add the copyright on the code.
Change-Id: I6ec9eefe65bf07c2dd6c636d1b90b64da303952e
Signed-off-by: Yiting.Li <liyiting@huawei.com>
Diffstat (limited to 'vstf/vstf/controller/reporters/report/pdf/styles.py')
-rwxr-xr-x | vstf/vstf/controller/reporters/report/pdf/styles.py | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/vstf/vstf/controller/reporters/report/pdf/styles.py b/vstf/vstf/controller/reporters/report/pdf/styles.py index d54ee8ab..2860c245 100755 --- a/vstf/vstf/controller/reporters/report/pdf/styles.py +++ b/vstf/vstf/controller/reporters/report/pdf/styles.py @@ -1,10 +1,17 @@ -#!/usr/bin/python -# -*- coding: utf8 -*- +############################################################################## +# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + from reportlab.lib.styles import PropertySet from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.styles import ParagraphStyle -from reportlab.lib.enums import TA_LEFT +import reportlab.lib.enums as ens class TemplateStyle(PropertySet): @@ -108,20 +115,14 @@ class BarChartStyle(PropertySet): "fastlink": (colors.pink, '%4.1f'), "l2switch": (colors.lightblue, '%4.1f'), "kernel rdp": (colors.lightgreen, '%4.1f'), + "ovs": (colors.purple, '%4.1f') }, background=colors.lightgrey, labelsfont=6, ) -ts_left = TableStyle( - name='left', - table_hAlign='LEFT', # LEFT,CENTRE or RIGHT - table_vAlign='BOTTOM', # BOTTOM,MIDDLE or TOP - table_colWidths=None, - table_rowHeights=None -) - +tes_default = TemplateStyle(name='default') is_default = ImageStyle(name='default') is_traffic = ImageStyle(name='traffic', image_height=150, @@ -129,12 +130,19 @@ is_traffic = ImageStyle(name='traffic', image_hAlign='CENTRE') ts_default = TableStyle(name='default') +ts_left = TableStyle( + name='left', + table_hAlign='LEFT', # LEFT,CENTRE or RIGHT + table_vAlign='BOTTOM', # BOTTOM,MIDDLE or TOP + table_colWidths=None, + table_rowHeights=None +) lps_default = LinePlotStyle(name='default') lcs_default = LineChartStyle(name='default') bcs_default = BarChartStyle(name='default') ps_head_lv1 = ParagraphStyle(name='ps_head_lv1', fontName='Courier-Bold', - alignment=TA_LEFT, # TA_CENTRE, + alignment=ens.TA_CENTER, # TA_LEFT, TA_RIGHT fontSize=13, leading=22, leftIndent=0) |