diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-09-09 13:19:23 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-09-09 13:19:23 -0400 |
commit | 239b51616c206f89fe727f062fcb0ad748cd855a (patch) | |
tree | fac31e33fbeff8478c22a415095e8bd64280a7c9 | |
parent | 309e8f8f08b23eacbd40f6f99572d7116124f1d7 (diff) | |
download | pfsense-239b51616c206f89fe727f062fcb0ad748cd855a.zip pfsense-239b51616c206f89fe727f062fcb0ad748cd855a.tar.gz |
firewall_asliases_edit: minor edits to display hint text on page load
head.inc: Fixes to notification system
pkg_mgr: Removed calls to dicontinued function. Removed obsolete table columns, corrected description display
-rwxr-xr-x | src/usr/local/www/firewall_aliases_edit.php | 35 | ||||
-rwxr-xr-x | src/usr/local/www/head.inc | 17 | ||||
-rw-r--r-- | src/usr/local/www/pkg_mgr.php | 113 |
3 files changed, 98 insertions, 67 deletions
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php index 90c00b9..8aecd17 100755 --- a/src/usr/local/www/firewall_aliases_edit.php +++ b/src/usr/local/www/firewall_aliases_edit.php @@ -880,10 +880,30 @@ events.push(function(){ setMasks(); } + function typechange() { + var tab = $('#type').find('option:selected').val(); + $("[id^='address_subnet']").prop("disabled", (tab == 'host') || (tab == 'port') || (tab == 'url') || (tab == 'url_ports')); + + // Set the help text to match the tab + var helparray = <?php echo json_encode($help); ?>; + $('.helptext').html(helparray[tab]); + + // Set the section heading by tab type + var sectionstr = <?php echo json_encode($section_str); ?>; + $('.panel-title:last').text(sectionstr[tab]); + + // Set the input field label by tab + var labelstr = <?php echo json_encode($label_str); ?>; + $('.repeatable:first').find('label').text(labelstr[tab]); + } + // These are action buttons, not submit buttons $('[id^=addrow]').prop('type','button'); $('[id^=delete]').prop('type','button'); + // On load . . + typechange(); + // on click . . $('[id^=addrow]').click(function() { add_row(); @@ -899,20 +919,7 @@ events.push(function(){ }); $('#type').on('change', function() { - var tab = $(this).find('option:selected').val(); - $("[id^='address_subnet']").prop("disabled", (tab == 'host') || (tab == 'port') || (tab == 'url') || (tab == 'url_ports')); - - // Set the help text to match the tab - var helparray = <?php echo json_encode($help); ?>; - $('.helptext').html(helparray[tab]); - - // Set the section heading by tab type - var sectionstr = <?php echo json_encode($section_str); ?>; - $('.panel-title:last').text(sectionstr[tab]); - - // Set the input field label by tab - var labelstr = <?php echo json_encode($label_str); ?>; - $('.repeatable:first').find('label').text(labelstr[tab]); + typechange(); }); // Disable address_subnet if type == 'host' diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc index 75b9ee5..7dcb413 100755 --- a/src/usr/local/www/head.inc +++ b/src/usr/local/www/head.inc @@ -42,6 +42,7 @@ if (empty($uri_split[0])) { } else { $pagename = $uri_split[1]; } + /* If the page name is still empty, the user must have requested / (index.php) */ if (empty($pagename)) { $pagename = "index.php"; @@ -164,6 +165,7 @@ $services_menu[] = array(gettext("DNS Forwarder"), "/services_dnsmasq.php"); $services_menu[] = array(gettext("DNS Resolver"), "/services_unbound.php"); $services_menu[] = array(gettext("DHCP Relay"), "/services_dhcp_relay.php"); $services_menu[] = array(gettext("DHCPv6 Relay"), "/services_dhcpv6_relay.php"); + if ($g['services_dhcp_server_enable']) { $services_menu[] = array(gettext("DHCP Server"), "/services_dhcp.php"); $services_menu[] = array(gettext("DHCPv6 Server/RA"), "/services_dhcpv6.php"); @@ -174,12 +176,14 @@ $services_menu[] = array(gettext("Load Balancer"), "/load_balancer_pool.php"); $services_menu[] = array(gettext("NTP"), "/services_ntpd.php"); $services_menu[] = array(gettext("PPPoE Server"), "/vpn_pppoe.php"); $services_menu[] = array(gettext("SNMP"), "/services_snmp.php"); + if (count($config['interfaces']) > 1) { /* no use for UPnP in single-interface deployments remove to reduce user confusion */ $services_menu[] = array(gettext("UPnP & NAT-PMP"), "/pkg_edit.php?xml=miniupnpd.xml"); } + $services_menu[] = array(gettext("Wake on LAN"), "/services_wol.php"); $services_menu = msort(array_merge($services_menu, return_ext_menu("Services")), 0); @@ -196,6 +200,7 @@ $status_menu = array(); if (count($config['captiveportal']) > 0) { $status_menu[] = array(gettext("Captive Portal"), "/status_captiveportal.php"); } + $status_menu[] = array(gettext("CARP (failover)"), "/carp_status.php"); $status_menu[] = array(gettext("Dashboard"), "/index.php"); $status_menu[] = array(gettext("Gateways"), "/status_gateways.php"); @@ -207,17 +212,21 @@ $status_menu[] = array(gettext("IPsec"), "/diag_ipsec.php"); $status_menu[] = array(gettext("Load Balancer"), "/status_lb_pool.php"); $status_menu[] = array(gettext("NTP"), "/status_ntpd.php"); $status_menu[] = array(gettext("OpenVPN"), "/status_openvpn.php"); + if ($g['platform'] == "pfSense") { $status_menu[] = array(gettext("Package Logs"), "/diag_pkglogs.php"); } + $status_menu[] = array(gettext("Queues"), "/status_queues.php"); $status_menu[] = array(gettext("RRD Graphs"), "/status_rrd_graph.php"); $status_menu[] = array(gettext("Services"), "/status_services.php"); $status_menu[] = array(gettext("System Logs"), "/diag_logs.php"); $status_menu[] = array(gettext("Traffic Graph"), "/status_graph.php?if=wan"); + if (count($config['interfaces']) > 1) { $status_menu[] = array(gettext("UPnP & NAT-PMP"), "/status_upnp.php"); } + $ifentries = get_configured_interface_with_descr(); foreach ($ifentries as $ent => $entdesc) { if (is_array($config['interfaces'][$ent]['wireless']) && @@ -225,9 +234,11 @@ foreach ($ifentries as $ent => $entdesc) { $wifdescrs[$ent] = $entdesc; } } + if (count($wifdescrs) > 0) { $status_menu[] = array(gettext("Wireless"), "/status_wireless.php"); } + $status_menu = msort(array_merge($status_menu, return_ext_menu("Status")), 0); // Diagnostics @@ -239,9 +250,11 @@ $diagnostics_menu[] = array(gettext("Command Prompt"), "/exec.php"); $diagnostics_menu[] = array(gettext("DNS Lookup"), "/diag_dns.php"); $diagnostics_menu[] = array(gettext("Edit File"), "/edit.php"); $diagnostics_menu[] = array(gettext("Factory Defaults"), "/diag_defaults.php"); + if (file_exists("/var/run/gmirror_active")) { $diagnostics_menu[] = array(gettext("GEOM Mirrors"), "/diag_gmirror.php"); } + $diagnostics_menu[] = array(gettext("Halt System"), "/halt.php"); $diagnostics_menu[] = array(gettext("Limiter Info"), "/diag_limiter_info.php"); $diagnostics_menu[] = array(gettext("NDP Table"), "/diag_ndp.php"); @@ -259,12 +272,15 @@ $diagnostics_menu[] = array(gettext("States Summary"), "/diag_states_summary.php $diagnostics_menu[] = array(gettext("System Activity"), "/diag_system_activity.php"); $diagnostics_menu[] = array(gettext("Traceroute"), "/diag_traceroute.php"); $diagnostics_menu[] = array(gettext("Packet Capture"), "/diag_packet_capture.php"); + if ($g['platform'] == "nanobsd") { $diagnostics_menu[] = array(gettext("NanoBSD"), "/diag_nanobsd.php"); } + if (isset($config['system']['developer'])) { $diagnostics_menu[] = array(gettext("Restart HTTPD"), "/restart_httpd.php", "style" => "font-weight: bold; color: yellow;"); } + $diagnostics_menu = msort(array_merge($diagnostics_menu, return_ext_menu("Diagnostics")), 0); $gold_menu = array(); @@ -277,6 +293,7 @@ if (!$g['disablehelpmenu']) { if ($g['product_name'] == "pfSense") { $help_menu[] = array(gettext("Bug Database"), "https://www.pfsense.org/j.php?jumpto=redmine"); } + $help_menu[] = array(gettext("User Forum"), "https://www.pfsense.org/j.php?jumpto=forum"); $help_menu[] = array(gettext("Documentation"), "https://www.pfsense.org/j.php?jumpto=doc"); $help_menu[] = array(gettext("Developers Wiki"), "https://www.pfsense.org/j.php?jumpto=devwiki"); diff --git a/src/usr/local/www/pkg_mgr.php b/src/usr/local/www/pkg_mgr.php index aa0ee0f..f23d981 100644 --- a/src/usr/local/www/pkg_mgr.php +++ b/src/usr/local/www/pkg_mgr.php @@ -2,36 +2,62 @@ /* $Id$ */ /* pkg_mgr.php - Copyright (C) 2013-2015 Electric Sheep Fencing, LP - Copyright (C) 2004-2012 Scott Ullrich <sullrich@gmail.com> - Copyright (C) 2013 Marcello Coutinho - - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, - INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. */ +/* ==================================================================== + * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved. + * Copyright (c) 2004, 2005 Scott Ullrich + * Copyright (c) 2013 Marcello Coutinho + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgment: + * "This product includes software developed by the pfSense Project + * for use in the pfSense software distribution. (http://www.pfsense.org/). + * + * 4. The names "pfSense" and "pfSense Project" must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * coreteam@pfsense.org. + * + * 5. Products derived from this software may not be called "pfSense" + * nor may "pfSense" appear in their names without prior written + * permission of the Electric Sheep Fencing, LLC. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * + * "This product includes software developed by the pfSense Project + * for use in the pfSense software distribution (http://www.pfsense.org/). + * + * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ==================================================================== + * + */ /* pfSense_BUILDER_BINARIES: /sbin/ifconfig - pfSense_MODULE: pkgs + pfSense_MODULE: pkgs */ ##|+PRIV @@ -121,7 +147,6 @@ if($pkg_info) { $categories=array(); if(is_array($pkg_keys)) { foreach($pkg_keys as $key) { - if (!package_skip_tests($pkg_info[$key],$requested_version)) $categories[$pkg_info[$key]['category']]++; } } @@ -166,14 +191,10 @@ if(!$pkg_info || !is_array($pkg_keys)):?> <thead> <tr> <th><?=gettext("Name")?></th> -<?php if ($show_category):?> - <th><?=gettext("Category")?></th> -<?php endif;?> - <th><?=gettext("Status")?></th> <?php if (!$g['disablepackagehistory']):?> <th><?=gettext("Version")?></th> <?php endif;?> - <th><?=gettext("Platform")?></th> + <th><?=gettext("Description")?></th> </tr> </thead> @@ -181,11 +202,10 @@ if(!$pkg_info || !is_array($pkg_keys)):?> <?php foreach($pkg_keys as $key): $index = &$pkg_info[$key]; - if(get_pkg_id($index['name']) >= 0 ) - continue; - if (package_skip_tests($index,$requested_version)) + if(get_pkg_id($index['name']) >= 0 ) continue; + continue; /* get history/changelog git dir */ $commit_dir=explode("/",$index['config_file']); @@ -200,20 +220,13 @@ if(!$pkg_info || !is_array($pkg_keys)):?> ?> <tr> <td> -<?php if ($index['website']):?> - <a title="<?=gettext("Visit official website")?>" target="_blank" href="<?=htmlspecialchars($index['website'])?>"> +<?php if ($index['www']):?> + <a title="<?=gettext("Visit official website")?>" target="_blank" href="<?=htmlspecialchars($index['www'])?>"> <?php endif; ?> <?=htmlspecialchars($index['name'])?> </a> </td> -<?php if ($show_category):?> - <td> - <?=gettext($index['category'])?> - </td> -<?php endif;?> - <td> - <?=ucfirst(strtolower($index['status']))?> - </td> + <?php if (!$g['disablepackagehistory']):?> <td> <a target="_blank" title="<?=gettext("View changelog")?>" href="<?=htmlspecialchars($changeloglink)?>"> @@ -222,13 +235,7 @@ if(!$pkg_info || !is_array($pkg_keys)):?> </td> <?php endif;?> <td> - <?=$index['required_version']?> - <?php if ($index['maximum_version']):?> - (< $index['maximum_version']) - <?php endif;?> - </td> - <td> - <?=$index['descr']?> + <?=$index['desc']?> </td> <td> <a title="<?=gettext("Click to install")?>" href="pkg_mgr_install.php?id=<?=$index['name']?>" class="btn btn-success">install</a> |