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
Hide 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
/*
Copyri
tgh
(C) 2014 Deciso B.V.
Copyri
ght
(C) 2014 Deciso B.V.
Copyright (C) 2009-2010 Jim Pingle
Redistribution and use in source and binary forms, with or without
...
...
@@ -44,7 +44,16 @@ if ($_GET['textonly'] == "true") {
<script
type=
"text/javascript"
>
//
<!
[
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>
src/www/widgets/widgets/log.widget.php
View file @
30a3036f
...
...
@@ -124,21 +124,40 @@ function format_log_line(row) {
<input
type=
"hidden"
id=
"log-config"
name=
"log-config"
value=
""
/>
<div
id=
"log-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<form
action=
"/widgets/widgets/log.widget.php"
method=
"post"
name=
"iforma"
>
<table
class=
"table table-striped"
>
<tbody>
<tr>
<td>
Number of lines to display:
</td>
</tr>
<tr>
<td>
<select
name=
"filterlogentries"
class=
"formfld unknown"
id=
"filterlogentries"
>
<?php
for
(
$i
=
1
;
$i
<=
20
;
$i
++
)
{
?>
<option
value=
"
<?php
echo
$i
;
?>
"
<?php
if
(
$nentries
==
$i
)
echo
"selected=
\"
selected
\"
"
;
?>
>
<?php
echo
$i
;
?>
</option>
<?php
}
?>
</select>
</td>
</tr>
<?php
$Include_Act
=
explode
(
" "
,
$nentriesacts
);
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=
"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
</td>
</tr>
<tr>
<td>
Interfaces:
</td>
</tr>
<tr>
<td>
<select
id=
"filterlogentriesinterfaces"
name=
"filterlogentriesinterfaces"
class=
"formselect"
>
<option
value=
"All"
>
ALL
</option>
<?php
...
...
@@ -154,7 +173,15 @@ function format_log_line(row) {
unset
(
$Include_Act
);
?>
</select>
</td>
</tr>
<tr>
<td>
<input
id=
"submita"
name=
"submita"
type=
"submit"
class=
"btn btn-primary formbtn"
value=
"Save"
/>
</td>
</tr>
</tbody>
</table>
</form>
</div>
...
...
src/www/widgets/widgets/ntp_status.widget.php
View file @
30a3036f
<?php
/*
$Id$
Copyright 2007 Scott Dale
Part of pfSense widgets (https://www.pfsense.org)
originally based on m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2014 Deciso B.V.
Copyright (c) 2007 Scott Dale
Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
and Jonathan Watt <jwatt@jwatt.org>.
All rights reserved.
...
...
@@ -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>
<tr>
<td
width=
"40%"
class=
"vncellt"
>
Sync Source
</td>
...
...
@@ -450,7 +447,7 @@ function clockUpdate()
</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>
<tr>
<td
width=
"40%"
class=
"vncellt"
>
Server Time
</td>
...
...
src/www/widgets/widgets/openvpn.widget.php
View file @
30a3036f
<?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
;
...
...
@@ -69,7 +94,7 @@ $clients = openvpn_get_active_clients();
jQuery
(
icon
).
css
(
"
cursor
"
,
"
wait
"
);
}
jQuery
(
'
img
[name="i:
'
+
mport
+
"
:
"
+
remipp
+
'
"]
'
).
each
(
busy
);
jQuery
(
'
span
[name="i:
'
+
mport
+
"
:
"
+
remipp
+
'
"]
'
).
each
(
busy
);
jQuery
.
ajax
(
"
<?=
$_SERVER
[
'SCRIPT_NAME'
];
?>
"
+
...
...
@@ -93,7 +118,7 @@ $clients = openvpn_get_active_clients();
<?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>
<td
colspan=
"6"
class=
"listtopic"
>
<?=
$server
[
'name'
];
?>
Client connections
...
...
@@ -119,10 +144,10 @@ $clients = openvpn_get_active_clients();
<?=
$conn
[
'remote_host'
];
?>
</td>
<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;'
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>
</tr>
<tr
name=
'
<?php
echo
"r:
{
$server
[
'mgmt'
]
}
:
{
$conn
[
'remote_host'
]
}
"
;
?>
'
class=
"
<?=
$evenRowClass
?>
"
>
...
...
@@ -147,7 +172,7 @@ $clients = openvpn_get_active_clients();
<?php
endforeach
;
?>
<?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>
<td
colspan=
"6"
class=
"listtopic"
>
Peer to Peer Server Instance Statistics
...
...
@@ -172,12 +197,12 @@ $clients = openvpn_get_active_clients();
<?php
if
(
$sk_server
[
'status'
]
==
"up"
)
{
/* tunnel is up */
$iconfn
=
"
interface_up
"
;
$iconfn
=
"
text-success
"
;
}
else
{
/* 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>
</tr>
...
...
@@ -197,14 +222,14 @@ $clients = openvpn_get_active_clients();
<?php
}
?>
<?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>
<td
colspan=
"6"
class=
"listtopic"
>
Client Instance Statistics
</td>
</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>
<td
class=
"listhdrr"
>
Name/Time
</td>
<td
class=
"listhdrr"
>
Remote/Virtual IP
</td>
...
...
@@ -222,12 +247,12 @@ $clients = openvpn_get_active_clients();
<?php
if
(
$client
[
'status'
]
==
"up"
)
{
/* tunnel is up */
$iconfn
=
"
interface_up
"
;
$iconfn
=
"
text-success
"
;
}
else
{
/* 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>
</tr>
...
...
src/www/widgets/widgets/picture.widget.php
View file @
30a3036f
<?php
/*
$Id$
Copyright 2009 Scott Ullrich
Copyright (C) 2014 Deciso B.V.
Copyright
(C)
2009 Scott Ullrich
Part of pfSense widgets (https://www.pfsense.org)
Redistribution and use in source and binary forms, with or without
...
...
@@ -73,17 +73,29 @@ if($_POST) {
<div
id=
"picture-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<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"
/>
<input
id=
"submita"
name=
"submita"
type=
"submit"
class=
"formbtn"
value=
"Upload"
/>
<table
class=
"table table-striped"
>
<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>
</div>
<!-- hide picture if none is defined in the configuration -->
<?php
if
(
$config
[
'widgets'
][
'picturewidget_filename'
]
!=
""
)
:
?>
<div
id=
"picture-widgets"
style=
"padding: 5px"
>
<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"
/>
</a>
</div>
<?php
endif
?>
<!-- needed to show the settings widget icon -->
<script
type=
"text/javascript"
>
//
<!
[
CDATA
[
...
...
src/www/widgets/widgets/rss.widget.php
View file @
30a3036f
<?php
/*
$Id$
Copyright 2009 Scott Ullrich
Part of pfSense widgets (https://www.pfsense.org)
copyright (C) 2014 Deciso B.V.
Copyright (C) 2009 Scott Ullrich
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
...
...
@@ -56,8 +55,8 @@ if(is_numeric($config['widgets']['rsswidgettextlength']))
// Set a default feed if none exists
if
(
!
$rss_feed_s
)
{
$rss_feed_s
=
"https://
blog.pfsense.org
"
;
$config
[
'widgets'
][
'rssfeed'
]
=
"https://
blog.pfsense.org
"
;
$rss_feed_s
=
"https://
opnsense.org/feed/
"
;
$config
[
'widgets'
][
'rssfeed'
]
=
"https://
opnsense.org/feed/
"
;
}
if
(
!
$max_items
)
...
...
@@ -80,11 +79,14 @@ else
<div
id=
"rss-settings"
class=
"widgetconfigdiv"
style=
"display:none;"
>
<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>
<br
/>
<table
summary=
"rss widget"
>
<table
class=
"table table-striped"
summary=
"rss widget"
>
<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:
</td>
<td>
...
...
@@ -98,7 +100,7 @@ else
</td>
</tr>
<tr>
<td
align=
"right"
>
<td>
Widget height:
</td>
<td>
...
...
@@ -112,7 +114,7 @@ else
</td>
</tr>
<tr>
<td
align=
"right"
>
<td>
Show how many characters from story:
</td>
<td>
...
...
@@ -126,11 +128,8 @@ else
</td>
</tr>
<tr>
<td>
</td>
<td>
<input
id=
"submitc"
name=
"submitc"
type=
"submit"
class=
"formbtn"
value=
"Save"
/>
<td
colspan=
"2"
>
<input
id=
"submitc"
name=
"submitc"
type=
"submit"
class=
"btn btn-primary formbtn"
value=
"Save"
/>
</td>
</tr>
</table>
...
...
@@ -165,7 +164,7 @@ else
$content
=
$item
->
get_content
();
$content
=
strip_tags
(
$content
);
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
++
;
if
(
$counter
>
$max_items
)
break
;
...
...
src/www/widgets/widgets/services_status.widget.php
View file @
30a3036f
<?php
/*
services_status.widget.php
Copyright (C) 2014
Copyright (C) 2004, 2005 Scott Ullrich
All rights reserved.
services_status.widget.php
Copyright (C) 2007 Sam Wenham
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
...
...
@@ -55,7 +53,7 @@ if(isset($_POST['servicestatusfilter'])) {
</form>
</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>
<td
class=
"widgetsubheader"
align=
"center"
><b>
Service
</b></td>
<td
class=
"widgetsubheader"
align=
"center"
><b>
Description
</b></td>
...
...
src/www/widgets/widgets/smart_status.widget.php
View file @
30a3036f
<?php
/*
Copyright (C) 2014 Deciso B.V.
Copyright 2012 mkirbst @ pfSense Forum
Part of pfSense widgets (https://www.pfsense.org)
All rights reserved.
Redistribution and use in source and binary forms, with or without
...
...
@@ -32,7 +32,7 @@ require_once("functions.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>
<td
class=
"widgetsubheader"
align=
"center"
><b>
<?php
echo
gettext
(
"Drive"
)
?>
</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
/*
$Id: thermal_sensors.widget.php
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
Copyright (C) 2014 Deciso B.V.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
...
...
@@ -32,6 +24,17 @@
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
(
"/usr/local/www/widgets/include/thermal_sensors.inc"
);
...
...
@@ -49,8 +52,8 @@ const WIDGETS_CONFIG_SECTION_KEY = "widgets";
const
THERMAL_SENSORS_WIDGET_SUBSECTION_KEY
=
"thermal_sensors_widget"
;
//default constants
const
DEFAULT_WARNING_THRESHOLD
=
6
0
;
//60 C
const
DEFAULT_CRITICAL_THRESHOLD
=
7
0
;
//70 C
const
DEFAULT_WARNING_THRESHOLD
=
7
0
;
//60 C
const
DEFAULT_CRITICAL_THRESHOLD
=
8
0
;
//70 C
const
MIN_THRESHOLD_VALUE
=
1
;
//deg C
const
MAX_THRESHOLD_VALUE
=
100
;
//deg C
...
...
@@ -168,7 +171,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
<input
type=
"hidden"
id=
"thermal_sensors-config"
name=
"thermal_sensors-config"
value=
""
/>
<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"
>
<table
width=
"100%"
border=
"0"
summary=
"thermal sensors widget"
>
<table
class=
"table table-striped"
width=
"100%"
border=
"0"
summary=
"thermal sensors widget"
>
<tr>
<td
align=
"left"
colspan=
"2"
>
<span
style=
"font-weight: bold"
>
Thresholds in
°
C (1 to 100):
</span>
...
...
@@ -178,7 +181,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
</td>
</tr>
<tr>
<td
align=
"right"
>
<td>
Zone Warning:
</td>
<td>
...
...
@@ -187,7 +190,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
id=
"thermal_sensors_widget_zone_warning_threshold"
value=
"
<?=
$thermal_sensors_widget_zoneWarningTempThreshold
;
?>
"
/>
</td>
<td
align=
"right"
>
<td>
<label
for=
"thermal_sensors_widget_show_raw_output"
>
Show raw output (no graph):
</label>
<input
type=
"checkbox"
id=
"thermal_sensors_widget_show_raw_output"
...
...
@@ -196,7 +199,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
</td>
</tr>
<tr>
<td
align=
"right"
>
<td>
Zone Critical:
</td>
<td>
...
...
@@ -205,7 +208,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
id=
"thermal_sensors_widget_zone_critical_threshold"
value=
"
<?=
$thermal_sensors_widget_zoneCriticalTempThreshold
;
?>
"
/>
</td>
<td
align=
"right"
>
<td>
<label
for=
"thermal_sensors_widget_show_full_sensor_name"
>
Show full sensor name:
</label>
<input
type=
"checkbox"
id=
"thermal_sensors_widget_show_full_sensor_name"
...
...
@@ -214,7 +217,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
</td>
</tr>
<tr>
<td
align=
"right"
>
<td>
Core Warning:
</td>
<td>
...
...
@@ -223,7 +226,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
id=
"thermal_sensors_widget_core_warning_threshold"
value=
"
<?=
$thermal_sensors_widget_coreWarningTempThreshold
?>
"
/>
</td>
<td
align=
"right"
>
<td>
<label
for=
"thermal_sensors_widget_pulsate_warning"
>
Pulsate Warning:
</label>
<input
type=
"checkbox"
id=
"thermal_sensors_widget_pulsate_warning"
...
...
@@ -232,7 +235,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
</td>
</tr>
<tr>
<td
align=
"right"
>
<td>
Core Critical:
</td>
<td>
...
...
@@ -241,7 +244,7 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
id=
"thermal_sensors_widget_core_critical_threshold"
value=
"
<?=
$thermal_sensors_widget_coreCriticalTempThreshold
?>
"
/>
</td>
<td
align=
"right"
>
<td>
<label
for=
"thermal_sensors_widget_pulsate_critical"
>
Pulsate Critical:
</label>
<input
type=
"checkbox"
id=
"thermal_sensors_widget_pulsate_critical"
...
...
@@ -250,12 +253,12 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
</td>
</tr>
<tr>
<td
align=
"right"
colspan=
"3"
>
<input
type=
"submit"
id=
"thermal_sensors_widget_submit"
name=
"thermal_sensors_widget_submit"
class=
"formbtn"
value=
"Save"
/>
<td
colspan=
"3"
>
<input
type=
"submit"
id=
"thermal_sensors_widget_submit"
name=
"thermal_sensors_widget_submit"
class=
"
btn btn-primary
formbtn"
value=
"Save"
/>
</td>
</tr>
<tr>
<td
align=
"left"
colspan=
"3"
>
<td
colspan=
"3"
>
<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>
</td>
...
...
src/www/widgets/widgets/traffic_graphs.widget.php
View file @
30a3036f
<?php
/*
$Id$
Copuyright (C) 20124 Deciso B.V.
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>
and Jonathan Watt <jwatt@jwatt.org>.
All rights reserved.
...
...
@@ -39,11 +36,6 @@ 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
();
...
...
src/www/widgets/widgets/wake_on_lan.widget.php
View file @
30a3036f
<?php
/*
wake_on_lan.widget.php
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2010 Yehuda Katz
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