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
30a3036f
Commit
30a3036f
authored
Dec 31, 2014
by
Jos Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cleanups javascript updates and so on
parent
96899e89
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
148 additions
and
86 deletions
+148
-86
gmirror_status.widget.php
src/www/widgets/widgets/gmirror_status.widget.php
+12
-3
log.widget.php
src/www/widgets/widgets/log.widget.php
+28
-1
ntp_status.widget.php
src/www/widgets/widgets/ntp_status.widget.php
+4
-7
openvpn.widget.php
src/www/widgets/widgets/openvpn.widget.php
+38
-13
picture.widget.php
src/www/widgets/widgets/picture.widget.php
+17
-5
rss.widget.php
src/www/widgets/widgets/rss.widget.php
+16
-17
services_status.widget.php
src/www/widgets/widgets/services_status.widget.php
+3
-5
smart_status.widget.php
src/www/widgets/widgets/smart_status.widget.php
+2
-2
thermal_sensors.widget.php
src/www/widgets/widgets/thermal_sensors.widget.php
+26
-23
traffic_graphs.widget.php
src/www/widgets/widgets/traffic_graphs.widget.php
+1
-9
wake_on_lan.widget.php
src/www/widgets/widgets/wake_on_lan.widget.php
+1
-1
No files found.
src/www/widgets/widgets/gmirror_status.widget.php
View file @
30a3036f
<?php
<?php
/*
/*
Copyri
tgh
(C) 2014 Deciso B.V.
Copyri
ght
(C) 2014 Deciso B.V.
Copyright (C) 2009-2010 Jim Pingle
Copyright (C) 2009-2010 Jim Pingle
Redistribution and use in source and binary forms, with or without
Redistribution and use in source and binary forms, with or without
...
@@ -44,7 +44,16 @@ if ($_GET['textonly'] == "true") {
...
@@ -44,7 +44,16 @@ if ($_GET['textonly'] == "true") {
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
//
<!
[
CDATA
[
//
<!
[
CDATA
[
var
gmirrorupdater
=
new
Ajax
.
PeriodicalUpdater
(
'
gmirror_status_table
'
,
'
/widgets/widgets/gmirror_status.widget.php?textonly=true
'
,
{
method
:
'
get
'
,
frequency
:
5
}
);
var
gmirrorupdater
=
function
()
{
jQuery
.
ajax
({
url
:
'
/widgets/widgets/gmirror_status.widget.php?textonly=true
'
,
dataType
:
'
text
'
,
success
:
function
(
code
)
{
jQuery
(
"
#gmirror_status_table
"
).
html
(
code
);
}
});
};
setInterval
(
gmirrorupdater
,
5000
);
//]]>
//]]>
</script>
</script>
src/www/widgets/widgets/log.widget.php
View file @
30a3036f
...
@@ -124,21 +124,40 @@ function format_log_line(row) {
...
@@ -124,21 +124,40 @@ function format_log_line(row) {
<input
type=
"hidden"
id=
"log-config"
name=
"log-config"
value=
""
/>
<input
type=
"hidden"
id=
"log-config"
name=
"log-config"
value=
""
/>
<div
id=
"log-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<div
id=
"log-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<form
action=
"/widgets/widgets/log.widget.php"
method=
"post"
name=
"iforma"
>
<form
action=
"/widgets/widgets/log.widget.php"
method=
"post"
name=
"iforma"
>
<table
class=
"table table-striped"
>
<tbody>
<tr>
<td>
Number of lines to display:
Number of lines to display:
</td>
</tr>
<tr>
<td>
<select
name=
"filterlogentries"
class=
"formfld unknown"
id=
"filterlogentries"
>
<select
name=
"filterlogentries"
class=
"formfld unknown"
id=
"filterlogentries"
>
<?php
for
(
$i
=
1
;
$i
<=
20
;
$i
++
)
{
?>
<?php
for
(
$i
=
1
;
$i
<=
20
;
$i
++
)
{
?>
<option
value=
"
<?php
echo
$i
;
?>
"
<?php
if
(
$nentries
==
$i
)
echo
"selected=
\"
selected
\"
"
;
?>
>
<?php
echo
$i
;
?>
</option>
<option
value=
"
<?php
echo
$i
;
?>
"
<?php
if
(
$nentries
==
$i
)
echo
"selected=
\"
selected
\"
"
;
?>
>
<?php
echo
$i
;
?>
</option>
<?php
}
?>
<?php
}
?>
</select>
</select>
</td>
</tr>
<?php
<?php
$Include_Act
=
explode
(
" "
,
$nentriesacts
);
$Include_Act
=
explode
(
" "
,
$nentriesacts
);
if
(
$nentriesinterfaces
==
"All"
)
$nentriesinterfaces
=
""
;
if
(
$nentriesinterfaces
==
"All"
)
$nentriesinterfaces
=
""
;
?>
?>
<tr>
<td>
<input
id=
"actpass"
name=
"actpass"
type=
"checkbox"
value=
"Pass"
<?php
if
(
in_arrayi
(
'Pass'
,
$Include_Act
))
echo
"checked=
\"
checked
\"
"
;
?>
/>
Pass
<input
id=
"actpass"
name=
"actpass"
type=
"checkbox"
value=
"Pass"
<?php
if
(
in_arrayi
(
'Pass'
,
$Include_Act
))
echo
"checked=
\"
checked
\"
"
;
?>
/>
Pass
<input
id=
"actblock"
name=
"actblock"
type=
"checkbox"
value=
"Block"
<?php
if
(
in_arrayi
(
'Block'
,
$Include_Act
))
echo
"checked=
\"
checked
\"
"
;
?>
/>
Block
<input
id=
"actblock"
name=
"actblock"
type=
"checkbox"
value=
"Block"
<?php
if
(
in_arrayi
(
'Block'
,
$Include_Act
))
echo
"checked=
\"
checked
\"
"
;
?>
/>
Block
<input
id=
"actreject"
name=
"actreject"
type=
"checkbox"
value=
"Reject"
<?php
if
(
in_arrayi
(
'Reject'
,
$Include_Act
))
echo
"checked=
\"
checked
\"
"
;
?>
/>
Reject
<input
id=
"actreject"
name=
"actreject"
type=
"checkbox"
value=
"Reject"
<?php
if
(
in_arrayi
(
'Reject'
,
$Include_Act
))
echo
"checked=
\"
checked
\"
"
;
?>
/>
Reject
</td>
</tr>
<tr>
<td>
Interfaces:
Interfaces:
</td>
</tr>
<tr>
<td>
<select
id=
"filterlogentriesinterfaces"
name=
"filterlogentriesinterfaces"
class=
"formselect"
>
<select
id=
"filterlogentriesinterfaces"
name=
"filterlogentriesinterfaces"
class=
"formselect"
>
<option
value=
"All"
>
ALL
</option>
<option
value=
"All"
>
ALL
</option>
<?php
<?php
...
@@ -154,7 +173,15 @@ function format_log_line(row) {
...
@@ -154,7 +173,15 @@ function format_log_line(row) {
unset
(
$Include_Act
);
unset
(
$Include_Act
);
?>
?>
</select>
</select>
</td>
</tr>
<tr>
<td>
<input
id=
"submita"
name=
"submita"
type=
"submit"
class=
"btn btn-primary formbtn"
value=
"Save"
/>
<input
id=
"submita"
name=
"submita"
type=
"submit"
class=
"btn btn-primary formbtn"
value=
"Save"
/>
</td>
</tr>
</tbody>
</table>
</form>
</form>
</div>
</div>
...
...
src/www/widgets/widgets/ntp_status.widget.php
View file @
30a3036f
<?php
<?php
/*
/*
$Id$
Copyright (C) 2014 Deciso B.V.
Copyright 2007 Scott Dale
Copyright (c) 2007 Scott Dale
Part of pfSense widgets (https://www.pfsense.org)
originally based on m0n0wall (http://m0n0.ch/wall)
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.
...
@@ -129,7 +126,7 @@ if($_REQUEST['updateme']) {
...
@@ -129,7 +126,7 @@ if($_REQUEST['updateme']) {
}
}
?>
?>
<table
width=
"100%"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
summary=
"clock"
>
<table
class=
"table table-striped"
width=
"100%"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
summary=
"clock"
>
<tbody>
<tbody>
<tr>
<tr>
<td
width=
"40%"
class=
"vncellt"
>
Sync Source
</td>
<td
width=
"40%"
class=
"vncellt"
>
Sync Source
</td>
...
@@ -450,7 +447,7 @@ function clockUpdate()
...
@@ -450,7 +447,7 @@ function clockUpdate()
</script>
</script>
<table
width=
"100%"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
summary=
"clock"
>
<table
class=
"table table-striped"
width=
"100%"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
summary=
"clock"
>
<tbody>
<tbody>
<tr>
<tr>
<td
width=
"40%"
class=
"vncellt"
>
Server Time
</td>
<td
width=
"40%"
class=
"vncellt"
>
Server Time
</td>
...
...
src/www/widgets/widgets/openvpn.widget.php
View file @
30a3036f
<?php
<?php
/*
Copyright (C) 2014 Deciso B.V.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
$nocsrf
=
true
;
$nocsrf
=
true
;
...
@@ -69,7 +94,7 @@ $clients = openvpn_get_active_clients();
...
@@ -69,7 +94,7 @@ $clients = openvpn_get_active_clients();
jQuery
(
icon
).
css
(
"
cursor
"
,
"
wait
"
);
jQuery
(
icon
).
css
(
"
cursor
"
,
"
wait
"
);
}
}
jQuery
(
'
img
[name="i:
'
+
mport
+
"
:
"
+
remipp
+
'
"]
'
).
each
(
busy
);
jQuery
(
'
span
[name="i:
'
+
mport
+
"
:
"
+
remipp
+
'
"]
'
).
each
(
busy
);
jQuery
.
ajax
(
jQuery
.
ajax
(
"
<?=
$_SERVER
[
'SCRIPT_NAME'
];
?>
"
+
"
<?=
$_SERVER
[
'SCRIPT_NAME'
];
?>
"
+
...
@@ -93,7 +118,7 @@ $clients = openvpn_get_active_clients();
...
@@ -93,7 +118,7 @@ $clients = openvpn_get_active_clients();
<?php
foreach
(
$servers
as
$server
)
:
?>
<?php
foreach
(
$servers
as
$server
)
:
?>
<table
style=
"padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px"
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<table
class=
"table table-striped"
style=
"padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px"
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<tr>
<td
colspan=
"6"
class=
"listtopic"
>
<td
colspan=
"6"
class=
"listtopic"
>
<?=
$server
[
'name'
];
?>
Client connections
<?=
$server
[
'name'
];
?>
Client connections
...
@@ -119,10 +144,10 @@ $clients = openvpn_get_active_clients();
...
@@ -119,10 +144,10 @@ $clients = openvpn_get_active_clients();
<?=
$conn
[
'remote_host'
];
?>
<?=
$conn
[
'remote_host'
];
?>
</td>
</td>
<td
class=
'listMR'
rowspan=
"2"
>
<td
class=
'listMR'
rowspan=
"2"
>
<
img
src=
'/themes/
<?php
echo
$g
[
'theme'
];
?>
/images/icons/icon_x.gif'
height=
'17'
width=
'17'
border=
'0'
<
span
class=
"glyphicon glyphicon-remove"
onclick=
"killClient('
<?php
echo
$server
[
'mgmt'
];
?>
', '
<?php
echo
$conn
[
'remote_host'
];
?>
');"
style=
'cursor:pointer;'
onclick=
"killClient('
<?php
echo
$server
[
'mgmt'
];
?>
', '
<?php
echo
$conn
[
'remote_host'
];
?>
');"
style=
'cursor:pointer;'
name=
'
<?php
echo
"i:
{
$server
[
'mgmt'
]
}
:
{
$conn
[
'remote_host'
]
}
"
;
?>
'
name=
'
<?php
echo
"i:
{
$server
[
'mgmt'
]
}
:
{
$conn
[
'remote_host'
]
}
"
;
?>
'
title=
'Kill client connection from
<?php
echo
$conn
[
'remote_host'
];
?>
'
alt=
''
/
>
title=
'Kill client connection from
<?php
echo
$conn
[
'remote_host'
];
?>
'
alt=
''
></span
>
</td>
</td>
</tr>
</tr>
<tr
name=
'
<?php
echo
"r:
{
$server
[
'mgmt'
]
}
:
{
$conn
[
'remote_host'
]
}
"
;
?>
'
class=
"
<?=
$evenRowClass
?>
"
>
<tr
name=
'
<?php
echo
"r:
{
$server
[
'mgmt'
]
}
:
{
$conn
[
'remote_host'
]
}
"
;
?>
'
class=
"
<?=
$evenRowClass
?>
"
>
...
@@ -147,7 +172,7 @@ $clients = openvpn_get_active_clients();
...
@@ -147,7 +172,7 @@ $clients = openvpn_get_active_clients();
<?php
endforeach
;
?>
<?php
endforeach
;
?>
<?php
if
(
!
empty
(
$sk_servers
))
{
?>
<?php
if
(
!
empty
(
$sk_servers
))
{
?>
<table
style=
"padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px"
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<table
class=
"table table-striped"
style=
"padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px"
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<tr>
<td
colspan=
"6"
class=
"listtopic"
>
<td
colspan=
"6"
class=
"listtopic"
>
Peer to Peer Server Instance Statistics
Peer to Peer Server Instance Statistics
...
@@ -172,12 +197,12 @@ $clients = openvpn_get_active_clients();
...
@@ -172,12 +197,12 @@ $clients = openvpn_get_active_clients();
<?php
<?php
if
(
$sk_server
[
'status'
]
==
"up"
)
{
if
(
$sk_server
[
'status'
]
==
"up"
)
{
/* tunnel is up */
/* tunnel is up */
$iconfn
=
"
interface_up
"
;
$iconfn
=
"
text-success
"
;
}
else
{
}
else
{
/* tunnel is down */
/* tunnel is down */
$iconfn
=
"
interface_down
"
;
$iconfn
=
"
text-danger
"
;
}
}
echo
"<
img src ='/themes/
{
$g
[
'theme'
]
}
/images/icons/icon_
{
$iconfn
}
.gif'
>"
;
echo
"<
span class='glyphicon glyphicon-transfer "
.
$iconfn
.
"'></span
>"
;
?>
?>
</td>
</td>
</tr>
</tr>
...
@@ -197,14 +222,14 @@ $clients = openvpn_get_active_clients();
...
@@ -197,14 +222,14 @@ $clients = openvpn_get_active_clients();
<?php
<?php
}
?>
}
?>
<?php
if
(
!
empty
(
$clients
))
{
?>
<?php
if
(
!
empty
(
$clients
))
{
?>
<table
style=
"padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px"
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<table
class=
"table table-striped"
style=
"padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px"
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<tr>
<td
colspan=
"6"
class=
"listtopic"
>
<td
colspan=
"6"
class=
"listtopic"
>
Client Instance Statistics
Client Instance Statistics
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<table
style=
"padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px"
class=
"tabcont sortable"
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<table
class=
"table table-striped"
style=
"padding-top:0px; padding-bottom:0px; padding-left:0px; padding-right:0px"
class=
"tabcont sortable"
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
>
<tr>
<tr>
<td
class=
"listhdrr"
>
Name/Time
</td>
<td
class=
"listhdrr"
>
Name/Time
</td>
<td
class=
"listhdrr"
>
Remote/Virtual IP
</td>
<td
class=
"listhdrr"
>
Remote/Virtual IP
</td>
...
@@ -222,12 +247,12 @@ $clients = openvpn_get_active_clients();
...
@@ -222,12 +247,12 @@ $clients = openvpn_get_active_clients();
<?php
<?php
if
(
$client
[
'status'
]
==
"up"
)
{
if
(
$client
[
'status'
]
==
"up"
)
{
/* tunnel is up */
/* tunnel is up */
$iconfn
=
"
interface_up
"
;
$iconfn
=
"
text-success
"
;
}
else
{
}
else
{
/* tunnel is down */
/* tunnel is down */
$iconfn
=
"
interface_down
"
;
$iconfn
=
"
text-danger
"
;
}
}
echo
"<
img src ='/themes/
{
$g
[
'theme'
]
}
/images/icons/icon_
{
$iconfn
}
.gif'
>"
;
echo
"<
span class='glyphicon glyphicon-transfer "
.
$iconfn
.
"'></span
>"
;
?>
?>
</td>
</td>
</tr>
</tr>
...
...
src/www/widgets/widgets/picture.widget.php
View file @
30a3036f
<?php
<?php
/*
/*
$Id$
Copyright (C) 2014 Deciso B.V.
Copyright 2009 Scott Ullrich
Copyright
(C)
2009 Scott Ullrich
Part of pfSense widgets (https://www.pfsense.org)
Part of pfSense widgets (https://www.pfsense.org)
Redistribution and use in source and binary forms, with or without
Redistribution and use in source and binary forms, with or without
...
@@ -73,17 +73,29 @@ if($_POST) {
...
@@ -73,17 +73,29 @@ if($_POST) {
<div
id=
"picture-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<div
id=
"picture-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<form
action=
"/widgets/widgets/picture.widget.php"
method=
"post"
name=
"iforma"
enctype=
"multipart/form-data"
>
<form
action=
"/widgets/widgets/picture.widget.php"
method=
"post"
name=
"iforma"
enctype=
"multipart/form-data"
>
<input
name=
"pictfile"
type=
"file"
class=
"formbtn"
id=
"pictfile"
size=
"20"
/>
<table
class=
"table table-striped"
>
<input
id=
"submita"
name=
"submita"
type=
"submit"
class=
"formbtn"
value=
"Upload"
/>
<tr>
<td>
<input
name=
"pictfile"
type=
"file"
class=
"btn btn-primary formbtn"
id=
"pictfile"
size=
"20"
/>
</td>
</tr>
<tr>
<td>
<input
id=
"submita"
name=
"submita"
type=
"submit"
class=
"btn btn-primary formbtn"
value=
"Upload"
/>
</td>
</tr>
</table>
</form>
</form>
</div>
</div>
<!-- hide picture if none is defined in the configuration -->
<?php
if
(
$config
[
'widgets'
][
'picturewidget_filename'
]
!=
""
)
:
?>
<div
id=
"picture-widgets"
style=
"padding: 5px"
>
<div
id=
"picture-widgets"
style=
"padding: 5px"
>
<a
href=
'/widgets/widgets/picture.widget.php?getpic=true'
target=
'_blank'
>
<a
href=
'/widgets/widgets/picture.widget.php?getpic=true'
target=
'_blank'
>
<img
border=
"0"
width=
"100%"
height=
"100%"
src=
"/widgets/widgets/picture.widget.php?getpic=true"
alt=
"picture"
/>
<img
border=
"0"
width=
"100%"
height=
"100%"
src=
"/widgets/widgets/picture.widget.php?getpic=true"
alt=
"picture"
/>
</a>
</a>
</div>
</div>
<?php
endif
?>
<!-- needed to show the settings widget icon -->
<!-- needed to show the settings widget icon -->
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
//
<!
[
CDATA
[
//
<!
[
CDATA
[
...
...
src/www/widgets/widgets/rss.widget.php
View file @
30a3036f
<?php
<?php
/*
/*
$Id$
copyright (C) 2014 Deciso B.V.
Copyright 2009 Scott Ullrich
Copyright (C) 2009 Scott Ullrich
Part of pfSense widgets (https://www.pfsense.org)
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:
...
@@ -56,8 +55,8 @@ if(is_numeric($config['widgets']['rsswidgettextlength']))
...
@@ -56,8 +55,8 @@ if(is_numeric($config['widgets']['rsswidgettextlength']))
// Set a default feed if none exists
// Set a default feed if none exists
if
(
!
$rss_feed_s
)
{
if
(
!
$rss_feed_s
)
{
$rss_feed_s
=
"https://
blog.pfsense.org
"
;
$rss_feed_s
=
"https://
opnsense.org/feed/
"
;
$config
[
'widgets'
][
'rssfeed'
]
=
"https://
blog.pfsense.org
"
;
$config
[
'widgets'
][
'rssfeed'
]
=
"https://
opnsense.org/feed/
"
;
}
}
if
(
!
$max_items
)
if
(
!
$max_items
)
...
@@ -80,11 +79,14 @@ else
...
@@ -80,11 +79,14 @@ else
<div
id=
"rss-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<div
id=
"rss-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<form
action=
"/widgets/widgets/rss.widget.php"
method=
"post"
name=
"iformc"
>
<form
action=
"/widgets/widgets/rss.widget.php"
method=
"post"
name=
"iformc"
>
<textarea
name=
"rssfeed"
class=
"formfld unknown textarea_widget"
id=
"rssfeed"
cols=
"40"
rows=
"3"
>
<?=
$textarea_txt
;
?>
</textarea>
<table
class=
"table table-striped"
summary=
"rss widget"
>
<br
/>
<table
summary=
"rss widget"
>
<tr>
<tr>
<td
align=
"right"
>
<td
colspan=
"2"
>
<textarea
name=
"rssfeed"
class=
"formfld unknown textarea_widget"
id=
"rssfeed"
cols=
"40"
rows=
"3"
style=
"max-width:100%;"
>
<?=
$textarea_txt
;
?>
</textarea>
</td>
</tr>
<tr>
<td>
Display number of items:
Display number of items:
</td>
</td>
<td>
<td>
...
@@ -98,7 +100,7 @@ else
...
@@ -98,7 +100,7 @@ else
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
align=
"right"
>
<td>
Widget height:
Widget height:
</td>
</td>
<td>
<td>
...
@@ -112,7 +114,7 @@ else
...
@@ -112,7 +114,7 @@ else
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
align=
"right"
>
<td>
Show how many characters from story:
Show how many characters from story:
</td>
</td>
<td>
<td>
...
@@ -126,11 +128,8 @@ else
...
@@ -126,11 +128,8 @@ else
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td>
<td
colspan=
"2"
>
<input
id=
"submitc"
name=
"submitc"
type=
"submit"
class=
"btn btn-primary formbtn"
value=
"Save"
/>
</td>
<td>
<input
id=
"submitc"
name=
"submitc"
type=
"submit"
class=
"formbtn"
value=
"Save"
/>
</td>
</td>
</tr>
</tr>
</table>
</table>
...
@@ -165,7 +164,7 @@ else
...
@@ -165,7 +164,7 @@ else
$content
=
$item
->
get_content
();
$content
=
$item
->
get_content
();
$content
=
strip_tags
(
$content
);
$content
=
strip_tags
(
$content
);
echo
textLimit
(
$content
,
$rsswidgettextlength
)
.
"<br />"
;
echo
textLimit
(
$content
,
$rsswidgettextlength
)
.
"<br />"
;
echo
"Source: <a target='_blank' href='"
.
$item
->
get_permalink
()
.
"'>
<img src='"
.
$feed
->
get_favicon
()
.
"' alt='"
.
$feed
->
get_title
()
.
"' title='"
.
$feed
->
get_title
()
.
"' border='0' width='16' height='16' />
</a><br />"
;
echo
"Source: <a target='_blank' href='"
.
$item
->
get_permalink
()
.
"'>
"
.
$feed
->
get_title
()
.
"
</a><br />"
;
$counter
++
;
$counter
++
;
if
(
$counter
>
$max_items
)
if
(
$counter
>
$max_items
)
break
;
break
;
...
...
src/www/widgets/widgets/services_status.widget.php
View file @
30a3036f
<?php
<?php
/*
/*
services_status.widget.php
Copyright (C) 2014
Copyright (C) 2004, 2005 Scott Ullrich
Copyright (C) 2004, 2005 Scott Ullrich
All rights reserved.
services_status.widget.php
Copyright (C) 2007 Sam Wenham
Copyright (C) 2007 Sam Wenham
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:
...
@@ -55,7 +53,7 @@ if(isset($_POST['servicestatusfilter'])) {
...
@@ -55,7 +53,7 @@ if(isset($_POST['servicestatusfilter'])) {
</form>
</form>
</div>
</div>
<table
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
summary=
"services"
>
<table
class=
"table table-striped"
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
summary=
"services"
>
<tr>
<tr>
<td
class=
"widgetsubheader"
align=
"center"
><b>
Service
</b></td>
<td
class=
"widgetsubheader"
align=
"center"
><b>
Service
</b></td>
<td
class=
"widgetsubheader"
align=
"center"
><b>
Description
</b></td>
<td
class=
"widgetsubheader"
align=
"center"
><b>
Description
</b></td>
...
...
src/www/widgets/widgets/smart_status.widget.php
View file @
30a3036f
<?php
<?php
/*
/*
Copyright (C) 2014 Deciso B.V.
Copyright 2012 mkirbst @ pfSense Forum
Copyright 2012 mkirbst @ pfSense Forum
Part of pfSense widgets (https://www.pfsense.org)
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
...
@@ -32,7 +32,7 @@ require_once("functions.inc");
...
@@ -32,7 +32,7 @@ require_once("functions.inc");
require_once
(
"/usr/local/www/widgets/include/smart_status.inc"
);
require_once
(
"/usr/local/www/widgets/include/smart_status.inc"
);
?>
?>
<table
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
summary=
"smart status"
>
<table
class=
"table table-striped"
width=
"100%"
border=
"0"
cellpadding=
"0"
cellspacing=
"0"
summary=
"smart status"
>
<tr>
<tr>
<td
class=
"widgetsubheader"
align=
"center"
><b>
<?php
echo
gettext
(
"Drive"
)
?>
</b></td>
<td
class=
"widgetsubheader"
align=
"center"
><b>
<?php
echo
gettext
(
"Drive"
)
?>
</b></td>
<td
class=
"widgetsubheader"
align=
"center"
><b>
<?php
echo
gettext
(
"Ident"
)
?>
</b></td>
<td
class=
"widgetsubheader"
align=
"center"
><b>
<?php
echo
gettext
(
"Ident"
)
?>
</b></td>
...
...
src/www/widgets/widgets/thermal_sensors.widget.php
View file @
30a3036f
<?php
<?php
/*
/*
$Id: thermal_sensors.widget.php
Copyright (C) 2014 Deciso B.V.
Description: Thermal Sensors Widget.
NOTE: depends on proper cofing in System >> Advanced >> Miscellaneous tab >> Thermal Sensors section.
File location:
\usr\local\www\widgets\widgets\
Depends on:
\usr\local\www\widgets\javascript\thermal_sensors.js
\usr\local\www\widgets\include\thermal_sensors.inc
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:
...
@@ -32,6 +24,17 @@
...
@@ -32,6 +24,17 @@
POSSIBILITY OF SUCH DAMAGE.
POSSIBILITY OF SUCH DAMAGE.
*/
*/
/*
Description: Thermal Sensors Widget.
NOTE: depends on proper cofing in System >> Advanced >> Miscellaneous tab >> Thermal Sensors section.
File location:
\usr\local\www\widgets\widgets\
Depends on:
\usr\local\www\widgets\javascript\thermal_sensors.js
\usr\local\www\widgets\include\thermal_sensors.inc
*/
require_once
(
"guiconfig.inc"
);
require_once
(
"guiconfig.inc"
);
require_once
(
"/usr/local/www/widgets/include/thermal_sensors.inc"
);
require_once
(
"/usr/local/www/widgets/include/thermal_sensors.inc"
);
...
@@ -49,8 +52,8 @@ const WIDGETS_CONFIG_SECTION_KEY = "widgets";
...
@@ -49,8 +52,8 @@ const WIDGETS_CONFIG_SECTION_KEY = "widgets";
const
THERMAL_SENSORS_WIDGET_SUBSECTION_KEY
=
"thermal_sensors_widget"
;
const
THERMAL_SENSORS_WIDGET_SUBSECTION_KEY
=
"thermal_sensors_widget"
;
//default constants
//default constants
const
DEFAULT_WARNING_THRESHOLD
=
6
0
;
//60 C
const
DEFAULT_WARNING_THRESHOLD
=
7
0
;
//60 C
const
DEFAULT_CRITICAL_THRESHOLD
=
7
0
;
//70 C
const
DEFAULT_CRITICAL_THRESHOLD
=
8
0
;
//70 C
const
MIN_THRESHOLD_VALUE
=
1
;
//deg C
const
MIN_THRESHOLD_VALUE
=
1
;
//deg C
const
MAX_THRESHOLD_VALUE
=
100
;
//deg C
const
MAX_THRESHOLD_VALUE
=
100
;
//deg C
...
@@ -168,7 +171,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
...
@@ -168,7 +171,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
<input
type=
"hidden"
id=
"thermal_sensors-config"
name=
"thermal_sensors-config"
value=
""
/>
<input
type=
"hidden"
id=
"thermal_sensors-config"
name=
"thermal_sensors-config"
value=
""
/>
<div
id=
"thermal_sensors-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<div
id=
"thermal_sensors-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<form
action=
"/widgets/widgets/thermal_sensors.widget.php"
method=
"post"
id=
"iform_thermal_sensors_settings"
name=
"iform_thermal_sensors_settings"
>
<form
action=
"/widgets/widgets/thermal_sensors.widget.php"
method=
"post"
id=
"iform_thermal_sensors_settings"
name=
"iform_thermal_sensors_settings"
>
<table
width=
"100%"
border=
"0"
summary=
"thermal sensors widget"
>
<table
class=
"table table-striped"
width=
"100%"
border=
"0"
summary=
"thermal sensors widget"
>
<tr>
<tr>
<td
align=
"left"
colspan=
"2"
>
<td
align=
"left"
colspan=
"2"
>
<span
style=
"font-weight: bold"
>
Thresholds in
°
C (1 to 100):
</span>
<span
style=
"font-weight: bold"
>
Thresholds in
°
C (1 to 100):
</span>
...
@@ -178,7 +181,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
...
@@ -178,7 +181,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
align=
"right"
>
<td>
Zone Warning:
Zone Warning:
</td>
</td>
<td>
<td>
...
@@ -187,7 +190,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
...
@@ -187,7 +190,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
id=
"thermal_sensors_widget_zone_warning_threshold"
id=
"thermal_sensors_widget_zone_warning_threshold"
value=
"
<?=
$thermal_sensors_widget_zoneWarningTempThreshold
;
?>
"
/>
value=
"
<?=
$thermal_sensors_widget_zoneWarningTempThreshold
;
?>
"
/>
</td>
</td>
<td
align=
"right"
>
<td>
<label
for=
"thermal_sensors_widget_show_raw_output"
>
Show raw output (no graph):
</label>
<label
for=
"thermal_sensors_widget_show_raw_output"
>
Show raw output (no graph):
</label>
<input
type=
"checkbox"
<input
type=
"checkbox"
id=
"thermal_sensors_widget_show_raw_output"
id=
"thermal_sensors_widget_show_raw_output"
...
@@ -196,7 +199,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
...
@@ -196,7 +199,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
align=
"right"
>
<td>
Zone Critical:
Zone Critical:
</td>
</td>
<td>
<td>
...
@@ -205,7 +208,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
...
@@ -205,7 +208,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
id=
"thermal_sensors_widget_zone_critical_threshold"
id=
"thermal_sensors_widget_zone_critical_threshold"
value=
"
<?=
$thermal_sensors_widget_zoneCriticalTempThreshold
;
?>
"
/>
value=
"
<?=
$thermal_sensors_widget_zoneCriticalTempThreshold
;
?>
"
/>
</td>
</td>
<td
align=
"right"
>
<td>
<label
for=
"thermal_sensors_widget_show_full_sensor_name"
>
Show full sensor name:
</label>
<label
for=
"thermal_sensors_widget_show_full_sensor_name"
>
Show full sensor name:
</label>
<input
type=
"checkbox"
<input
type=
"checkbox"
id=
"thermal_sensors_widget_show_full_sensor_name"
id=
"thermal_sensors_widget_show_full_sensor_name"
...
@@ -214,7 +217,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
...
@@ -214,7 +217,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
align=
"right"
>
<td>
Core Warning:
Core Warning:
</td>
</td>
<td>
<td>
...
@@ -223,7 +226,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
...
@@ -223,7 +226,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
id=
"thermal_sensors_widget_core_warning_threshold"
id=
"thermal_sensors_widget_core_warning_threshold"
value=
"
<?=
$thermal_sensors_widget_coreWarningTempThreshold
?>
"
/>
value=
"
<?=
$thermal_sensors_widget_coreWarningTempThreshold
?>
"
/>
</td>
</td>
<td
align=
"right"
>
<td>
<label
for=
"thermal_sensors_widget_pulsate_warning"
>
Pulsate Warning:
</label>
<label
for=
"thermal_sensors_widget_pulsate_warning"
>
Pulsate Warning:
</label>
<input
type=
"checkbox"
<input
type=
"checkbox"
id=
"thermal_sensors_widget_pulsate_warning"
id=
"thermal_sensors_widget_pulsate_warning"
...
@@ -232,7 +235,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
...
@@ -232,7 +235,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
align=
"right"
>
<td>
Core Critical:
Core Critical:
</td>
</td>
<td>
<td>
...
@@ -241,7 +244,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
...
@@ -241,7 +244,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
id=
"thermal_sensors_widget_core_critical_threshold"
id=
"thermal_sensors_widget_core_critical_threshold"
value=
"
<?=
$thermal_sensors_widget_coreCriticalTempThreshold
?>
"
/>
value=
"
<?=
$thermal_sensors_widget_coreCriticalTempThreshold
?>
"
/>
</td>
</td>
<td
align=
"right"
>
<td>
<label
for=
"thermal_sensors_widget_pulsate_critical"
>
Pulsate Critical:
</label>
<label
for=
"thermal_sensors_widget_pulsate_critical"
>
Pulsate Critical:
</label>
<input
type=
"checkbox"
<input
type=
"checkbox"
id=
"thermal_sensors_widget_pulsate_critical"
id=
"thermal_sensors_widget_pulsate_critical"
...
@@ -250,12 +253,12 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
...
@@ -250,12 +253,12 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
align=
"right"
colspan=
"3"
>
<td
colspan=
"3"
>
<input
type=
"submit"
id=
"thermal_sensors_widget_submit"
name=
"thermal_sensors_widget_submit"
class=
"formbtn"
value=
"Save"
/>
<input
type=
"submit"
id=
"thermal_sensors_widget_submit"
name=
"thermal_sensors_widget_submit"
class=
"
btn btn-primary
formbtn"
value=
"Save"
/>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
align=
"left"
colspan=
"3"
>
<td
colspan=
"3"
>
<span>
* You can configure a proper Thermal Sensor / Module under
<br
/>
<span>
* You can configure a proper Thermal Sensor / Module under
<br
/>
<a
href=
"system_advanced_misc.php"
>
System
>
Advanced
>
Miscellaneous : Thermal Sensors section
</a>
.
</span>
<a
href=
"system_advanced_misc.php"
>
System
>
Advanced
>
Miscellaneous : Thermal Sensors section
</a>
.
</span>
</td>
</td>
...
...
src/www/widgets/widgets/traffic_graphs.widget.php
View file @
30a3036f
<?php
<?php
/*
/*
$Id$
Copuyright (C) 20124 Deciso B.V.
Copyright 2007 Scott Dale
Copyright 2007 Scott Dale
Part of pfSense widgets (https://www.pfsense.org)
originally based on m0n0wall (http://m0n0.ch/wall)
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.
...
@@ -39,11 +36,6 @@ require_once("functions.inc");
...
@@ -39,11 +36,6 @@ require_once("functions.inc");
$first_time
=
false
;
$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"
]))
{
if
(
!
is_array
(
$config
[
"widgets"
][
"trafficgraphs"
]))
{
$first_time
=
true
;
$first_time
=
true
;
$config
[
"widgets"
][
"trafficgraphs"
]
=
array
();
$config
[
"widgets"
][
"trafficgraphs"
]
=
array
();
...
...
src/www/widgets/widgets/wake_on_lan.widget.php
View file @
30a3036f
<?php
<?php
/*
/*
wake_on_lan.widget.php
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2010 Yehuda Katz
Copyright (C) 2010 Yehuda Katz
Redistribution and use in source and binary forms, with or without
Redistribution and use in source and binary forms, with or without
...
...
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