Commit 63403a98 authored by Franco Fichtner's avatar Franco Fichtner

menu: more flattening in status section (almost done)

parent 52d74d1b
...@@ -60,7 +60,6 @@ ...@@ -60,7 +60,6 @@
<PortalAuth url="/diag_logs_auth.php"/> <PortalAuth url="/diag_logs_auth.php"/>
<PPP url="/diag_logs_ppp.php"/> <PPP url="/diag_logs_ppp.php"/>
<VPN url="/diag_logs_vpn.php*"/> <VPN url="/diag_logs_vpn.php*"/>
<LoadBalancer url="/diag_logs_relayd.php"/>
<OpenVPN url="/diag_logs_openvpn.php"/> <OpenVPN url="/diag_logs_openvpn.php"/>
<Proxy url="/diag_logs_proxy.php"> <Proxy url="/diag_logs_proxy.php">
<ProxyActions url="/diag_logs_proxy.php?*"/> <ProxyActions url="/diag_logs_proxy.php?*"/>
...@@ -218,12 +217,20 @@ ...@@ -218,12 +217,20 @@
<IGMPProxy VisibleName="IGMP Proxy" url="/services_igmpproxy.php"> <IGMPProxy VisibleName="IGMP Proxy" url="/services_igmpproxy.php">
<IGMPProxyEdit url="/services_igmpproxy_edit.php"/> <IGMPProxyEdit url="/services_igmpproxy_edit.php"/>
</IGMPProxy> </IGMPProxy>
<LoadBalancer VisibleName="Load Balancer" url="/load_balancer_pool.php"> <LoadBalancer VisibleName="Load Balancer" cssClass="fa fa-truck">
<Monitors url="/load_balancer_monitor.php">
<Edit url="/load_balancer_monitor_edit.php*"/>
</Monitors>
<PoolSetup VisibleName="Pool Setup" url="/load_balancer_pool.php">
<Edit url="/load_balancer_pool_edit.php"/> <Edit url="/load_balancer_pool_edit.php"/>
<VirtualServer url="/load_balancer_virtual_server.php"/> </PoolSetup>
<VirtualServerEdit url="/load_balancer_virtual_server_edit.php"/> <PoolStatus VisibleName="Pool Status" url="/status_lb_pool.php"/>
<Monitors url="/load_balancer_monitor.php"/>
<Settings url="/load_balancer_setting.php"/> <Settings url="/load_balancer_setting.php"/>
<Log VisibleName="Log File" url="/diag_logs_relayd.php"/>
<VirtualServer VisibleName="Virtual Server Setup" url="/load_balancer_virtual_server.php">
<Edit url="/load_balancer_virtual_server_edit.php"/>
</VirtualServer>
<VirtualServerStatus VisibleName="Virtual Server Status" url="/status_lb_vs.php"/>
</LoadBalancer> </LoadBalancer>
<NTP VisibleName="Network Time Protocol" cssClass="fa fa-clock-o"> <NTP VisibleName="Network Time Protocol" cssClass="fa fa-clock-o">
<General url="/services_ntpd.php"/> <General url="/services_ntpd.php"/>
...@@ -237,6 +244,9 @@ ...@@ -237,6 +244,9 @@
</PPPoEServer> </PPPoEServer>
<Proxy VisibleName="Proxy Server" url="/ui/proxy/"/> <Proxy VisibleName="Proxy Server" url="/ui/proxy/"/>
<SNMP VisibleName="SNMP" url="/services_snmp.php"/> <SNMP VisibleName="SNMP" url="/services_snmp.php"/>
<Status VisibleName="Status Overview" url="/status_services.php">
<ServicesActions url="/status_services.php?*"/>
</Status>
<UPnP VisibleName="Universal Plug and Play" cssClass="fa fa-plug"> <UPnP VisibleName="Universal Plug and Play" cssClass="fa fa-plug">
<Settings url="/services_upnp.php"> <Settings url="/services_upnp.php">
<Edit url="/services_upnp.php?*"/> <Edit url="/services_upnp.php?*"/>
...@@ -302,12 +312,6 @@ ...@@ -302,12 +312,6 @@
<DHCPv6Leases VisibleName="DHCP IPv6 Leases" url="/status_dhcpv6_leases.php"> <DHCPv6Leases VisibleName="DHCP IPv6 Leases" url="/status_dhcpv6_leases.php">
<DHCPv6LeasesDetails url="/status_dhcpv6_leases.php?*"/> <DHCPv6LeasesDetails url="/status_dhcpv6_leases.php?*"/>
</DHCPv6Leases> </DHCPv6Leases>
<LoadBalancer VisibleName="Load Balancer" url="/status_lb_pool.php">
<VirtualServers url="/status_lb_vs.php"/>
</LoadBalancer>
<Services url="/status_services.php">
<ServicesActions url="/status_services.php?*"/>
</Services>
</Status> </Status>
<Help order="8" cssClass="glyphicon glyphicon-question-sign"> <Help order="8" cssClass="glyphicon glyphicon-question-sign">
<AboutThisPage VisibleName="About this Page" url="/help.php" IsExternal="Y"/> <AboutThisPage VisibleName="About this Page" url="/help.php" IsExternal="Y"/>
......
...@@ -45,8 +45,9 @@ if ($_POST['clear']) { ...@@ -45,8 +45,9 @@ if ($_POST['clear']) {
clear_clog($relayd_logfile); clear_clog($relayd_logfile);
} }
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("Load Balancer")); $pgtitle = array(gettext('Services'), gettext('Load Balancer'), gettext('Log File'));
$shortcut_section = "relayd"; $shortcut_section = 'relayd';
include("head.inc"); include("head.inc");
?> ?>
...@@ -64,25 +65,17 @@ include("head.inc"); ...@@ -64,25 +65,17 @@ include("head.inc");
<section class="col-xs-12"> <section class="col-xs-12">
<? include('diag_logs_tabs.inc'); ?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<div class="container-fluid">
<p> <?php printf(gettext("Last %s Load Balancer log entries"),$nentries);?></p>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
<tr><td><strong><?= sprintf(gettext('Last %s Load Balancer log entries'), $nentries);?></strong></td></tr>
<?php dump_clog($relayd_logfile, $nentries); ?> <?php dump_clog($relayd_logfile, $nentries); ?>
</table> <tr><td>
</div>
<form action="diag_logs_relayd.php" method="post"> <form action="diag_logs_relayd.php" method="post">
<input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" /> <input name="clear" type="submit" class="btn" value="<?= gettext("Clear log");?>" />
</form> </form>
</td></tr>
</table>
</div> </div>
</div> </div>
</section> </section>
......
...@@ -34,7 +34,6 @@ $tab_array[] = array(gettext("DHCP"), $active_tab == "/diag_logs_dhcp.php", "dia ...@@ -34,7 +34,6 @@ $tab_array[] = array(gettext("DHCP"), $active_tab == "/diag_logs_dhcp.php", "dia
$tab_array[] = array(gettext("Portal Auth"), $active_tab == "/diag_logs_auth.php", "diag_logs_auth.php"); $tab_array[] = array(gettext("Portal Auth"), $active_tab == "/diag_logs_auth.php", "diag_logs_auth.php");
$tab_array[] = array(gettext("PPP"), $active_tab == "/diag_logs_ppp.php", "diag_logs_ppp.php"); $tab_array[] = array(gettext("PPP"), $active_tab == "/diag_logs_ppp.php", "diag_logs_ppp.php");
$tab_array[] = array(gettext("VPN"), $active_tab == "/diag_logs_vpn.php", "diag_logs_vpn.php"); $tab_array[] = array(gettext("VPN"), $active_tab == "/diag_logs_vpn.php", "diag_logs_vpn.php");
$tab_array[] = array(gettext("Load Balancer"), $active_tab == "/diag_logs_relayd.php", "diag_logs_relayd.php");
$tab_array[] = array(gettext("OpenVPN"), $active_tab == "/diag_logs_openvpn.php", "diag_logs_openvpn.php"); $tab_array[] = array(gettext("OpenVPN"), $active_tab == "/diag_logs_openvpn.php", "diag_logs_openvpn.php");
$tab_array[] = array(gettext("Proxy"), $active_tab == "/diag_logs_proxy.php", "diag_logs_proxy.php?type=cache"); $tab_array[] = array(gettext("Proxy"), $active_tab == "/diag_logs_proxy.php", "diag_logs_proxy.php?type=cache");
$tab_array[] = array(gettext("Settings"), $active_tab == "/diag_logs_settings.php", "diag_logs_settings.php"); $tab_array[] = array(gettext("Settings"), $active_tab == "/diag_logs_settings.php", "diag_logs_settings.php");
......
...@@ -74,8 +74,8 @@ if ($_GET['act'] == "del") { ...@@ -74,8 +74,8 @@ if ($_GET['act'] == "del") {
} }
} }
$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Monitor")); $pgtitle = array(gettext('Services'), gettext('Load Balancer'), gettext('Monitors'));
$shortcut_section = "relayd"; $shortcut_section = 'relayd';
include("head.inc"); include("head.inc");
...@@ -99,16 +99,6 @@ $main_buttons = array( ...@@ -99,16 +99,6 @@ $main_buttons = array(
<section class="col-xs-12"> <section class="col-xs-12">
<?php
/* active tabs */
$tab_array = array();
$tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
$tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
$tab_array[] = array(gettext("Monitors"), true, "load_balancer_monitor.php");
$tab_array[] = array(gettext("Settings"), false, "load_balancer_setting.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
......
...@@ -246,8 +246,8 @@ if ($_POST) { ...@@ -246,8 +246,8 @@ if ($_POST) {
} }
} }
$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Monitor"),gettext("Edit")); $pgtitle = array(gettext('Services'), gettext('Load Balancer'), gettext('Edit Monitor'));
$shortcut_section = "relayd"; $shortcut_section = 'relayd';
include("head.inc"); include("head.inc");
$types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => gettext("HTTP"), "https" => gettext("HTTPS"), "send" => gettext("Send/Expect")); $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => gettext("HTTP"), "https" => gettext("HTTPS"), "send" => gettext("Send/Expect"));
......
...@@ -84,8 +84,8 @@ for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) { ...@@ -84,8 +84,8 @@ for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$a_pool[$i]['monitor'] = "<a href=\"/load_balancer_monitor_edit.php?id={$mondex[$a_pool[$i]['monitor']]}\">{$a_pool[$i]['monitor']}</a>"; $a_pool[$i]['monitor'] = "<a href=\"/load_balancer_monitor_edit.php?id={$mondex[$a_pool[$i]['monitor']]}\">{$a_pool[$i]['monitor']}</a>";
} }
$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Pool")); $pgtitle = array(gettext('Services'), gettext('Load Balancer'),gettext('Pool Setup'));
$shortcut_section = "relayd"; $shortcut_section = 'relayd';
include("head.inc"); include("head.inc");
...@@ -111,16 +111,6 @@ $main_buttons = array( ...@@ -111,16 +111,6 @@ $main_buttons = array(
<section class="col-xs-12"> <section class="col-xs-12">
<?php
/* active tabs */
$tab_array = array();
$tab_array[] = array(gettext("Pools"), true, "load_balancer_pool.php");
$tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
$tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
$tab_array[] = array(gettext("Settings"), false, "load_balancer_setting.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<form action="load_balancer_pool.php" method="post" name="iform" id="iform"> <form action="load_balancer_pool.php" method="post" name="iform" id="iform">
...@@ -145,11 +135,9 @@ $main_buttons = array( ...@@ -145,11 +135,9 @@ $main_buttons = array(
$t->display(); $t->display();
?> ?>
</div> </div>
<div class="container-fluid"> <table class="table table-striped table-sort "><tbody><tr><td>
<br /><span class="red"><strong><?=gettext("Hint:");?></strong></span><br /> <?= sprintf(gettext('This feature is intended for server load balancing, not multi-WAN. For load balancing or failover for multiple WANs, use %sGateway Groups%s.'), '<a href="/system_gateway_groups.php">', '</a>'); ?>
<?= sprintf(gettext("The Load Balancer in %s is for server load balancing, not Multi-WAN. For load balancing or failover for multiple WANs, use "), $g['product_name']);?> </td></tr></tbody></table>
<a href="/system_gateway_groups.php"><?= gettext("Gateway Groups"); ?></a>
</div>
</form> </form>
</div> </div>
</section> </section>
......
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>. Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
...@@ -82,8 +83,8 @@ if ($_POST) { ...@@ -82,8 +83,8 @@ if ($_POST) {
} }
} }
$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Settings")); $pgtitle = array(gettext('Services'), gettext('Load Balancer'), gettext('Settings'));
$shortcut_section = "relayd"; $shortcut_section = 'relayd';
include("head.inc"); include("head.inc");
...@@ -104,16 +105,6 @@ include("head.inc"); ...@@ -104,16 +105,6 @@ include("head.inc");
<section class="col-xs-12"> <section class="col-xs-12">
<?php
/* active tabs */
$tab_array = array();
$tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
$tab_array[] = array(gettext("Virtual Servers"), false, "load_balancer_virtual_server.php");
$tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
$tab_array[] = array(gettext("Settings"), true, "load_balancer_setting.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
...@@ -123,7 +114,7 @@ include("head.inc"); ...@@ -123,7 +114,7 @@ include("head.inc");
<table class="table table-striped table-sort"> <table class="table table-striped table-sort">
<tr> <tr>
<td colspan="2" valign="top" class="listtopic"><?=gettext("Relayd global settings"); ?></td> <td colspan="2" valign="top" class="listtopic"><?=gettext("Global settings"); ?></td>
</tr> </tr>
<tr> <tr>
<td width="22%" valign="top" class="vncell"><?=gettext("timeout") ; ?></td> <td width="22%" valign="top" class="vncell"><?=gettext("timeout") ; ?></td>
......
...@@ -122,8 +122,8 @@ for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) { ...@@ -122,8 +122,8 @@ for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
} }
} }
$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Virtual Servers")); $pgtitle = array(gettext('Services'), gettext('Load Balancer'), gettext('Virtual Server Setup'));
$shortcut_section = "relayd-virtualservers"; $shortcut_section = 'relayd';
include("head.inc"); include("head.inc");
...@@ -148,16 +148,6 @@ $main_buttons = array( ...@@ -148,16 +148,6 @@ $main_buttons = array(
<section class="col-xs-12"> <section class="col-xs-12">
<?php
/* active tabs */
$tab_array = array();
$tab_array[] = array(gettext("Pools"), false, "load_balancer_pool.php");
$tab_array[] = array(gettext("Virtual Servers"), true, "load_balancer_virtual_server.php");
$tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
$tab_array[] = array(gettext("Settings"), false, "load_balancer_setting.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<form action="load_balancer_virtual_server.php" method="post" name="iform" id="iform"> <form action="load_balancer_virtual_server.php" method="post" name="iform" id="iform">
......
...@@ -29,9 +29,6 @@ ...@@ -29,9 +29,6 @@
*/ */
// On the page, add in like so:
// $shortcut_section = "relayd";
$shortcuts = array(); $shortcuts = array();
/* Load and process custom shortcuts. */ /* Load and process custom shortcuts. */
...@@ -132,17 +129,8 @@ $shortcuts['upnp']['service'] = "miniupnpd"; ...@@ -132,17 +129,8 @@ $shortcuts['upnp']['service'] = "miniupnpd";
$shortcuts['relayd'] = array(); $shortcuts['relayd'] = array();
$shortcuts['relayd']['main'] = "load_balancer_pool.php";
$shortcuts['relayd']['log'] = "diag_logs_relayd.php";
$shortcuts['relayd']['status'] = "status_lb_pool.php";
$shortcuts['relayd']['service'] = "relayd"; $shortcuts['relayd']['service'] = "relayd";
$shortcuts['relayd-virtualservers'] = array();
$shortcuts['relayd-virtualservers']['main'] = "load_balancer_virtual_server.php";
$shortcuts['relayd-virtualservers']['log'] = "diag_logs_relayd.php";
$shortcuts['relayd-virtualservers']['status'] = "status_lb_vs.php";
$shortcuts['relayd-virtualservers']['service'] = "relayd";
$shortcuts['dhcp'] = array(); $shortcuts['dhcp'] = array();
$shortcuts['dhcp']['main'] = "services_dhcp.php"; $shortcuts['dhcp']['main'] = "services_dhcp.php";
$shortcuts['dhcp']['log'] = "diag_logs_dhcp.php"; $shortcuts['dhcp']['log'] = "diag_logs_dhcp.php";
......
...@@ -53,8 +53,9 @@ if (!$nentries) { ...@@ -53,8 +53,9 @@ if (!$nentries) {
$now = time(); $now = time();
$year = date("Y"); $year = date("Y");
$pgtitle = array(gettext("Status"),gettext("Load Balancer"),gettext("Pool")); $pgtitle = array(gettext('Services'), gettext('Load Balancer'), gettext('Pool Status'));
$shortcut_section = "relayd"; $shortcut_section = 'relayd';
include("head.inc"); include("head.inc");
$relay_hosts = get_lb_summary(); $relay_hosts = get_lb_summary();
...@@ -115,14 +116,6 @@ if ($_POST) { ...@@ -115,14 +116,6 @@ if ($_POST) {
<section class="col-xs-12"> <section class="col-xs-12">
<?php
/* active tabs */
$tab_array = array();
$tab_array[] = array(gettext("Pools"), true, "status_lb_pool.php");
$tab_array[] = array(gettext("Virtual Servers"), false, "status_lb_vs.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<form action="status_lb_pool.php" method="post"> <form action="status_lb_pool.php" method="post">
...@@ -222,13 +215,12 @@ if ($_POST) { ...@@ -222,13 +215,12 @@ if ($_POST) {
</td> </td>
</tr> </tr>
<?php endforeach; ?> <?php endforeach; ?>
</tbody> <tr><td colspan="5">
</table>
<div class="container-fluid">
<input name="Submit" type="submit" class="btn btn-primary" value="<?= gettext("Save"); ?>" /> <input name="Submit" type="submit" class="btn btn-primary" value="<?= gettext("Save"); ?>" />
<input name="Reset" type="reset" class="btn btn-default" value="<?= gettext("Reset"); ?>" /> <input name="Reset" type="reset" class="btn btn-default" value="<?= gettext("Reset"); ?>" />
</td></tr>
</div> </tbody>
</table>
</form> </form>
</div> </div>
</div> </div>
......
<?php <?php
/* /*
Copyright (C) 2014-2015 Deciso B.V. Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>. Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
...@@ -26,8 +27,8 @@ ...@@ -26,8 +27,8 @@
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
require_once("guiconfig.inc"); require_once("guiconfig.inc");
require_once("services.inc");
require_once("vslb.inc"); require_once("vslb.inc");
if (!is_array($config['load_balancer']['lbpool'])) { if (!is_array($config['load_balancer']['lbpool'])) {
...@@ -40,7 +41,9 @@ $a_vs = &$config['load_balancer']['virtual_server']; ...@@ -40,7 +41,9 @@ $a_vs = &$config['load_balancer']['virtual_server'];
$a_pool = &$config['load_balancer']['lbpool']; $a_pool = &$config['load_balancer']['lbpool'];
$rdr_a = get_lb_redirects(); $rdr_a = get_lb_redirects();
$pgtitle = array(gettext("Status"),gettext("Load Balancer"),gettext("Virtual Server")); $pgtitle = array(gettext('Services'), gettext('Load Balancer'), gettext('Virtual Server Status'));
$shortcut_section = 'relayd';
include("head.inc"); include("head.inc");
?> ?>
...@@ -59,14 +62,6 @@ include("head.inc"); ...@@ -59,14 +62,6 @@ include("head.inc");
<section class="col-xs-12"> <section class="col-xs-12">
<?php
/* active tabs */
$tab_array = array();
$tab_array[] = array(gettext("Pools"), false, "status_lb_pool.php");
$tab_array[] = array(gettext("Virtual Servers"), true, "status_lb_vs.php");
display_top_tabs($tab_array);
?>
<div class="tab-content content-box col-xs-12"> <div class="tab-content content-box col-xs-12">
<div class="container-fluid"> <div class="container-fluid">
<form action="status_lb_pool.php" method="post"> <form action="status_lb_pool.php" method="post">
......
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