more work on moderator UI

pull/3017/head
Thibault Duplessis 2017-05-03 00:52:18 +02:00
parent beacca4a2c
commit 95d0536093
5 changed files with 88 additions and 143 deletions

View File

@ -9,11 +9,11 @@ case _ => {red}
<div class="irwin">
<header>
<div class="title">
<a class="title" href="https://github.com/ornicar/lila/wiki/Irwin-AI-hunter">
<img src="@staticUrl("images/icons/brain.blue.svg")" />
Irwin AI<br />
Hunter
</div>
</a>
<div class="infos">
<p>Updated @momentFromNow(report.report.date)</p>
@request.map { r =>
@ -24,60 +24,61 @@ case _ => {red}
}
</div>
<div class="pv0">
<a href="https://github.com/ornicar/lila/wiki#for-moderators">
PV 0 Rate by Ambiguity
</a>
@report.report.pv0ByAmbiguity.map { values =>
<div class="rates text">
@values.zipWithIndex.map {
case (v, i) => {
<div><strong class="@percentClass(v)">@v%</strong>@(i + 1)</div>
}
}
</div>
PV 0 Rate by Ambiguity
</a>
@report.report.pv0ByAmbiguity.map { values =>
<div class="rates text">
@values.zipWithIndex.map {
case (v, i) => {
<div><strong class="@percentClass(v)">@v%</strong>@(i + 1)</div>
}
}
</div>
<div class="assess text">
<strong class="@percentClass(report.report.activation)">@report.report.activation%</strong>
Overall assessment
</div>
</header>
<table class="slist">
<tbody>
@report.withPovs.sortBy(-_.report.activation).map {
case lila.irwin.IrwinReport.GameReport.WithPov(gameReport, pov) => {
<tr class="text">
<td class="moves">
}
</div>
<div class="assess text">
<strong class="@percentClass(report.report.activation)">@report.report.activation%</strong>
Overall assessment
</div>
</header>
<table class="slist">
<tbody>
@report.withPovs.sortBy(-_.report.activation).map {
case lila.irwin.IrwinReport.GameReport.WithPov(gameReport, pov) => {
<tr class="text">
<td class="moves">
<a href="@routes.Round.watcher(pov.gameId, pov.color.name)">
@gameReport.moves.map { move => <span class="@percentClass(move.activation)" title="@move" style="height:@move.activation%"></span> }
</td>
<td>
<a href="@routes.Round.watcher(pov.gameId, pov.color.name)">
@playerLink(pov.opponent, withRating = true, withDiff = true, withOnline = false, link = false)
<br />
@if(pov.game.isTournament) { <span data-icon="g"></span> }
@pov.game.perfType.map { pt => <span data-icon="@pt.iconChar"></span> }
@shortClockName(pov.game.clock.map(_.config)) -
@momentFromNow(pov.game.createdAt)
</a>
</td>
<td>
<strong class="@percentClass(gameReport.activation)">@gameReport.activation%</strong>
<em>assessment</em>
</td>
<td>
@defining(pov.game.playerBlurPercent(pov.color)) { blurs =>
<strong class="@percentClass(blurs)">@blurs%</strong>
}
<em>blurs</em>
</td>
<td>
@if(pov.player.holdAlert.??(_.suspicious)) {
<strong class="@percentClass(50)">Bot?</strong>
}
</td>
</tr>
}
}
</tbody>
</table>
</a>
</td>
<td>
<a href="@routes.Round.watcher(pov.gameId, pov.color.name)">
@playerLink(pov.opponent, withRating = true, withDiff = true, withOnline = false, link = false)
<br />
@if(pov.game.isTournament) { <span data-icon="g"></span> }
@pov.game.perfType.map { pt => <span data-icon="@pt.iconChar"></span> }
@shortClockName(pov.game.clock.map(_.config)) -
@momentFromNow(pov.game.createdAt)
</a>
</td>
<td>
<strong class="@percentClass(gameReport.activation)">@gameReport.activation%</strong>
<em>assessment</em>
</td>
<td>
@defining(pov.game.playerBlurPercent(pov.color)) { blurs =>
<strong class="@percentClass(blurs)">@blurs%</strong>
}
<em>blurs</em>
</td>
<td>
@if(pov.player.holdAlert.??(_.suspicious)) {
<strong class="@percentClass(50)">Bot?</strong>
}
</td>
</tr>
}
}
</tbody>
</table>
</div>

View File

@ -97,42 +97,27 @@
}
@optionAggregateAssessment.map { pag =>
<div class="evaluation results">
<table class="extra_stats">
<caption>Average Centipawn Loss Given:</caption>
<tr>
<th data-hint="The frequency of which the user leaves the game page." class="hint--top">Blurs</th>
<td>
<strong>@pag.pag.sfAvgBlurs</strong>
<br/>high
</td>
<td>
<strong>@pag.pag.sfAvgNoBlurs</strong>
<br/>low
</td>
</tr>
<tr>
<th data-hint="The computed standard deviation of the move times distribution across games." class="hint--top">Move Times</th>
<td>
<strong>@pag.pag.sfAvgLowVar</strong>
<br/>low variance
</td>
<td>
<strong>@pag.pag.sfAvgHighVar</strong>
<br/>high variance
</td>
</tr>
<tr>
<th data-hint="Bot detection using grid click analysis." class="hint--top">Hold Alert</th>
<td>
<strong>@pag.pag.sfAvgHold</strong>
<br/>alert
</td>
<td>
<strong>@pag.pag.sfAvgNoHold</strong>
<br/>no alert
</td>
</tr>
</table>
@pag.pag.sfAvgBlurs.map { blursYes =>
<p class="text" data-icon="j">ACPL in games with blurs is <strong>@blursYes</strong>
@pag.pag.sfAvgNoBlurs.map { blursNo =>
against <strong>@blursNo</strong> in games without blurs.
}
</p>
}
@pag.pag.sfAvgLowVar.map { lowVar =>
<p class="text" data-icon="j">ACPL in games with consistent move times is <strong>@lowVar</strong>
@pag.pag.sfAvgHighVar.map { highVar =>
against <strong>@highVar</strong> in games with random move times.
}
</p>
}
@pag.pag.sfAvgHold.map { holdYes =>
<p class="text" data-icon="j">ACPL in games with bot signature <strong>@holdYes</strong>
@pag.pag.sfAvgNoHold.map { holdNo =>
against <strong>@holdNo</strong> in games without bot signature.
}
</p>
}
<table class="slist">
<thead>
<tr>

View File

@ -51,15 +51,6 @@ $(function() {
$(this).parent('form').submit();
});
lichess.pubsub.emit('content_loaded')();
var relatedUsers = +$zone.find('.reportCard thead th:last').text();
if (relatedUsers > 100) {
var others = $zone.find('.others').hide()
.before('<a id="others-show">Show ' + relatedUsers + ' related users... (very large!)</a>');
$zone.find('#others-show').click(function() {
others.show();
$(this).remove();
});
}
var $modLog = $zone.find('.mod_log ul').children();
if ($modLog.length > 20) {
var list = $modLog.slice(20);

View File

@ -101,6 +101,9 @@ body.dark .mod_zone .reports .half:first-child {
.mod_zone .reports .half:hover {
flex: 0 0 90%;
}
.mod_zone .evaluation table {
margin-top: 10px;
}
.mod_zone .evaluation time {
display: inline;
}
@ -165,7 +168,7 @@ body.dark .mod_zone .reports .half:first-child {
display: flex;
border: 1px solid #ccc;
}
.mod_zone .irwin header > div {
.mod_zone .irwin header > * {
flex: 1 1 100%;
display: flex;
flex-flow: column;
@ -175,17 +178,17 @@ body.dark .mod_zone .reports .half:first-child {
border-left: 1px solid #ccc;
padding: 5px 10px;
}
.mod_zone .irwin header > div:first-child {
.mod_zone .irwin header > *:first-child {
border-left: none;
}
body.dark .irwin header,
body.dark .irwin header > div {
body.dark .irwin header > * {
border-color: #3d3d3d;
}
.mod_zone .irwin header .title {
flex-flow: row;
color: #3893E8;
font-size: 1.5em;
font-size: 1.4em;
text-transform: uppercase;
letter-spacing: 3px;
}
@ -238,8 +241,11 @@ body.dark .irwin header > div {
display: block;
}
.mod_zone .irwin .moves {
width: 400px;
padding: 0;
}
.mod_zone .irwin .moves a {
display: block;
width: 400px;
height: 48px;
display: flex;
align-items: flex-end;

View File

@ -377,38 +377,6 @@ div.sub_ratings h3 {
div.crosstable {
margin: 25px 10px 15px 10px;
}
.user_show .reportCard {
margin: 0 auto 10px auto;
}
.user_show .reportCard th {
font-weight: bold;
font-size: 1.6em;
text-align: center;
padding: 0 5px 0 5px;
}
.user_show .reportCard td {
text-align: center;
padding: 5px;
}
.user_show .extra_stats {
margin: 0 auto 10px auto;
}
.user_show .extra_stats caption {
text-align: center;
font-weight: bold;
font-size: 1.2em;
padding-bottom: 5px;
}
.user_show .extra_stats th {
text-align: right;
font-weight: bold;
font-size: 1.2em;
padding: 0 5px 0 5px;
}
.user_show .extra_stats td {
text-align: center;
padding: 5px;
}
.user_show .results .aggregate {
font-weight: bold;
font-size: 1.4em;
@ -417,12 +385,6 @@ div.crosstable {
width: 50px;
transform: rotate(90deg);
}
.user_show .reportCard .mark {
color: #dc322f;
}
.user_show .reportCard .report {
color: #B8AA1A;
}
.user_show .search {
white-space: nowrap;