Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc14ba36

Browse files
authored
Merge pull requestRustPython#10 from mireille-raad/master
display regrtests_results.json in dashboard/html page
2 parents1a3bfbe +cdcebab commitc14ba36

File tree

5 files changed

+301
-32
lines changed

5 files changed

+301
-32
lines changed

‎_layouts/regrtests_results.html‎

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
---
2+
layout: default
3+
---
4+
5+
<divclass="w-80 m-auto mt-2">
6+
<divclass="d-md-flex">
7+
<divclass="d-sm-none">
8+
<imgclass="logo"src="{{site.baseurl}}/assets/img/rust-python-logo.svg"alt="RustPython Logo">
9+
</div>
10+
<divclass="pl-md-2">
11+
<divclass="title">{{ site.title }}</div>
12+
<divclass="section-title">{{ page.title }}</div>
13+
</div>
14+
</div>
15+
</div>
16+
17+
<divclass="w-80 m-auto mt-4">
18+
<divclass="font-secondary section-title">Filters</div>
19+
<divclass="d-md-flex mt-1">
20+
<divdata-filter="all"class="filter active pr-2"> All</div>
21+
<divdata-filter="passed"class="filter pr-2"> Passed</div>
22+
<divdata-filter="skipped"class="filter pr-2"> Skipped</div>
23+
<divdata-filter=""class="filter"> Empty</div>
24+
</div>
25+
</div>
26+
27+
<!-- content -->
28+
<divclass="w-80 m-auto">
29+
<divclass="m-auto">
30+
{% for test in site.data.regrtests_results.suites %}
31+
<divclass="results-suites">
32+
{% for result in test %}
33+
<divclass="results-test">
34+
35+
{% if result.module %}
36+
<divclass="padding-small">
37+
<spanclass="font-secondary">Module:</span>
38+
{{result.module }}
39+
</div>
40+
{% endif %}
41+
42+
{% if result.name %}
43+
<divclass="padding-small">
44+
<spanclass="font-secondary">Name:</span>
45+
{{result.name }}
46+
</div>
47+
{% endif %}
48+
49+
{% if result.class %}
50+
<divclass="padding-small">
51+
<spanclass="font-secondary">Class:</span>
52+
{{result.class }}
53+
</div>
54+
{% endif %}
55+
56+
<divclass="results-case-wrapper">
57+
{% for cases in result.cases %}
58+
<divclass="results-case">
59+
<divclass="tbl results-case-list">
60+
<!-- for each case -->
61+
{% for case in cases %}
62+
<divdata-status="{{case.result}}"class="row results-case-list-details">
63+
64+
{% if case.method %}
65+
<divclass="cell results-case-list-item">
66+
<spanclass="text-small text-muted">METHOD:</span>
67+
{{case.method }}
68+
</div>
69+
{% endif %}
70+
71+
{% if case.result %}
72+
<divclass="cell {{case.result }} results-case-list-item text-mobile-right">
73+
<spanclass="text-small text-muted d-mobile-none">RESULT:</span>
74+
{{case.result }}
75+
</div>
76+
{% endif %}
77+
78+
{% if case.execution_time %}
79+
<divclass="cell results-case-list-item text-md-right d-mobile-none">
80+
<spanclass="text-small text-muted">EXEC TIME:</span>
81+
{{case.execution_time }}
82+
</div>
83+
{% endif %}
84+
85+
</div>
86+
{% endfor %}
87+
<!-- end for each case -->
88+
</div>
89+
</div>
90+
{% endfor %}
91+
</div>
92+
93+
</div>
94+
{% endfor %}
95+
</div>
96+
{% endfor %}
97+
</div>
98+
</div>
99+
100+
<scriptsrc="/assets/js/regrtests_results.js"></script>

‎assets/js/regrtests_results.js‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
(function(){
2+
3+
varfilter=function(){
4+
// simply blast through the list and update the display
5+
criteria=this.dataset.filter;
6+
document.querySelector(".active").classList.remove("active");
7+
8+
this.classList.add("active");
9+
el=document.querySelectorAll('div[data-status]');
10+
for(vari=0;i<el.length;i++){
11+
if(el[i].dataset.status==criteria||criteria=="all"){
12+
el[i].style.display="flex"
13+
}else{
14+
el[i].style.display="none"
15+
}
16+
}
17+
};
18+
19+
// attach a click event to each filter and call the filter function
20+
varelements=document.getElementsByClassName("filter");
21+
for(vari=0;i<elements.length;i++){
22+
elements[i].addEventListener('click',filter,false);
23+
}
24+
25+
})();

‎assets/media.css‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@
2323
font-size:1em;
2424
}
2525

26+
.d-mobile-none {
27+
display: none;
28+
}
29+
30+
.text-mobile-right {
31+
text-align: right;
32+
}
33+
2634
}
2735

2836

@@ -63,7 +71,15 @@
6371
.float-md-right {
6472
float: right;
6573
}
74+
75+
.row .cell {
76+
line-height:30px;
77+
}
6678

79+
.text-md-right {
80+
text-align: right;
81+
}
82+
6783
}
6884

6985
/* fixes for ipad */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp