summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJared Dillard <jdillard@netgate.com>2016-03-02 16:21:36 -0600
committerJared Dillard <jdillard@netgate.com>2016-03-02 16:21:36 -0600
commit3b53c22761d63a6a9fa806fa4d22838c2afd618e (patch)
treef1cc68cf0d0b62df1beb0dfc11a989ad3a6a5a1f /src
parentc46856253212b3601981fdae116a989bba167450 (diff)
downloadpfsense-3b53c22761d63a6a9fa806fa4d22838c2afd618e.zip
pfsense-3b53c22761d63a6a9fa806fa4d22838c2afd618e.tar.gz
Ticket #5905 remove unused code
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/includes/functions.inc.php83
-rw-r--r--src/usr/local/www/widgets/widgets/system_information.widget.php16
2 files changed, 0 insertions, 99 deletions
diff --git a/src/usr/local/www/includes/functions.inc.php b/src/usr/local/www/includes/functions.inc.php
index 8431bda..2e1af8a 100644
--- a/src/usr/local/www/includes/functions.inc.php
+++ b/src/usr/local/www/includes/functions.inc.php
@@ -20,7 +20,6 @@ function get_stats() {
$stats['datetime'] = update_date_time();
$stats['interfacestatistics'] = get_interfacestats();
$stats['interfacestatus'] = get_interfacestatus();
- $stats['gateways'] = get_gatewaystats();
$stats['cpufreq'] = get_cpufreq();
$stats['load_average'] = get_load_average();
$stats['mbuf'] = get_mbuf();
@@ -30,88 +29,6 @@ function get_stats() {
return $stats;
}
-function get_gatewaystats() {
- global $config;
- if (isset($config["widgets"]["gateways_widget"]["display_type"])) {
- $display_type = $config["widgets"]["gateways_widget"]["display_type"];
- } else {
- $display_type = "gw_ip";
- }
-
- $a_gateways = return_gateways_array();
- $gateways_status = array();
- $gateways_status = return_gateways_status(true);
- $data = "";
- $isfirst = true;
- foreach ($a_gateways as $gname => $gw) {
- if (!$isfirst) {
- $data .= ",";
- }
- $isfirst = false;
- $data .= $gw['name'] . ",";
-
- $monitor_address = "";
- $monitor_address_disp = "";
- if ($display_type == "monitor_ip" || $display_type == "both_ip") {
- $monitor_address = $gw['monitor'];
- if ($monitor_address != "" && $display_type == "both_ip") {
- $monitor_address_disp = " (" . $monitor_address . ")";
- } else {
- $monitor_address_disp = $monitor_address;
- }
- }
-
- if ($gateways_status[$gname]) {
- if ($display_type == "gw_ip" || $display_type == "both_ip" || ($display_type == "monitor_ip" && $monitor_address == "")) {
- $if_gw = lookup_gateway_ip_by_name($gname);
- } else {
- $if_gw = "";
- }
- if ($monitor_address == $if_gw) {
- $monitor_address_disp = "";
- }
-
- $data .= "<b>" . $if_gw . $monitor_address_disp . "</b>,";
- $gws = $gateways_status[$gname];
- switch (strtolower($gws['status'])) {
- case "none":
- $online = "Online";
- $bgcolor = "#90EE90"; // lightgreen
- break;
- case "down":
- $online = "Offline";
- $bgcolor = "#F08080"; // lightcoral
- break;
- case "delay":
- $online = "Latency";
- $bgcolor = "#F0E68C"; // khaki
- break;
- case "loss":
- $online = "Packetloss";
- $bgcolor = "#F0E68C"; // khaki
- break;
- default:
- $online = "Pending";
- break;
- }
- } else {
- if ($display_type == "gw_ip" || $display_type == "both_ip" || ($display_type == "monitor_ip" && $monitor_address == "")) {
- $if_gw = "~";
- } else {
- $if_gw = "";
- }
- $data .= $if_gw . $monitor_address_disp . ",";
- $gws['delay'] = "~";
- $gws['loss'] = "~";
- $online = "Unknown";
- $bgcolor = "#ADD8E6"; // lightblue
- }
- $data .= ($online == "Pending") ? "{$online},{$online}," : "{$gws['delay']},{$gws['loss']},";
- $data .= "{$online}^{$bgcolor}";
- }
- return $data;
-}
-
function get_uptime() {
$uptime = get_uptime_sec();
diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php
index 9bbaac1..61ca9d0 100644
--- a/src/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/src/usr/local/www/widgets/widgets/system_information.widget.php
@@ -376,7 +376,6 @@ function stats(x) {
updateTemp(values[4]);
updateInterfaceStats(values[6]);
updateInterfaces(values[7]);
- updateGatewayStats(values[8]);
updateCpuFreq(values[9]);
updateLoadAverage(values[10]);
updateMbuf(values[11]);
@@ -459,21 +458,6 @@ function updateStateMeter(x) {
}
}
-function updateGatewayStats(x) {
- if (widgetActive("gateways")) {
- gateways_split = x.split(",");
- for (var y=0; y<gateways_split.length; y++) {
- gateways_field_split = gateways_split[y].split("^");
- if ($('#gateway' + (y + 1))) {
- $('#gateway' + (y + 1)).html(gateways_field_split[0]);
- if (gateways_field_split[1]) {
- $('#gateway' + (y + 1)).css('background-color',gateways_field_split[1]);
- }
- }
- }
- }
-}
-
function updateCpuFreq(x) {
if ($('#cpufreq')) {
$("#cpufreq").html(x);
OpenPOWER on IntegriCloud