2016-04-07 22:06:57 -04:00
|
|
|
extends /templates/base-flat
|
|
|
|
|
|
|
|
block content
|
|
|
|
.container
|
2016-05-30 16:51:09 -04:00
|
|
|
div.row.verifier-row
|
2016-05-03 14:46:10 -04:00
|
|
|
div.col-sm-3
|
2016-05-30 16:51:09 -04:00
|
|
|
p.alert.alert-success
|
2016-05-03 14:46:10 -04:00
|
|
|
| Passed: #{view.passed}
|
2016-05-03 22:14:40 -04:00
|
|
|
div.col-sm-3
|
2016-05-30 16:51:09 -04:00
|
|
|
p.alert.alert-warning
|
2016-05-03 22:14:40 -04:00
|
|
|
| Test Problem: #{view.problem}
|
2016-05-03 14:46:10 -04:00
|
|
|
div.col-sm-3
|
2016-05-30 16:51:09 -04:00
|
|
|
p.alert.alert-danger
|
2016-05-03 14:46:10 -04:00
|
|
|
| Failed: #{view.failed}
|
2016-05-03 22:14:40 -04:00
|
|
|
div.col-sm-3
|
2016-05-30 16:51:09 -04:00
|
|
|
p.alert.alert-info
|
2016-05-03 22:14:40 -04:00
|
|
|
| To Run: #{view.testCount - view.passed - view.problem - view.failed}
|
2016-05-03 14:46:10 -04:00
|
|
|
|
2016-06-21 14:48:28 -04:00
|
|
|
.form.form-inline
|
|
|
|
.row.lineUnder
|
|
|
|
.form-group.campaign-mix
|
|
|
|
input(id="careAboutFrames", type="checkbox", checked=!!view.careAboutFrames, disabled=!!view.tests)
|
|
|
|
label(for="careAboutFrames") Check frame counts
|
|
|
|
.form-group.campaign-mix
|
|
|
|
label(for="cores") Threads:
|
|
|
|
input(id="cores", type="number", min="1", max="16", value=view.cores, disabled=!!view.tests)
|
|
|
|
|
2016-05-30 16:51:09 -04:00
|
|
|
if view.levelsByCampaign
|
|
|
|
.form.form-inline
|
2016-06-21 14:48:28 -04:00
|
|
|
.row.lineUnder
|
2016-05-30 16:51:09 -04:00
|
|
|
each campaignInfo, campaign in view.levelsByCampaign
|
|
|
|
.form-group.campaign-mix
|
|
|
|
- var campaignID = "campaign-" + campaign + "-checkbox";
|
|
|
|
input(id=campaignID, type="checkbox", checked=campaignInfo.checked, disabled=!!view.tests)
|
|
|
|
label(for=campaignID)= campaign + ': ' + campaignInfo.levels.length
|
|
|
|
.row
|
|
|
|
each codeLanguage in view.codeLanguages
|
|
|
|
.form-group.code-language-mix
|
|
|
|
- var codeLanguageID = "code-language-" + codeLanguage.id + "-checkbox";
|
|
|
|
input(id=codeLanguageID, type="checkbox", checked=codeLanguage.checked, disabled=!!view.tests)
|
|
|
|
label(for=codeLanguageID)= codeLanguage.id
|
|
|
|
.pull-right
|
|
|
|
button.btn.btn-primary#go-button(disabled=!!view.tests) Start Tests
|
|
|
|
|
|
|
|
if view.levelsToLoad && !view.tests
|
2016-05-03 14:46:10 -04:00
|
|
|
.progress
|
2016-05-30 16:51:09 -04:00
|
|
|
.progress-bar.progress-bar-success(role="progressbar" style="width: #{100*(1 - view.levelsToLoad/view.initialLevelsToLoad)}%")
|
2016-05-03 14:46:10 -04:00
|
|
|
|
2016-05-30 16:51:09 -04:00
|
|
|
if view.tests
|
|
|
|
if view.levelIDs
|
|
|
|
.progress
|
|
|
|
.progress-bar.progress-bar-success(role="progressbar" style="width: #{100*view.passed/view.testCount}%")
|
|
|
|
.progress-bar.progress-bar-warning(role="progressbar" style="width: #{100*view.problem/view.testCount}%")
|
|
|
|
.progress-bar.progress-bar-danger(role="progressbar" style="width: #{100*view.failed/view.testCount}%")
|
2016-05-03 22:14:40 -04:00
|
|
|
|
2016-05-30 16:51:09 -04:00
|
|
|
each test, id in view.tests
|
|
|
|
- if (test.state == 'no-solution')
|
|
|
|
- continue;
|
|
|
|
if test.level
|
|
|
|
.pull-right
|
|
|
|
- var last = test.level.get('slug') + view.linksQueryString
|
|
|
|
a.btn.btn-primary(href="/editor/verifier/" + last) Focus
|
|
|
|
a.btn.btn-success(href="/play/level/" + last) Play
|
|
|
|
a.btn.btn-warning(href="/editor/level/" + last) Edit
|
|
|
|
a.btn.btn-default(data-target='#verifier-test-' + id, data-toggle="collapse") Toggle
|
2016-05-03 15:14:51 -04:00
|
|
|
|
2016-05-30 16:51:09 -04:00
|
|
|
if !test.goals
|
|
|
|
h2.test-running= test.level.get('name')
|
|
|
|
small= ' in ' + test.language + ''
|
|
|
|
else if test.isSuccessful()
|
|
|
|
h2.test-success= test.level.get('name')
|
|
|
|
small= ' in ' + test.language + ''
|
|
|
|
else
|
|
|
|
h2.test-failed= test.level.get('name')
|
|
|
|
small= ' in ' + test.language + ''
|
2016-04-12 15:17:05 -04:00
|
|
|
|
2016-05-30 16:51:09 -04:00
|
|
|
div.row(class=(test.isSuccessful() && id > 1 ? 'collapse' : 'collapse in'), id='verifier-test-' + id)
|
|
|
|
div.col-xs-8
|
|
|
|
if test.solution
|
|
|
|
pre #{test.solution.source}
|
2016-04-12 15:17:05 -04:00
|
|
|
else
|
2016-05-30 16:51:09 -04:00
|
|
|
h4 Error Loading Test
|
|
|
|
pre #{test.error}
|
|
|
|
div.col-xs-4.well
|
|
|
|
if test.goals
|
|
|
|
if test.frames == test.solution.frameCount
|
|
|
|
div.test-success ✓ Frames: #{test.frames}
|
2016-04-12 15:17:05 -04:00
|
|
|
else
|
2016-05-30 16:51:09 -04:00
|
|
|
div.test-failed ✘ Frames: #{test.frames} vs #{test.solution.frameCount}
|
2016-05-03 22:14:40 -04:00
|
|
|
|
2016-05-30 16:51:09 -04:00
|
|
|
each v,k in test.goals || []
|
|
|
|
if !test.solution.goals
|
|
|
|
div.test-running ? #{k} (#{v.status})
|
|
|
|
else if v.status == test.solution.goals[k]
|
|
|
|
div.test-success ✓ #{k} (#{v.status})
|
|
|
|
else
|
|
|
|
div.test-failed ✘ #{k} (#{v.status} vs #{test.solution.goals[k]})
|
|
|
|
else
|
|
|
|
h3 Pending....
|
2016-05-13 13:53:39 -04:00
|
|
|
|
2016-05-30 16:51:09 -04:00
|
|
|
if test.error
|
|
|
|
pre.test-faile #{test.error}
|
|
|
|
|
|
|
|
if test.userCodeProblems.length
|
|
|
|
h4.test-failed User Code Problems
|
|
|
|
pre.test-failed #{JSON.stringify(test.userCodeProblems, null, 2)}
|
|
|
|
|
2016-06-29 15:40:30 -04:00
|
|
|
if test.simulationFrameRate
|
|
|
|
if test.simulationFrameRate > 90
|
|
|
|
div.test-success ✓ #{test.simulationFrameRate.toFixed(1)} FPS
|
|
|
|
else if test.simulationFrameRate > 30
|
|
|
|
div.test-running ~ #{test.simulationFrameRate.toFixed(1)} FPS
|
|
|
|
else
|
|
|
|
div.test-failed ✘ #{test.simulationFrameRate.toFixed(1)} FPS
|
|
|
|
|
2016-05-30 16:51:09 -04:00
|
|
|
else
|
|
|
|
h1 Loading Level...
|
2016-04-07 22:06:57 -04:00
|
|
|
|
2016-05-30 16:51:09 -04:00
|
|
|
// TODO: show last frame hash
|