admin: Can import videos
This commit is contained in:
parent
dfe62e0b97
commit
223f44572e
7 changed files with 59 additions and 6 deletions
|
|
@ -740,6 +740,19 @@ angular.module("FICApp")
|
|||
});
|
||||
});
|
||||
};
|
||||
$scope.syncVideos = function() {
|
||||
$scope.addToast('warning', 'Synchroniser les vidéos de résolution ?', 'ATTENTION il ne faut pas lancer cette synchronisation durant le challenge. Seulement une fois le challenge terminé, cela permet de rendre les vidéos accessibles dans l\'interface joueurs.',
|
||||
function() {
|
||||
$scope.deepSyncInProgress = true;
|
||||
$http.post("api/sync/videos").then(function() {
|
||||
$scope.deepSyncInProgress = false;
|
||||
$scope.addToast('success', 'Import des vidéos terminé.');
|
||||
}, function(response) {
|
||||
$scope.deepSyncInProgress = false;
|
||||
$scope.addToast('danger', 'Import des vidéos terminé.', response.data.errmsg);
|
||||
});
|
||||
});
|
||||
};
|
||||
})
|
||||
|
||||
.controller("PKIController", function($scope, $rootScope, Certificate, CACertificate, Team, $location, $http) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
<div class="row">
|
||||
<div class="col text-center" ng-if="exercice.videoURI">
|
||||
<video src="vids/{{exercice.videoURI.replace('\$FILES\$/','').replace('?', '%3F')}}" controls style="height: 80vh; margin: auto;"></video>
|
||||
<video src="{{exercice.videoURI.replace('\$RFILES\$/','vids/').replace('\$FILES\$/','files/').replace('?', '%3F')}}" controls style="height: 80vh; margin: auto;"></video>
|
||||
</div>
|
||||
<div class="col" ng-if="exercice.resolution" ng-bind-html="exercice.resolution.replaceAll('\$FILES\$/','files/')">
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-secondary" ng-click="speedyDeepSync()" ng-disabled="deepSyncInProgress"><span class="glyphicon glyphicon-import" aria-hidden="true"></span> Synchronisation sans fichiers</button>
|
||||
<button type="button" class="btn btn-info" ng-click="syncVideos()" ng-disabled="deepSyncInProgress"><span class="glyphicon glyphicon-facetime-video" aria-hidden="true"></span> Mettre à disposition les vidéos</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Reference in a new issue