admin: Fix sync report display
This commit is contained in:
parent
cea3c13369
commit
adebdd180d
2 changed files with 45 additions and 24 deletions
|
@ -8,11 +8,12 @@
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function disp(data) {
|
function disp(data) {
|
||||||
if (data["_date"]) {
|
if (data["_updated"]) {
|
||||||
document.getElementById("date_imp").innerHTML = data["_date"][data["_date"].length - 1];
|
document.getElementById("date_imp").innerHTML = new Intl.DateTimeFormat(undefined, {weekday: 'long', year: 'numeric', month: 'long', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric'}).format(new Date(data["_updated"][data["_updated"].length - 1]));
|
||||||
}
|
}
|
||||||
Object.keys(data).map(function(theme) {
|
data.themes["_ALL"] = data._themes;
|
||||||
if (data[theme] != null && theme != "_date") {
|
Object.keys(data.themes).map(function(theme) {
|
||||||
|
if (data.themes[theme] != null && theme != "_date") {
|
||||||
var title = document.createElement("h3");
|
var title = document.createElement("h3");
|
||||||
title.id = theme;
|
title.id = theme;
|
||||||
title.innerHTML = theme;
|
title.innerHTML = theme;
|
||||||
|
@ -20,9 +21,9 @@
|
||||||
|
|
||||||
var row = document.createElement("ul");
|
var row = document.createElement("ul");
|
||||||
row.type = "square";
|
row.type = "square";
|
||||||
for (var i = 0; i < data[theme].length; i++) {
|
for (var i = 0; i < data.themes[theme].length; i++) {
|
||||||
var col = document.createElement("li");
|
var col = document.createElement("li");
|
||||||
col.innerHTML = data[theme][i];
|
col.innerHTML = data.themes[theme][i];
|
||||||
row.appendChild(col);
|
row.appendChild(col);
|
||||||
}
|
}
|
||||||
document.getElementById("content").appendChild(row);
|
document.getElementById("content").appendChild(row);
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
<h3 class="mb-0">
|
<h3 class="mb-0">
|
||||||
Import des thèmes
|
Import des thèmes
|
||||||
</h3>
|
</h3>
|
||||||
<div class="badge badge-success align-self-center" ng-if="syncReport">
|
<div class="badge badge-success align-self-center" ng-if="syncReport" title="{{ syncReport._updated[syncReport._updated.length-1] }}">
|
||||||
Dernier import : {{ syncReport._date[1] }}
|
Dernier import : {{ syncReport._updated[syncReport._updated.length-1] | date:"medium" }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="progress" style="height: 5px; border-radius: 0;">
|
<div class="progress" style="height: 5px; border-radius: 0;">
|
||||||
|
@ -68,7 +68,27 @@
|
||||||
Dernier rapport de synchronisation
|
Dernier rapport de synchronisation
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div ng-repeat="(th, line) in syncReport" class="card-body" ng-if="th !== '_date' && line.length">
|
<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">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<h3>
|
<h3>
|
||||||
{{ th }}
|
{{ th }}
|
||||||
|
|
Reference in a new issue