From 0ba83bd0fe204e15e1c7f2eb8978af1078126d4b Mon Sep 17 00:00:00 2001 From: debugtalk Date: Mon, 26 Feb 2018 12:42:21 +0800 Subject: [PATCH] update html report default template --- .../templates/default_report_template.html | 112 +++++++++++++++++- 1 file changed, 107 insertions(+), 5 deletions(-) diff --git a/httprunner/templates/default_report_template.html b/httprunner/templates/default_report_template.html index 523ef816..f087314f 100644 --- a/httprunner/templates/default_report_template.html +++ b/httprunner/templates/default_report_template.html @@ -6,6 +6,8 @@ body { background-color: #f2f2f2; color: #333; + margin: 0 auto; + width: 960px; } #summary, #details { width: 960px; @@ -27,11 +29,11 @@ background-color: lightblue; padding: 5px 12px; } - #details .info { + #details .detail { background-color: lightgrey; font-size: smaller; - padding-left: 2em; - white-space: nowrap; + padding: 5px 10px; + text-align: center; } #details .success { background-color: greenyellow; @@ -45,6 +47,84 @@ #details .skipped { background-color: gray; } + + .button { + font-size: 1em; + padding: 6px; + width: 4em; + text-align: center; + background-color: #06d85f; + border-radius: 20px/50px; + cursor: pointer; + transition: all 0.3s ease-out; + } + a.button{ + color: gray; + text-decoration: none; + } + .button:hover { + background: #2cffbd; + } + + .overlay { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: rgba(0, 0, 0, 0.7); + transition: opacity 500ms; + visibility: hidden; + opacity: 0; + } + .overlay:target { + visibility: visible; + opacity: 1; + } + + .popup { + margin: 70px auto; + padding: 20px; + background: #fff; + border-radius: 5px; + width: 30%; + position: relative; + transition: all 5s ease-in-out; + } + + .popup h2 { + margin-top: 0; + color: #333; + font-family: Tahoma, Arial, sans-serif; + } + .popup .close { + position: absolute; + top: 20px; + right: 30px; + transition: all 200ms; + font-size: 30px; + font-weight: bold; + text-decoration: none; + color: #333; + } + .popup .close:hover { + color: #06d85f; + } + .popup .content { + max-height: 30%; + overflow: auto; + text-align: left; + } + + @media screen and (max-width: 700px) { + .box { + width: 70%; + } + .popup { + width: 70%; + } + } + @@ -88,14 +168,36 @@ Status Name Response Time - Info + Detail {% for record in records %} {{record.status}} {{record.name}} {{ '%0.1f'| format(record.response_time|float) }} ms -
{{record.attachment}}
+ + + log + + + {% if record.attachment %} + traceback + + {% endif %} + + {% endfor %}