Add descriptions to table with data hints
This commit is contained in:
parent
6ce9c766c4
commit
5f47058df5
|
@ -77,7 +77,7 @@
|
|||
}
|
||||
@if(gameResults.nonEmpty) {
|
||||
<div class="evaluation">
|
||||
<table class="slist">
|
||||
<table class="slist hint--top">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Assessed game</th>
|
||||
|
@ -91,11 +91,11 @@
|
|||
</th>
|
||||
<th>Blurs</th>
|
||||
<th>Bot</th>
|
||||
<th>Primary</th>
|
||||
<th>2</th>
|
||||
<th>3</th>
|
||||
<th>4</th>
|
||||
<th>5</th>
|
||||
<th><span data-hint="Primary match">1</span></th>
|
||||
<th><span data-hint="Secondary match">2</span></th>
|
||||
<th><span data-hint="Tertiary match">3</span></th>
|
||||
<th><span data-hint="Quaternary match">4</span></th>
|
||||
<th><span data-hint="Quinary match">5</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -107,19 +107,23 @@
|
|||
<td>@(result.blur)%</td>
|
||||
<td>@if(result.hold){Yes} else {No}</td>
|
||||
<td>
|
||||
<span class="assessment sig_@(result.bestMatch.assessment)">@result.bestMatch.assessmentString</span>
|
||||
<br /><span class="@if(result.bestMatch.positiveMatch) {match} else {partial}">@(result.bestMatch.matchPercentage)%</span>
|
||||
<div class="hint--top" data-hint="@result.bestMatch.explanation">
|
||||
<span class="assessment sig_@(result.bestMatch.assessment)">@result.bestMatch.assessmentString</span>
|
||||
<br /><span class="@if(result.bestMatch.positiveMatch) {match} else {partial}">@(result.bestMatch.matchPercentage)%</span>
|
||||
</div>
|
||||
</td>
|
||||
@Range(0, 4).map { i =>
|
||||
@result.secondaryMatches.lift(i) match {
|
||||
case Some(peer) => {
|
||||
<td>
|
||||
<span class="assessment sig_@(peer.assessment)">@peer.assessmentString</span>
|
||||
<br /><span class="@if(peer.positiveMatch) {match} else {partial}">@(peer.matchPercentage)%</span>
|
||||
</td>
|
||||
<div class="hint--top" data-hint="@peer.explanation">
|
||||
<span class="assessment sig_@(peer.assessment)">@peer.assessmentString</span>
|
||||
<br /><span class="@if(peer.positiveMatch) {match} else {partial}">@(peer.matchPercentage)%</span>
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
case _ => {
|
||||
<td></td>
|
||||
<td></td>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,17 @@ case class PeerGame(
|
|||
case 5 => "CH" // Cheating
|
||||
case _ => "Undef"
|
||||
}
|
||||
|
||||
val explanation: String =
|
||||
(if (positiveMatch) "Matches " else "Partially matches ") + "with " +
|
||||
(assessment match {
|
||||
case 1 => "a non cheating"
|
||||
case 2 => "an unlikely cheating"
|
||||
case 3 => "an unclear"
|
||||
case 4 => "a likely cheating"
|
||||
case 5 => "a cheating"
|
||||
case _ => "Undefined"
|
||||
}) + " game at " + matchPercentage + "% confidence"
|
||||
}
|
||||
|
||||
case class GameGroupResult(
|
||||
|
|
Loading…
Reference in a new issue