updated qrz
All checks were successful
continuous-integration/drone/push Build is passing

* removed unused js libraries
* added cached control for lb handling
This commit is contained in:
Paul 2023-07-13 00:41:31 +02:00
parent b9343ee6e0
commit 81218f6ea8
7 changed files with 3 additions and 1739 deletions

View File

@ -21,7 +21,7 @@ func GetStatic(fs *embed.FS, c echo.Context) (err error) {
cnt, err := fs.ReadFile(fmt.Sprintf("%s/%s", basedir, name))
if err != nil {
log.Println(err)
return c.String(http.StatusNotFound, "")
return c.String(http.StatusNotFound, "")
}
if strings.HasSuffix(name, ".js") {
@ -29,6 +29,7 @@ func GetStatic(fs *embed.FS, c echo.Context) (err error) {
} else if strings.HasSuffix(name, ".css") {
c.Response().Header().Set(echo.HeaderContentType, "text/css")
}
c.Response().Header().Add("Cache-Control", "max-age=172800")
return c.String(http.StatusOK, string(cnt))
}

View File

@ -16,6 +16,7 @@ func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Con
if strings.HasSuffix(name, ".html") {
c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTMLCharsetUTF8)
}
c.Response().Header().Add("Cache-Control", "max-age=172800")
return t.templates.ExecuteTemplate(w, name, data)
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,14 +1,3 @@
function export_frs() {
var w = window.location.href = "/export_frs.csv";
}
new Vue({
el: '#countries',
data: {
selected: "France",
options: [{
text: 'France',
value: 'france'
}, ]
}
})

File diff suppressed because one or more lines are too long

View File

@ -10,13 +10,10 @@
<link rel="stylesheet" type="text/css" href="static/css/responsive.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="static/css/rowReorder.dataTables.min.css">
<script src="static/js/jquery.js"></script>
<script src="static/js/jquery.dataTables.min.js"></script>
<script src="static/js/bootstrap.min.js"></script>
<script src="static/js/dataTables.bootstrap4.min.js"></script>
<script src="static/js/axios.min.js"></script>
<script src="static/js/vue.min.js"></script>
<script src="static/js/datatable.min.js"></script>
<script src="static/js/functions.js"></script>
</head>