133 lines
7.8 KiB
HTML
133 lines
7.8 KiB
HTML
<!DOCTYPE html>
|
|
<html ng-app="AdLinApp">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>AdLin - Tableau d'avancement</title>
|
|
<link href="css/bootstrap.min.css" type="text/css" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
font-size: 13px;
|
|
margin-top: 0.2vh;
|
|
}
|
|
.dropdown a {
|
|
display: block;
|
|
color: black;
|
|
}
|
|
.dropdown a:hover {
|
|
background-color: #ccc;
|
|
text-decoration: none;
|
|
}
|
|
.student {
|
|
background-position: center;
|
|
background-repeat: no-repeat;
|
|
background-size: cover;
|
|
height: calc(100vh / 5 - 0.3vh);
|
|
margin-left: 0.2%;
|
|
margin-bottom: 0.2vh;
|
|
width: calc(100vw / 13 - 0.26vw);
|
|
}
|
|
.student-title {
|
|
width: calc(2 * (100vw / 13 - 0.22vw) + 0.2vw);
|
|
font-size: 15px;
|
|
}
|
|
.student h5 {
|
|
font-size: 16px;
|
|
}
|
|
.student h5 span {
|
|
font-size: 10px;
|
|
}
|
|
.student div, .student h5 {
|
|
background-color: rgba(255,255,255,0.35);
|
|
padding: 0.2vh 0.2vw;
|
|
transition: background-color .5s;
|
|
}
|
|
.student:hover h5, .student-title h5 {
|
|
background-color: rgba(255,255,255,0.7);
|
|
}
|
|
.login {
|
|
max-width: 122px;
|
|
}
|
|
.badge.badge-sm {
|
|
font-size: 59%;
|
|
padding: .15em .35em;
|
|
}
|
|
</style>
|
|
<base href="/">
|
|
</head>
|
|
<body>
|
|
<div ng-cloak ng-if="onestudent">
|
|
<div ng-controller="StudentProgressionController" class="m-4">
|
|
<div class="card-group col-6 offset-3">
|
|
<div class="card">
|
|
<img src="https://photos.cri.epita.fr/thumb/{{ img | lowercase }}" class="card-img-top" alt="{{ student.login }}">
|
|
</div>
|
|
<div class="card">
|
|
<div class="card-body">
|
|
<h5 class="card-title">{{ student.login }}</h5>
|
|
<p class="card-text" ng-controller="PingController">
|
|
<span class="badge" ng-class="{'badge-success': PING && PING < 120, 'badge-info': PING && PING >= 120 && PING < 300, 'badge-warning': PING && PING >= 300 && PING < 900, 'badge-danger': PING && PING >= 900, 'badge-dark': !PING}" title="{{ PING_time }}">
|
|
💻
|
|
</span>
|
|
<ng-pluralize count="PING" when="{'NaN': 'jamais vu', 'one': 'vu il y a {} seconde', 'other': 'vu il y a {} secondes'}"></ng-pluralize>
|
|
<ul ng-if="ips" style="padding-left:0">
|
|
<li><strong>Domaine :</strong> <a href="http://{{ips.adn}}/">{{ips.adn}}</a></li>
|
|
<li><strong>Délégation :</strong> <a href="http://{{ips.ddn}}/">{{ips.ddn}}</a></li>
|
|
<li><strong>IPv6 :</strong> {{ips.wg}}/80</li>
|
|
</ul>
|
|
<div ng-repeat="(tutoid,tuto) in tuto_progress">
|
|
<hr>
|
|
<h6>TP {{tutoid+1}}</h6>
|
|
<span class="badge mr-1" ng-repeat="(ch,t) in tuto_progress[tutoid]" ng-class="{'badge-warning': mychallenges[ch] && mychallenges[ch].recent && (tutoid != 0 && mychallenges[ch].recent > 300), 'badge-info': mychallenges[ch] && mychallenges[ch].recent && mychallenges[ch].recent <= 300 && mychallenges[ch].recent >= 120, 'badge-success': mychallenges[ch] && mychallenges[ch].recent && (tutoid == 0 || mychallenges[ch].recent < 120), 'badge-danger': !mychallenges[ch] || !mychallenges[ch].recent}" title="{{ t.title }} @ {{ mychallenges[ch].time | date: 'medium' }} {{ mychallenges[ch].recent }}" ng-bind="t.label"></span>
|
|
</div>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div ng-cloak ng-if="!onestudent">
|
|
<div ng-controller="StudentsProgressionController" class="d-flex flex-wrap">
|
|
<div class="card student student-title d-flex flex-column justify-content-around" style="background-image: url('https://srs.epita.fr/assets/images/logo-srs.png');">
|
|
<h5 class="text-center" title="SRS" ng-cloak>
|
|
ADLIN TP {{tutoid+1}}
|
|
<span ng-click="toogleDropdown()">
|
|
<svg class="bi bi-chevron-down" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 01.708 0L8 10.293l5.646-5.647a.5.5 0 01.708.708l-6 6a.5.5 0 01-.708 0l-6-6a.5.5 0 010-.708z" clip-rule="evenodd"/>
|
|
</svg>
|
|
</span>
|
|
</h5>
|
|
<div style="padding: 0 60px; position: absolute" class="student-title" ng-if="show_dropdown">
|
|
<div style="background-color: #ddd" class="dropdown">
|
|
<a href="/dashboard/1" ng-click="toogleDropdown()">TP 1</a>
|
|
<a href="/dashboard/2" ng-click="toogleDropdown()">TP 2</a>
|
|
<a href="/dashboard/3" ng-click="toogleDropdown()">TP 3</a>
|
|
</div>
|
|
</div>
|
|
<div class="d-flex flex-wrap justify-content-around" style="padding: 0">
|
|
<span class="badge" ng-repeat="(ch,t) in tuto_progress[tutoid]" ng-class="{'badge-success': stats[ch].success > 0 || (tutoid == 0 && stats[ch].warning > 0), 'badge-warning': tutoid != 0 && stats[ch].success == 0 && stats[ch].warning > 0, 'badge-danger': !stats[ch] || (stats[ch].success == 0 && stats[ch].warning == 0)}" title="{{ t.title }}: {{ stats[ch].success }} - {{ stats[ch].warning }}/{{ stats.total }}" ng-click="toogleBadge(ch)" ng-cloak>{{ stats[ch].warning * 100 / stats.total | number:0 }} %</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card student d-flex flex-column justify-content-between" ng-repeat="(login, mychallenges) in students" ng-if="login != 'nemunaire'" style="background-image: url('https://photos.cri.epita.fr/square/{{ mychallenges.img | lowercase }}')" ng-show="!filterBadgeState.challenge || (filterBadgeState.state == 'bad' && (!mychallenges[filterBadgeState.challenge] || !mychallenges[filterBadgeState.challenge].recent)) || (filterBadgeState.state == 'passed' && mychallenges[filterBadgeState.challenge] && mychallenges[filterBadgeState.challenge].recent) || (filterBadgeState.state == 'online' && mychallenges[filterBadgeState.challenge] && mychallenges[filterBadgeState.challenge].recent <= 300) || (filterBadgeState.state == 'offline' && mychallenges[filterBadgeState.challenge] && mychallenges[filterBadgeState.challenge].recent > 300)">
|
|
<h5 class="login text-truncate" title="{{ login }}">
|
|
<span class="badge" ng-class="{'badge-success': mychallenges['ping'] && mychallenges['ping'].recent < 120, 'badge-info': mychallenges['ping'] && mychallenges['ping'].recent >= 120 && mychallenges['ping'].recent < 300, 'badge-warning': mychallenges['ping'] && mychallenges['ping'].recent >= 300 && mychallenges['ping'].recent < 900, 'badge-danger': mychallenges['ping'] && mychallenges['ping'].recent >= 900, 'badge-dark': !mychallenges['ping']}" title="{{ mychallenges['ping'].time }}">
|
|
💻
|
|
</span>
|
|
<a class="text-dark" href="/dashboard/{{login}}">{{ login }}</a>
|
|
</h5>
|
|
<div class="d-flex flex-wrap justify-content-around" style="padding: 0">
|
|
<span class="badge badge-sm" style="margin-left: .07rem" ng-repeat="(ch,t) in tuto_progress[tutoid]" ng-class="{'badge-warning': mychallenges[ch] && mychallenges[ch].recent && (tutoid != 0 && mychallenges[ch].recent > 300), 'badge-info': mychallenges[ch] && mychallenges[ch].recent && mychallenges[ch].recent <= 300 && mychallenges[ch].recent >= 120, 'badge-success': mychallenges[ch] && mychallenges[ch].recent && (tutoid == 0 || mychallenges[ch].recent < 120), 'badge-danger': !mychallenges[ch] || !mychallenges[ch].recent}" title="{{ t.title }} @ {{ mychallenges[ch].time | date: 'medium' }} {{ mychallenges[ch].recent }}" ng-bind="t.icon"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="js/angular.min.js"></script>
|
|
<script src="js/angular-resource.min.js"></script>
|
|
<script src="js/angular-route.min.js"></script>
|
|
<script src="js/angular-sanitize.min.js"></script>
|
|
<script src="js/adlin-common.js"></script>
|
|
<script src="js/adlin-dashboard.js"></script>
|
|
</body>
|
|
</html>
|