Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions framework/python/src/common/testreport.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def generate_results(self, json_data, page_num):
result_list = '''
<img style="margin-bottom:10px;width:100%;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABFgAAAABCAYAAADqzRqJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAA3SURBVHgB7cAxAQAQFEXRJ4MIMkjwS9hklMCoi1EBWljePWlHvQIAMy2mAMDNKV3ADysPAYCbB6fxBrzkZ2KOAAAAAElFTkSuQmCC" />
<div class="result-list">
<span class="result-list-title">Results List</span>
<h3>Results List</h3>
<div class="result-line" style="margin-top: 10px;border-top-left-radius:4px;border-top-right-radius:4px;">
<div class="result-list-header-label" style="left: .1in">Name</div>
<div class="result-list-header-label" style="left: 2.8in">Description</div>
Expand Down Expand Up @@ -264,8 +264,8 @@ def generate_header(self, json_data):
tr_img_b64 = base64.b64encode(f.read()).decode('utf-8')
return f'''
<div class="header">
<h3 class="header-text">Testrun report</h3>
<h1 class="header-title" style="top: 50%;">{json_data["device"]["manufacturer"]} {json_data["device"]["model"]}</h1>
<h1>Testrun report</h1>
<h2 style="top: 50%;">{json_data["device"]["manufacturer"]} {json_data["device"]["model"]}</h2>
<img src="data:image/png;base64,{tr_img_b64}" alt="Test Run" width="90" style="position: absolute;top: 40%; right: 0px;"></img>
</div>
'''
Expand Down Expand Up @@ -299,7 +299,7 @@ def generate_summary(self, json_data):
summary += '''
<div class="summary-device-modules">
<div class="summary-item-label" style="margin-bottom:10px;">
Device Configuration
<h4>Device Configuration</h4>
</div>
'''

Expand Down Expand Up @@ -379,7 +379,7 @@ def generate_result_summary_item(self, key, value, style=None):

def generate_device_summary_label(self, key, value, trailing_space=True):
label = f'''
<div class="summary-item-label">{key}</div>
<div class="summary-item-label"><h4>{key}</h4></div>
<div class="summary-item-value">{value}</div>
'''
if trailing_space:
Expand Down Expand Up @@ -457,18 +457,30 @@ def generate_css(self):
position: relative;
}

.header-text {
h1 {
margin: 0 0 8px 0;
font-size: 20px;
font-weight: 400;
}

.header-title {
h2 {
margin: 0px;
font-size: 48px;
font-weight: 700;
}

h3 {
font-size: 24px;
}

h4 {
font-size: 12px;
font-weight: 500;
color: #5F6368;
margin-bottom: 0;
margin-top: 0;
}

/* Define the summary related css elements*/
.summary-content {
position: relative;
Expand All @@ -480,9 +492,6 @@ def generate_css(self):

.summary-item-label {
position: relative;
font-size: 12px;
font-weight: 500;
color: #5F6368;
}

.summary-item-value {
Expand Down