-
Notifications
You must be signed in to change notification settings - Fork 0
/
result.html
98 lines (97 loc) · 2.89 KB
/
result.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
{{define "content"}}
<div class="col-sm-12">
<h1>Result #{{.Request}}</h1>
{{if ne .Message ""}}
<div class="col-sm-6 col-sm-offset-4">
<div class="alert alert-dismissible alert-danger">
<button type="button" class="close" data-dismiss="alert">×</button>
<p><span class="glyphicon glyphicon-ban-circle"></span> {{.Message}}</p>
</div>
</div>
{{else}}
{{if eq .Result.Status -1}}
<section>
<h3>Status</h3>
<span class="label label-danger">Error</span>
<p>"Something went wrong"</p>
<p>Let us know, please</p>
{{if ne .Result.SystemLog ""}}
<pre>{{.Result.SystemLog}}</pre>
{{end}}
</section>
{{end}}
{{if eq .Result.Status 1}}
<section>
<h3>Status</h3>
<span class="label label-default">In queue...({{.Result.QueueIndex}}/{{.Result.QueueLength}})</span>
<p>Reload after a while</p>
</section>
{{end}}
{{if eq .Result.Status 2}}
<section>
<h3>Status</h3>
<span class="label label-primary">Running...</span>
<p>Wait a bit, and reload please</p>
</section>
{{end}}
{{if eq .Result.Status 0}}
<section>
<h3>Status</h3>
<span class="label label-success">Succuess</span>
</section>
{{if eq .Result.Compile -1}}
<section>
<h3>Compile</h3>
<span class="label label-default">Failed at opponent side</span>
</section>
{{else if eq .Result.Compile 1}}
<section>
<h3>Compile</h3>
<span class="label label-danger">Failed...</span>
</section>
<section>
<h3>Compiler Message</h3>
<pre>{{.Result.CompilerMessage}}</pre>
</section>
{{else}}
<section>
<h3>Visualizer</h3>
{{template "viewer" .}}
</section>
<section>
<h3>Log</h3>
<ul class="nav nav-tabs">
<li class="active"><a href="#stderr" data-toggle="tab" aria-expanded="true">stderr</a></li>
<li class=""><a href="#stdin" data-toggle="tab" aria-expanded="false">stdin</a></li>
<li class=""><a href="#course" data-toggle="tab" aria-expanded="false">course</a></li>
<li class=""><a href="#gamelog" data-toggle="tab" aria-expanded="false">gamelog</a></li>
<li class=""><a href="#compile" data-toggle="tab" aria-expanded="false">compile</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="stderr" style="margin: 15px;">
<h4>Standard Error from your AI</h4>
<pre>{{.Result.StderrLog}}</pre>
</div>
<div class="tab-pane" id="stdin" style="margin: 15px;">
<h4>Standard Input to your AI</h4>
<pre>{{.Result.StdinLog}}</pre>
</div>
<div class="tab-pane" id="course" style="margin: 15px;">
<h4>Course File</h4>
<pre>{{.Result.Course}}</pre>
</div>
<div class="tab-pane" id="gamelog" style="margin: 15px;">
<h4>Game Log</h4>
<pre>{{.Result.GameLog}}</pre>
</div>
<div class="tab-pane" id="compile" style="margin: 15px;">
<h4>Compiler Message</h4>
<pre>{{.Result.CompilerMessage}}</pre>
</div>
</div>
</section>
{{end}} <!-- END OF COMPILE -->
{{end}} <!-- END OF STATUS -->
{{end}} <!-- END OF MESSAGE -->
</div>
{{end}}