Commit b3fea6b9 authored by Jos Schellevis's avatar Jos Schellevis

Fixed some issues with unbound Gui pages

parent 60a5170d
......@@ -28,9 +28,9 @@ var addRowTo = (function() {
if(typeof(rowtype[i]) == 'function') {
td.innerHTML="<input type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "' />" + rowtype[i](rowname[i], rowsize[i], totalrows) + " ";
} else if(rowtype[i] == 'textbox') {
td.innerHTML="<input type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "' /><input size='" + rowsize[i] + "' class='formfld unknown' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "' /> ";
td.innerHTML="<input type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "' /><input size='" + rowsize[i] + "' class='formfld unknown' type='text' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "' /> ";
} else if(rowtype[i] == 'textbox,ipv4v6') {
td.innerHTML="<input type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "' /><input size='" + rowsize[i] + "' class='formfld unknown ipv4v6' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "' /> ";
td.innerHTML="<input type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "' /><input size='" + rowsize[i] + "' class='formfld unknown ipv4v6' type='text' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "' /> ";
} else if(rowtype[i] == 'password') {
td.innerHTML="<input type='hidden' value='" + totalrows +"' name='" + rowname[i] + "_row-" + totalrows + "' /><input type='password' size='" + rowsize[i] + "' class='formfld pwd' name='" + rowname[i] + totalrows + "' id='" + rowname[i] + totalrows + "' /> ";
} else if(rowtype[i] == 'select') {
......
......@@ -134,7 +134,7 @@ if ($_GET['act'] == "del") {
$closehead = false;
$pgtitle = array(gettext("Services"),gettext("DNS forwarder"));
$shortcut_section = "resolver";
$shortcut_section = "forwarder";
include("head.inc");
?>
......
......@@ -67,17 +67,18 @@ else
$pconfig['outgoing_interface'] = explode(",", $config['unbound']['outgoing_interface']);
if ($_POST) {
$pconfig = $_POST;
unset($input_errors);
if ($_POST['apply']) {
$retval = services_unbound_configure();
$savemsg = get_std_save_message($retval);
if ($retval == 0)
if ($retval == 0) {
clear_subsystem_dirty('unbound');
}
/* Update resolv.conf in case the interface bindings exclude localhost. */
system_resolvconf_generate();
} else {
$pconfig = $_POST;
if (isset($_POST['enable']) && isset($config['dnsmasq']['enable']))
$input_errors[] = "The system dns-forwarder is still active. Disable it before enabling the DNS Resolver.";
......@@ -156,6 +157,7 @@ if ($_GET['act'] == "del") {
$closehead = false;
$pgtitle = array(gettext("Services"),gettext("DNS Resolver"));
$shortcut_section = "resolver";
include_once("head.inc");
?>
......@@ -236,7 +238,7 @@ function show_advanced_dns() {
?>
<?=gettext("Interface IPs used by the DNS Resolver for responding to queries from clients. If an interface has both IPv4 and IPv6 IPs, both are used. Queries to other interface IPs not selected below are discarded. The default behavior is to respond to queries on every available IPv4 and IPv6 address.");?>
<br /><br />
<select id="active_interface" name="active_interface[]" multiple="multiple" size="3">
<select id="active_interface" name="active_interface[]" multiple="multiple" size="3" class="selectpicker" data-live-search="true">
<option value="" <?php if (empty($pconfig['active_interface']) || empty($pconfig['active_interface'][0])) echo 'selected="selected"'; ?>>All</option>
<?php
foreach ($interface_addresses as $laddr):
......@@ -261,7 +263,7 @@ function show_advanced_dns() {
?>
<?=gettext("Utilize different network interface(s) that the DNS Resolver will use to send queries to authoritative servers and receive their replies. By default all interfaces are used.");?>
<br /><br />
<select id="outgoing_interface" name="outgoing_interface[]" multiple="multiple" size="3">
<select id="outgoing_interface" name="outgoing_interface[]" multiple="multiple" size="3" class="selectpicker" data-live-search="true">
<option value="" <?php if (empty($pconfig['outgoing_interface']) || empty($pconfig['outgoing_interface'][0])) echo 'selected="selected"'; ?>>All</option>
<?php
foreach ($interface_addresses as $laddr):
......@@ -327,7 +329,7 @@ function show_advanced_dns() {
<td width="22%" valign="top" class="vncellreq"><?=gettext("Advanced");?></td>
<td width="78%" class="vtable">
<div id="showadvbox" <?php if ($pconfig['custom_options']) echo "style='display:none'"; ?>>
<input type="button" onclick="show_advanced_dns()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
<input type="button" class="btn btn-xs btn-default" onclick="show_advanced_dns()" value="<?=gettext("Advanced"); ?>" /> - <?=gettext("Show advanced option");?>
</div>
<div id="showadv" <?php if (empty($pconfig['custom_options'])) echo "style='display:none'"; ?>>
<strong><?=gettext("Advanced");?><br /></strong>
......
This diff is collapsed.
......@@ -201,7 +201,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Message Cache Size");?></td>
<td width="78%" class="vtable">
<p>
<select id="msgcachesize" name="msgcachesize">
<select id="msgcachesize" name="msgcachesize" class="selectpicker">
<?php
foreach (array("4", "10", "20", "50", "100", "250", "512") as $size) :
?>
......@@ -220,7 +220,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Outgoing TCP Buffers");?></td>
<td width="78%" class="vtable">
<p>
<select id="outgoing_num_tcp" name="outgoing_num_tcp">
<select id="outgoing_num_tcp" name="outgoing_num_tcp" class="selectpicker">
<?php
for ($num_tcp = 0; $num_tcp <= 50; $num_tcp += 10):
?>
......@@ -239,7 +239,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Incoming TCP Buffers");?></td>
<td width="78%" class="vtable">
<p>
<select id="incoming_num_tcp" name="incoming_num_tcp">
<select id="incoming_num_tcp" name="incoming_num_tcp" class="selectpicker">
<?php
for ($num_tcp = 0; $num_tcp <= 50; $num_tcp += 10):
?>
......@@ -258,7 +258,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("EDNS Buffer Size");?></td>
<td width="78%" class="vtable">
<p>
<select id="edns_buffer_size" name="edns_buffer_size">
<select id="edns_buffer_size" name="edns_buffer_size" class="selectpicker">
<?php
foreach (array("512", "1480", "4096") as $size) :
?>
......@@ -277,7 +277,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Number of queries per thread");?></td>
<td width="78%" class="vtable">
<p>
<select id="num_queries_per_thread" name="num_queries_per_thread">
<select id="num_queries_per_thread" name="num_queries_per_thread" class="selectpicker">
<?php
foreach (array("512", "1024", "2048") as $queries) :
?>
......@@ -296,7 +296,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Jostle Timeout");?></td>
<td width="78%" class="vtable">
<p>
<select id="jostle_timeout" name="jostle_timeout">
<select id="jostle_timeout" name="jostle_timeout" class="selectpicker">
<?php
foreach (array("100", "200", "500", "1000") as $timeout) :
?>
......@@ -333,7 +333,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("TTL for Host cache entries");?></td>
<td width="78%" class="vtable">
<p>
<select id="infra_host_ttl" name="infra_host_ttl">
<select id="infra_host_ttl" name="infra_host_ttl" class="selectpicker">
<option value="60" <?php if ($pconfig['infra_host_ttl'] == "60") echo "selected=\"selected\""; ?>>1 minute</option>
<option value="120" <?php if ($pconfig['infra_host_ttl'] == "120") echo "selected=\"selected\""; ?>>2 minutes</option>
<option value="300" <?php if ($pconfig['infra_host_ttl'] == "300") echo "selected=\"selected\""; ?>>5 minutes</option>
......@@ -348,7 +348,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("TTL for lame delegation");?></td>
<td width="78%" class="vtable">
<p>
<select id="infra_lame_ttl" name="infra_lame_ttl">
<select id="infra_lame_ttl" name="infra_lame_ttl" class="selectpicker">
<option value="60" <?php if ($pconfig['infra_lame_ttl'] == "60") echo "selected=\"selected\""; ?>>1 minute</option>
<option value="120" <?php if ($pconfig['infra_lame_ttl'] == "120") echo "selected=\"selected\""; ?>>2 minutes</option>
<option value="300" <?php if ($pconfig['infra_lame_ttl'] == "300") echo "selected=\"selected\""; ?>>5 minutes</option>
......@@ -363,7 +363,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Number of Hosts to cache");?></td>
<td width="78%" class="vtable">
<p>
<select id="infra_cache_numhosts" name="infra_cache_numhosts">
<select id="infra_cache_numhosts" name="infra_cache_numhosts" class="selectpicker">
<option value="1000" <?php if ($pconfig['infra_cache_numhosts'] == "1000") echo "selected=\"selected\""; ?>>1000</option>
<option value="5000" <?php if ($pconfig['infra_cache_numhosts'] == "5000") echo "selected=\"selected\""; ?>>5000</option>
<option value="10000" <?php if ($pconfig['infra_cache_numhosts'] == "10000") echo "selected=\"selected\""; ?>>10 000</option>
......@@ -378,7 +378,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Unwanted Reply Threshold");?></td>
<td width="78%" class="vtable">
<p>
<select id="unwanted_reply_threshold" name="unwanted_reply_threshold">
<select id="unwanted_reply_threshold" name="unwanted_reply_threshold" class="selectpicker">
<option value="disabled" <?php if ($pconfig['unwanted_reply_threshold'] == "disabled") echo "selected=\"selected\""; ?>>disabled</option>
<option value="5000000" <?php if ($pconfig['unwanted_reply_threshold'] == "5000000") echo "selected=\"selected\""; ?>>5 million</option>
<option value="10000000" <?php if ($pconfig['unwanted_reply_threshold'] == "10000000") echo "selected=\"selected\""; ?>>10 million</option>
......@@ -394,7 +394,7 @@ include_once("head.inc");
<td width="22%" valign="top" class="vncell"><?=gettext("Log level verbosity");?></td>
<td width="78%" class="vtable">
<p>
<select id="log_verbosity" name="log_verbosity">
<select id="log_verbosity" name="log_verbosity" class="selectpicker">
<?php
for ($level = 0; $level <= 5; $level++):
?>
......
......@@ -223,10 +223,15 @@ $shortcuts['trafficshaper-limiters'] = array();
$shortcuts['trafficshaper-limiters']['main'] = "firewall_shaper_vinterface.php";
$shortcuts['trafficshaper-limiters']['status'] = "diag_limiter_info.php";
$shortcuts['forwarder'] = array();
$shortcuts['forwarder']['main'] = "services_dnsmasq.php";
$shortcuts['forwarder']['log'] = "diag_logs_resolver.php";
$shortcuts['forwarder']['service'] = "dnsmasq";
$shortcuts['resolver'] = array();
$shortcuts['resolver']['main'] = "services_dnsmasq.php";
$shortcuts['resolver']['main'] = "services_unbound.php";
$shortcuts['resolver']['log'] = "diag_logs_resolver.php";
$shortcuts['resolver']['service'] = "dnsmasq";
$shortcuts['resolver']['service'] = "unbound";
$shortcuts['wireless'] = array();
$shortcuts['wireless']['main'] = "interfaces_wireless.php";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment