{% extends "/base.html" %} {% block html_attr %} ng-app="App" ng-controller="Controller" id="page-html"{% endblock %} {% block title_text %}{% raw %}{{title}}{% endraw %}{% endblock %} {% block libs %} {% if include_libs %} {% else %} {% endif %} {% endblock %} {% block js_before %} "use strict"; {{ include_raw_file("/task/directive_widget.js") }} var controllerFunction = function($scope, $location) { $scope.data = {{ data }}; /* Calculate columns width in percent */ var td_ctr_width = 4; var td_result_width = Math.round(1 / ($scope.data.uuids.length+3) * 100); $scope.td_width_ = { counter: td_ctr_width, test_name: (100 - td_ctr_width - (td_result_width * $scope.data.uuids.length)), test_result: td_result_width } $scope.td_width = (function(vers_num) { var uuid_w = Math.round(1 / (vers_num+3) * 100); return {test: 100 - (uuid_w * vers_num), uuid: uuid_w} })($scope.data.uuids.length) var bitmask = {"success": 1, "skip": 2, "xfail": 4, "uxsuccess": 8, "fail": 16}; for (var i in $scope.data.tests) { var t = $scope.data.tests[i]; var bits = 0; for (var uuid in t.by_verification) { var status = t.by_verification[uuid].status; if (status in bitmask) { bits |= bitmask[status] } } $scope.data.tests[i].filter = bits; } $scope.set_filter = function(status) { if (status in $scope.state) { $scope.state[status] = !$scope.state[status]; $scope.filter_bits ^= bitmask[status] } } $scope.state = {"success": true, "skip": true, "xfail": true, "uxsuccess": true, "fail": true}; $scope.filter_by_status = function(test, index, arr) { return test.filter & $scope.filter_bits } $scope.filter_bits = (function(filter){ var bits = 0; for (var status in $scope.state){ if ($scope.state[status]) { bits ^= bitmask[status] } } return bits })(); $scope.toggle_filters_flag = true; $scope.toggle_filters = function() { if ($scope.toggle_filters_flag) { $scope.toggle_filters_flag = false; $scope.state = {"success": false, "skip": false, "xfail": false, "uxsuccess": false, "fail": false}; $scope.filter_bits = 0 } else { $scope.toggle_filters_flag = true $scope.state = {"success": true, "skip": true, "xfail": true, "uxsuccess": true, "fail": true}; $scope.filter_bits = 31 } } var title = "verification result"; if ($scope.data.uuids.length > 1) { title = "verifications results" } $scope.title = title; $scope.srt_dir = false; $scope.get_tests_count = function() { var ctr = 0; for (var i in $scope.data.tests) { if ($scope.data.tests[i].filter & $scope.filter_bits) { ctr++ } } return ctr } var title = angular.element(document.getElementById("page-header")); var header = angular.element(document.getElementById("content-header")); var tests = angular.element(document.getElementById("tests")); var sync_positions = function() { var title_h = title[0].offsetHeight; var header_h = header[0].offsetHeight; header.css({top:title_h+"px"}) tests.css({"margin-top": (title_h+header_h)+"px"}); } /* Make page head sticky */ window.onload = function() { title.css({position:"fixed", top:0, width:"100%"}); header.css({position:"fixed", width:"100%", background:"#fff"}); sync_positions(); window.onresize = sync_positions; var goup = document.getElementById("button-goup"); goup.onclick = function () { scrollTo(0, 0) }; window.onscroll = function() { if (window.scrollY > 50) { goup.style.display = "block"; } else { goup.style.display = "none"; } } } $scope.show_header = true; $scope.toggle_header = (function(e) { return function() { $scope.show_header = (e.style.display === "none"); e.style.display = $scope.show_header ? "table" : "none"; sync_positions() } })(document.getElementById("verifications")) }; if (typeof angular === "object") { angular.module("App", []) .controller("Controller", ["$scope", "$location", controllerFunction]) .directive("widget", widgetDirective) } {% endblock %} {% block css %} div.header {margin:0 !important} div.header .content-wrap { padding-left:10px } .status.status-success { background: #cfc; color: #333 } .status.status-uxsuccess { background: #ffd7af; color: #333 } .status.status-fail { background: #fbb; color: #333 } .status.status-xfail { background: #ffb; color: #333 } .status.status-skip { background: #ccf5ff; color: #333 } .status.checkbox { font-size:18px; text-align:center; cursor:pointer; padding:0 } .column { display:block; float:left; padding:4px 0 4px 8px; box-sizing:border-box; background:#fff; font-size:12px; font-weight:bold; border:#ccc solid; border-width:0 0 1px } .button { margin:0 5px; padding:0 8px 1px; background:#47a; color:#fff; cursor:pointer; border:1px #036 solid; border-radius:11px; font-size:12px; font-weight:normal; opacity:.8} .button:hover { opacity:1 } #button-goup { padding:3px 10px 5px; text-align:center; cursor:pointer; background:#fff; color:#036; line-height:14px; font-size:14px; position:fixed; bottom:0; right:10px; border:#ccc solid; border-width:1px 1px 0; border-radius:15px 15px 0 0} {% endblock %} {% block css_content_wrap %}width:100%; padding:0{% endblock %} {% block body_attr %} id="page-body" style="position:relative"{% endblock %} {% block header_text %}{% raw %}{{title}}{% endraw %}{% endblock %} {% block content %} {% raw %}

processing ...

Verification UUID Status Started at Finished at Tests count Tests duration, sec success skipped expected failures unexpected success failures
{{uuid}} {{data.verifications[uuid].status}} {{data.verifications[uuid].started_at}} {{data.verifications[uuid].finished_at}} {{data.verifications[uuid].tests_count}} {{data.verifications[uuid].tests_duration}} {{data.verifications[uuid].success}} {{data.verifications[uuid].skipped}} {{data.verifications[uuid].expected_failures}} {{data.verifications[uuid].unexpected_success}} {{data.verifications[uuid].failures}}
Filter tests by status:
Toggle Header Toggle Tags Toggle All Filters
Test name (shown {{get_tests_count()}})
{{uuid}}
{{t.name}}
{{tag}}
{{t.by_verification[uuid].status}} {{t.by_verification[uuid].duration}}
{{uuid}}
{{t.by_verification[uuid].details}}
{% endraw %} {% endblock %}