{% extends "html/index.html" %} {% block script %} function openFunctionalDetailModal() { document.getElementById('functional-detail-modal-overlay').style.display = 'block'; document.getElementById('functional-detail-modal').style.display = 'block'; dragElement(document.getElementById('functional-detail-modal')); } // 关闭模态框 function closeFunctionalDetailModal() { document.getElementById('functional-detail-modal-overlay').style.display = 'none'; document.getElementById('functional-detail-modal').style.display = 'none'; } function dragElement(elmnt) { var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0; elmnt.onmousedown = dragMouseDown; function dragMouseDown(e) { e = e || window.event; e.preventDefault(); // get the mouse cursor position at startup: pos3 = e.clientX; pos4 = e.clientY; document.onmouseup = closeDragElement; // call a function whenever the cursor moves: document.onmousemove = elementDrag; } function elementDrag(e) { e = e || window.event; e.preventDefault(); // calculate the new cursor position: pos1 = pos3 - e.clientX; pos2 = pos4 - e.clientY; pos3 = e.clientX; pos4 = e.clientY; // set the element's new position: elmnt.style.top = (elmnt.offsetTop - pos2) + "px"; elmnt.style.left = (elmnt.offsetLeft - pos1) + "px"; } function closeDragElement() { // stop moving when mouse button is released: document.onmouseup = null; document.onmousemove = null; } } document.addEventListener("DOMContentLoaded", function() { const urlParams = new URLSearchParams(window.location.search); const K = urlParams.getAll('K'); var filterString = ""; for (let i = 0; i < K.length; i++) { const params = K[i].split(","); if(params.length != 6){ console.log("Formart of: K["+i+"] is empty: " + K[i]); continue; } console.log("K["+i+"]: " + params.join(",")); const firstTag = params[0].toUpperCase(); // Item need remain const firstClass = params[1]; const secondTag = params[2].toUpperCase(); // Condition 1 const secondClass = params[3]; const thirdTag = params[4].toUpperCase(); // Condition 2 const targetStr = params[5]; filterString += "Item(" + firstTag + ", " + firstClass + ") with C1(" + secondTag + ", " + secondClass + ") and C2(" + thirdTag + ", " + targetStr + ") && "; // search const elements = document.getElementsByTagName(firstTag); for (let j = elements.length - 1; j >= 0; j--) { if (elements[j].classList.contains(firstClass)) { var needRemove = false; if(secondTag.length > 0){ needRemove = true; const secondElements = elements[j].getElementsByTagName(secondTag); for (let k = secondElements.length - 1; k >= 0; k--) { if (secondElements[k].classList.contains(secondClass)) { needRemove = false; break; } } } if(thirdTag.length > 0 && !needRemove){ needRemove = true; const thirdElements = elements[j].getElementsByTagName(thirdTag); for (let k = thirdElements.length - 1; k >= 0; k--) { if (thirdElements[k].outerHTML.includes(targetStr)) { needRemove = false; break; } } } if(needRemove){ elements[j].parentNode.removeChild(elements[j]); } } } } if(filterString.length > 0){ filterString = filterString.substring(0, filterString.length - 4); document.getElementById('tr_filter_string').style.display = ''; document.getElementById('td_filter_string').innerHTML = filterString; document.getElementById('td_filter_string').style.color = '#ff00ff'; } var openFuc = urlParams.getAll('ShowFunCov'); if(openFuc.length > 0){ if(openFuc[0] == "1" || openFuc[0] == "true"){ openFunctionalDetailModal(); } } }); {% endblock %} {% block coverage %}

Line Coverage

{% if coverages.line is none %} {% else %} {% set line_rate = 0 %} {% if coverages.line.total != 0 %} {% set line_rate = (coverages.line.hints / coverages.line.total * 100) %} {% endif %} {% endif %}
Coverage Rate Hint Lines Total Lines Detail
N/A N/A N/A N/A {{ line_rate|round(2) }}% {{ coverages.line.hints }} {{ coverages.line.total }} View Details

Functional Coverage

{% if coverages.functional is none %} {% else %} {% set point_rate = 0 %} {% if coverages.functional.point_num_total != 0 %} {% set point_rate = (coverages.functional.point_num_hints / coverages.functional.point_num_total * 100) %} {% endif %} {% endif %}
Coverage Rate Hint Points Total Points Detail
N/A N/A N/A N/A {{ point_rate|round(2) }}% {{ coverages.functional.point_num_hints }} {{ coverages.functional.point_num_total }} View Details

{% endblock %} {% block footer %}
Toffee Report, Do Not Edit.
{% endblock %}