diff options
author | jim-p <jimp@pfsense.org> | 2012-08-10 11:48:09 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-08-10 11:48:09 -0400 |
commit | 76692ad2a13c455128d9f51d78c5f0d2062d4267 (patch) | |
tree | 8ebf14d3cd0e2d8e68614b9d49b273e245d47b88 /usr/local | |
parent | b1460af34a50e85a055f228ba281307c80e3cd78 (diff) | |
download | pfsense-76692ad2a13c455128d9f51d78c5f0d2062d4267.zip pfsense-76692ad2a13c455128d9f51d78c5f0d2062d4267.tar.gz |
Start revamp of shortcuts, central file to hold links, also service status/control, added to dns forwarder as example.
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/diag_logs_resolver.php | 2 | ||||
-rwxr-xr-x | usr/local/www/fbegin.inc | 21 | ||||
-rwxr-xr-x | usr/local/www/services_dnsmasq.php | 2 | ||||
-rwxr-xr-x | usr/local/www/services_dnsmasq_domainoverride_edit.php | 2 | ||||
-rwxr-xr-x | usr/local/www/services_dnsmasq_edit.php | 2 | ||||
-rw-r--r-- | usr/local/www/shortcuts.inc | 158 |
6 files changed, 181 insertions, 6 deletions
diff --git a/usr/local/www/diag_logs_resolver.php b/usr/local/www/diag_logs_resolver.php index 4fd7abb..dc8a2ba 100755 --- a/usr/local/www/diag_logs_resolver.php +++ b/usr/local/www/diag_logs_resolver.php @@ -45,6 +45,8 @@ require("guiconfig.inc"); +$shortcut_section = "resolver"; + $system_logfile = "{$g['varlog_path']}/resolver.log"; $nentries = $config['syslog']['nentries']; diff --git a/usr/local/www/fbegin.inc b/usr/local/www/fbegin.inc index 1fa9a18..cc205cd 100755 --- a/usr/local/www/fbegin.inc +++ b/usr/local/www/fbegin.inc @@ -13,6 +13,8 @@ if (self === top) { var antiClickjack = document.getElementById("antiClickjack") require_once("globals.inc"); require_once("functions.inc"); +require_once("shortcuts.inc"); +require_once("service-utils.inc"); /* $Id$ */ @@ -380,19 +382,26 @@ function add_to_menu($url, $name) { if (isAllowedPage($url)) echo "<li><a href=\"{$url}\" class=\"navlnk\">{$name}</a></li>\n"; } + ?> <div> <span class="pgtitle"><a href="<?= $_SERVER['SCRIPT_NAME'] ?>"><?=genhtmltitle($pgtitle);?></a></span> -<span style="float:right; margin: 0 0 20px 20px;"> -<?php if(! empty($statusurl)): ?> -<a href="<?php echo $statusurl; ?>" title="<?php echo gettext("Status of items on this page."); ?>"><img src="/themes/<?php echo $g['theme']; ?>/images/status.png" border="0"></a> +<span style="float:right; margin: 0 0 20px 20px"> +<?php +if (!$hide_service_status && !empty($shortcuts[$shortcut_section]['service'])) { + $ssvc = find_service_by_name($shortcuts[$shortcut_section]['service']); + echo get_service_status_icon($ssvc, false); + echo get_service_control_links($ssvc); +} ?> +<?php if(!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['status'])): ?> +<a href="<?php echo $shortcuts[$shortcut_section]['status']; ?>" title="<?php echo gettext("Status of items on this page."); ?>"><img style="vertical-align:middle" src="/themes/<?php echo $g['theme']; ?>/images/status.png" border="0"></a> <?php endif; ?> -<?php if(! empty($logurl)): ?> -<a href="<?php echo $logurl; ?>" title="<?php echo gettext("Log entries for items on this page."); ?>"><img src="/themes/<?php echo $g['theme']; ?>/images/log.png" border="0"></a> +<?php if(!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['log'])): ?> +<a href="<?php echo $shortcuts[$shortcut_section]['log']; ?>" title="<?php echo gettext("Log entries for items on this page."); ?>"><img style="vertical-align:middle" src="/themes/<?php echo $g['theme']; ?>/images/log.png" border="0"></a> <?php endif; ?> <?php if(! $g['disablehelpicon']): ?> -<a href="<?php echo $helpurl; ?>" title="<?php echo gettext("Help for items on this page."); ?>"><img src="/themes/<?php echo $g['theme']; ?>/images/help.png" border="0"></a> +<a href="<?php echo $helpurl; ?>" title="<?php echo gettext("Help for items on this page."); ?>"><img style="vertical-align:middle" src="/themes/<?php echo $g['theme']; ?>/images/help.png" border="0"></a> <?php endif; ?> </span> </div> diff --git a/usr/local/www/services_dnsmasq.php b/usr/local/www/services_dnsmasq.php index 736be45..e4f1f5b 100755 --- a/usr/local/www/services_dnsmasq.php +++ b/usr/local/www/services_dnsmasq.php @@ -44,6 +44,8 @@ require_once("functions.inc"); require_once("filter.inc"); require_once("shaper.inc"); +$shortcut_section = "resolver"; + $pconfig['enable'] = isset($config['dnsmasq']['enable']); $pconfig['regdhcp'] = isset($config['dnsmasq']['regdhcp']); $pconfig['regdhcpstatic'] = isset($config['dnsmasq']['regdhcpstatic']); diff --git a/usr/local/www/services_dnsmasq_domainoverride_edit.php b/usr/local/www/services_dnsmasq_domainoverride_edit.php index dd2c403..49b16ff 100755 --- a/usr/local/www/services_dnsmasq_domainoverride_edit.php +++ b/usr/local/www/services_dnsmasq_domainoverride_edit.php @@ -40,6 +40,8 @@ require("guiconfig.inc"); +$shortcut_section = "resolver"; + if (!is_array($config['dnsmasq']['domainoverrides'])) { $config['dnsmasq']['domainoverrides'] = array(); } diff --git a/usr/local/www/services_dnsmasq_edit.php b/usr/local/www/services_dnsmasq_edit.php index 56ad988..e50ac7f 100755 --- a/usr/local/www/services_dnsmasq_edit.php +++ b/usr/local/www/services_dnsmasq_edit.php @@ -39,6 +39,8 @@ ##|*MATCH=services_dnsmasq_edit.php* ##|-PRIV +$shortcut_section = "resolver"; + function hostcmp($a, $b) { return strcasecmp($a['host'], $b['host']); } diff --git a/usr/local/www/shortcuts.inc b/usr/local/www/shortcuts.inc new file mode 100644 index 0000000..8abfa94 --- /dev/null +++ b/usr/local/www/shortcuts.inc @@ -0,0 +1,158 @@ +<?php +$shortcuts['relayd']['log'] = "diag_logs_relayd.php"; +$shortcuts['relayd']['status'] = "status_lb_pool.php"; +$shortcuts['relayd']['service'] = "relayd"; + +$shortcuts['relayd-virtualservers']['log'] = "diag_logs_relayd.php"; +$shortcuts['relayd-virtualservers']['status'] = "status_lb_vs.php"; +$shortcuts['relayd']['service'] = "relayd"; + +$shortcuts['captiveportal']['log'] = "diag_logs_auth.php"; +$shortcuts['captiveportal']['status'] = "status_captiveportal.php"; +$shortcuts['captiveportal']['service'] = "captiveportal"; +$shortcuts['captiveportal-vouchers']['log'] = "diag_logs_auth.php"; +$shortcuts['captiveportal-vouchers']['status'] = "status_captiveportal_vouchers.php"; +$shortcuts['captiveportal-vouchers']['service'] = "captiveportal"; + +$shortcuts['dhcp']['log'] = "diag_logs_dhcp.php"; +$shortcuts['dhcp']['status'] = "status_dhcp_leases.php"; +$shortcuts['dhcp']['service'] = "dhcpd"; + +$shortcuts['dhcp6']['log'] = "diag_logs_dhcp.php"; +$shortcuts['dhcp6']['status'] = "status_dhcpv6_leases.php"; + +$shortcuts['ipsec']['log'] = "diag_logs_ipsec.php"; +$shortcuts['ipsec']['status'] = "diag_ipsec.php"; +$shortcuts['ipsec']['service'] = "racoon"; + +$shortcuts['openvpn']['log'] = "diag_logs_openvpn.php"; +$shortcuts['openvpn']['status'] = "status_openvpn.php"; +$shortcuts['openvpn']['service'] = "openvpn"; + +$shortcuts['firewall']['log'] = "diag_logs_filter.php"; +$shortcuts['firewall']['status'] = "status_filter_reload.php"; + +$shortcuts['routing']['log'] = "diag_logs_routing.php"; +$shortcuts['routing']['status'] = "diag_routes.php"; + +$shortcuts['gateways']['log'] = "diag_logs_gateways.php"; +$shortcuts['gateways']['status'] = "status_gateways.php"; +$shortcuts['gateway-groups']['log'] = "diag_logs_gateways.php"; +$shortcuts['gateway-groups']['status'] = "status_gateway_groups.php"; + +$shortcuts['interfaces']['status'] = "status_interfaces.php"; + +$shortcuts['trafficshaper']['status'] = "status_queues.php"; + +$shortcuts['resolver']['log'] = "diag_logs_resolver.php"; +$shortcuts['resolver']['service'] = "dnsmasq"; + +$shortcuts['wireless']['log'] = "diag_logs_wireless.php"; +$shortcuts['wireless']['status'] = "status_wireless.php"; + +$shortcuts['ntp']['log'] = "diag_logs_ntpd.php"; +$shortcuts['ntp']['status'] = "status_ntpd.php"; +$shortcuts['ntp']['service'] = "ntpd"; + +$shortcuts['upnp']['status'] = "status_upnp.php"; +$shortcuts['upnp']['service'] = "miniupnpd"; + +$shortcuts['pptps']['log'] = "diag_logs_vpn.php"; + +$shortcuts['pppoes']['log'] = "diag_logs_vpn.php?vpntype=poes"; + +$shortcuts['l2tps']['log'] = "diag_logs_vpn.php?vpntype=l2tp"; + +$shortcuts['carp']['status'] = "carp_status.php"; + + +/* +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal.php +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal_filemanager.php +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal_hostname.php +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal_hostname_edit.php +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal_ip.php +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal_ip_edit.php +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal_mac.php +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal_mac_edit.php +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal_vouchers.php +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal_vouchers_edit.php +$logurl = "diag_logs_auth.php"; - usr/local/www/services_captiveportal_zones_edit.php +$logurl = "diag_logs_dhcp.php"; - usr/local/www/services_dhcp.php +$logurl = "diag_logs_dhcp.php"; - usr/local/www/services_dhcp_edit.php +$logurl = "diag_logs_dhcp.php"; - usr/local/www/services_dhcpv6.php +$logurl = "diag_logs_dhcp.php"; - usr/local/www/services_dhcpv6_edit.php +$logurl = "diag_logs_filter.php"; - usr/local/www/firewall_rules.php +$logurl = "diag_logs_filter.php"; - usr/local/www/firewall_rules_edit.php +$logurl = "diag_logs_ipsec.php"; - usr/local/www/vpn_ipsec.php +$logurl = "diag_logs_ipsec.php"; - usr/local/www/vpn_ipsec_keys.php +$logurl = "diag_logs_ipsec.php"; - usr/local/www/vpn_ipsec_keys_edit.php +$logurl = "diag_logs_ipsec.php"; - usr/local/www/vpn_ipsec_mobile.php +$logurl = "diag_logs_ipsec.php"; - usr/local/www/vpn_ipsec_phase1.php +$logurl = "diag_logs_ipsec.php"; - usr/local/www/vpn_ipsec_phase2.php +$logurl = "diag_logs_openvpn.php"; - usr/local/www/vpn_openvpn_client.php +$logurl = "diag_logs_openvpn.php"; - usr/local/www/vpn_openvpn_csc.php +$logurl = "diag_logs_openvpn.php"; - usr/local/www/vpn_openvpn_server.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_monitor.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_monitor_edit.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_pool.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_pool_edit.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_relay_action.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_relay_action_edit.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_relay_protocol.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_relay_protocol_edit.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_setting.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_virtual_server.php +$logurl = "diag_logs_relayd.php"; - usr/local/www/load_balancer_virtual_server_edit.php +$statusurl = "diag_ipsec.php"; - usr/local/www/vpn_ipsec.php +$statusurl = "diag_ipsec.php"; - usr/local/www/vpn_ipsec_keys.php +$statusurl = "diag_ipsec.php"; - usr/local/www/vpn_ipsec_keys_edit.php +$statusurl = "diag_ipsec.php"; - usr/local/www/vpn_ipsec_mobile.php +$statusurl = "diag_ipsec.php"; - usr/local/www/vpn_ipsec_phase1.php +$statusurl = "diag_ipsec.php"; - usr/local/www/vpn_ipsec_phase2.php +$statusurl = "diag_routes.php"; - usr/local/www/system_routes.php +$statusurl = "status_captiveportal.php"; - usr/local/www/services_captiveportal.php +$statusurl = "status_captiveportal.php"; - usr/local/www/services_captiveportal_filemanager.php +$statusurl = "status_captiveportal.php"; - usr/local/www/services_captiveportal_hostname.php +$statusurl = "status_captiveportal.php"; - usr/local/www/services_captiveportal_hostname_edit.php +$statusurl = "status_captiveportal.php"; - usr/local/www/services_captiveportal_ip.php +$statusurl = "status_captiveportal.php"; - usr/local/www/services_captiveportal_ip_edit.php +$statusurl = "status_captiveportal.php"; - usr/local/www/services_captiveportal_mac.php +$statusurl = "status_captiveportal.php"; - usr/local/www/services_captiveportal_mac_edit.php +$statusurl = "status_captiveportal_vouchers.php"; - usr/local/www/services_captiveportal_vouchers.php +$statusurl = "status_captiveportal_vouchers.php"; - usr/local/www/services_captiveportal_vouchers_edit.php +$statusurl = "status_captiveportal_zones_edit.php"; - usr/local/www/services_captiveportal_zones_edit.php +$statusurl = "status_dhcp_leases.php"; - usr/local/www/services_dhcp.php +$statusurl = "status_dhcp_leases.php"; - usr/local/www/services_dhcp_edit.php +$statusurl = "status_dhcpv6_leases.php"; - usr/local/www/services_dhcpv6.php +$statusurl = "status_dhcpv6_leases.php"; - usr/local/www/services_dhcpv6_edit.php +$statusurl = "status_filter_reload.php"; - usr/local/www/firewall_rules.php +$statusurl = "status_filter_reload.php"; - usr/local/www/firewall_rules_edit.php +$statusurl = "status_gateway_groups.php"; - usr/local/www/system_gateway_groups.php +$statusurl = "status_gateway_groups.php"; - usr/local/www/system_gateway_groups_edit.php +$statusurl = "status_gateways.php"; - usr/local/www/system_gateways.php +$statusurl = "status_gateways.php"; - usr/local/www/system_gateways_edit.php +$statusurl = "status_interfaces.php"; - usr/local/www/interfaces.php +$statusurl = "status_interfaces.php"; - usr/local/www/interfaces_assign.php +$statusurl = "status_lb_pool.php"; - usr/local/www/load_balancer_monitor.php +$statusurl = "status_lb_pool.php"; - usr/local/www/load_balancer_monitor_edit.php +$statusurl = "status_lb_pool.php"; - usr/local/www/load_balancer_pool.php +$statusurl = "status_lb_pool.php"; - usr/local/www/load_balancer_pool_edit.php +$statusurl = "status_lb_pool.php"; - usr/local/www/load_balancer_relay_action.php +$statusurl = "status_lb_pool.php"; - usr/local/www/load_balancer_relay_action_edit.php +$statusurl = "status_lb_pool.php"; - usr/local/www/load_balancer_relay_protocol.php +$statusurl = "status_lb_pool.php"; - usr/local/www/load_balancer_relay_protocol_edit.php +$statusurl = "status_lb_pool.php"; - usr/local/www/load_balancer_setting.php +$statusurl = "status_lb_vs.php"; - usr/local/www/load_balancer_virtual_server.php +$statusurl = "status_lb_vs.php"; - usr/local/www/load_balancer_virtual_server_edit.php +$statusurl = "status_openvpn.php"; - usr/local/www/vpn_openvpn_client.php +$statusurl = "status_openvpn.php"; - usr/local/www/vpn_openvpn_csc.php +$statusurl = "status_openvpn.php"; - usr/local/www/vpn_openvpn_server.php +$statusurl = "status_queues.php"; - usr/local/www/firewall_shaper.php +$statusurl = "status_queues.php"; - usr/local/www/firewall_shaper_layer7.php +$statusurl = "status_queues.php"; - usr/local/www/firewall_shaper_queues.php +$statusurl = "status_queues.php"; - usr/local/www/firewall_shaper_vinterface.php +$statusurl = "status_queues.php"; - usr/local/www/firewall_shaper_wizards.php + +*/ +?>
\ No newline at end of file |