mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-25 22:03:49 +01:00
Transform to one line with jsonify and JSON parse
This commit is contained in:
parent
d566394650
commit
f690de40d3
@ -1,10 +1,11 @@
|
|||||||
<script>
|
<script>
|
||||||
{{- $files := readDir "/static/data" -}}
|
{{- $files := readDir "/static/data" }}
|
||||||
|
{{- $list := slice }}
|
||||||
function getDataFilesName(){
|
function getDataFilesName(){
|
||||||
var files=[]
|
|
||||||
{{- range $files }}
|
{{- range $files }}
|
||||||
files.push({{ .Name }})
|
{{- $list = $list | append .Name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
var files=JSON.parse({{ jsonify $list }})
|
||||||
return files
|
return files
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue
Block a user