2022-07-11 08:34:41 +00:00
< div class = "card mt-3 mb-5" ng-show = "!settings.wip && timeProgression && !displayDangerousActions" >
2022-05-19 19:15:25 +00:00
< div class = "card-header bg-secondary text-light" >
< h3 class = "mb-0" >
Synchronisation
< / h3 >
< / div >
< div class = "card-body" >
< div class = "form-check" >
< label class = "custom-control custom-checkbox" >
< input class = "custom-control-input" type = "checkbox" ng-model = "displayDangerousActions" >
< strong class = "custom-control-label" > Je sais ce que le challenge a démarré ET < span style = "text-decoration: underline red;" > j'ai réalisé une sauvegarde de la base de données il y a moins d'une minute< / span > ET je sais que c'est < span style = "text-decoration: underline yellow;" > une très mauvaise idée de cocher cette case< / span > , mais j'y suis obligé pour de bonnes raisons.< / strong >
< / label >
< / div >
< / div >
< / div >
2022-07-11 08:34:41 +00:00
< div class = "card my-3" ng-if = "settings.wip || !timeProgression || displayDangerousActions" >
2022-05-20 08:00:46 +00:00
< div class = "card-header d-flex justify-content-between" >
< h3 class = "mb-0" >
Import des thèmes
< / h3 >
2022-10-30 18:44:31 +00:00
< div class = "badge badge-success align-self-center" ng-if = "syncReport" title = "{{ syncReport._updated[syncReport._updated.length-1] }}" >
Dernier import : {{ syncReport._updated[syncReport._updated.length-1] | date:"medium" }}
2022-05-20 08:00:46 +00:00
< / div >
2023-10-23 17:22:19 +00:00
< a ng-if = "configro['sync-type'] === 'GitImporter'" href = "repositories" class = "btn btn-secondary" >
Voir les dépôts
< / a >
2022-05-20 08:00:46 +00:00
< / div >
< div class = "progress" style = "height: 5px; border-radius: 0;" >
< div class = "progress-bar bg-primary progress-bar-striped" ng-class = "{'progress-bar-animated': syncPercent && syncPercent < 100}" role = "progressbar" style = "width: {{ syncPercent }}%" > < / div >
< / div >
2022-05-19 19:15:25 +00:00
< div class = "card-body" >
< dl class = "row" >
2022-05-20 08:00:46 +00:00
< dt class = "col-2" > Type< / dt >
< dd class = "col-10" ng-bind = "configro['sync-type']" > < / dd >
2022-05-19 19:15:25 +00:00
< dt class = "col-2" > Synchronisation< / dt >
2022-05-20 08:00:46 +00:00
< dd class = "col-10" title = "{{ configro['sync'] }}" ng-bind = "configro.sync" > < / dd >
2022-05-19 19:15:25 +00:00
< dt class = "col-2" ng-if = "configro['sync-id']" > ID< / dt >
< dd class = "col-10" ng-if = "configro['sync-id']" > {{ configro['sync-id'] }}< / dd >
2022-05-20 08:00:46 +00:00
< dt class = "col-2" ng-if = "configro['sync']" > Statut< / dt >
< dd class = "col-10" ng-if = "configro['sync']" > {{ syncProgress }}< / dd >
2022-05-19 19:15:25 +00:00
< / dl >
2022-05-20 08:00:46 +00:00
< div class = "d-flex justify-content-around" ng-if = "configro.sync" >
2022-05-19 19:15:25 +00:00
< button ng-if = "configro['sync-type'] === 'GitImporter'" type = "button" class = "btn btn-info" ng-click = "baseSync()" ng-disabled = "deepSyncInProgress" > < span class = "glyphicon glyphicon-repeat" aria-hidden = "true" > < / span > Pull< / button >
2022-05-20 08:00:46 +00:00
< div class = "btn-group dropright" >
2022-05-19 19:15:25 +00:00
< button type = "button" class = "btn btn-secondary" ng-click = "deepSync()" ng-disabled = "deepSyncInProgress" > < span class = "glyphicon glyphicon-import" aria-hidden = "true" > < / span > Synchronisation intégrale< / button >
< button type = "button" class = "btn btn-secondary dropdown-toggle dropdown-toggle-split" data-toggle = "dropdown" aria-haspopup = "true" aria-expanded = "false" ng-disabled = "deepSyncInProgress" >
< span class = "sr-only" > Toggle Dropdown< / span >
< / button >
2022-05-20 08:00:46 +00:00
< div class = "dropdown-menu" ng-controller = "ThemesListController" style = "max-height: 45vh; overflow: auto" >
2022-05-19 19:15:25 +00:00
< a class = "dropdown-item" ng-click = "deepSync(theme)" ng-repeat = "theme in themes" ng-bind = "theme.name" > < / a >
2024-03-15 16:46:50 +00:00
< a class = "dropdown-item" ng-click = "deepSync({name: 'Exercices indépendants', id: 0})" > Exercices indépendants< / a >
2022-05-19 19:15:25 +00:00
< / 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 >
2022-07-11 09:15:51 +00:00
< button type = "button" class = "btn btn-info" ng-if = "settings.wip" ng-click = "syncVideos()" ng-disabled = "deepSyncInProgress" > < span class = "glyphicon glyphicon-facetime-video" aria-hidden = "true" > < / span > Mettre à disposition les vidéos< / button >
2024-03-14 17:43:07 +00:00
< button type = "button" class = "btn btn-danger" ng-click = "dropSoluces()" ng-disabled = "deepSyncInProgress" title = "Par solutions, on entend les résolutions écrites dans la base de données, les liens vers les fichiers vidéos" > Effacer les solutions< / button >
2022-05-19 19:15:25 +00:00
< / div >
< / div >
< / div >
2022-05-20 08:00:46 +00:00
< div ng-if = "syncReport" class = "card mb-5" ng-controller = "ThemesListController" >
< div class = "card-header" >
< a href = "check_import.html" class = "btn btn-success float-right mx-1" target = "_self" >
< span class = "glyphicon glyphicon-link" aria-hidden = "true" > < / span >
Lien public
< / a >
< button type = "button" class = "btn btn-primary float-right mx-1" ng-click = "updateReport()" title = "Actualiser le rapport" >
< span class = "glyphicon glyphicon-refresh" aria-hidden = "true" > < / span >
< / button >
< h3 class = "mb-0" >
Dernier rapport de synchronisation
< / h3 >
< / div >
2022-10-30 18:44:31 +00:00
< div class = "card-body" ng-if = "syncReport._regeneration.length" >
< div class = "d-flex" >
< h3 >
Génération
< / h3 >
< / div >
< ul >
< li ng-repeat = "item in syncReport._regeneration" class = "text-break" > {{ item }}< / li >
< / ul >
< / div >
< div class = "card-body" ng-if = "syncReport._themes.length" >
< div class = "d-flex" >
< h3 >
Général
< / h3 >
< / div >
< ul >
< li ng-repeat = "item in syncReport._themes" class = "text-break" > {{ item }}< / li >
< / ul >
< / div >
< div ng-repeat = "(th, line) in syncReport.themes" class = "card-body" ng-if = "line.length" >
2022-05-31 16:41:42 +00:00
< div class = "d-flex" >
< h3 >
{{ th }}
< / h3 >
< div class = "d-inline-block" ng-repeat = "theme in themes" ng-if = "theme.name == th" >
< a href = "themes/{{ theme.id }}" class = "btn btn-link" title = "Voir le thème" >
< span class = "glyphicon glyphicon-hand-right" aria-hidden = "true" > < / span >
< / a >
2022-07-11 08:34:41 +00:00
< button class = "btn btn-light" title = "Resynchroniser uniquement ce thème" ng-click = "deepSync(theme)" ng-if = "settings.wip || !timeProgression || displayDangerousActions" >
2022-05-31 16:41:42 +00:00
< span class = "glyphicon glyphicon-hdd" aria-hidden = "true" > < / span >
< / button >
< / div >
< / div >
2022-05-20 08:00:46 +00:00
< ul >
2022-05-31 14:41:36 +00:00
< li ng-repeat = "item in line" class = "text-break" > {{ item }}< / li >
2022-05-20 08:00:46 +00:00
< / ul >
< / div >
< / div >