Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
cc6530f6
Commit
cc6530f6
authored
Dec 28, 2014
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widgets: apply whitespace cleanups
parent
8be7fb86
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
146 additions
and
149 deletions
+146
-149
installed_packages.inc
src/www/widgets/include/installed_packages.inc
+1
-1
interface_statistics.inc
src/www/widgets/include/interface_statistics.inc
+1
-1
interfaces.inc
src/www/widgets/include/interfaces.inc
+1
-1
log.inc
src/www/widgets/include/log.inc
+1
-1
openvpn.inc
src/www/widgets/include/openvpn.inc
+1
-1
services_status.inc
src/www/widgets/include/services_status.inc
+1
-1
thermal_sensors.inc
src/www/widgets/include/thermal_sensors.inc
+2
-2
wake_on_lan.inc
src/www/widgets/include/wake_on_lan.inc
+1
-1
ipsec.js
src/www/widgets/javascript/ipsec.js
+2
-2
thermal_sensors.js
src/www/widgets/javascript/thermal_sensors.js
+61
-61
traffic_graph.js
src/www/widgets/javascript/traffic_graph.js
+10
-11
captive_portal_status.widget.php
src/www/widgets/widgets/captive_portal_status.widget.php
+9
-9
gateways.widget.php
src/www/widgets/widgets/gateways.widget.php
+0
-2
interface_list.widget.php
src/www/widgets/widgets/interface_list.widget.php
+5
-5
interface_statistics.widget.php
src/www/widgets/widgets/interface_statistics.widget.php
+21
-21
ipsec.widget.php
src/www/widgets/widgets/ipsec.widget.php
+1
-1
log.widget.php
src/www/widgets/widgets/log.widget.php
+1
-1
ntp_status.widget.php
src/www/widgets/widgets/ntp_status.widget.php
+9
-9
system_information.widget.php
src/www/widgets/widgets/system_information.widget.php
+15
-15
traffic_graphs.widget.php
src/www/widgets/widgets/traffic_graphs.widget.php
+3
-3
No files found.
src/www/widgets/include/installed_packages.inc
View file @
cc6530f6
...
@@ -4,4 +4,4 @@
...
@@ -4,4 +4,4 @@
$installed_packages_title
=
"Installed Packages"
;
$installed_packages_title
=
"Installed Packages"
;
$installed_packages_title_link
=
"pkg_mgr_installed.php"
;
$installed_packages_title_link
=
"pkg_mgr_installed.php"
;
?>
?>
\ No newline at end of file
src/www/widgets/include/interface_statistics.inc
View file @
cc6530f6
...
@@ -2,4 +2,4 @@
...
@@ -2,4 +2,4 @@
//set variable for custom title
//set variable for custom title
$interface_statistics_title
=
"Interface Statistics"
;
$interface_statistics_title
=
"Interface Statistics"
;
$interface_statistics_title_link
=
"status_interfaces.php"
;
$interface_statistics_title_link
=
"status_interfaces.php"
;
?>
?>
\ No newline at end of file
src/www/widgets/include/interfaces.inc
View file @
cc6530f6
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
$interfaces_title
=
"Interfaces"
;
$interfaces_title
=
"Interfaces"
;
$interfaces_title_link
=
"status_interfaces.php"
;
$interfaces_title_link
=
"status_interfaces.php"
;
?>
?>
\ No newline at end of file
src/www/widgets/include/log.inc
View file @
cc6530f6
...
@@ -3,4 +3,4 @@
...
@@ -3,4 +3,4 @@
$log_title
=
"Firewall Logs"
;
$log_title
=
"Firewall Logs"
;
$log_title_link
=
"diag_logs_filter.php"
;
$log_title_link
=
"diag_logs_filter.php"
;
?>
?>
\ No newline at end of file
src/www/widgets/include/openvpn.inc
View file @
cc6530f6
<?php
<?php
$openvpn_title
=
"OpenVPN"
;
$openvpn_title
=
"OpenVPN"
;
$openvpn_title_link
=
"status_openvpn.php"
;
$openvpn_title_link
=
"status_openvpn.php"
;
?>
?>
\ No newline at end of file
src/www/widgets/include/services_status.inc
View file @
cc6530f6
...
@@ -4,4 +4,4 @@
...
@@ -4,4 +4,4 @@
$services_status_title
=
"Services Status"
;
$services_status_title
=
"Services Status"
;
$services_status_title_link
=
"status_services.php"
;
$services_status_title_link
=
"status_services.php"
;
?>
?>
\ No newline at end of file
src/www/widgets/include/thermal_sensors.inc
View file @
cc6530f6
<?php
<?php
/*
/*
$Id: thermal_sensors.inc
$Id: thermal_sensors.inc
File location:
File location:
\usr\local\www\widgets\include\
\usr\local\www\widgets\include\
Used by:
Used by:
...
@@ -22,6 +22,6 @@ function getThermalSensorsData() {
...
@@ -22,6 +22,6 @@ function getThermalSensorsData() {
$_gb
=
exec
(
"/sbin/sysctl -a | grep temperature"
,
$dfout
);
$_gb
=
exec
(
"/sbin/sysctl -a | grep temperature"
,
$dfout
);
$thermalSensorsData
=
join
(
"|"
,
$dfout
);
$thermalSensorsData
=
join
(
"|"
,
$dfout
);
return
$thermalSensorsData
;
return
$thermalSensorsData
;
}
}
?>
?>
src/www/widgets/include/wake_on_lan.inc
View file @
cc6530f6
...
@@ -4,4 +4,4 @@
...
@@ -4,4 +4,4 @@
$wake_on_lan_title
=
"Wake On Lan"
;
$wake_on_lan_title
=
"Wake On Lan"
;
$wake_on_lan_title_link
=
"services_wol.php"
;
$wake_on_lan_title_link
=
"services_wol.php"
;
?>
?>
\ No newline at end of file
src/www/widgets/javascript/ipsec.js
View file @
cc6530f6
...
@@ -2,8 +2,8 @@ function updateIpsec(){
...
@@ -2,8 +2,8 @@ function updateIpsec(){
selectIntLink
=
"
ipsecDetailed
"
;
selectIntLink
=
"
ipsecDetailed
"
;
ipsecsettings
=
"
ipsecDetail=
"
;
ipsecsettings
=
"
ipsecDetail=
"
;
ipsecsettings
+=
d
.
getElementById
(
selectIntLink
).
checked
;
ipsecsettings
+=
d
.
getElementById
(
selectIntLink
).
checked
;
selectIntLink
=
"
ipsec-config
"
;
selectIntLink
=
"
ipsec-config
"
;
textlink
=
d
.
getElementById
(
selectIntLink
);
textlink
=
d
.
getElementById
(
selectIntLink
);
textlink
.
value
=
ipsecsettings
;
textlink
.
value
=
ipsecsettings
;
}
}
\ No newline at end of file
src/www/widgets/javascript/thermal_sensors.js
View file @
cc6530f6
This diff is collapsed.
Click to expand it.
src/www/widgets/javascript/traffic_graph.js
View file @
cc6530f6
function
trafficshowDiv
(
incDiv
,
swapButtons
){
function
trafficshowDiv
(
incDiv
,
swapButtons
){
//appear element
//appear element
selectedDiv
=
incDiv
+
"
graphdiv
"
;
selectedDiv
=
incDiv
+
"
graphdiv
"
;
jQuery
(
'
#
'
+
selectedDiv
).
show
();
jQuery
(
'
#
'
+
selectedDiv
).
show
();
d
=
document
;
d
=
document
;
if
(
swapButtons
){
if
(
swapButtons
){
selectIntLink
=
selectedDiv
+
"
-min
"
;
selectIntLink
=
selectedDiv
+
"
-min
"
;
textlink
=
d
.
getElementById
(
selectIntLink
);
textlink
=
d
.
getElementById
(
selectIntLink
);
textlink
.
style
.
display
=
"
inline
"
;
textlink
.
style
.
display
=
"
inline
"
;
selectIntLink
=
selectedDiv
+
"
-open
"
;
selectIntLink
=
selectedDiv
+
"
-open
"
;
textlink
=
d
.
getElementById
(
selectIntLink
);
textlink
=
d
.
getElementById
(
selectIntLink
);
textlink
.
style
.
display
=
"
none
"
;
textlink
.
style
.
display
=
"
none
"
;
}
}
document
.
iform
[
"
shown[
"
+
incDiv
+
"
]
"
].
value
=
"
show
"
;
document
.
iform
[
"
shown[
"
+
incDiv
+
"
]
"
].
value
=
"
show
"
;
}
}
function
trafficminimizeDiv
(
incDiv
,
swapButtons
){
function
trafficminimizeDiv
(
incDiv
,
swapButtons
){
//fade element
//fade element
selectedDiv
=
incDiv
+
"
graphdiv
"
;
selectedDiv
=
incDiv
+
"
graphdiv
"
;
jQuery
(
'
#
'
+
selectedDiv
).
hide
();
jQuery
(
'
#
'
+
selectedDiv
).
hide
();
d
=
document
;
d
=
document
;
if
(
swapButtons
){
if
(
swapButtons
){
selectIntLink
=
selectedDiv
+
"
-open
"
;
selectIntLink
=
selectedDiv
+
"
-open
"
;
textlink
=
d
.
getElementById
(
selectIntLink
);
textlink
=
d
.
getElementById
(
selectIntLink
);
textlink
.
style
.
display
=
"
inline
"
;
textlink
.
style
.
display
=
"
inline
"
;
selectIntLink
=
selectedDiv
+
"
-min
"
;
selectIntLink
=
selectedDiv
+
"
-min
"
;
textlink
=
d
.
getElementById
(
selectIntLink
);
textlink
=
d
.
getElementById
(
selectIntLink
);
textlink
.
style
.
display
=
"
none
"
;
textlink
.
style
.
display
=
"
none
"
;
}
}
document
.
iform
[
"
shown[
"
+
incDiv
+
"
]
"
].
value
=
"
hide
"
;
document
.
iform
[
"
shown[
"
+
incDiv
+
"
]
"
].
value
=
"
hide
"
;
}
}
src/www/widgets/widgets/captive_portal_status.widget.php
View file @
cc6530f6
<?php
<?php
/*
/*
captive_portal_status.widget.php
captive_portal_status.widget.php
Copyright (C) 2007 Sam Wenham
Copyright (C) 2007 Sam Wenham
...
@@ -6,20 +6,20 @@
...
@@ -6,20 +6,20 @@
status_captiveportal.php
status_captiveportal.php
part of m0n0wall (http://m0n0.ch/wall)
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
All rights reserved.
Redistribution and use in source and binary forms, with or without
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
...
@@ -63,15 +63,15 @@ $a_cp =& $config['captiveportal'];
...
@@ -63,15 +63,15 @@ $a_cp =& $config['captiveportal'];
$cpdb_all
=
array
();
$cpdb_all
=
array
();
foreach
(
$a_cp
as
$cpzone
=>
$cp
)
{
foreach
(
$a_cp
as
$cpzone
=>
$cp
)
{
$cpdb_handle
=
new
OPNsense\CaptivePortal\DB
(
$cpzone
);
$cpdb_handle
=
new
OPNsense\CaptivePortal\DB
(
$cpzone
);
$order
=
""
;
$order
=
""
;
if
(
$_GET
[
'order'
])
{
if
(
$_GET
[
'order'
])
{
if
(
$_GET
[
'order'
]
==
"ip"
)
$order
=
"ip"
;
if
(
$_GET
[
'order'
]
==
"ip"
)
$order
=
"ip"
;
else
if
(
$_GET
[
'order'
]
==
"mac"
)
$order
=
"mac"
;
else
if
(
$_GET
[
'order'
]
==
"mac"
)
$order
=
"mac"
;
else
if
(
$_GET
[
'order'
]
==
"user"
)
$order
=
"username"
;
else
if
(
$_GET
[
'order'
]
==
"user"
)
$order
=
"username"
;
}
}
$cpdb
=
$cpdb_handle
->
listClients
(
array
(),
"and"
,
array
(
$order
)
)
;
$cpdb
=
$cpdb_handle
->
listClients
(
array
(),
"and"
,
array
(
$order
)
)
;
$cpdb_all
[
$cpzone
]
=
$cpdb
;
$cpdb_all
[
$cpzone
]
=
$cpdb
;
}
}
...
...
src/www/widgets/widgets/gateways.widget.php
View file @
cc6530f6
...
@@ -126,5 +126,3 @@ $counter = 1;
...
@@ -126,5 +126,3 @@ $counter = 1;
</tr>
</tr>
<?php
}
// foreach ?>
<?php
}
// foreach ?>
</
table
>
</
table
>
src/www/widgets/widgets/interface_list.widget.php
View file @
cc6530f6
...
@@ -77,12 +77,12 @@ require_once("/usr/local/www/widgets/include/interfaces.inc");
...
@@ -77,12 +77,12 @@ require_once("/usr/local/www/widgets/include/interfaces.inc");
<?php
if
(
$ifinfo
[
'status'
]
==
"up"
||
$ifinfo
[
'status'
]
==
"associated"
)
{
?>
<?php
if
(
$ifinfo
[
'status'
]
==
"up"
||
$ifinfo
[
'status'
]
==
"associated"
)
{
?>
<td
class=
"listr"
align=
"center"
>
<td
class=
"listr"
align=
"center"
>
<span
id=
"
<?php
echo
$ifname
;
?>
"
class=
"glyphicon glyphicon-arrow-up text-success"
></span>
<span
id=
"
<?php
echo
$ifname
;
?>
"
class=
"glyphicon glyphicon-arrow-up text-success"
></span>
</td>
</td>
<?php
}
else
if
(
$ifinfo
[
'status'
]
==
"no carrier"
)
{
?>
<?php
}
else
if
(
$ifinfo
[
'status'
]
==
"no carrier"
)
{
?>
<td
class=
"listr"
align=
"center"
>
<td
class=
"listr"
align=
"center"
>
<span
id=
"
<?php
echo
$ifname
;
?>
"
class=
"glyphicon glyphicon-arrow-down text-danger"
></span>
<span
id=
"
<?php
echo
$ifname
;
?>
"
class=
"glyphicon glyphicon-arrow-down text-danger"
></span>
</td>
</td>
<?php
}
else
if
(
$ifinfo
[
'status'
]
==
"down"
)
{
?>
<?php
}
else
if
(
$ifinfo
[
'status'
]
==
"down"
)
{
?>
<td
class=
"listr"
align=
"center"
>
<td
class=
"listr"
align=
"center"
>
...
@@ -94,13 +94,13 @@ require_once("/usr/local/www/widgets/include/interfaces.inc");
...
@@ -94,13 +94,13 @@ require_once("/usr/local/www/widgets/include/interfaces.inc");
</td>
</td>
<td
class=
"vncellt"
>
<td
class=
"vncellt"
>
<?php
if
(
$ifinfo
[
'ipaddr'
]
!=
""
)
{
?>
<?php
if
(
$ifinfo
[
'ipaddr'
]
!=
""
)
{
?>
<div
id=
"
<?php
echo
$ifname
;
?>
-ip"
style=
"display:inline"
>
<?=
htmlspecialchars
(
$ifinfo
[
'ipaddr'
]);
?>
</div>
<div
id=
"
<?php
echo
$ifname
;
?>
-ip"
style=
"display:inline"
>
<?=
htmlspecialchars
(
$ifinfo
[
'ipaddr'
]);
?>
</div>
<br
/>
<br
/>
<?php
}
<?php
}
if
(
$ifinfo
[
'ipaddrv6'
]
!=
""
)
{
?>
if
(
$ifinfo
[
'ipaddrv6'
]
!=
""
)
{
?>
<div
id=
"
<?php
echo
$ifname
;
?>
-ipv6"
style=
"display:inline"
>
<?=
htmlspecialchars
(
$ifinfo
[
'ipaddrv6'
]);
?>
</div>
<div
id=
"
<?php
echo
$ifname
;
?>
-ipv6"
style=
"display:inline"
>
<?=
htmlspecialchars
(
$ifinfo
[
'ipaddrv6'
]);
?>
</div>
<?php
}
?>
<?php
}
?>
</td>
</td>
</tr>
</tr>
<?php
}
//end for each ?>
<?php
}
//end for each ?>
</
table
>
</
table
>
src/www/widgets/widgets/interface_statistics.widget.php
View file @
cc6530f6
...
@@ -84,7 +84,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
...
@@ -84,7 +84,7 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
<table
class=
"table table-striped"
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"
>
</td></tr>
<tr><td
class=
"widgetsubheader"
style=
"height:25px"
>
</td></tr>
<tr>
<tr>
<td><b>
<?php
echo
gettext
(
'Packets In'
)
?>
</b></td>
<td><b>
<?php
echo
gettext
(
'Packets In'
)
?>
</b></td>
</tr>
</tr>
<tr>
<tr>
<td><b>
<?php
echo
gettext
(
'Packets Out'
)
?>
</b></td>
<td><b>
<?php
echo
gettext
(
'Packets Out'
)
?>
</b></td>
...
@@ -111,12 +111,12 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
...
@@ -111,12 +111,12 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
<table
class=
"table table-striped"
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>
<tr>
<?php
<?php
$interface_names
=
array
();
$interface_names
=
array
();
foreach
(
$ifdescrs
as
$ifdescr
=>
$ifname
)
:
foreach
(
$ifdescrs
as
$ifdescr
=>
$ifname
)
:
$ifinfo
=
get_interface_info
(
$ifdescr
);
$ifinfo
=
get_interface_info
(
$ifdescr
);
if
(
$ifinfo
[
'status'
]
!=
"down"
){
?>
if
(
$ifinfo
[
'status'
]
!=
"down"
){
?>
<td
class=
"widgetsubheader nowrap"
style=
"height:25px"
>
<td
class=
"widgetsubheader nowrap"
style=
"height:25px"
>
<b>
<?=
htmlspecialchars
(
$ifname
);
?>
</b>
<b>
<?=
htmlspecialchars
(
$ifname
);
?>
</b>
</td>
</td>
<?php
<?php
//build array of interface names
//build array of interface names
...
@@ -135,9 +135,9 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
...
@@ -135,9 +135,9 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
<?php
<?php
$counter
=
$counter
+
7
;
$counter
=
$counter
+
7
;
endforeach
;
?>
endforeach
;
?>
</tr>
</tr>
<tr>
<tr>
<?php
<?php
$counter
=
2
;
$counter
=
2
;
foreach
(
$array_out_packets
as
$data
)
:
?>
foreach
(
$array_out_packets
as
$data
)
:
?>
...
@@ -147,10 +147,10 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
...
@@ -147,10 +147,10 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
<?php
<?php
$counter
=
$counter
+
7
;
$counter
=
$counter
+
7
;
endforeach
;
?>
endforeach
;
?>
</tr>
</tr>
<tr>
<tr>
<?php
<?php
$counter
=
3
;
$counter
=
3
;
foreach
(
$array_in_bytes
as
$data
)
:
?>
foreach
(
$array_in_bytes
as
$data
)
:
?>
<td
class=
"listr nowrap"
id=
"stat
<?php
echo
$counter
;
?>
"
style=
"height:25px"
>
<td
class=
"listr nowrap"
id=
"stat
<?php
echo
$counter
;
?>
"
style=
"height:25px"
>
...
@@ -159,9 +159,9 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
...
@@ -159,9 +159,9 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
<?php
<?php
$counter
=
$counter
+
7
;
$counter
=
$counter
+
7
;
endforeach
;
?>
endforeach
;
?>
</tr>
</tr>
<tr>
<tr>
<?php
<?php
$counter
=
4
;
$counter
=
4
;
foreach
(
$array_out_bytes
as
$data
)
:
?>
foreach
(
$array_out_bytes
as
$data
)
:
?>
...
@@ -171,9 +171,9 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
...
@@ -171,9 +171,9 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
<?php
<?php
$counter
=
$counter
+
7
;
$counter
=
$counter
+
7
;
endforeach
;
?>
endforeach
;
?>
</tr>
</tr>
<tr>
<tr>
<?php
<?php
$counter
=
5
;
$counter
=
5
;
foreach
(
$array_in_errors
as
$data
)
:
?>
foreach
(
$array_in_errors
as
$data
)
:
?>
...
@@ -183,11 +183,11 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
...
@@ -183,11 +183,11 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
<?php
<?php
$counter
=
$counter
+
7
;
$counter
=
$counter
+
7
;
endforeach
;
?>
endforeach
;
?>
</tr>
</tr>
<tr>
<tr>
<?php
<?php
$counter
=
6
;
$counter
=
6
;
foreach
(
$array_out_errors
as
$data
)
:
?>
foreach
(
$array_out_errors
as
$data
)
:
?>
<td
class=
"listr nowrap"
id=
"stat
<?php
echo
$counter
;
?>
"
style=
"height:25px"
>
<td
class=
"listr nowrap"
id=
"stat
<?php
echo
$counter
;
?>
"
style=
"height:25px"
>
<?=
htmlspecialchars
(
$data
);
?>
<?=
htmlspecialchars
(
$data
);
?>
...
@@ -195,11 +195,11 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
...
@@ -195,11 +195,11 @@ require_once("/usr/local/www/widgets/include/interface_statistics.inc");
<?php
<?php
$counter
=
$counter
+
7
;
$counter
=
$counter
+
7
;
endforeach
;
?>
endforeach
;
?>
</tr>
</tr>
<tr>
<tr>
<?php
<?php
$counter
=
7
;
$counter
=
7
;
foreach
(
$array_collisions
as
$data
)
:
?>
foreach
(
$array_collisions
as
$data
)
:
?>
<td
class=
"listr nowrap"
id=
"stat
<?php
echo
$counter
;
?>
"
style=
"height:25px"
>
<td
class=
"listr nowrap"
id=
"stat
<?php
echo
$counter
;
?>
"
style=
"height:25px"
>
<?=
htmlspecialchars
(
$data
);
?>
<?=
htmlspecialchars
(
$data
);
?>
...
...
src/www/widgets/widgets/ipsec.widget.php
View file @
cc6530f6
...
@@ -172,7 +172,7 @@ if (isset($config['ipsec']['phase1'])){?>
...
@@ -172,7 +172,7 @@ if (isset($config['ipsec']['phase1'])){?>
<?php
<?php
if
(
is_array
(
$mobile
[
'pool'
]))
:
if
(
is_array
(
$mobile
[
'pool'
]))
:
foreach
(
$mobile
[
'pool'
]
as
$pool
)
:
foreach
(
$mobile
[
'pool'
]
as
$pool
)
:
if
(
is_array
(
$pool
[
'lease'
]))
:
if
(
is_array
(
$pool
[
'lease'
]))
:
foreach
(
$pool
[
'lease'
]
as
$muser
)
:
?>
foreach
(
$pool
[
'lease'
]
as
$muser
)
:
?>
<div
style=
"display:table-row;"
>
<div
style=
"display:table-row;"
>
<div
class=
"listlr"
style=
"display:table-cell;width:139px"
>
<div
class=
"listlr"
style=
"display:table-cell;width:139px"
>
...
...
src/www/widgets/widgets/log.widget.php
View file @
cc6530f6
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
1. Redistributions of source code must retain the above copyright notice,
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
documentation and/or other materials provided with the distribution.
...
...
src/www/widgets/widgets/ntp_status.widget.php
View file @
cc6530f6
...
@@ -146,7 +146,7 @@ if($_REQUEST['updateme']) {
...
@@ -146,7 +146,7 @@ if($_REQUEST['updateme']) {
<td
width=
"40%"
class=
"vncellt"
>
Clock location
</td>
<td
width=
"40%"
class=
"vncellt"
>
Clock location
</td>
<td
width=
"60%"
class=
"listr"
>
<td
width=
"60%"
class=
"listr"
>
<a
target=
"_gmaps"
href=
"http://maps.google.com/?q=
<?php
echo
$gps_lat
;
?>
,
<?php
echo
$gps_lon
;
?>
"
>
<a
target=
"_gmaps"
href=
"http://maps.google.com/?q=
<?php
echo
$gps_lat
;
?>
,
<?php
echo
$gps_lon
;
?>
"
>
<?php
<?php
echo
sprintf
(
"%.5f"
,
$gps_lat
)
.
" "
.
$gps_la
.
", "
.
sprintf
(
"%.5f"
,
$gps_lon
)
.
" "
.
$gps_lo
;
?>
echo
sprintf
(
"%.5f"
,
$gps_lat
)
.
" "
.
$gps_la
.
", "
.
sprintf
(
"%.5f"
,
$gps_lon
)
.
" "
.
$gps_lo
;
?>
</a>
</a>
<?php
if
(
isset
(
$gps_alt
))
{
echo
" ("
.
$gps_alt
.
" "
.
$gps_alt_unit
.
" alt.)"
;}
?>
<?php
if
(
isset
(
$gps_alt
))
{
echo
" ("
.
$gps_alt
.
" "
.
$gps_alt_unit
.
" alt.)"
;}
?>
...
@@ -156,10 +156,10 @@ if($_REQUEST['updateme']) {
...
@@ -156,10 +156,10 @@ if($_REQUEST['updateme']) {
<tr>
<tr>
<td
width=
"40%"
class=
"vncellt"
>
Satellites
</td>
<td
width=
"40%"
class=
"vncellt"
>
Satellites
</td>
<td
width=
"60%"
class=
"listr"
>
<td
width=
"60%"
class=
"listr"
>
<?php
<?php
if
(
isset
(
$gps_satview
))
{
echo
'in view '
.
intval
(
$gps_satview
);}
if
(
isset
(
$gps_satview
))
{
echo
'in view '
.
intval
(
$gps_satview
);}
if
(
isset
(
$gps_sat
)
&&
isset
(
$gps_satview
))
{
echo
', '
;}
if
(
isset
(
$gps_sat
)
&&
isset
(
$gps_satview
))
{
echo
', '
;}
if
(
isset
(
$gps_sat
))
{
echo
'in use '
.
$gps_sat
;}
if
(
isset
(
$gps_sat
))
{
echo
'in use '
.
$gps_sat
;}
?>
?>
</td>
</td>
</tr>
</tr>
...
@@ -167,7 +167,7 @@ if($_REQUEST['updateme']) {
...
@@ -167,7 +167,7 @@ if($_REQUEST['updateme']) {
<?php
endif
;
?>
<?php
endif
;
?>
</tbody>
</tbody>
</table>
</table>
<?php
<?php
exit
;
exit
;
}
}
...
@@ -266,7 +266,7 @@ History: 1.0 2000-05-09 GIF-image digits
...
@@ -266,7 +266,7 @@ History: 1.0 2000-05-09 GIF-image digits
cookies to work around Win IE stale-time bug
cookies to work around Win IE stale-time bug
2.1 2002-10-12 Noted Mozilla 1.0 compatibility; released PHP version.
2.1 2002-10-12 Noted Mozilla 1.0 compatibility; released PHP version.
2.1.1 2002-10-20 Fixed octal bug in the PHP translation; the number of
2.1.1 2002-10-20 Fixed octal bug in the PHP translation; the number of
minutes & seconds were misinterpretes when less than 10
minutes & seconds were misinterpretes when less than 10
2.1.2 2003-08-07 The previous fix had introduced a bug when the
2.1.2 2003-08-07 The previous fix had introduced a bug when the
minutes or seconds were exactly 0. Thanks to Man Bui
minutes or seconds were exactly 0. Thanks to Man Bui
for reporting the bug.
for reporting the bug.
...
@@ -356,7 +356,7 @@ function clockTimeString(inHours, inMinutes, inSeconds) {
...
@@ -356,7 +356,7 @@ function clockTimeString(inHours, inMinutes, inSeconds) {
}
}
function
clockDisplayTime
(
inHours
,
inMinutes
,
inSeconds
)
{
function
clockDisplayTime
(
inHours
,
inMinutes
,
inSeconds
)
{
clockWriteToDiv
(
"
ClockTime
"
,
clockTimeString
(
inHours
,
inMinutes
,
inSeconds
));
clockWriteToDiv
(
"
ClockTime
"
,
clockTimeString
(
inHours
,
inMinutes
,
inSeconds
));
}
}
...
@@ -416,7 +416,7 @@ function clockUpdate()
...
@@ -416,7 +416,7 @@ function clockUpdate()
{
{
var
lastLocalTime
=
localTime
;
var
lastLocalTime
=
localTime
;
localTime
=
(
new
Date
()).
getTime
();
localTime
=
(
new
Date
()).
getTime
();
/* Sanity-check the diff. in local time between successive calls;
/* Sanity-check the diff. in local time between successive calls;
reload if user has reset system clock */
reload if user has reset system clock */
if
(
clockOffset
==
null
)
{
if
(
clockOffset
==
null
)
{
...
@@ -431,11 +431,11 @@ function clockUpdate()
...
@@ -431,11 +431,11 @@ function clockUpdate()
location
.
reload
();
// will refresh time values in cookies
location
.
reload
();
// will refresh time values in cookies
}
}
else
{
else
{
// Compute what time would be on server
// Compute what time would be on server
var
serverTime
=
new
Date
(
localTime
+
clockOffset
);
var
serverTime
=
new
Date
(
localTime
+
clockOffset
);
clockDisplayTime
(
serverTime
.
getHours
(),
serverTime
.
getMinutes
(),
clockDisplayTime
(
serverTime
.
getHours
(),
serverTime
.
getMinutes
(),
serverTime
.
getSeconds
());
serverTime
.
getSeconds
());
// Reschedule this func to run on next even clockIncrementMillis boundary
// Reschedule this func to run on next even clockIncrementMillis boundary
clockTimerID
=
setTimeout
(
"
clockUpdate()
"
,
clockTimerID
=
setTimeout
(
"
clockUpdate()
"
,
clockIncrementMillis
-
(
serverTime
.
getTime
()
%
clockIncrementMillis
));
clockIncrementMillis
-
(
serverTime
.
getTime
()
%
clockIncrementMillis
));
...
...
src/www/widgets/widgets/system_information.widget.php
View file @
cc6530f6
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
/*
/*
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2014 Deciso B.V.
Copyright 2007 Scott Dale
Copyright 2007 Scott Dale
Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
and Jonathan Watt <jwatt@jwatt.org>.
and Jonathan Watt <jwatt@jwatt.org>.
All rights reserved.
All rights reserved.
...
@@ -42,10 +42,10 @@ if($_POST['action'] == 'pkg_update') {
...
@@ -42,10 +42,10 @@ if($_POST['action'] == 'pkg_update') {
$shell
=
new
Core\Shell
();
$shell
=
new
Core\Shell
();
// execute shell command and collect (only valid) info into named array
// execute shell command and collect (only valid) info into named array
$shell
->
exec
(
"/usr/local/opnsense/scripts/pkg_updatecheck.sh"
,
false
,
false
,
$shell_output
);
$shell
->
exec
(
"/usr/local/opnsense/scripts/pkg_updatecheck.sh"
,
false
,
false
,
$shell_output
);
}
}
if
(
file_exists
(
$file_pkg_status
))
{
if
(
file_exists
(
$file_pkg_status
))
{
$json
=
file_get_contents
(
$file_pkg_status
);
$json
=
file_get_contents
(
$file_pkg_status
);
$pkg_status
=
json_decode
(
$json
,
true
);
$pkg_status
=
json_decode
(
$json
,
true
);
}
}
...
@@ -65,7 +65,7 @@ if($_REQUEST['getupdatestatus']) {
...
@@ -65,7 +65,7 @@ if($_REQUEST['getupdatestatus']) {
echo
"<span class='text-danger'>"
.
gettext
(
"Unknown"
)
.
"</span><br/><span class='btn-link' onclick='checkupdate()'>"
.
gettext
(
"Click to check now"
)
.
"</span>"
;
echo
"<span class='text-danger'>"
.
gettext
(
"Unknown"
)
.
"</span><br/><span class='btn-link' onclick='checkupdate()'>"
.
gettext
(
"Click to check now"
)
.
"</span>"
;
}
}
exit
;
exit
;
}
}
$curcfg
=
$config
[
'system'
][
'firmware'
];
$curcfg
=
$config
[
'system'
][
'firmware'
];
...
@@ -74,7 +74,7 @@ $filesystems = get_mounted_filesystems();
...
@@ -74,7 +74,7 @@ $filesystems = get_mounted_filesystems();
?>
?>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
//
<!
[
CDATA
[
//
<!
[
CDATA
[
jQuery
(
function
()
{
jQuery
(
function
()
{
jQuery
(
"
#statePB
"
).
css
(
{
width
:
'
<?php
echo
get_pfstate
(
true
);
?>
%
'
}
);
jQuery
(
"
#statePB
"
).
css
(
{
width
:
'
<?php
echo
get_pfstate
(
true
);
?>
%
'
}
);
jQuery
(
"
#mbufPB
"
).
css
(
{
width
:
'
<?php
echo
get_mbuf
(
true
);
?>
%
'
}
);
jQuery
(
"
#mbufPB
"
).
css
(
{
width
:
'
<?php
echo
get_mbuf
(
true
);
?>
%
'
}
);
jQuery
(
"
#cpuPB
"
).
css
(
{
width
:
0
}
);
jQuery
(
"
#cpuPB
"
).
css
(
{
width
:
0
}
);
...
@@ -89,7 +89,7 @@ $filesystems = get_mounted_filesystems();
...
@@ -89,7 +89,7 @@ $filesystems = get_mounted_filesystems();
jQuery
(
"
#swapUsagePB
"
).
css
(
{
width
:
'
<?php
echo
swap_usage
();
?>
%
'
}
);
jQuery
(
"
#swapUsagePB
"
).
css
(
{
width
:
'
<?php
echo
swap_usage
();
?>
%
'
}
);
<?php
endif
;
?>
<?php
endif
;
?>
<?php
if
(
get_temp
()
!=
""
)
:
?>
<?php
if
(
get_temp
()
!=
""
)
:
?>
jQuery
(
"
#tempPB
"
).
css
(
{
width
:
'
<?php
echo
get_temp
();
?>
%
'
}
);
jQuery
(
"
#tempPB
"
).
css
(
{
width
:
'
<?php
echo
get_temp
();
?>
%
'
}
);
<?php
endif
;
?>
<?php
endif
;
?>
});
});
//]]>
//]]>
...
@@ -154,7 +154,7 @@ $filesystems = get_mounted_filesystems();
...
@@ -154,7 +154,7 @@ $filesystems = get_mounted_filesystems();
<tr>
<tr>
<td
width=
"25%"
class=
"vncellt"
>
<?=
gettext
(
"CPU Type"
);
?>
</td>
<td
width=
"25%"
class=
"vncellt"
>
<?=
gettext
(
"CPU Type"
);
?>
</td>
<td
width=
"75%"
class=
"listr"
>
<td
width=
"75%"
class=
"listr"
>
<?php
<?php
echo
(
htmlspecialchars
(
get_single_sysctl
(
"hw.model"
)));
echo
(
htmlspecialchars
(
get_single_sysctl
(
"hw.model"
)));
?>
?>
<div
id=
"cpufreq"
>
<?=
get_cpufreq
();
?>
</div>
<div
id=
"cpufreq"
>
<?=
get_cpufreq
();
?>
</div>
...
@@ -191,7 +191,7 @@ $filesystems = get_mounted_filesystems();
...
@@ -191,7 +191,7 @@ $filesystems = get_mounted_filesystems();
}
}
?>
?>
</td>
</td>
</tr>
</tr>
<?php
if
(
$config
[
'revision'
])
:
?>
<?php
if
(
$config
[
'revision'
])
:
?>
<tr>
<tr>
<td
width=
"25%"
class=
"vncellt"
>
<?=
gettext
(
"Last config change"
);
?>
</td>
<td
width=
"25%"
class=
"vncellt"
>
<?=
gettext
(
"Last config change"
);
?>
</td>
...
@@ -209,10 +209,10 @@ $filesystems = get_mounted_filesystems();
...
@@ -209,10 +209,10 @@ $filesystems = get_mounted_filesystems();
<span
class=
"sr-only"
></span>
<span
class=
"sr-only"
></span>
</div>
</div>
</div>
</div>
<span
id=
"pfstateusagemeter"
>
<?=
$pfstateusage
.
'%'
;
?>
</span>
(
<span
id=
"pfstate"
>
<?=
htmlspecialchars
(
$pfstatetext
);
?>
</span>
)
<span
id=
"pfstateusagemeter"
>
<?=
$pfstateusage
.
'%'
;
?>
</span>
(
<span
id=
"pfstate"
>
<?=
htmlspecialchars
(
$pfstatetext
);
?>
</span>
)
<br
/>
<br
/>
<a
href=
"diag_dump_states.php"
>
<?=
gettext
(
"Show states"
);
?>
</a>
<a
href=
"diag_dump_states.php"
>
<?=
gettext
(
"Show states"
);
?>
</a>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
...
@@ -222,7 +222,7 @@ $filesystems = get_mounted_filesystems();
...
@@ -222,7 +222,7 @@ $filesystems = get_mounted_filesystems();
$mbufstext
=
get_mbuf
();
$mbufstext
=
get_mbuf
();
$mbufusage
=
get_mbuf
(
true
);
$mbufusage
=
get_mbuf
(
true
);
?>
?>
<div
class=
"progress"
>
<div
class=
"progress"
>
<div
id=
"mbufPB"
class=
"progress-bar"
role=
"progressbar"
aria-valuenow=
"60"
aria-valuemin=
"0"
aria-valuemax=
"100"
style=
"width: 0%;"
>
<div
id=
"mbufPB"
class=
"progress-bar"
role=
"progressbar"
aria-valuenow=
"60"
aria-valuemin=
"0"
aria-valuemax=
"100"
style=
"width: 0%;"
>
<span
class=
"sr-only"
></span>
<span
class=
"sr-only"
></span>
...
@@ -236,7 +236,7 @@ $filesystems = get_mounted_filesystems();
...
@@ -236,7 +236,7 @@ $filesystems = get_mounted_filesystems();
<td
width=
"25%"
class=
"vncellt"
>
<?=
gettext
(
"Temperature"
);
?>
</td>
<td
width=
"25%"
class=
"vncellt"
>
<?=
gettext
(
"Temperature"
);
?>
</td>
<td
width=
"75%"
class=
"listr"
>
<td
width=
"75%"
class=
"listr"
>
<?php
$TempMeter
=
$temp
=
get_temp
();
?>
<?php
$TempMeter
=
$temp
=
get_temp
();
?>
<div
class=
"progress"
>
<div
class=
"progress"
>
<div
id=
"tempPB"
class=
"progress-bar"
role=
"progressbar"
aria-valuenow=
"60"
aria-valuemin=
"0"
aria-valuemax=
"100"
style=
"width: 0%;"
>
<div
id=
"tempPB"
class=
"progress-bar"
role=
"progressbar"
aria-valuenow=
"60"
aria-valuemin=
"0"
aria-valuemax=
"100"
style=
"width: 0%;"
>
<span
class=
"sr-only"
></span>
<span
class=
"sr-only"
></span>
...
@@ -255,7 +255,7 @@ $filesystems = get_mounted_filesystems();
...
@@ -255,7 +255,7 @@ $filesystems = get_mounted_filesystems();
<tr>
<tr>
<td
width=
"25%"
class=
"vncellt"
>
<?=
gettext
(
"CPU usage"
);
?>
</td>
<td
width=
"25%"
class=
"vncellt"
>
<?=
gettext
(
"CPU usage"
);
?>
</td>
<td
width=
"75%"
class=
"listr"
>
<td
width=
"75%"
class=
"listr"
>
<div
class=
"progress"
>
<div
class=
"progress"
>
<div
id=
"cpuPB"
class=
"progress-bar"
role=
"progressbar"
aria-valuenow=
"60"
aria-valuemin=
"0"
aria-valuemax=
"100"
style=
"width: 0%;"
>
<div
id=
"cpuPB"
class=
"progress-bar"
role=
"progressbar"
aria-valuenow=
"60"
aria-valuemin=
"0"
aria-valuemax=
"100"
style=
"width: 0%;"
>
<span
class=
"sr-only"
></span>
<span
class=
"sr-only"
></span>
...
@@ -322,7 +322,7 @@ $filesystems = get_mounted_filesystems();
...
@@ -322,7 +322,7 @@ $filesystems = get_mounted_filesystems();
success
:
function
(
html
)
{
success
:
function
(
html
)
{
//alert(html);
//alert(html);
getstatus
();
getstatus
();
}
}
});
});
}
}
...
...
src/www/widgets/widgets/traffic_graphs.widget.php
View file @
cc6530f6
...
@@ -110,16 +110,16 @@ if (isset($a_config["scale_type"])) {
...
@@ -110,16 +110,16 @@ if (isset($a_config["scale_type"])) {
<?php
foreach
(
$ifdescrs
as
$ifname
=>
$ifdescr
)
{
?>
<?php
foreach
(
$ifdescrs
as
$ifname
=>
$ifdescr
)
{
?>
<input
type=
"hidden"
name=
"shown[
<?=
$ifname
?>
]"
value=
"
<?=
$shown
[
$ifname
]
?
"show"
:
"hide"
?>
"
/>
<input
type=
"hidden"
name=
"shown[
<?=
$ifname
?>
]"
value=
"
<?=
$shown
[
$ifname
]
?
"show"
:
"hide"
?>
"
/>
<?php
}
?>
<?php
}
?>
<table
class=
"table table-striped"
>
<table
class=
"table table-striped"
>
<tbody>
<tbody>
<tr>
<tr>
<td>
<td>
Default AutoScale:
Default AutoScale:
</td>
</td>
</tr>
</tr>
<?php
<?php
$scale_type_up
=
"checked=
\"
checked
\"
"
;
$scale_type_up
=
"checked=
\"
checked
\"
"
;
$scale_type_follow
=
""
;
$scale_type_follow
=
""
;
if
(
isset
(
$config
[
"widgets"
][
"trafficgraphs"
][
"scale_type"
]))
{
if
(
isset
(
$config
[
"widgets"
][
"trafficgraphs"
][
"scale_type"
]))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment