From a6a1fdeb31874f92b56d88818ae9defad371f39e Mon Sep 17 00:00:00 2001 From: systemcrash Date: Tue, 11 Mar 2025 14:06:36 +0000 Subject: [PATCH] deploy: dea8d79888f862c82953b775e55f4d0c672cc897 --- jsapi/LuCI.baseclass.html | 4 +- jsapi/LuCI.dom.html | 4 +- jsapi/LuCI.form.AbstractElement.html | 4 +- jsapi/LuCI.form.AbstractSection.html | 4 +- jsapi/LuCI.form.AbstractValue.html | 4 +- jsapi/LuCI.form.ButtonValue.html | 4 +- jsapi/LuCI.form.DummyValue.html | 4 +- jsapi/LuCI.form.DynamicList.html | 4 +- jsapi/LuCI.form.FileUpload.html | 4 +- jsapi/LuCI.form.FlagValue.html | 4 +- jsapi/LuCI.form.GridSection.html | 4 +- jsapi/LuCI.form.HiddenValue.html | 4 +- jsapi/LuCI.form.JSONMap.html | 4 +- jsapi/LuCI.form.ListValue.html | 4 +- jsapi/LuCI.form.Map.html | 4 +- jsapi/LuCI.form.MultiValue.html | 4 +- jsapi/LuCI.form.NamedSection.html | 4 +- jsapi/LuCI.form.RichListValue.html | 4 +- jsapi/LuCI.form.SectionValue.html | 4 +- jsapi/LuCI.form.TableSection.html | 4 +- jsapi/LuCI.form.TextValue.html | 4 +- jsapi/LuCI.form.TypedSection.html | 4 +- jsapi/LuCI.form.Value.html | 4 +- jsapi/LuCI.form.html | 4 +- jsapi/LuCI.fs.html | 4 +- jsapi/LuCI.headers.html | 4 +- jsapi/LuCI.html | 4 +- jsapi/LuCI.network.Device.html | 4 +- jsapi/LuCI.network.Hosts.html | 4 +- jsapi/LuCI.network.Protocol.html | 4 +- jsapi/LuCI.network.WifiDevice.html | 4 +- jsapi/LuCI.network.WifiNetwork.html | 4 +- jsapi/LuCI.network.WifiVlan.html | 4 +- jsapi/LuCI.network.html | 4 +- jsapi/LuCI.poll.html | 4 +- jsapi/LuCI.request.html | 4 +- jsapi/LuCI.request.poll.html | 4 +- jsapi/LuCI.response.html | 4 +- jsapi/LuCI.rpc.html | 4 +- jsapi/LuCI.session.html | 4 +- jsapi/LuCI.uci.html | 236 ++++++++++++++++++++++++++- jsapi/LuCI.ui.AbstractElement.html | 4 +- jsapi/LuCI.ui.Checkbox.html | 4 +- jsapi/LuCI.ui.ComboButton.html | 4 +- jsapi/LuCI.ui.Combobox.html | 4 +- jsapi/LuCI.ui.Dropdown.html | 4 +- jsapi/LuCI.ui.DynamicList.html | 4 +- jsapi/LuCI.ui.FileUpload.html | 4 +- jsapi/LuCI.ui.Hiddenfield.html | 4 +- jsapi/LuCI.ui.Select.html | 4 +- jsapi/LuCI.ui.Textarea.html | 4 +- jsapi/LuCI.ui.Textfield.html | 4 +- jsapi/LuCI.ui.changes.html | 4 +- jsapi/LuCI.ui.html | 4 +- jsapi/LuCI.ui.menu.html | 4 +- jsapi/LuCI.ui.tabs.html | 4 +- jsapi/LuCI.view.html | 4 +- jsapi/LuCI.xhr.html | 4 +- jsapi/form.js.html | 4 +- jsapi/fs.js.html | 4 +- jsapi/index.html | 4 +- jsapi/luci.js.html | 4 +- jsapi/network.js.html | 4 +- jsapi/rpc.js.html | 4 +- jsapi/uci.js.html | 38 ++++- jsapi/ui.js.html | 4 +- 66 files changed, 458 insertions(+), 72 deletions(-) diff --git a/jsapi/LuCI.baseclass.html b/jsapi/LuCI.baseclass.html index 50edd2366d..413583cb85 100644 --- a/jsapi/LuCI.baseclass.html +++ b/jsapi/LuCI.baseclass.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4882,7 +4884,7 @@ and the values extracted from the args array beginning with diff --git a/jsapi/LuCI.dom.html b/jsapi/LuCI.dom.html index e194564b9c..e81e64c53e 100644 --- a/jsapi/LuCI.dom.html +++ b/jsapi/LuCI.dom.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -6478,7 +6480,7 @@ ignored, else not.

    diff --git a/jsapi/LuCI.form.AbstractElement.html b/jsapi/LuCI.form.AbstractElement.html index 349b833ab0..e8793c5675 100644 --- a/jsapi/LuCI.form.AbstractElement.html +++ b/jsapi/LuCI.form.AbstractElement.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4469,7 +4471,7 @@ was neither a string nor a function. diff --git a/jsapi/LuCI.form.AbstractSection.html b/jsapi/LuCI.form.AbstractSection.html index 4345fad0f3..d244b6a47e 100644 --- a/jsapi/LuCI.form.AbstractSection.html +++ b/jsapi/LuCI.form.AbstractSection.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -6368,7 +6370,7 @@ was neither a string nor a function. diff --git a/jsapi/LuCI.form.AbstractValue.html b/jsapi/LuCI.form.AbstractValue.html index adac68e9bd..fbd422e3cd 100644 --- a/jsapi/LuCI.form.AbstractValue.html +++ b/jsapi/LuCI.form.AbstractValue.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7426,7 +7428,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.ButtonValue.html b/jsapi/LuCI.form.ButtonValue.html index 8ec17d7860..cc9827f218 100644 --- a/jsapi/LuCI.form.ButtonValue.html +++ b/jsapi/LuCI.form.ButtonValue.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7749,7 +7751,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.DummyValue.html b/jsapi/LuCI.form.DummyValue.html index 2959897435..9ec09afc8d 100644 --- a/jsapi/LuCI.form.DummyValue.html +++ b/jsapi/LuCI.form.DummyValue.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7735,7 +7737,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.DynamicList.html b/jsapi/LuCI.form.DynamicList.html index 7529d5bd64..34d0ea375c 100644 --- a/jsapi/LuCI.form.DynamicList.html +++ b/jsapi/LuCI.form.DynamicList.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7636,7 +7638,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.FileUpload.html b/jsapi/LuCI.form.FileUpload.html index 0c4b71e97d..712745bd21 100644 --- a/jsapi/LuCI.form.FileUpload.html +++ b/jsapi/LuCI.form.FileUpload.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7893,7 +7895,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.FlagValue.html b/jsapi/LuCI.form.FlagValue.html index 2c6d4a77a6..1ad54718cb 100644 --- a/jsapi/LuCI.form.FlagValue.html +++ b/jsapi/LuCI.form.FlagValue.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7777,7 +7779,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.GridSection.html b/jsapi/LuCI.form.GridSection.html index 20bb12a887..135b5ed7ab 100644 --- a/jsapi/LuCI.form.GridSection.html +++ b/jsapi/LuCI.form.GridSection.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7178,7 +7180,7 @@ was neither a string nor a function. diff --git a/jsapi/LuCI.form.HiddenValue.html b/jsapi/LuCI.form.HiddenValue.html index 216436439a..7e3257b217 100644 --- a/jsapi/LuCI.form.HiddenValue.html +++ b/jsapi/LuCI.form.HiddenValue.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7590,7 +7592,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.JSONMap.html b/jsapi/LuCI.form.JSONMap.html index 484258fd7d..b340ccabc7 100644 --- a/jsapi/LuCI.form.JSONMap.html +++ b/jsapi/LuCI.form.JSONMap.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -6048,7 +6050,7 @@ was neither a string nor a function. diff --git a/jsapi/LuCI.form.ListValue.html b/jsapi/LuCI.form.ListValue.html index c4afe0dbd3..d90d8f6e44 100644 --- a/jsapi/LuCI.form.ListValue.html +++ b/jsapi/LuCI.form.ListValue.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7761,7 +7763,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.Map.html b/jsapi/LuCI.form.Map.html index 1a83f2940b..a8ddcf2aec 100644 --- a/jsapi/LuCI.form.Map.html +++ b/jsapi/LuCI.form.Map.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -6027,7 +6029,7 @@ was neither a string nor a function. diff --git a/jsapi/LuCI.form.MultiValue.html b/jsapi/LuCI.form.MultiValue.html index 958a343a02..22cd305e42 100644 --- a/jsapi/LuCI.form.MultiValue.html +++ b/jsapi/LuCI.form.MultiValue.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7784,7 +7786,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.NamedSection.html b/jsapi/LuCI.form.NamedSection.html index 99d73d1e15..9099524cb3 100644 --- a/jsapi/LuCI.form.NamedSection.html +++ b/jsapi/LuCI.form.NamedSection.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -6632,7 +6634,7 @@ was neither a string nor a function. diff --git a/jsapi/LuCI.form.RichListValue.html b/jsapi/LuCI.form.RichListValue.html index d1041b450f..908bf8524d 100644 --- a/jsapi/LuCI.form.RichListValue.html +++ b/jsapi/LuCI.form.RichListValue.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7913,7 +7915,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.SectionValue.html b/jsapi/LuCI.form.SectionValue.html index a0d2dcbc44..146fc79aa9 100644 --- a/jsapi/LuCI.form.SectionValue.html +++ b/jsapi/LuCI.form.SectionValue.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7617,7 +7619,7 @@ its write() implementation is a no-op.

    diff --git a/jsapi/LuCI.form.TableSection.html b/jsapi/LuCI.form.TableSection.html index 088bc4d054..2f13b91029 100644 --- a/jsapi/LuCI.form.TableSection.html +++ b/jsapi/LuCI.form.TableSection.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7150,7 +7152,7 @@ was neither a string nor a function. diff --git a/jsapi/LuCI.form.TextValue.html b/jsapi/LuCI.form.TextValue.html index a81bf1a0b4..5dc64bf9e2 100644 --- a/jsapi/LuCI.form.TextValue.html +++ b/jsapi/LuCI.form.TextValue.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7633,7 +7635,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.TypedSection.html b/jsapi/LuCI.form.TypedSection.html index ba53b160f5..77ab46a524 100644 --- a/jsapi/LuCI.form.TypedSection.html +++ b/jsapi/LuCI.form.TypedSection.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -6839,7 +6841,7 @@ was neither a string nor a function. diff --git a/jsapi/LuCI.form.Value.html b/jsapi/LuCI.form.Value.html index 33bb8962e1..4f231562f0 100644 --- a/jsapi/LuCI.form.Value.html +++ b/jsapi/LuCI.form.Value.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7692,7 +7694,7 @@ before it is written.

    diff --git a/jsapi/LuCI.form.html b/jsapi/LuCI.form.html index 750d870f36..a20fc1938c 100644 --- a/jsapi/LuCI.form.html +++ b/jsapi/LuCI.form.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -3891,7 +3893,7 @@ m.render().then((node) => { diff --git a/jsapi/LuCI.fs.html b/jsapi/LuCI.fs.html index 3c0c644b9c..20e334dc10 100644 --- a/jsapi/LuCI.fs.html +++ b/jsapi/LuCI.fs.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -6077,7 +6079,7 @@ the failure reason. diff --git a/jsapi/LuCI.headers.html b/jsapi/LuCI.headers.html index e1d56a632b..890e3de5a0 100644 --- a/jsapi/LuCI.headers.html +++ b/jsapi/LuCI.headers.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4093,7 +4095,7 @@ Note: Header-Names are case-insensitive.

    diff --git a/jsapi/LuCI.html b/jsapi/LuCI.html index 46369a8efb..211da34563 100644 --- a/jsapi/LuCI.html +++ b/jsapi/LuCI.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -8669,7 +8671,7 @@ else null.

    diff --git a/jsapi/LuCI.network.Device.html b/jsapi/LuCI.network.Device.html index 6275bc25f4..305300b1a0 100644 --- a/jsapi/LuCI.network.Device.html +++ b/jsapi/LuCI.network.Device.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -6458,7 +6460,7 @@ when it is down or absent. diff --git a/jsapi/LuCI.network.Hosts.html b/jsapi/LuCI.network.Hosts.html index 3a56069838..ba29816bb3 100644 --- a/jsapi/LuCI.network.Hosts.html +++ b/jsapi/LuCI.network.Hosts.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5019,7 +5021,7 @@ is used as hint. diff --git a/jsapi/LuCI.network.Protocol.html b/jsapi/LuCI.network.Protocol.html index d6ce91d8a4..17c32054eb 100644 --- a/jsapi/LuCI.network.Protocol.html +++ b/jsapi/LuCI.network.Protocol.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -8355,7 +8357,7 @@ configuration.

    diff --git a/jsapi/LuCI.network.WifiDevice.html b/jsapi/LuCI.network.WifiDevice.html index 35b888bb5a..0bfa2fd35d 100644 --- a/jsapi/LuCI.network.WifiDevice.html +++ b/jsapi/LuCI.network.WifiDevice.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5396,7 +5398,7 @@ configuration.

    diff --git a/jsapi/LuCI.network.WifiNetwork.html b/jsapi/LuCI.network.WifiNetwork.html index e7c4a09182..c9bc49a22f 100644 --- a/jsapi/LuCI.network.WifiNetwork.html +++ b/jsapi/LuCI.network.WifiNetwork.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -8080,7 +8082,7 @@ configuration.

    diff --git a/jsapi/LuCI.network.WifiVlan.html b/jsapi/LuCI.network.WifiVlan.html index 2b0c294457..0038abbf42 100644 --- a/jsapi/LuCI.network.WifiVlan.html +++ b/jsapi/LuCI.network.WifiVlan.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4298,7 +4300,7 @@ if it is different than the vlan id diff --git a/jsapi/LuCI.network.html b/jsapi/LuCI.network.html index a4e0954e76..066181618e 100644 --- a/jsapi/LuCI.network.html +++ b/jsapi/LuCI.network.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -9926,7 +9928,7 @@ conjunction with quality to calculate a quality percentage.

    - Documentation generated by JSDoc 3.6.11 on Fri Mar 07 2025 13:24:26 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Tue Mar 11 2025 14:06:32 GMT+0000 (Coordinated Universal Time) diff --git a/jsapi/LuCI.poll.html b/jsapi/LuCI.poll.html index a4f6a7b512..b2740c6dae 100644 --- a/jsapi/LuCI.poll.html +++ b/jsapi/LuCI.poll.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4476,7 +4478,7 @@ run to begin with. diff --git a/jsapi/LuCI.request.html b/jsapi/LuCI.request.html index b839aa0653..6b8ee244ce 100644 --- a/jsapi/LuCI.request.html +++ b/jsapi/LuCI.request.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5411,7 +5413,7 @@ instances as sole argument during the HTTP request transfer.

    diff --git a/jsapi/LuCI.request.poll.html b/jsapi/LuCI.request.poll.html index 2ae64a5c9a..5692cee7f9 100644 --- a/jsapi/LuCI.request.poll.html +++ b/jsapi/LuCI.request.poll.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4595,7 +4597,7 @@ else null.

    diff --git a/jsapi/LuCI.response.html b/jsapi/LuCI.response.html index 3984f986a8..11937064fd 100644 --- a/jsapi/LuCI.response.html +++ b/jsapi/LuCI.response.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4553,7 +4555,7 @@ using String() and treated as response text.

    diff --git a/jsapi/LuCI.rpc.html b/jsapi/LuCI.rpc.html index ab30efbe34..0fb4075c00 100644 --- a/jsapi/LuCI.rpc.html +++ b/jsapi/LuCI.rpc.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5884,7 +5886,7 @@ to the expect and filter declarations. diff --git a/jsapi/LuCI.session.html b/jsapi/LuCI.session.html index af605a3f5c..cf5d8a1d33 100644 --- a/jsapi/LuCI.session.html +++ b/jsapi/LuCI.session.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4323,7 +4325,7 @@ being put in the session store.

    diff --git a/jsapi/LuCI.uci.html b/jsapi/LuCI.uci.html index 67ee652801..cd21961764 100644 --- a/jsapi/LuCI.uci.html +++ b/jsapi/LuCI.uci.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4003,7 +4005,7 @@ to the given name for non-anonymous sections.
    - uci.js, line 940 + uci.js, line 974
    @@ -4165,7 +4167,7 @@ operation to cancel the rollback timer.

    - uci.js, line 1020 + uci.js, line 1054
    @@ -4900,6 +4902,226 @@ found or if the corresponding configuration is not loaded. + + + + +
    +
    +

    + + get_bool(conf, sid, opt){boolean} +

    + + + + +
    + + +
    +
    + + +
    +

    A special case of get that always returns either true or +false.

    +

    Many configuration files contain boolean settings, such as +enabled or advanced_mode, where there is no consistent +definition for the values. This function allows users to +enter any of the values "yes", "on", "true" or 1 in +their config files and we return the expected boolean result.

    +

    Character case is not significant, so for example, any of +"YES", "Yes" or "yes" will be interpreted as a true value.

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    conf + + +string + + + + + + + + + + +

    The name of the configuration to read.

    sid + + +string + + + + + + + + + + +

    The name or ID of the section to read.

    opt + + +string + + + + + + + optional + + + + + +

    The option name from which to read the value. If the option +name is omitted or null, the value false is returned.

    + + + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + +
    Returns:
    + + + + + + + + + + + + + + + + + + + + +
    TypeDescription
    + + boolean + + +
      +
    • Returns boolean true if the configuration value is defined +and looks like a true value, otherwise returns false.
    • +
    + + + +
    @@ -5301,7 +5523,7 @@ that have been successfully loaded.
    - uci.js, line 795 + uci.js, line 829
    @@ -5887,7 +6109,7 @@ not be resolved to existing section ID.
    - uci.js, line 850 + uci.js, line 884
    @@ -6400,7 +6622,7 @@ with the given value.

    - uci.js, line 731 + uci.js, line 765
    @@ -6906,7 +7128,7 @@ configuration.

    - uci.js, line 760 + uci.js, line 794
    @@ -7640,7 +7862,7 @@ associated name as arguments.

    diff --git a/jsapi/LuCI.ui.AbstractElement.html b/jsapi/LuCI.ui.AbstractElement.html index 595ead3200..1d3b711a83 100644 --- a/jsapi/LuCI.ui.AbstractElement.html +++ b/jsapi/LuCI.ui.AbstractElement.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5427,7 +5429,7 @@ and are displayed in a slightly faded style.

    diff --git a/jsapi/LuCI.ui.Checkbox.html b/jsapi/LuCI.ui.Checkbox.html index ef4ab98e91..a85075134e 100644 --- a/jsapi/LuCI.ui.Checkbox.html +++ b/jsapi/LuCI.ui.Checkbox.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5541,7 +5543,7 @@ it is required for HTML based form submissions.

    diff --git a/jsapi/LuCI.ui.ComboButton.html b/jsapi/LuCI.ui.ComboButton.html index af818f5a69..d1039eeb4e 100644 --- a/jsapi/LuCI.ui.ComboButton.html +++ b/jsapi/LuCI.ui.ComboButton.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5571,7 +5573,7 @@ choice value as second argument.

    diff --git a/jsapi/LuCI.ui.Combobox.html b/jsapi/LuCI.ui.Combobox.html index 28d2bc0bff..b1770d88ac 100644 --- a/jsapi/LuCI.ui.Combobox.html +++ b/jsapi/LuCI.ui.Combobox.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5474,7 +5476,7 @@ forcibly set to true.

    diff --git a/jsapi/LuCI.ui.Dropdown.html b/jsapi/LuCI.ui.Dropdown.html index c9742baf04..787ecb0f1d 100644 --- a/jsapi/LuCI.ui.Dropdown.html +++ b/jsapi/LuCI.ui.Dropdown.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -6272,7 +6274,7 @@ expression. Only applicable when create is true.

    - Documentation generated by JSDoc 3.6.11 on Fri Mar 07 2025 13:24:27 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Tue Mar 11 2025 14:06:32 GMT+0000 (Coordinated Universal Time) diff --git a/jsapi/LuCI.ui.DynamicList.html b/jsapi/LuCI.ui.DynamicList.html index af15be0ef3..e997ed4ca8 100644 --- a/jsapi/LuCI.ui.DynamicList.html +++ b/jsapi/LuCI.ui.DynamicList.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5649,7 +5651,7 @@ it to remain unselected.

    diff --git a/jsapi/LuCI.ui.FileUpload.html b/jsapi/LuCI.ui.FileUpload.html index 2e099d29e6..45dea31a39 100644 --- a/jsapi/LuCI.ui.FileUpload.html +++ b/jsapi/LuCI.ui.FileUpload.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5572,7 +5574,7 @@ ACL setup for the current session.

    diff --git a/jsapi/LuCI.ui.Hiddenfield.html b/jsapi/LuCI.ui.Hiddenfield.html index e081c9b672..75eb8f2cdb 100644 --- a/jsapi/LuCI.ui.Hiddenfield.html +++ b/jsapi/LuCI.ui.Hiddenfield.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5252,7 +5254,7 @@ trigger validation runs, e.g. when programmatically altering values.

    diff --git a/jsapi/LuCI.ui.Select.html b/jsapi/LuCI.ui.Select.html index 3b43d79487..e56a1eb73e 100644 --- a/jsapi/LuCI.ui.Select.html +++ b/jsapi/LuCI.ui.Select.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5604,7 +5606,7 @@ selected yet. Only applicable to the select widget type.

    diff --git a/jsapi/LuCI.ui.Textarea.html b/jsapi/LuCI.ui.Textarea.html index 752685bfbe..176dbe8e2f 100644 --- a/jsapi/LuCI.ui.Textarea.html +++ b/jsapi/LuCI.ui.Textarea.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5550,7 +5552,7 @@ contents.

    diff --git a/jsapi/LuCI.ui.Textfield.html b/jsapi/LuCI.ui.Textfield.html index 199566bf12..819e679457 100644 --- a/jsapi/LuCI.ui.Textfield.html +++ b/jsapi/LuCI.ui.Textfield.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -5478,7 +5480,7 @@ corresponding <input> element is empty.

    diff --git a/jsapi/LuCI.ui.changes.html b/jsapi/LuCI.ui.changes.html index 70a0df8bd5..dfbf7c54f8 100644 --- a/jsapi/LuCI.ui.changes.html +++ b/jsapi/LuCI.ui.changes.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4330,7 +4332,7 @@ is removed.

    diff --git a/jsapi/LuCI.ui.html b/jsapi/LuCI.ui.html index bca4a0e566..133d148cad 100644 --- a/jsapi/LuCI.ui.html +++ b/jsapi/LuCI.ui.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -6426,7 +6428,7 @@ cancelled by the user. diff --git a/jsapi/LuCI.ui.menu.html b/jsapi/LuCI.ui.menu.html index bec1239545..50cd27e61e 100644 --- a/jsapi/LuCI.ui.menu.html +++ b/jsapi/LuCI.ui.menu.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4377,7 +4379,7 @@ internal root node if omitted.

    diff --git a/jsapi/LuCI.ui.tabs.html b/jsapi/LuCI.ui.tabs.html index 1a133bcd08..fe478b172c 100644 --- a/jsapi/LuCI.ui.tabs.html +++ b/jsapi/LuCI.ui.tabs.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4077,7 +4079,7 @@ DOM node.

    diff --git a/jsapi/LuCI.view.html b/jsapi/LuCI.view.html index 74b9d1a307..de2983a37b 100644 --- a/jsapi/LuCI.view.html +++ b/jsapi/LuCI.view.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4681,7 +4683,7 @@ to a Node value. diff --git a/jsapi/LuCI.xhr.html b/jsapi/LuCI.xhr.html index 77ab8051a3..8c689fc42a 100644 --- a/jsapi/LuCI.xhr.html +++ b/jsapi/LuCI.xhr.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4645,7 +4647,7 @@ when invoked.

    diff --git a/jsapi/form.js.html b/jsapi/form.js.html index 12274add4f..f632063020 100644 --- a/jsapi/form.js.html +++ b/jsapi/form.js.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -8738,7 +8740,7 @@ return baseclass.extend(/** @lends LuCI.form.prototype */ { diff --git a/jsapi/fs.js.html b/jsapi/fs.js.html index 11c6f95517..4752a494ff 100644 --- a/jsapi/fs.js.html +++ b/jsapi/fs.js.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4119,7 +4121,7 @@ return FileSystem; diff --git a/jsapi/index.html b/jsapi/index.html index d506ec71f0..2804bfa140 100644 --- a/jsapi/index.html +++ b/jsapi/index.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -3706,7 +3708,7 @@ is the central JSDoc 3.6.11 on Fri Mar 07 2025 13:24:26 GMT+0000 (Coordinated Universal Time) + Documentation generated by JSDoc 3.6.11 on Tue Mar 11 2025 14:06:31 GMT+0000 (Coordinated Universal Time) diff --git a/jsapi/luci.js.html b/jsapi/luci.js.html index e35c02c5c0..5df4350648 100644 --- a/jsapi/luci.js.html +++ b/jsapi/luci.js.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -7115,7 +7117,7 @@ diff --git a/jsapi/network.js.html b/jsapi/network.js.html index 7f720f70bd..a2e40ce145 100644 --- a/jsapi/network.js.html +++ b/jsapi/network.js.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -8228,7 +8230,7 @@ return Network; diff --git a/jsapi/rpc.js.html b/jsapi/rpc.js.html index cb71f3856f..972c6c60cc 100644 --- a/jsapi/rpc.js.html +++ b/jsapi/rpc.js.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4175,7 +4177,7 @@ return baseclass.extend(/** @lends LuCI.rpc.prototype */ { diff --git a/jsapi/uci.js.html b/jsapi/uci.js.html index 0d6d410fac..83cec237e2 100644 --- a/jsapi/uci.js.html +++ b/jsapi/uci.js.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -4384,6 +4386,40 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ { return this.get(conf, sid, opt); }, + /** + * A special case of `get` that always returns either `true` or + * `false`. + * + * Many configuration files contain boolean settings, such as + * `enabled` or `advanced_mode`, where there is no consistent + * definition for the values. This function allows users to + * enter any of the values `"yes"`, `"on"`, `"true"` or `1` in + * their config files and we return the expected boolean result. + * + * Character case is not significant, so for example, any of + * "YES", "Yes" or "yes" will be interpreted as a `true` value. + * + * @param {string} conf + * The name of the configuration to read. + * + * @param {string} sid + * The name or ID of the section to read. + * + * @param {string} [opt] + * The option name from which to read the value. If the option + * name is omitted or `null`, the value `false` is returned. + * + * @returns {boolean} + * - Returns boolean `true` if the configuration value is defined + * and looks like a true value, otherwise returns `false`. + */ + get_bool(conf, type, opt) { + let value = this.get(conf, type, opt); + if (typeof(value) == 'string') + return ['1', 'on', 'true', 'yes', 'enabled'].includes(value.toLowerCase()); + return false; + }, + /** * Sets the value of the given option within the first found section * of the given configuration matching the specified type or within @@ -4715,7 +4751,7 @@ return baseclass.extend(/** @lends LuCI.uci.prototype */ { diff --git a/jsapi/ui.js.html b/jsapi/ui.js.html index c990a5153f..2f3e73531c 100644 --- a/jsapi/ui.js.html +++ b/jsapi/ui.js.html @@ -2860,6 +2860,8 @@
  • get
  • +
  • get_bool
  • +
  • get_first
  • load
  • @@ -8811,7 +8813,7 @@ return UI; -- 2.30.2