Commit 9543799a authored by Jos Schellevis's avatar Jos Schellevis

Primarily Dashboard updates and fixes

parent c23950b0
......@@ -404,7 +404,7 @@ echo $jscriptstr;
<div class="content-box" style="padding: 20px;">
<div class="table-responsive">
<?php
echo "<img src=\"/themes/{$g['theme']}/images/default-logo.png\" border=\"0\" alt=\"logo\" /><p>\n";
echo "<img src=\"/themes/{$g['theme']}/assets/images/default-logo.png\" border=\"0\" alt=\"logo\" /><p>\n";
?>
<br />
<div class="content-box-main">
......@@ -530,8 +530,8 @@ echo $jscriptstr;
?>
<section class="col-xs-12 col-md-6 widgetdiv" id="<?php echo $widgetname;?>" style="display:<?php echo $divdisplay; ?>;">
<div class="content-box">
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" id="iform">
<input type="hidden" value="" name="sequence" id="sequence" />
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" id="iform">
<input type="hidden" value="" name="sequence" id="sequence" />
<header class="content-box-head container-fluid">
<ul class="list-inline __nomb">
......@@ -577,7 +577,7 @@ echo $jscriptstr;
</li>
</ul>
</header>
</form>
</form>
<div class="content-box-main collapse in" id="<?php echo $widgetname;?>-container" style="display:<?=$mindiv;?>">
<input type="hidden" value="<?php echo $inputdisplay;?>" id="<?php echo $widgetname;?>-config" name="<?php echo $widgetname;?>-config" />
......
......@@ -44,6 +44,7 @@ require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("util.inc");
require_once("classes/maintable.inc");
if (!is_array($config['load_balancer']['monitor_type'])) {
$config['load_balancer']['monitor_type'] = array();
......
......@@ -43,6 +43,7 @@ require_once("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("classes/maintable.inc");
if (!is_array($config['load_balancer']['lbpool'])) {
$config['load_balancer']['lbpool'] = array();
......@@ -157,7 +158,7 @@ $main_buttons = array(
</div>
<div class="container-fluid">
<br /><span class="red"><strong><?=gettext("Hint:");?></strong></span><br />
<?= sprintf(gettext("The Load Balancer in %s 2.0 is for server load balancing, not Multi-WAN. For load balancing or failover for multiple WANs, use "), $g['product_name']);?>
<?= 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']);?>
<a href="/system_gateway_groups.php"><?= gettext("Gateway Groups"); ?></a>
</div>
</form>
......
......@@ -43,6 +43,7 @@ require_once("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("classes/maintable.inc");
if (!is_array($config['load_balancer']['lbaction'])) {
$config['load_balancer']['lbaction'] = array();
......
......@@ -43,6 +43,7 @@ require_once("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("classes/maintable.inc");
if (!is_array($config['load_balancer']['lbprotocol'])) {
$config['load_balancer']['lbprotocol'] = array();
......
......@@ -44,6 +44,7 @@ require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
require_once("vslb.inc");
require_once("classes/maintable.inc");
if (!is_array($config['load_balancer']['virtual_server'])) {
$config['load_balancer']['virtual_server'] = array();
......
......@@ -512,7 +512,8 @@ function enable_change(enable_change) {
$tab_array[] = array(gettext("Captive portal(s)"), true, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
// Hide Allowed Hostnames as this feature is currently not supported
// $tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
display_top_tabs($tab_array, true);
......
......@@ -158,7 +158,8 @@ $main_buttons = array(
$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
// Hide Allowed Hostnames as this feature is currently not supported
// $tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), true, "services_captiveportal_filemanager.php?zone={$cpzone}");
display_top_tabs($tab_array, true);
......
......@@ -114,7 +114,8 @@ $main_buttons = array(
$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed IP addresses"), true, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
// Hide Allowed Hostnames as this feature is currently not supported
// $tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
display_top_tabs($tab_array, true);
......
......@@ -163,7 +163,8 @@ $main_buttons = array(
$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), true, "services_captiveportal_mac.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
// Hide Allowed Hostnames as this feature is currently not supported
// $tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
display_top_tabs($tab_array, true);
......
......@@ -454,7 +454,8 @@ function enable_change(enable_change) {
$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
// Hide Allowed Hostnames as this feature is currently not supported
// $tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), true, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
display_top_tabs($tab_array, true);
......
......@@ -159,6 +159,7 @@ include("head.inc");
</td>
</tr>
<tr>
<td></td>
<td>&nbsp;</td>
</tr>
</tbody>
......
......@@ -88,14 +88,14 @@ if ($_GET['order']) {
usort($cpdb_all, "clientcmp");
}
?>
<table class="sortable" id="sortabletable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="captive portal status">
<table class="table table-striped sortable" id="sortabletable" width="100%" border="0" cellpadding="0" cellspacing="0" summary="captive portal status">
<tr>
<td class="listhdrr"><a href="?order=ip&amp;showact=<?=$_GET['showact'];?>">IP address</a></td>
<td class="listhdrr"><a href="?order=mac&amp;showact=<?=$_GET['showact'];?>">MAC address</a></td>
<td class="listhdrr"><a href="?order=user&amp;showact=<?=$_GET['showact'];?>"><?=gettext("Username");?></a></td>
<td class="listhdrr"><a href="?order=ip&amp;showact=<?=$_GET['showact'];?>"><b>IP address</b></a></td>
<td class="listhdrr"><a href="?order=mac&amp;showact=<?=$_GET['showact'];?>"><b>MAC address</b></a></td>
<td class="listhdrr"><a href="?order=user&amp;showact=<?=$_GET['showact'];?>"><b><?=gettext("Username");?></b></a></td>
<?php if ($_GET['showact']): ?>
<td class="listhdrr"><a href="?order=start&amp;showact=<?=$_GET['showact'];?>"><?=gettext("Session start");?></a></td>
<td class="listhdrr"><a href="?order=start&amp;showact=<?=$_GET['showact'];?>"><?=gettext("Last activity");?></a></td>
<td class="listhdrr"><a href="?order=start&amp;showact=<?=$_GET['showact'];?>"><b><?=gettext("Session start");?></b></a></td>
<td class="listhdrr"><a href="?order=start&amp;showact=<?=$_GET['showact'];?>"><b><?=gettext("Last activity");?></b></a></td>
<?php endif; ?>
</tr>
<?php foreach ($cpdb_all as $cpent): ?>
......@@ -108,7 +108,7 @@ if ($_GET['order']) {
<td class="listr"><?php if ($cpent[11] && ($cpent[11] > 0)) echo htmlspecialchars(date("m/d/Y H:i:s", $cpent[11]));?></td>
<?php endif; ?>
<td valign="middle" class="list nowrap">
<a href="?order=<?=$_GET['order'];?>&amp;showact=<?=$_GET['showact'];?>&amp;act=del&amp;zone=<?=$cpent[10];?>&amp;id=<?=$cpent[5];?>" onclick="return confirm('Do you really want to disconnect this client?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" width="17" height="17" border="0" alt="x" /></a></td>
<a href="?order=<?=$_GET['order'];?>&amp;showact=<?=$_GET['showact'];?>&amp;act=del&amp;zone=<?=$cpent[10];?>&amp;id=<?=$cpent[5];?>" onclick="return confirm('Do you really want to disconnect this client?')"><span class="glyphicon glyphicon-remove"></span></a></td>
</tr>
<?php endforeach; ?>
</table>
......@@ -37,7 +37,7 @@ require_once("/usr/local/www/widgets/include/carp_status.inc");
$carp_enabled = get_carp_status();
?>
<table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="carp status">
<table class="table table-striped" width="100%" border="0" cellspacing="0" cellpadding="0" summary="carp status">
<?php
if(is_array($config['virtualip']['vip'])) {
$carpint=0;
......@@ -53,22 +53,22 @@ $carp_enabled = get_carp_status();
?>
<tr>
<td class="vncellt" width="35%">
<img src="./themes/<?= $g['theme']; ?>/images/icons/icon_cablenic.gif" alt="cablenic" />&nbsp;
<span alt="cablenic" class="glyphicon glyphicon-transfer text-success"></span>&nbsp;
<strong><a href="/system_hasync.php">
<span style="color:#000000"><?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($carp['interface']) . "@{$vhid}");?></span></a></strong>
<span><?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($carp['interface']) . "@{$vhid}");?></span></a></strong>
</td>
<td width="65%" class="listr">
<?php
if($carp_enabled == false) {
$status = "DISABLED";
echo "<img src='/themes/".$g['theme']."/images/icons/icon_block.gif' title=\"$status\" alt=\"$status\" />";
echo "<span class=\"glyphicon glyphicon-remove text-danger\" title=\"$status\" alt=\"$status\" ></span>";
} else {
if($status == "MASTER") {
echo "<img src='/themes/".$g['theme']."/images/icons/icon_pass.gif' title=\"$status\" alt=\"$status\" />";
echo "<span class=\"glyphicon glyphicon-play text-success\" title=\"$status\" alt=\"$status\" ></span>";
} else if($status == "BACKUP") {
echo "<img src='/themes/".$g['theme']."/images/icons/icon_pass_d.gif' title=\"$status\" alt=\"$status\" />";
echo "<span class=\"glyphicon glyphicon-play text-muted\" title=\"$status\" alt=\"$status\" ></span>";
} else if($status == "INIT") {
echo "<img src='/themes/".$g['theme']."/images/icons/icon_log.gif' title=\"$status\" alt=\"$status\" />";
echo "<span class=\"glyphicon glyphicon-info-sign\" title=\"$status\" alt=\"$status\" ></span>";
}
}
if ($ipaddress){ ?> &nbsp;
......
......@@ -73,12 +73,12 @@ if($_REQUEST['getdyndnsstatus']) {
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<table class="table table-triped" width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="5%" class="listhdrr"><?=gettext("Int.");?></td>
<td width="15%" class="listhdrr"><?=gettext("Service");?></td>
<td width="20%" class="listhdrr"><?=gettext("Hostname");?></td>
<td width="20%" class="listhdrr"><?=gettext("Cached IP");?></td>
<td width="5%" class="listhdrr"><b><?=gettext("Int.");?></b></td>
<td width="15%" class="listhdrr"><b><?=gettext("Service");?></b></td>
<td width="20%" class="listhdrr"><b><?=gettext("Hostname");?></b></td>
<td width="20%" class="listhdrr"><b><?=gettext("Cached IP");?></b></td>
</tr>
<?php $i = 0; foreach ($a_dyndns as $dyndns): ?>
<tr ondblclick="document.location='services_dyndns_edit.php?id=<?=$i;?>'">
......
......@@ -42,23 +42,23 @@ $counter = 1;
?>
<table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="gateway status">
<table class="table table-striped" width="100%" border="0" cellspacing="0" cellpadding="0" summary="gateway status">
<tr>
<td class="listhdrr" id="gatewayname" align="center">Name</td>
<td class="listhdrr" align="center">RTT</td>
<td class="listhdrr" align="center">Loss</td>
<td class="listhdrr" align="center">Status</td>
<td id="gatewayname" align="center"><b><?php echo gettext('Name')?></b></td>
<td align="center"><b><?php echo gettext('RTT')?></b></td>
<td align="center"><b><?php echo gettext('Loss')?></b></td>
<td align="center"><b><?php echo gettext('Status')?></b></td>
</tr>
<?php foreach ($a_gateways as $gname => $gateway) { ?>
<tr>
<td class="listhdrr" id="gateway<?php echo $counter; ?>" rowspan="2" align="center">
<td class="h6" id="gateway<?php echo $counter; ?>" rowspan="2" align="center">
<strong>
<?php echo htmlspecialchars($gateway['name']); ?>
</strong>
<?php $counter++; ?>
</td>
<td colspan="3" class="listr ellipsis" align="center">
<div id="gateway<?php echo $counter; ?>" style="display:inline"><b>
</td>
<td colspan="3" align="left">
<div class="h6" id="gateway<?php echo $counter; ?>" style="display:inline">
<?php
$if_gw = '';
if (is_ipaddr($gateway['gateway']))
......@@ -73,11 +73,11 @@ $counter = 1;
unset ($if_gw);
$counter++;
?>
</b></div>
</div>
</td>
</tr>
<tr>
<td class="listr ellipsis" align="center" id="gateway<?php echo $counter; ?>">
<td align="center" id="gateway<?php echo $counter; ?>">
<?php
if ($gateways_status[$gname])
echo htmlspecialchars($gateways_status[$gname]['delay']);
......@@ -86,7 +86,7 @@ $counter = 1;
?>
<?php $counter++; ?>
</td>
<td class="listr ellipsis" align="center" id="gateway<?php echo $counter; ?>">
<td align="center" id="gateway<?php echo $counter; ?>">
<?php
if ($gateways_status[$gname])
echo htmlspecialchars($gateways_status[$gname]['loss']);
......@@ -99,28 +99,28 @@ $counter = 1;
if ($gateways_status[$gname]) {
if (stristr($gateways_status[$gname]['status'], "force_down")) {
$online = "Offline (forced)";
$bgcolor = "#F08080"; // lightcoral
$class="danger";
} elseif (stristr($gateways_status[$gname]['status'], "down")) {
$online = "Offline";
$bgcolor = "#F08080"; // lightcoral
$class="danger";
} elseif (stristr($gateways_status[$gname]['status'], "loss")) {
$online = "Packetloss";
$bgcolor = "#F0E68C"; // khaki
$class="warning";
} elseif (stristr($gateways_status[$gname]['status'], "delay")) {
$online = "Latency";
$bgcolor = "#F0E68C"; // khaki
$class="warning";
} elseif ($gateways_status[$gname]['status'] == "none") {
$online = "Online";
$bgcolor = "#90EE90"; // lightgreen
$class="success";
} elseif ($gateways_status[$gname]['status'] == "") {
$online = "Pending";
$bgcolor = "#D3D3D3"; // lightgray
$class="info";
}
} else {
$online = gettext("Unknown");
$bgcolor = "#ADD8E6"; // lightblue
$class="info";
}
echo "<td class=\"ellipsis\" bgcolor=\"$bgcolor\" align=\"center\">$online</td>\n";
echo "<td class=\"$class\" align=\"center\">$online</td>\n";
$counter++;
?>
</tr>
......
......@@ -81,34 +81,34 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
?>
<div id="int_labels" style="float:left;width:32%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="interfaces statistics">
<table class="table table-striped" width="100%" border="0" cellspacing="0" cellpadding="0" summary="interfaces statistics">
<tr><td class="widgetsubheader" style="height:25px">&nbsp;&nbsp;&nbsp;</td></tr>
<tr>
<td class="vncellt" style="height:25px">Packets In</td>
<td><b><?php echo gettext('Packets In')?></b></td>
</tr>
<tr>
<td class="vncellt" style="height:25px">Packets Out</td>
<td><b><?php echo gettext('Packets Out')?></b></td>
</tr>
<tr>
<td class="vncellt" style="height:25px">Bytes In</td>
<td><b><?php echo gettext('Bytes In')?></b></td>
</tr>
<tr>
<td class="vncellt" style="height:25px">Bytes Out</td>
<td><b><?php echo gettext('Bytes Out')?></b></td>
</tr>
<tr>
<td class="vncellt" style="height:25px">Errors In</td>
<td><b><?php echo gettext('Errors In')?></b></td>
</tr>
<tr>
<td class="vncellt" style="height:25px">Errors Out</td>
<td><b><?php echo gettext('Errors Out')?></b></td>
</tr>
<tr>
<td class="vncellt" style="height:25px">Collisions</td>
<td><b><?php echo gettext('Collisions')?></b></td>
</tr>
</table>
</div>
<div id="interfacestats" style="float:right;overflow: auto; width:68%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="the stats">
<table class="table table-striped" width="100%" border="0" cellspacing="0" cellpadding="0" summary="the stats">
<tr>
<?php
$interface_names = array();
......@@ -116,7 +116,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
$ifinfo = get_interface_info($ifdescr);
if ($ifinfo['status'] != "down"){ ?>
<td class="widgetsubheader nowrap" style="height:25px">
<?=htmlspecialchars($ifname);?>
<b><?=htmlspecialchars($ifname);?></b>
</td>
<?php
//build array of interface names
......
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