mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 08:34:39 +00:00
Fix traffic graph widget
This commit is contained in:
parent
727453c076
commit
c23950b0bd
@ -530,7 +530,7 @@ 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">
|
||||
<form action="<?=$_SERVER['REQUEST_URI'];?>" method="post" id="iform">
|
||||
<input type="hidden" value="" name="sequence" id="sequence" />
|
||||
<header class="content-box-head container-fluid">
|
||||
|
||||
|
||||
@ -1 +0,0 @@
|
||||
function trafficshowDiv(e,t){selectedDiv=e+"graphdiv",jQuery("#"+selectedDiv).show(),d=document,t&&(selectIntLink=selectedDiv+"-min",textlink=d.getElementById(selectIntLink),textlink.style.display="inline",selectIntLink=selectedDiv+"-open",textlink=d.getElementById(selectIntLink),textlink.style.display="none")}function trafficminimizeDiv(e,t){selectedDiv=e+"graphdiv",jQuery("#"+selectedDiv).hide(),d=document,t&&(selectIntLink=selectedDiv+"-open",textlink=d.getElementById(selectIntLink),textlink.style.display="inline",selectIntLink=selectedDiv+"-min",textlink=d.getElementById(selectIntLink),textlink.style.display="none")}
|
||||
@ -1,7 +1,7 @@
|
||||
function trafficshowDiv(incDiv,swapButtons){
|
||||
//appear element
|
||||
selectedDiv = incDiv + "graphdiv";
|
||||
jQuery('#' + selectedDiv).show();
|
||||
jQuery('#' + selectedDiv).show();
|
||||
d = document;
|
||||
if (swapButtons){
|
||||
selectIntLink = selectedDiv + "-min";
|
||||
@ -12,6 +12,7 @@ function trafficshowDiv(incDiv,swapButtons){
|
||||
textlink = d.getElementById(selectIntLink);
|
||||
textlink.style.display = "none";
|
||||
}
|
||||
document.iform["shown[" + incDiv + "]"].value = "show";
|
||||
}
|
||||
|
||||
function trafficminimizeDiv(incDiv,swapButtons){
|
||||
@ -28,5 +29,6 @@ function trafficminimizeDiv(incDiv,swapButtons){
|
||||
textlink = d.getElementById(selectIntLink);
|
||||
textlink.style.display = "none";
|
||||
}
|
||||
document.iform["shown[" + incDiv + "]"].value = "hide";
|
||||
}
|
||||
|
||||
|
||||
@ -38,6 +38,12 @@ require_once("pfsense-utils.inc");
|
||||
require_once("functions.inc");
|
||||
|
||||
$first_time = false;
|
||||
|
||||
//var_dump($config["widgets"]["trafficgraphs"]);
|
||||
//$config["widgets"]["trafficgraphs"]["shown"]["item"][1]="lan";
|
||||
//write_config(gettext("Widget configuration has been changed."));
|
||||
|
||||
|
||||
if (!is_array($config["widgets"]["trafficgraphs"])) {
|
||||
$first_time = true;
|
||||
$config["widgets"]["trafficgraphs"] = array();
|
||||
@ -56,6 +62,7 @@ if (isset($config['ipsec']['enable']))
|
||||
$ifdescrs['enc0'] = "IPsec";
|
||||
|
||||
if ($_POST) {
|
||||
|
||||
if (isset($_POST["refreshinterval"])) {
|
||||
$a_config["refreshinterval"] = $_POST["refreshinterval"];
|
||||
}
|
||||
@ -100,12 +107,13 @@ if (isset($a_config["scale_type"])) {
|
||||
|
||||
<div id="traffic_graphs-settings" class="widgetconfigdiv" style="display:none;">
|
||||
<form action="/widgets/widgets/traffic_graphs.widget.php" method="post" name="iform" id="iform">
|
||||
<?php foreach ($ifdescrs as $ifname => $ifdescr) { ?>
|
||||
<input type="hidden" name="shown[<?= $ifname ?>]" value="<?= $shown[$ifname] ? "show" : "hide" ?>" />
|
||||
<?php } ?>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tbody>
|
||||
<?php foreach ($ifdescrs as $ifname => $ifdescr) { ?>
|
||||
<input type="hidden" name="shown[<?= $ifname ?>]" value="<?= $shown[$ifname] ? "show" : "hide" ?>" />
|
||||
<?php } ?>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
Default AutoScale:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user