mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1033343702
26
Caddyfile
Normal file
26
Caddyfile
Normal file
@ -0,0 +1,26 @@
|
||||
wakapi.yourdomain.tld {
|
||||
encode zstd gzip
|
||||
|
||||
header {
|
||||
Strict-Transport-Security "max-age=2592000; includeSubDomains"
|
||||
}
|
||||
|
||||
log {
|
||||
output file /var/log/caddy/wakapi.dev.access.log
|
||||
format single_field common_log
|
||||
}
|
||||
|
||||
reverse_proxy http://[::1]:3000
|
||||
|
||||
@api path_regexp "^/api.*"
|
||||
@notapi not path_regexp "^/api.*"
|
||||
|
||||
push @notapi /assets/vendor/source-sans-3.css
|
||||
push @notapi /assets/css/app.dist.css
|
||||
push @notapi /assets/vendor/petite-vue.min.js
|
||||
push @notapi /assets/vendor/chart.min.js
|
||||
push @notapi /assets/vendor/iconify.basic.min.js
|
||||
push @notapi /assets/js/icons.dist.js
|
||||
push @notapi /assets/js/base.js
|
||||
push @notapi /assets/images/logo.svg
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
const LEGEND_MAX_ENTRIES = 9
|
||||
// dirty hack to vertically align legends across multiple charts
|
||||
// however, without monospace font, it's still not perfectly aligned
|
||||
// waiting for https://github.com/chartjs/Chart.js/discussions/9890
|
||||
@ -31,8 +30,8 @@ let topNPickers = [...document.getElementsByClassName('top-picker')]
|
||||
topNPickers.sort(((a, b) => parseInt(a.attributes['data-entity'].value) - parseInt(b.attributes['data-entity'].value)))
|
||||
topNPickers.forEach(e => {
|
||||
const idx = parseInt(e.attributes['data-entity'].value)
|
||||
e.max = Math.min(data[idx].length, 10)
|
||||
e.value = e.max
|
||||
e.max = data[idx].length
|
||||
e.value = Math.min(e.max, 9)
|
||||
})
|
||||
|
||||
let charts = []
|
||||
@ -77,7 +76,7 @@ function draw(subselection) {
|
||||
function filterLegendItem(item) {
|
||||
item.text = item.text.length > LEGEND_CHARACTERS ? item.text.slice(0, LEGEND_CHARACTERS - 3).padEnd(LEGEND_CHARACTERS, '.') : item.text
|
||||
item.text = item.text.padEnd(LEGEND_CHARACTERS + 3)
|
||||
return item.index < LEGEND_MAX_ENTRIES
|
||||
return true
|
||||
}
|
||||
|
||||
function shouldUpdate(index) {
|
||||
|
@ -1 +1 @@
|
||||
2.0.0-RC1
|
||||
2.0.0
|
Loading…
Reference in New Issue
Block a user