sync: fix report display with some security headers
This commit is contained in:
parent
50a51ba628
commit
58dbd9499b
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Rapport d'import FIC</title>
|
<title>Rapport d'import FIC</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
<link rel="stylesheet" href="css/bootstrap.min.css">
|
||||||
<style>li:hover { background: lightgrey; }
|
<style>li:hover { background: lightgrey; }
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
@ -38,6 +38,14 @@
|
|||||||
<strong>Date du dernier import :</strong> <span id="date_imp"></span>
|
<strong>Date du dernier import :</strong> <span id="date_imp"></span>
|
||||||
</p>
|
</p>
|
||||||
<div id="content"></div>
|
<div id="content"></div>
|
||||||
<script src="full_import_report.json"></script>
|
<script type="text/javascript">
|
||||||
|
fetch('full_import_report.json')
|
||||||
|
.then(function(response) {
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.then(function(report) {
|
||||||
|
disp(report);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -62,14 +62,12 @@ func SyncDeep(i Importer) (errs map[string][]string) {
|
|||||||
if fdto, err := os.Create(DeepReportPath); err == nil {
|
if fdto, err := os.Create(DeepReportPath); err == nil {
|
||||||
defer fdto.Close()
|
defer fdto.Close()
|
||||||
|
|
||||||
fdto.Write([]byte("disp("))
|
|
||||||
if out, err := json.Marshal(errs); err == nil {
|
if out, err := json.Marshal(errs); err == nil {
|
||||||
fdto.Write(out)
|
fdto.Write(out)
|
||||||
} else {
|
} else {
|
||||||
errs["_regeneration"] = append(errs["_regeneration"], err.Error())
|
errs["_regeneration"] = append(errs["_regeneration"], err.Error())
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
fdto.Write([]byte(");"))
|
|
||||||
} else {
|
} else {
|
||||||
errs["_regeneration"] = append(errs["_regeneration"], err.Error())
|
errs["_regeneration"] = append(errs["_regeneration"], err.Error())
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user