summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-11-23 04:45:21 +0300
committerMaxim Devaev <[email protected]>2022-11-23 04:45:21 +0300
commit3b4792882be0129f787b21602f67d1f70d7bfdaa (patch)
tree39876cda00782b1095c3051a2808323a942837b5
parentedc370168cd84c3a5813b207c17d7ca0a559953c (diff)
web: locator switch
-rw-r--r--testenv/v2-hdmi-rpi4.override.yaml10
-rw-r--r--web/kvm/index.html9
-rw-r--r--web/kvm/navbar-system.pug9
-rw-r--r--web/share/js/kvm/gpio.js1
4 files changed, 29 insertions, 0 deletions
diff --git a/testenv/v2-hdmi-rpi4.override.yaml b/testenv/v2-hdmi-rpi4.override.yaml
index adb67907..7160a090 100644
--- a/testenv/v2-hdmi-rpi4.override.yaml
+++ b/testenv/v2-hdmi-rpi4.override.yaml
@@ -40,6 +40,9 @@ kvmd:
drivers:
__gpio__:
device: /dev/kvmd-gpio
+ __v4_locator__:
+ type: locator
+ device: /dev/kvmd-gpio
relay:
type: hidrelay
device: /dev/hidraw0
@@ -58,6 +61,13 @@ kvmd:
pulse:
delay: 0
+ __v4_locator__:
+ driver: __v4_locator__
+ pin: 12
+ mode: output
+ pulse:
+ delay: 0
+
led1:
pin: 19
mode: input
diff --git a/web/kvm/index.html b/web/kvm/index.html
index 55ccad0b..3d852763 100644
--- a/web/kvm/index.html
+++ b/web/kvm/index.html
@@ -325,6 +325,15 @@
</div>
</td>
</tr>
+ <tr class="feature-disabled" id="v4-locator">
+ <td>Enable locator LED:</td>
+ <td align="right">
+ <div class="switch-box">
+ <input class="gpio-switch" disabled type="checkbox" id="gpio-switch-__v4_locator__" data-channel="__v4_locator__">
+ <label for="gpio-switch-__v4_locator__"><span class="switch-inner"></span><span class="switch"></span></label>
+ </div>
+ </td>
+ </tr>
<tr>
<td>Ask page close confirmation:</td>
<td align="right">
diff --git a/web/kvm/navbar-system.pug b/web/kvm/navbar-system.pug
index c3367696..ea8cd6b8 100644
--- a/web/kvm/navbar-system.pug
+++ b/web/kvm/navbar-system.pug
@@ -100,6 +100,15 @@ li(id="system-dropdown" class="right")
label(for="gpio-switch-__v3_usb_breaker__")
span(class="switch-inner")
span(class="switch")
+ tr(id="v4-locator" class="feature-disabled")
+ td Enable locator LED:
+ td(align="right")
+ div(class="switch-box")
+ input(disabled type="checkbox" id="gpio-switch-__v4_locator__" class="gpio-switch"
+ data-channel="__v4_locator__")
+ label(for="gpio-switch-__v4_locator__")
+ span(class="switch-inner")
+ span(class="switch")
tr
+menu_switch_notable("page-close-ask-switch", "Ask page close confirmation", true, true)
hr
diff --git a/web/share/js/kvm/gpio.js b/web/share/js/kvm/gpio.js
index 08ec42a8..cf319c95 100644
--- a/web/share/js/kvm/gpio.js
+++ b/web/share/js/kvm/gpio.js
@@ -114,6 +114,7 @@ export function Gpio(__recorder) {
}
tools.feature.setEnabled($("v3-usb-breaker"), ("__v3_usb_breaker__" in model.scheme.outputs));
+ tools.feature.setEnabled($("v4-locator"), ("__v4_locator__" in model.scheme.outputs));
tools.feature.setEnabled($("system-tool-wol"), ("__wol__" in model.scheme.outputs));
self.setState(__state);