mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Add advanced fields to JSON response
This commit is contained in:
parent
209d741363
commit
e4856484d9
@ -21,7 +21,7 @@ if (isset($interface)) {
|
|||||||
$dhcpdata['dhcpHost'] = is_array($dhcpHost) ? $dhcpHost : [ $dhcpHost ];
|
$dhcpdata['dhcpHost'] = is_array($dhcpHost) ? $dhcpHost : [ $dhcpHost ];
|
||||||
$upstreamServers = is_array($conf['server']) ? $conf['server'] : [ $conf['server'] ];
|
$upstreamServers = is_array($conf['server']) ? $conf['server'] : [ $conf['server'] ];
|
||||||
$dhcpdata['upstreamServers'] = array_filter($upstreamServers);
|
$dhcpdata['upstreamServers'] = array_filter($upstreamServers);
|
||||||
|
$dhcpdata['upstreamServersEnabled'] = empty($conf['server']) ? false: true;
|
||||||
preg_match('/([0-9]*)([a-z])/i', $dhcpdata['leaseTime'], $arrRangeLeaseTime);
|
preg_match('/([0-9]*)([a-z])/i', $dhcpdata['leaseTime'], $arrRangeLeaseTime);
|
||||||
$dhcpdata['leaseTime'] = $arrRangeLeaseTime[1];
|
$dhcpdata['leaseTime'] = $arrRangeLeaseTime[1];
|
||||||
$dhcpdata['leaseTimeInterval'] = $arrRangeLeaseTime[2];
|
$dhcpdata['leaseTimeInterval'] = $arrRangeLeaseTime[2];
|
||||||
|
@ -255,6 +255,8 @@ function loadInterfaceDHCPSelect() {
|
|||||||
$('#txtdns1').val(jsonData.DNS1);
|
$('#txtdns1').val(jsonData.DNS1);
|
||||||
$('#txtdns2').val(jsonData.DNS2);
|
$('#txtdns2').val(jsonData.DNS2);
|
||||||
$('#cbxrangeleasetimeunits').val(jsonData.leaseTimeInterval);
|
$('#cbxrangeleasetimeunits').val(jsonData.leaseTimeInterval);
|
||||||
|
$('#no-resolv')[0].checked = jsonData.upstreamServersEnabled;
|
||||||
|
$('#cbxdhcpupstreamserver').val(jsonData.upstreamServers[0]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<code class="text-muted"><?php echo htmlspecialchars("[/[<domain>]/[domain/]][<ipaddr>[#<port>][@<source-ip>|<interface>[#<port>]]"); ?></code>
|
<code class="text-muted"><?php echo htmlspecialchars("[/[<domain>]/[domain/]][<ipaddr>[#<port>][@<source-ip>|<interface>[#<port>]]"); ?></code>
|
||||||
</small>
|
</small>
|
||||||
</p>
|
</p>
|
||||||
<select class="custom-select custom-select-sm js-field-preset" data-field-preset-target="#add-dhcp-upstream-server-field">
|
<select class="custom-select custom-select-sm js-field-preset" id="cbxdhcpupstreamserver" data-field-preset-target="#add-dhcp-upstream-server-field">
|
||||||
<option value=""><?php echo _("Choose a hosted server") ?></option>
|
<option value=""><?php echo _("Choose a hosted server") ?></option>
|
||||||
<option disabled="disabled"></option>
|
<option disabled="disabled"></option>
|
||||||
<?php echo optionsForSelect(dnsServers()) ?>
|
<?php echo optionsForSelect(dnsServers()) ?>
|
||||||
|
Loading…
Reference in New Issue
Block a user