diff options
author | PiBa-NL <pba_2k3@yahoo.com> | 2014-02-16 21:04:47 +0100 |
---|---|---|
committer | PiBa-NL <pba_2k3@yahoo.com> | 2014-02-16 21:07:44 +0100 |
commit | b07bce1a7b918ade438851b60a25372abdef7908 (patch) | |
tree | 95c030d7bdf5c171aab58f9a92e92a5394262ed1 /config/haproxy-devel/pkg_haproxy_tabs.inc | |
parent | 085d9fbf916b389037799bd74fa10e1da3c60f27 (diff) | |
download | pfsense-packages-b07bce1a7b918ade438851b60a25372abdef7908.tar.gz pfsense-packages-b07bce1a7b918ade438851b60a25372abdef7908.tar.bz2 pfsense-packages-b07bce1a7b918ade438851b60a25372abdef7908.zip |
haproxy-devel, integrated stats page with stick-table info WebGUI
Diffstat (limited to 'config/haproxy-devel/pkg_haproxy_tabs.inc')
-rw-r--r-- | config/haproxy-devel/pkg_haproxy_tabs.inc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/config/haproxy-devel/pkg_haproxy_tabs.inc b/config/haproxy-devel/pkg_haproxy_tabs.inc new file mode 100644 index 00000000..8cb280f8 --- /dev/null +++ b/config/haproxy-devel/pkg_haproxy_tabs.inc @@ -0,0 +1,25 @@ +<?php + +//require_once("guiconfig.inc"); DO NOT REQUIRE THIS! + +// DO NOT REQUIRE guiconfig.inc HERE! though it contains the function display_top_tabs needed below. +// however if included it will hang filter rule generation, and might cause pf to not load any rules. +// This happens when /usr/local/pkg/*.inc files are dynamically loaded during package generation from filter.inc with function discover_pkg_rules(x). + +global $haproxy_tab_array; + +$haproxy_tab_array['haproxy'] = array(); +$haproxy_tab_array['haproxy']['settings'] = Array(name => "Settings", url => "haproxy_global.php"); +$haproxy_tab_array['haproxy']['frontend'] = Array(name => "Frontend", url => "haproxy_listeners.php"); +$haproxy_tab_array['haproxy']['backend'] = Array(name => "Backend", url => "haproxy_pools.php"); +$haproxy_tab_array['haproxy']['stats'] = Array(name => "Stats", url => "haproxy_stats.php"); + +function haproxy_display_top_tabs_active($top_tabs, $activetab) { + $tab_array = array(); + foreach($top_tabs as $key => $tab_item){ + $tab_array[] = array($tab_item['name'], $key == $activetab, $tab_item['url']); + } + display_top_tabs($tab_array); +} + +?> |