server/admin/static/views/home.html

82 lines
3.5 KiB
HTML

<div class="jumbotron text-light bg-dark">
<h1 class="display-4">Interface d'administration du challenge</h1>
<div class="row">
<div class="col">
<p ng-controller="VersionController">
Version de l'API : {{ v.version }}
</p>
<p ng-controller="TimestampController">
Latence frontend-backend : <span ng-class="{'text-success': t.diffFB <= 1000000000, 'text-warning': t.diffFB > 1000000000, 'text-danger': t.diffFB > 1500000000}"><ng-pluralize count="t.diffFB / 1000000000" when="{'one': '{}&nbsp;seconde', 'other': '{}&nbsp;secondes'}"></ng-pluralize></span><br>
Dernière synchronisation du frontend : {{ t.frontend | date:"mediumTime" }}
</p>
</div>
<div class="col">
Problèmes dans les fichiers :
<ul ng-controller="HealthController">
<li ng-if="!health.length">Rien de problématique pour l'instant</li>
<li ng-repeat="heal in health">
<a ng-href="teams/{{ heal.id_team }}" ng-if="heal.id_team" class="text-warning">/{{ heal.path.split("/")[1] }}</a><a target="_blank" ng-href="submissions{{ heal.path }}" ng-if="heal.id_team">/{{ heal.path.split("/")[2] }}</a>
<a ng-href="submissions{{ heal.path }}" ng-if="!heal.id_team">{{ heal.path }}</a>
: {{ heal.error }}
</li>
</ul>
</div>
</div>
</div>
<div class="card-deck mb-3">
<div class="card">
<div class="card-header">
<h4>Progression</h4>
</div>
<table class="table table-hover table-striped table-sm" ng-controller="ThemesListController">
<thead>
<tr>
<th class="frotated"></th>
<th class="rotated" ng-repeat="(tid,th) in themes"><div><a ng-href="themes/{{ th.id }}">{{ th.name }}</a></div></th>
</tr>
</thead>
<tbody class="table-bordered">
<tr ng-repeat="lvl in [1,2,3,4,5]">
<th class="text-center"><nobr>Challenge {{ lvl }}</nobr></th>
<td ng-repeat="(tid,theme) in themes" class="text-center text-bold" ng-controller="ExercicesStatsController">
<a ng-href="exercices/{{ exercice.id_exercice }}" ng-repeat="exercice in exercices" ng-if="$index == lvl-1 && (exercice.team_tries || lvl == 1)" ng-class="{'text-primary': exercice.solved_count == 0, 'text-success': exercice.solved_count >= 1, 'text-bold': exercice.solved_count >= 1, 'text-warning': exercice.solved_count == 0 && exercice.team_tries}">
<span ng-if="exercice.solved_count">{{ exercice.solved_count }}</span>
<span ng-if="!exercice.solved_count">{{ exercice.team_tries }}</span>
</a>
</td>
</tr>
</tbody>
<tfoot ng-if="s.params.total" ng-init="team={id:0}">
<tr ng-controller="TeamController">
<td class="text-right text-light">
<span ng-if="s.params.kind == 'levels'"><span class="badge badge-success">&nbsp;&nbsp;</span> Résolus</span>
<span ng-if="s.params.kind == 'teams'">Total résolus</span><br>
<span class="badge badge-warning">&nbsp;&nbsp;</span> Tentatives
</td>
<td class="table-bordered bg-dark" ng-repeat="(tid,th) in themes" class="text-center" ng-if="mystats && s.params.themes.indexOf(tid-0) !== -1">
<strong>{{ mystats.themes[tid].solved }}</strong><br>
{{ mystats.themes[tid].tries }}
</td>
</tr>
</tfoot>
</table>
</div>
<div class="card">
<div class="card-header">
<h4>Classement</h4>
</div>
<table class="table table-hover table-striped table-sm" ng-controller="TeamsJSONController">
<tbody>
<tr ng-repeat="team in rank | orderBy:'rank'" ng-if="team.rank">
<td>{{ team.rank }}</td>
<td><a ng-href="teams/{{ team.id }}">{{ team.name }}</td>
<td>{{ team.score | number:0 }}</td>
</tr>
</tbody>
</table>
</div>
</div>