summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/local/www')
-rw-r--r--src/usr/local/www/diag_dump_states.php13
-rw-r--r--src/usr/local/www/guiconfig.inc6
-rw-r--r--src/usr/local/www/system.php4
-rw-r--r--src/usr/local/www/system_authservers.php13
-rw-r--r--src/usr/local/www/widgets/widgets/services_status.widget.php100
5 files changed, 86 insertions, 50 deletions
diff --git a/src/usr/local/www/diag_dump_states.php b/src/usr/local/www/diag_dump_states.php
index 342d8f5..879617b 100644
--- a/src/usr/local/www/diag_dump_states.php
+++ b/src/usr/local/www/diag_dump_states.php
@@ -205,10 +205,14 @@ print $form;
$arr[] = array("filter" => $_POST['filter']);
}
- if (count($arr) > 0) {
- $res = pfSense_get_pf_states($arr);
+ if (isset($_POST['filter']) || !isset($config['system']['webgui']['requirestatefilter'])) {
+ if (count($arr) > 0) {
+ $res = pfSense_get_pf_states($arr);
+ } else {
+ $res = pfSense_get_pf_states();
+ }
} else {
- $res = pfSense_get_pf_states();
+ $res = NULL;
}
$states = 0;
@@ -261,6 +265,9 @@ print $form;
if ($states == 0) {
if (isset($_POST['filter']) && !empty($_POST['filter'])) {
$errmsg = gettext('No states were found that match the current filter.');
+ } else if (!isset($_POST['filter']) && isset($config['system']['webgui']['requirestatefilter'])) {
+ $errmsg = gettext('State display suppressed without filter submission. '.
+ 'See System > General Setup, Require State Filter.');
} else {
$errmsg = gettext('No states were found.');
}
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc
index c9e78dc..2d22114 100644
--- a/src/usr/local/www/guiconfig.inc
+++ b/src/usr/local/www/guiconfig.inc
@@ -158,6 +158,12 @@ $radius_srvcs = array(
'auth' => gettext("Authentication"),
'acct' => gettext("Accounting"));
+$radius_protocol = array(
+ 'PAP' => "PAP",
+ 'CHAP_MD5' => "MD5-CHAP",
+ 'MSCHAPv1' => "MS-CHAPv1",
+ 'MSCHAPv2' => "MS-CHAPv2");
+
$netbios_nodetypes = array(
'0' => "none",
'1' => "b-node",
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index 86b9d76..858ca00 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -68,6 +68,7 @@ $pconfig['webguihostnamemenu'] = $config['system']['webgui']['webguihostnamemenu
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
$pconfig['dashboardperiod'] = isset($config['widgets']['period']) ? $config['widgets']['period']:"10";
$pconfig['loginshowhost'] = isset($config['system']['webgui']['loginshowhost']);
+$pconfig['requirestatefilter'] = isset($config['system']['webgui']['requirestatefilter']);
if (!$pconfig['timezone']) {
if (isset($g['default_timezone']) && !empty($g['default_timezone'])) {
@@ -177,6 +178,8 @@ if ($_POST) {
unset($config['system']['webgui']['dashboardcolumns']);
}
+ $config['system']['webgui']['requirestatefilter'] = $_POST['requirestatefilter'] ? true : false;
+
if ($_POST['hostname']) {
if (!is_hostname($_POST['hostname'])) {
$input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'. It may not start or end with '-'.");
@@ -519,6 +522,7 @@ gen_associatedpanels_fields(
$pconfig['systemlogsfilterpanel'],
$pconfig['systemlogsmanagelogpanel'],
$pconfig['statusmonitoringsettingspanel']);
+gen_requirestatefilter_field($section, $pconfig['requirestatefilter']);
gen_webguileftcolumnhyper_field($section, $pconfig['webguileftcolumnhyper']);
$section->addInput(new Form_Checkbox(
diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php
index f21a7a9..86f96e8 100644
--- a/src/usr/local/www/system_authservers.php
+++ b/src/usr/local/www/system_authservers.php
@@ -179,6 +179,7 @@ if ($act == "edit") {
}
if ($pconfig['type'] == "radius") {
+ $pconfig['radius_protocol'] = $a_server[$id]['radius_protocol'];
$pconfig['radius_host'] = $a_server[$id]['host'];
$pconfig['radius_auth_port'] = $a_server[$id]['radius_auth_port'];
$pconfig['radius_acct_port'] = $a_server[$id]['radius_acct_port'];
@@ -209,6 +210,7 @@ if ($act == "edit") {
if ($act == "new") {
$pconfig['ldap_protver'] = 3;
$pconfig['ldap_anon'] = true;
+ $pconfig['radius_protocol'] = "MSCHAPv2";
$pconfig['radius_srvcs'] = "both";
$pconfig['radius_auth_port'] = "1812";
$pconfig['radius_acct_port'] = "1813";
@@ -248,10 +250,11 @@ if ($_POST) {
}
if ($pconfig['type'] == "radius") {
- $reqdfields = explode(" ", "name type radius_host radius_srvcs");
+ $reqdfields = explode(" ", "name type radius_protocol radius_host radius_srvcs");
$reqdfieldsn = array(
gettext("Descriptive name"),
gettext("Type"),
+ gettext("Radius Protocol"),
gettext("Hostname or IP"),
gettext("Services"));
@@ -354,6 +357,7 @@ if ($_POST) {
if ($server['type'] == "radius") {
+ $server['radius_protocol'] = $pconfig['radius_protocol'];
$server['host'] = $pconfig['radius_host'];
if ($pconfig['radius_secret']) {
@@ -725,6 +729,13 @@ $form->add($section);
$section = new Form_Section('RADIUS Server Settings');
$section->addClass('toggle-radius collapse');
+$section->addInput(new Form_Select(
+ 'radius_protocol',
+ 'Protocol',
+ $pconfig['radius_protocol'],
+ $radius_protocol
+));
+
$section->addInput(new Form_Input(
'radius_host',
'Hostname or IP address',
diff --git a/src/usr/local/www/widgets/widgets/services_status.widget.php b/src/usr/local/www/widgets/widgets/services_status.widget.php
index 1ef5b5b..864432e 100644
--- a/src/usr/local/www/widgets/widgets/services_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/services_status.widget.php
@@ -56,8 +56,8 @@ if ($_POST) {
array_push($validNames, $service['dispname']);
}
- if (isset($_POST['servicestatusfilter'])) {
- $user_settings['widgets']['servicestatusfilter'] = implode(',', array_intersect($validNames, $_POST['servicestatusfilter']));
+ if (is_array($_POST['show'])) {
+ $user_settings['widgets']['servicestatusfilter'] = implode(',', array_diff($validNames, $_POST['show']));
} else {
$user_settings['widgets']['servicestatusfilter'] = "";
}
@@ -67,16 +67,17 @@ if ($_POST) {
}
?>
-<table class="table table-striped table-hover">
-<thead>
- <tr>
- <th></th>
- <th><?=gettext('Service')?></th>
- <th><?=gettext('Description')?></th>
- <th><?=gettext('Action')?></th>
- </tr>
-</thead>
-<tbody>
+<div class="table-responsive">
+ <table class="table table-striped table-hover table-condensed">
+ <thead>
+ <tr>
+ <th></th>
+ <th><?=gettext('Service')?></th>
+ <th><?=gettext('Description')?></th>
+ <th><?=gettext('Action')?></th>
+ </tr>
+ </thead>
+ <tbody>
<?php
$skipservices = explode(",", $user_settings['widgets']['servicestatusfilter']);
@@ -94,67 +95,74 @@ if (count($services) > 0) {
$service_desc = explode(".",$service['description']);
?>
- <tr>
- <td><?=get_service_status_icon($service, false, true, false, "state")?></td>
- <td><?=$service['dispname']?></td>
- <td><?=$service_desc[0]?></td>
- <td><?=get_service_control_links($service)?></td>
- </tr>
+ <tr>
+ <td><?=get_service_status_icon($service, false, true, false, "state")?></td>
+ <td><?=$service['dispname']?></td>
+ <td><?=$service_desc[0]?></td>
+ <td><?=get_service_control_links($service)?></td>
+ </tr>
<?php
}
} else {
echo "<tr><td colspan=\"3\" class=\"text-center\">" . gettext("No services found") . ". </td></tr>\n";
}
?>
-</tbody>
-</table>
-
+ </tbody>
+ </table>
+</div>
<!-- close the body we're wrapped in and add a configuration-panel -->
</div><div id="widget-<?=$widgetname?>_panel-footer" class="panel-footer collapse">
<form action="/widgets/widgets/services_status.widget.php" method="post" class="form-horizontal">
- <div class="form-group">
- <label class="col-sm-3 control-label"><?=gettext('Hidden services')?></label>
- <div class="col-sm-6">
- <select multiple id="servicestatusfilter" name="servicestatusfilter[]" class="form-control">
- <?php
+ <div class="panel panel-default col-sm-10">
+ <div class="panel-body">
+ <div class="table responsive">
+ <table class="table table-striped table-hover table-condensed">
+ <thead>
+ <tr>
+ <th><?=gettext("Service")?></th>
+ <th><?=gettext("Show")?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ $skipservices = explode(",", $user_settings['widgets']['servicestatusfilter']);
+ $idx = 0;
+
foreach ($services as $service):
if (!empty(trim($service['dispname'])) || is_numeric($service['dispname'])) {
- ?>
- <option <?=(in_array($service['dispname'], $skipservices)?'selected':'')?>><?=$service['dispname']?></option>
- <?php
+?>
+ <tr>
+ <td><?=$service['dispname']?></td>
+ <td class="col-sm-2"><input id="show[]" name ="show[]" value="<?=$service['dispname']?>" type="checkbox" <?=(!in_array($service['dispname'], $skipservices) ? 'checked':'')?>></td>
+ </tr>
+<?php
}
endforeach;
- ?>
- </select>
+?>
+ </tbody>
+ </table>
+ </div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-6">
<button type="submit" class="btn btn-primary"><i class="fa fa-save icon-embed-btn"></i><?=gettext('Save')?></button>
- <button id="clearall" type="button" class="btn btn-info"><i class="fa fa-undo icon-embed-btn"></i><?=gettext('Clear')?></button>
+ <button id="showallservices" type="button" class="btn btn-info"><i class="fa fa-undo icon-embed-btn"></i><?=gettext('All')?></button>
</div>
</div>
</form>
<script>
//<![CDATA[
-events.push(function(){
- $("select[multiple] option").mousedown(function(){
- var $self = $(this);
+ events.push(function(){
+ $("#showallservices").click(function() {
+ $("[id^=show]").each(function() {
+ $(this).prop("checked", true);
+ });
+ });
- if ($self.prop("selected"))
- $self.prop("selected", false);
- else
- $self.prop("selected", true);
-
- return false;
});
-
- $("#clearall").click(function() {
- $('select#servicestatusfilter option').removeAttr("selected");
- });
-});
//]]>
</script>
OpenPOWER on IntegriCloud