mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
security/netbird: fix selectpicker and unbreak migration
The auth key may be required but not giving a default for obvious reasons just makes it end up without a required value anyway until user contact. This can probably be made more robust in the future, but requires a bit of thought on what we validate/enforce here anyway like an "enbable" checkbox being checked requires filling this value, but it's also not on the same page or model even making constraints tricky.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<Default>https://api.netbird.io:443</Default>
|
||||
</managementUrl>
|
||||
<setupKey type="TextField">
|
||||
<Required>Y</Required>
|
||||
<!-- XXX fails migration for obvious reasons <Required>Y</Required> -->
|
||||
<Mask>/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i</Mask>
|
||||
<ValidationMessage>Please specify a valid setup key.</ValidationMessage>
|
||||
</setupKey>
|
||||
|
||||
@@ -29,9 +29,8 @@
|
||||
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
mapDataToFormUI({
|
||||
'frmSettings': "/api/netbird/settings/get"
|
||||
}).done(() => {
|
||||
mapDataToFormUI({'frmSettings': '/api/netbird/settings/get'}).done(() => {
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
updateServiceControlUI('netbird');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user