diff options
-rw-r--r-- | configs/nginx/nginx.conf | 2 | ||||
-rw-r--r-- | extras/kvm/manifest.yaml | 4 | ||||
-rw-r--r-- | testenv/tox.ini | 2 | ||||
-rw-r--r-- | web/index.html | 2 | ||||
-rw-r--r-- | web/js/kvm/main.js | 2 | ||||
-rw-r--r-- | web/kvm/index.html (renamed from web/kvm.html) | 78 |
6 files changed, 45 insertions, 45 deletions
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 @@ <head> <meta charset="utf-8" /> <title>Redirect</title> - <meta http-equiv="refresh" content="0;kvm.html"> + <meta http-equiv="refresh" content="0;/kvm/"> </head> </html> 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 index 739f7b18..20c0340d 100644 --- a/web/kvm.html +++ b/web/kvm/index.html @@ -12,32 +12,32 @@ <meta name="msapplication-TileColor" content="#2b5797"> <meta name="theme-color" content="#ffffff"> - <link rel="stylesheet" href="css/vars.css"> - <link rel="stylesheet" href="css/main.css"> - <link rel="stylesheet" href="css/menu.css"> - <link rel="stylesheet" href="css/windows.css"> - <link rel="stylesheet" href="css/modals.css"> - <link rel="stylesheet" href="css/leds.css"> - <link rel="stylesheet" href="css/sliders.css"> - <link rel="stylesheet" href="css/switches.css"> - <link rel="stylesheet" href="css/progress.css"> - <link rel="stylesheet" href="css/kvm/stream.css"> - <link rel="stylesheet" href="css/kvm/hid.css"> - <link rel="stylesheet" href="css/kvm/msd.css"> - <link rel="stylesheet" href="css/kvm/keyboard.css"> - <link rel="stylesheet" href="css/kvm/about.css"> + <link rel="stylesheet" href="../css/vars.css"> + <link rel="stylesheet" href="../css/main.css"> + <link rel="stylesheet" href="../css/menu.css"> + <link rel="stylesheet" href="../css/windows.css"> + <link rel="stylesheet" href="../css/modals.css"> + <link rel="stylesheet" href="../css/leds.css"> + <link rel="stylesheet" href="../css/sliders.css"> + <link rel="stylesheet" href="../css/switches.css"> + <link rel="stylesheet" href="../css/progress.css"> + <link rel="stylesheet" href="../css/kvm/stream.css"> + <link rel="stylesheet" href="../css/kvm/hid.css"> + <link rel="stylesheet" href="../css/kvm/msd.css"> + <link rel="stylesheet" href="../css/kvm/keyboard.css"> + <link rel="stylesheet" href="../css/kvm/about.css"> - <script src="js/bb.js"></script> - <script src="js/tools.js"></script> - <script src="js/ui.js"></script> - <script src="js/kvm/stream.js"></script> - <script src="js/kvm/atx.js"></script> - <script src="js/kvm/keyboard.js"></script> - <script src="js/kvm/mouse.js"></script> - <script src="js/kvm/hid.js"></script> - <script src="js/kvm/msd.js"></script> - <script src="js/kvm/session.js"></script> - <script src="js/kvm/main.js"></script> + <script src="../js/bb.js"></script> + <script src="../js/tools.js"></script> + <script src="../js/ui.js"></script> + <script src="../js/kvm/stream.js"></script> + <script src="../js/kvm/atx.js"></script> + <script src="../js/kvm/keyboard.js"></script> + <script src="../js/kvm/mouse.js"></script> + <script src="../js/kvm/hid.js"></script> + <script src="../js/kvm/msd.js"></script> + <script src="../js/kvm/session.js"></script> + <script src="../js/kvm/main.js"></script> <script>window.onload = main;</script> </head> @@ -63,15 +63,15 @@ <ul id="menu" class="menu"> <li class="menu-logo"> - <img class="svg-gray" src="svg/logo.svg" alt="π-kvm" /> + <img class="svg-gray" src="../svg/logo.svg" alt="π-kvm" /> </li> <li class="menu-right-items"> <a class="menu-item" href="#"> - <img data-dont-hide-menu id="link-led" class="led-gray" src="svg/link-led.svg" /> - <img data-dont-hide-menu id="stream-led" class="led-gray" src="svg/stream-led.svg" /> - <img data-dont-hide-menu id="hid-keyboard-led" class="led-gray" src="svg/hid-keyboard-led.svg" /> - <img data-dont-hide-menu id="hid-mouse-led" class="led-gray" src="svg/hid-mouse-led.svg" /> + <img data-dont-hide-menu id="link-led" class="led-gray" src="../svg/link-led.svg" /> + <img data-dont-hide-menu id="stream-led" class="led-gray" src="../svg/stream-led.svg" /> + <img data-dont-hide-menu id="hid-keyboard-led" class="led-gray" src="../svg/hid-keyboard-led.svg" /> + <img data-dont-hide-menu id="hid-mouse-led" class="led-gray" src="../svg/hid-mouse-led.svg" /> System ↴ </a> <div data-dont-hide-menu class="menu-item-content"> @@ -133,8 +133,8 @@ <li class="menu-right-items"> <a class="menu-item" href="#"> - <img data-dont-hide-menu id="atx-power-led" class="led-gray" src="svg/atx-power-led.svg" /> - <img data-dont-hide-menu id="atx-hdd-led" class="led-gray" src="svg/atx-hdd-led.svg" /> + <img data-dont-hide-menu id="atx-power-led" class="led-gray" src="../svg/atx-power-led.svg" /> + <img data-dont-hide-menu id="atx-hdd-led" class="led-gray" src="../svg/atx-hdd-led.svg" /> ATX ↴ </a> <div class="menu-item-content menu-item-content-buttons"> @@ -147,7 +147,7 @@ <li class="menu-right-items"> <a class="menu-item" href="#"> - <img data-dont-hide-menu id="msd-led" class="led-gray" src="svg/msd-led.svg" /> + <img data-dont-hide-menu id="msd-led" class="led-gray" src="../svg/msd-led.svg" /> Mass Storage ↴ </a> <div data-dont-hide-menu id="msd-menu" class="menu-item-content"> @@ -155,7 +155,7 @@ <div class="menu-item-content-text"> <table> <tr> - <td><img src="svg/warning.svg" /></td> + <td><img src="../svg/warning.svg" /></td> <td><b>Mass Storage Device is not operational</b></td> </tr> </table> @@ -167,7 +167,7 @@ <div class="menu-item-content-text"> <table> <tr> - <td><img src="svg/warning.svg" /></td> + <td><img src="../svg/warning.svg" /></td> <td><b>Current image is broken!</b><br><sub>Perhaps uploading was interrupted</sub></td> </tr> </table> @@ -179,7 +179,7 @@ <div class="menu-item-content-text"> <table> <tr> - <td><img src="svg/info.svg" /></td> + <td><img src="../svg/info.svg" /></td> <td><b>Another user uploads an image</b></td> </tr> </table> @@ -248,7 +248,7 @@ <li class="menu-right-items"> <a class="menu-item" href="#"> - <img data-dont-hide-menu id="hid-pak-led" class="led-gray" src="svg/gear-led.svg" /> + <img data-dont-hide-menu id="hid-pak-led" class="led-gray" src="../svg/gear-led.svg" /> Shortcuts ↴ </a> <div data-dont-hide-menu class="menu-item-content"> @@ -295,7 +295,7 @@ <div id="stream-window-header" class="window-header"><div class="window-grab">Stream</div></div> <div id="stream-info"></div> <div id="stream-box" class="stream-box-inactive"> - <img id="stream-image" class="stream-image-inactive" src="png/blank-stream.png" /> + <img id="stream-image" class="stream-image-inactive" src="../png/blank-stream.png" /> </div> <div id="stream-mouse-buttons"> <button data-mouse-button="left" class="row50">Left Click</button> @@ -547,7 +547,7 @@ <table> <tr> <td valign="top" class="logo"> - <img class="svg-gray" src="svg/logo.svg" alt="Open Source Hardware" height="40" /> + <img class="svg-gray" src="../svg/logo.svg" alt="Open Source Hardware" height="40" /> </td> <td valign="top"> <table> |