forked from a11smiles/karma-html-detailed-reporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.html
144 lines (137 loc) · 6.45 KB
/
template.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Test Results {{Browser}}</title>
<link rel="stylesheet" href="{{bootstrap_Path}}/css/bootstrap.css" />
<style>
html, body#REPORT_TEMPLATE {height:100%;font-family: Arial, Helvetica, sans-serif;padding:0px;margin:0px;background:#efefef;}
#REPORT_TEMPLATE #browser {font-size:12px;}
#REPORT_TEMPLATE span.result {display:inline-block;margin-right:20px;background-color:#fff;padding:2px 8px;color:#000;}
#REPORT_TEMPLATE table {border:1px solid #ccc;border-collapse:collapse;width:100%;}
#REPORT_TEMPLATE th {background-color:#acf;}
#REPORT_TEMPLATE td,th {border:1px solid #fff;font-size:14px;}
#REPORT_TEMPLATE td.status {width:30px;padding-left:10px;}
#REPORT_TEMPLATE td.status {width:100px;padding-left:10px;}
#REPORT_TEMPLATE td.error {padding-top:10px;}
#REPORT_TEMPLATE #timestamp {font-size:12px;margin-left:10px;}
#REPORT_TEMPLATE #refreshToggle {padding-top:8px;color:#fff;}
#REPORT_TEMPLATE #refreshToggle button {margin-left:10px;}
#REPORT_TEMPLATE .countBox {height:75px;text-align:center;color:#aaa;border:1px solid #fff;font-size:.9em;}
#REPORT_TEMPLATE .countBox h2 { color:#000;margin:10px 0px 5px 0px;}
#REPORT_TEMPLATE .countBox.success {background-color:#dff0d8;}
#REPORT_TEMPLATE .countBox.info {background-color:#d9edf7;}
#REPORT_TEMPLATE .countBox.active {background-color:#f5f5f5;}
#REPORT_TEMPLATE .countBox.danger {background-color:#f2dede;}
#REPORT_TEMPLATE .whiteout {background-color:#fff;padding:1px 15px;}
#REPORT_TEMPLATE .row.clear {margin-top:45px;}
#REPORT_TEMPLATE h3 {margin-bottom:30px;}
#REPORT_TEMPLATE .menu {list-style-type: none;padding-left:10px;font-size:1.1em;}
#REPORT_TEMPLATE .menu li {list-style-type: none;}
#REPORT_TEMPLATE #refreshBtn {outline:none;}
</style>
<script src="{{jquery_Path}}/jquery.min.js"></script>
<script>
var reload = shouldReload();
function shouldReload() {
if (location.search != null && location.search != undefined && location.search.length > 0)
return location.search.substr(1) === 'true' ? true : false;
else
return {{Auto_Reload}};
};
var setState = function(status) {
if (status) {
$('#refreshBtn').removeClass('btn-danger');
$('#refreshBtn').addClass('btn-success');
$('#refreshBtn').text('Enable Refresh');
} else {
$('#refreshBtn').removeClass('btn-success');
$('#refreshBtn').addClass('btn-danger');
$('#refreshBtn').text('Disable Refresh');
}
};
var refresh = function() {
if (reload) {
location.reload(true);
}
};
$(document).ready(function() {
setState(!reload);
$('#refreshBtn').click(function() {
setState(reload);
if (reload) {
reload = false;
} else {
reload = true;
refresh();
}
});
setTimeout(refresh, {{Refresh_Timeout}});
});
</script>
</head>
<body id="REPORT_TEMPLATE">
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<span class="navbar-brand">Test Results <span id="browser">{{Browser}}</span></a>
</div>
<div class="collapse navbar-collapse">
<div id="refreshToggle" class="pull-right">
<span id="timestamp">{{DateTime_Stamp}}</span>
<button class="btn btn-danger" id="refreshBtn">Disable Refresh</button>
</div>
</div>
</div>
</nav>
<div class="container-fluid" style="height:100%;">
<div class="row" style="height:100%;">
<div class="col-sm-2" style="padding:0px;height:100%;">
<div class="whiteout col-sm-2" style="height:100%;padding:75px 15px;position:fixed;">
<ul class="menu">
<li><a href="#Overview">Overview</a></li>
<li><a href="#Details">Details</a></li>
</ul>
</div>
</div>
<div class="col-sm-10" style="padding-top:75px;" id="Overview">
<div class="row">
<div class="col-sm-2">
<div class="countBox info">
<h2>{{Total_Test_Count}}</h2>
Total Tests
</div>
</div>
<div class="col-sm-2 col-sm-offset-1">
<div class="countBox success">
<h2>{{Total_Pass_Count}}</h2>
Passed Tests
</div>
</div>
<div class="col-sm-2 col-sm-offset-1">
<div class="countBox danger">
<h2>{{Total_Fail_Count}}</h2>
Failed Tests
</div>
</div>
<div class="col-sm-2 col-sm-offset-1">
<div class="countBox active">
<h2>{{Total_Skip_Count}}</h2>
Skipped Tests
</div>
</div>
</div>
<div class="row clear">
<div class="col-sm-12">
<div class="cold-sm-12 whiteout">
<h3 id="Details">Details</h3>
{{Test_Results}}
</div>
</div>
</div>
</div>
</div>
</div>
<script src="{{bootstrap_Path}}/js/bootstrap.min.js"></script>
</body>
</html>