Commit 96899e89 authored by Jos Schellevis's avatar Jos Schellevis

Cleanups icons and a bit more..

parent a17e071a
<?php
/* $Id$ */
/*
filter_log.inc
part of pfSesne by Scott Ullrich
originally based on m0n0wall (http://m0n0.ch/wall)
Copyritgh (C) 2014 Deciso B.V.
Copyright (C) Scott Ullrich
Copyright (C) 2009 Jim Pingle <myfirstname>@<mylastname>.org
All rights reserved.
......@@ -29,10 +26,6 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_BUILDER_BINARIES: /usr/sbin/fifolog_reader /usr/bin/tail /usr/local/sbin/clog
pfSense_MODULE: filter
*/
require 'config.inc';
......@@ -361,13 +354,14 @@ function find_rule_by_number_buffer($rulenum, $type){
}
function find_action_image($action) {
// This function will now return a glyphicon class
global $g;
if ((strstr(strtolower($action), "p")) || (strtolower($action) == "rdr"))
return "/themes/{$g['theme']}/images/icons/icon_pass.gif";
return "glyphicon glyphicon-play text-success";
else if(strstr(strtolower($action), "r"))
return "/themes/{$g['theme']}/images/icons/icon_reject.gif";
return "glyphicon glyphicon-remove text-warning";
else
return "/themes/{$g['theme']}/images/icons/icon_block.gif";
return "glyphicon glyphicon-remove text-danger";
}
/* AJAX specific handlers */
......
<?php
/* $Id$ */
/*
part of pfSense (https://www.pfsense.org/)
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
All rights reserved.
......@@ -28,10 +26,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_MODULE: guiutils
*/
/* DISABLE_PHP_LINT_CHECKING */
class MainTable {
......
<?php
/*
guiconfig.inc
by Scott Ullrich, Copyright 2004, All rights reserved.
originally based on of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004 Scott Ullrich
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......@@ -28,9 +26,6 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_MODULE: base
*/
/* Include authentication routines */
/* THIS MUST BE ABOVE ALL OTHER CODE */
......@@ -744,14 +739,6 @@ function display_widget_tabs(& $tab_array) {
echo "</div>";
}
echo "<script type=\"text/javascript\">";
echo "\n//<![CDATA[\n";
echo "NiftyCheck();\n";
echo "Rounded(\"div.{$tabclass}-tabactive\",\"top\",\"#CCCCCC\",\"#EEEEEE\",\"smooth\");\n";
echo "Rounded(\"div.{$tabclass}-tabdeactive\",\"top\",\"#CCCCCC\",\"#777777\",\"smooth\");\n";
echo "//]]>\n";
echo "</script>";
echo "</div>";
}
......
<?php
/*
headjs.php
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:
......@@ -23,27 +22,19 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_MODULE: header
*/
##|+PRIV
##|*IDENT=page-requiredforjavascript
##|*NAME=Required for javascript page
##|*DESCR=Allow access to the 'Required for javascript' page.
##|*MATCH=headjs.php*
##|-PRIV
require_once("guiconfig.inc");
function getHeadJS() {
global $g, $use_loader_tab_gif;
/*
if(!$use_loader_tab_gif)
$loader_gif = "/themes/{$g['theme']}/images/misc/loader.gif";
else
$loader_gif = "/themes/{$g['theme']}/images/misc/loader_tab.gif";
*/
$headjs = "
var input_errors = '';
jQuery(document).ready(init);
......@@ -63,7 +54,7 @@ function getHeadJS() {
jQuery(\"#submit\").click(submit_form);
jQuery('#submit').click(function() {return false;});
var to_insert = \"<div style='visibility:hidden' id='loading' name='loading'><img src='{$loader_gif}' alt='loader' \/><\/div>\";
var to_insert = \"<div style='visibility:hidden' id='loading' name='loading'><span class='glyphicon glyphicon-refresh' alt='loader'></span><\/div>\";
jQuery('#submit').before(to_insert);
}
}
......@@ -120,9 +111,6 @@ function getHeadJS() {
var message_html;
if (message == '') {
NiftyCheck();
Rounded(\"div#redbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\");
Rounded(\"td#blackbox\",\"all\",\"#FFF\",\"#000000\",\"smooth\");
if(jQuery('#submit'))
jQuery('#submit').css('visibility','visible');
......@@ -137,7 +125,7 @@ function getHeadJS() {
message_html = '<table height=\"32\" width=\"100%\" summary=\"redbox\"><tr><td>';
message_html += '<div style=\"background-color:#990000\" id=\"redbox\">';
message_html += '<table width=\"100%\" summary=\"message\"><tr><td width=\"8%\">';
message_html += '<img style=\"vertical-align:center\" src=\"/themes/{$g['theme']}/images/icons/icon_exclam.gif\" width=\"28\" height=\"32\" alt=\"exclamation\" \/>';
message_html += '<span class=\"glyphicon glyphicon-exclamation-sign\" style=\"vertical-align:center\" alt=\"exclamation\" ></span>';
message_html += '<\/td><td width=\"70%\"><font color=\"white\">';
message_html += '<b>' + message + '<\/b><\/font><\/td>';
......@@ -150,10 +138,6 @@ function getHeadJS() {
message_html += '<\/tr><\/table><\/div><\/td><\/table><br \/>';
jQuery('#inputerrors').html(message_html);
NiftyCheck();
Rounded(\"div#redbox\",\"all\",\"#FFF\",\"#990000\",\"smooth\");
Rounded(\"td#blackbox\",\"all\",\"#FFF\",\"#000000\",\"smooth\");
if(jQuery('#submit'))
jQuery('#submit').css('visibility','visible');
if(jQuery('#cancelbutton'))
......
<?php
/* $Id$ */
/*
index.php
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2004-2012 Scott Ullrich
All rights reserved.
Originally part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......@@ -30,17 +26,6 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_BUILDER_BINARIES: /sbin/ifconfig
pfSense_MODULE: interfaces
*/
##|+PRIV
##|*IDENT=page-system-login/logout
##|*NAME=System: Login / Logout page / Dashboard
##|*DESCR=Allow access to the 'System: Login / Logout' page and Dashboard.
##|*MATCH=index.php*
##|-PRIV
// Turn on buffering to speed up rendering
ini_set('output_buffering','true');
......@@ -357,7 +342,43 @@ function updatePref(){
return false;
}
function changeTabDIV(selectedDiv){
var dashpos = selectedDiv.indexOf("-");
var tabclass = selectedDiv.substring(0,dashpos);
d = document;
//get deactive tabs first
tabclass = tabclass + "-class-tabdeactive";
var tabs = document.getElementsByClassName(tabclass);
var incTabSelected = selectedDiv + "-deactive";
for (i=0; i<tabs.length; i++){
var tab = tabs[i].id;
dashpos = tab.lastIndexOf("-");
var tab2 = tab.substring(0,dashpos) + "-deactive";
if (tab2 == incTabSelected){
tablink = d.getElementById(tab2);
tablink.style.display = "none";
tab2 = tab.substring(0,dashpos) + "-active";
tablink = d.getElementById(tab2);
tablink.style.display = "table-cell";
//now show main div associated with link clicked
tabmain = d.getElementById(selectedDiv);
tabmain.style.display = "block";
}
else
{
tab2 = tab.substring(0,dashpos) + "-deactive";
tablink = d.getElementById(tab2);
tablink.style.display = "table-cell";
tab2 = tab.substring(0,dashpos) + "-active";
tablink = d.getElementById(tab2);
tablink.style.display = "none";
//hide sections we don't want to see
tab2 = tab.substring(0,dashpos);
tabmain = d.getElementById(tab2);
tabmain.style.display = "none";
}
}
}
//]]>
</script>
EOD;
......
/* $Id$ */
/*
ticker.js
Copyright (C) 2012 Marcello Coutinho
Copyright (C) 2012 Carlos Cesario - carloscesario@gmail.com
All rights reserved.
......@@ -30,9 +28,8 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
pfSense_MODULE: utils
*/
function notice_action(action,msgid) {
jQuery.ajax({
type: 'post',
......
<?php
//set variable for custom title
$installed_packages_title = "Installed Packages";
$installed_packages_title_link = "pkg_mgr_installed.php";
?>
<?php
/*
captive_portal_status.widget.php
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2007 Sam Wenham
All rights reserved.
status_captiveportal.php
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
All rights reserved.
......
<?php
/*
$Id$
carp_status.widget.php
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2007 Sam Wenham
All rights reserved.
......
<?php
/*
Original status page code from: services_dyndns.php
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2008 Ermal Luci
Edits to convert it to a widget: dyn_dns_status.widget.php
Copyright (C) 2013 Stanley P. Miller \ stan-qaz
All rights reserved.
......@@ -27,10 +26,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
/*
pfSense_BUILDER_BINARIES: /usr/bin/host
pfSense_MODULE: dyndns
*/
$nocsrf = true;
......
<?php
/*
$Id$
Copyright 2008 Seth Mos
Part of pfSense widgets (https://www.pfsense.org)
originally based on m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2014 Deciso B.V.
Copyright (C) 2008 Seth Mos
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
......
<?php
/*
gmirror_status.widget.php
Copyritgh (C) 2014 Deciso B.V.
Copyright (C) 2009-2010 Jim Pingle
Redistribution and use in source and binary forms, with or without
......
<?php
/*
$Id$
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.
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;
require_once("guiconfig.inc");
require_once("pfsense-utils.inc");
require_once("functions.inc");
require_once("/usr/local/www/widgets/include/installed_packages.inc");
require_once("pkg-utils.inc");
if(is_array($config['installedpackages']['package'])) {
foreach($config['installedpackages']['package'] as $instpkg) {
$tocheck[] = $instpkg['name'];
}
$currentvers = get_pkg_info($tocheck, array('version', 'xmlver'));
}
$updateavailable = false;
?>
<table width="100%" border="0" cellpadding="6" cellspacing="0" summary="installed packages">
<tr>
<td width="15%" class="listhdrr">Package Name</td>
<td width="15%" class="listhdrr">Category</td>
<td width="30%" class="listhdrr">Package Version</td>
</tr>
<?php
if($config['installedpackages']['package'] != "") {
$instpkgs = array();
foreach($config['installedpackages']['package'] as $instpkg)
$instpkgs[] = $instpkg['name'];
natcasesort($instpkgs);
$y=1;
foreach ($instpkgs as $index => $pkgname){
$pkg = $config['installedpackages']['package'][$index];
if($pkg['name'] <> "") { ?>
<tr valign="top">
<td class="listlr">
<?= $pkg['name'] ?>
</td>
<td class="listr">
<?= $pkg['category'] ?>
</td>
<td class="listr">
<?php
$latest_package = $currentvers[$pkg['name']]['version'];
if($latest_package == false) {
// We can't determine this package's version status.
echo "Current: Unknown.<br />Installed: " . $pkg['version'];
} elseif(strcmp($pkg['version'], $latest_package) > 0) {
/* we're running a newer version of the package */
echo "Current: {$latest_package}";
echo "<br />Installed: {$pkg['version']}";
} elseif(strcmp($pkg['version'], $latest_package) < 0) {
/* our package is out of date */
$updateavailable = true;
?>
<div id="updatediv-<?php echo $y; ?>" style="color:red">
<b>Update Available!</b></div><div style="float:left">
Current: <?php echo $latest_package; ?><br />
Installed: <?php echo $pkg['version']; ?></div><div style="float:right">
<a href="pkg_mgr_install.php?mode=reinstallpkg&amp;pkg=<?= $pkg['name']; ?>"><img title="Update this package." src="./themes/<?= $g['theme']; ?>/images/icons/icon_reinstall_pkg.gif" width="17" height="17" border="0" alt="reinstall" /></a>
</div>
<?php
$y++;
} else {
echo $pkg['version'];
} ?>
</td>
</tr>
<?php }
}
} else {
echo "<tr><td colspan=\"5\" align=\"center\">There are no packages currently installed.</td></tr>";
}
?>
</table>
<?php if ($updateavailable): ?>
<script type="text/javascript">
//<![CDATA[
window.onload = function(in_event)
{
for (y=1; y<=<?php echo $y;?>; y++){
textID = "#updatediv-" + y;
jQuery(textID).effect('pulsate');
}
}
//]]>
</script>
<?php endif; ?>
<?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.
......
<?php
/*
$Id: interface_statistics.widget.php
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.
......
<?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.
......@@ -136,7 +133,7 @@ if (isset($config['ipsec']['phase1'])){?>
<?php echo htmlspecialchars($ipsec['src']);?>
<?php echo $spane;?>
</div>
<divstyle="display:table-cell;width:100px"><?php echo $spans;?>
<div style="display:table-cell;width:100px"><?php echo $spans;?>
<?php echo $ipsec['remote-subnet'];?>
<br />
(<?php echo htmlspecialchars($ipsec['dest']);?>)<?php echo $spane;?>
......@@ -147,13 +144,13 @@ if (isset($config['ipsec']['phase1'])){?>
if($ipsec['status'] == "true") {
/* 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' alt='Tunnel status' width='11' height='11' />";
echo "<span class='glyphicon glyphicon-transfer ".$iconfn."' alt='Tunnel status'></span>";
?><?php echo $spane;?></div>
</div>
......
<?php
/*
Copyright 2010 Jim Pingle
Portions copied from status_lb_pool.php, status_lb_vs.php, and vslb.inc:
Copyritgh (C) 2014 Deciso B.V.
Copyright (C) 2010 Jim Pingle
Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
Copyright (C) 2005-2008 Bill Marquette
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.
......@@ -62,12 +58,12 @@ if (!$nentries)
?>
<table bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="load balancer">
<tr>
<table class="table table-stiped" bgcolor="#990000" width="100%" border="0" cellspacing="0" cellpadding="0" summary="load balancer">
<thead>
<td width="10%" class="listhdrr">Server</td>
<td width="10%" class="listhdrr">Pool</td>
<td width="30%" class="listhdr">Description</td>
</tr>
</thead>
<?php $i = 0; foreach ($a_vs as $vsent): ?>
<tr>
<?php
......
<?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.
......@@ -123,16 +120,16 @@ function format_log_line(row) {
//]]>
</script>
<script src="/javascript/filter_log.js" type="text/javascript"></script>
<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;">
<form action="/widgets/widgets/log.widget.php" method="post" name="iforma">
Number of lines to display:
<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>
Number of lines to display:
<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>
<?php
$Include_Act = explode(" ", $nentriesacts);
......@@ -141,8 +138,7 @@ function format_log_line(row) {
<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
<br />
Interfaces:
Interfaces:
<select id="filterlogentriesinterfaces" name="filterlogentriesinterfaces" class="formselect">
<option value="All">ALL</option>
<?php
......@@ -158,12 +154,11 @@ function format_log_line(row) {
unset($Include_Act);
?>
</select>
<input id="submita" name="submita" type="submit" class="formbtn" value="Save" />
<input id="submita" name="submita" type="submit" class="btn btn-primary formbtn" value="Save" />
</form>
</div>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed;" summary="logs">
<table class="table table-striped" width="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed;" summary="logs">
<colgroup>
<col style='width: 7%;' />
<col style='width: 23%;' />
......@@ -190,7 +185,7 @@ function format_log_line(row) {
<tr class="<?=$evenRowClass?>">
<td class="listMRlr nowrap" align="center">
<a href="#" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['act']}"; ?>', outputrule);">
<img border="0" src="<?php echo find_action_image($filterent['act']);?>" width="11" height="11" alt="<?php echo $filterent['act'];?>" title="<?php echo $filterent['act'];?>" />
<span class="<?php echo find_action_image($filterent['act']);?>" alt="<?php echo $filterent['act'];?>" title="<?php echo $filterent['act'];?>" ></span>
</a>
</td>
<td class="listMRr ellipsis nowrap" title="<?php echo htmlspecialchars($filterent['time']);?>"><?php echo substr(htmlspecialchars($filterent['time']),0,-3);?></td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment