diff --git a/configs/nginx/nginx.conf b/configs/nginx/nginx.conf index ae2703ec..9805e3c6 100644 --- a/configs/nginx/nginx.conf +++ b/configs/nginx/nginx.conf @@ -20,6 +20,7 @@ http { include /etc/nginx/mime-types.conf; default_type application/octet-stream; charset utf-8; + index index.html; sendfile on; tcp_nodelay on; @@ -69,7 +70,6 @@ http { location / { root /usr/share/kvmd/web; - index index.html; } location /ws_auth { diff --git a/extras/kvm/manifest.yaml b/extras/kvm/manifest.yaml index 0251425a..d99cd7bf 100644 --- a/extras/kvm/manifest.yaml +++ b/extras/kvm/manifest.yaml @@ -1,7 +1,7 @@ name: KVM description: Open KVM session in a web browser -icon: /svg/kvm.svg -path: /kvm.html +icon: svg/kvm.svg +path: kvm keyboard_cap: true daemon: kvmd place: 0 diff --git a/testenv/tox.ini b/testenv/tox.ini index 6d71a64c..874df6ce 100644 --- a/testenv/tox.ini +++ b/testenv/tox.ini @@ -37,7 +37,7 @@ commands = eslint --config=testenv/eslintrc.yaml --color --ext .js web/js [testenv:htmlhint] whitelist_externals = htmlhint -commands = htmlhint web/*.html +commands = htmlhint web/*.html web/*/*.html [flake8] max-line-length = 160 diff --git a/web/index.html b/web/index.html index b4cb1da6..0874c1f4 100644 --- a/web/index.html +++ b/web/index.html @@ -3,6 +3,6 @@ Redirect - + diff --git a/web/js/kvm/main.js b/web/js/kvm/main.js index 641609c0..9a000615 100644 --- a/web/js/kvm/main.js +++ b/web/js/kvm/main.js @@ -7,7 +7,7 @@ function main() { tools.setOnClick($("show-about-button"), () => ui.showWindow($("about-window"))); tools.setOnClick($("show-keyboard-button"), () => ui.showWindow($("keyboard-window"))); tools.setOnClick($("show-stream-button"), () => ui.showWindow($("stream-window"))); - tools.setOnClick($("open-log-button"), () => window.open("kvmd/log?seek=3600&follow=1", "_blank")); + tools.setOnClick($("open-log-button"), () => window.open("/kvmd/log?seek=3600&follow=1", "_blank")); ui.showWindow($("stream-window")); diff --git a/web/kvm.html b/web/kvm/index.html similarity index 93% rename from web/kvm.html rename to web/kvm/index.html index 739f7b18..20c0340d 100644 --- a/web/kvm.html +++ b/web/kvm/index.html @@ -12,32 +12,32 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + @@ -63,15 +63,15 @@