admin: Add stats about submissions rate
This commit is contained in:
parent
116c061715
commit
329bd246c7
4 changed files with 144 additions and 1 deletions
|
@ -1723,6 +1723,32 @@ angular.module("FICApp")
|
|||
}
|
||||
})
|
||||
|
||||
.controller("SubmissionsStatsController", function($scope, $http, $interval) {
|
||||
var refresh = function() {
|
||||
$http({
|
||||
url: "api/submissions-stats.json",
|
||||
}).then(function(response) {
|
||||
$scope.submissionsstats = response.data;
|
||||
});
|
||||
}
|
||||
var myinterval = $interval(refresh, 15000);
|
||||
refresh();
|
||||
$scope.$on('$destroy', function () { $interval.cancel(myinterval); });
|
||||
})
|
||||
|
||||
.controller("ValidationsStatsController", function($scope, $http, $interval) {
|
||||
var refresh = function() {
|
||||
$http({
|
||||
url: "api/validations-stats.json",
|
||||
}).then(function(response) {
|
||||
$scope.validationsstats = response.data;
|
||||
});
|
||||
}
|
||||
var myinterval = $interval(refresh, 15000);
|
||||
refresh();
|
||||
$scope.$on('$destroy', function () { $interval.cancel(myinterval); });
|
||||
})
|
||||
|
||||
.controller("ExercicesStatsController", function($scope, Themes, ExercicesStats) {
|
||||
$scope.themes = Themes.get();
|
||||
$scope.exercices = {};
|
||||
|
|
Reference in a new issue