Skip to content

Commit

Permalink
updating heartbeat dashboard page, configuration items and database s…
Browse files Browse the repository at this point in the history
…ettings
  • Loading branch information
lirantal committed Feb 26, 2011
1 parent b4cd015 commit cd17a43
Show file tree
Hide file tree
Showing 7 changed files with 338 additions and 5 deletions.
171 changes: 171 additions & 0 deletions config-reports-dashboard.php
@@ -0,0 +1,171 @@
<?php
/*
*********************************************************************************************************
* daloRADIUS - RADIUS Web Platform
* Copyright (C) 2007 - Liran Tal <liran@enginx.com> All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*********************************************************************************************************
*
* Authors: Liran Tal <liran@enginx.com>
*
*********************************************************************************************************
*/

include ("library/checklogin.php");
$operator = $_SESSION['operator_user'];

include('library/check_operator_perm.php');

include_once('library/config_read.php');
$log = "visited page: ";
include('include/config/logging.php');


include ("library/config_read.php");

if (isset($_REQUEST['submit'])) {

if (isset($_REQUEST['config_dashboard_dalo_secretkey']))
$configValues['CONFIG_DASHBOARD_DALO_SECRETKEY'] = $_REQUEST['config_dashboard_dalo_secretkey'];

if (isset($_REQUEST['config_dashboard_dalo_debug']))
$configValues['CONFIG_DASHBOARD_DALO_DEBUG'] = $_REQUEST['config_dashboard_dalo_debug'];

include ("library/config_write.php");
}


?>

<?php
include ("menu-config-reports.php");
?>

<?php
include_once ("library/tabber/tab-layout.php");
?>


<div id="contentnorightbar">

<h2 id="Intro"><a href="#" onclick="javascript:toggleShowDiv('helpPage')"><?php echo $l['Intro']['configdashboard.php']; ?>
<h144>+</h144></a></h2>

<div id="helpPage" style="display:none;visibility:visible" >
<?php echo $l['helpPage']['configdashboard'] ?>
<br/>
</div>
<?php
include_once('include/management/actionMessages.php');
?>

<form name="dashboardsettings" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">

<div class="tabber">

<div class="tabbertab" title="<?php echo $l['title']['Dashboard']; ?>">

<fieldset>

<h302><?php echo $l['title']['Settings']; ?></h302>
<br/>

<ul>

<li class='fieldset'>
<label for='config_dashboard_dalo_secretkey' class='form'><?php echo $l['all']['DashboardSecretKey'] ?></label>
<input type='text' value="<?php echo $configValues['CONFIG_DASHBOARD_DALO_SECRETKEY'] ?>" name="config_dashboard_dalo_secretkey" />
</li>

<li class='fieldset'>
<label for='config_dashboard_dalo_debug' class='form'><?php echo $l['all']['DashboardDebug']?></label>
<select class='form' name="config_dashboard_dalo_debug">
<option value="<?php echo $configValues['CONFIG_DASHBOARD_DALO_DEBUG'] ?>"> <?php echo $configValues['CONFIG_DASHBOARD_DALO_DEBUG'] ?> </option>
<option value=""></option>
<option value="0">0</option>
<option value="1">1</option>
</select>
</li>

<li class='fieldset'>
<br/>
<hr><br/>
<input type='submit' name='submit' value='<?php echo $l['buttons']['apply'] ?>' class='button' />
</li>

</ul>

</fieldset>

</div>


<div class="tabbertab" title="<?php echo $l['title']['Dashboard']; ?>">

<fieldset>

<h302><?php echo $l['title']['Settings']; ?></h302>
<br/>

<ul>

<li class='fieldset'>
<label for='config_dashboard_dalo_delay_soft' class='form'><?php echo $l['all']['DashboardDelaySoft'] ?></label>
<input type='text' value="<?php echo $configValues['CONFIG_DASHBOARD_DALO_DELAYSOFT'] ?>" name="config_dashboard_dalo_delay_soft" />
</li>

<li class='fieldset'>
<label for='config_dashboard_dalo_delay_hard' class='form'><?php echo $l['all']['DashboardDelayHard'] ?></label>
<input type='text' value="<?php echo $configValues['CONFIG_DASHBOARD_DALO_DELAYHARD'] ?>" name="config_dashboard_dalo_delay_hard" />
</li>

<li class='fieldset'>
<br/>
<hr><br/>
<input type='submit' name='submit' value='<?php echo $l['buttons']['apply'] ?>' class='button' />
</li>

</ul>

</fieldset>

</div>

</div>


</form>


<br/><br/>






</div>

<div id="footer">

<?php
include 'page-footer.php';
?>

</div>

</div>
</div>


</body>
</html>
66 changes: 66 additions & 0 deletions config-reports.php
@@ -0,0 +1,66 @@
<?php
/*
*********************************************************************************************************
* daloRADIUS - RADIUS Web Platform
* Copyright (C) 2007 - Liran Tal <liran@enginx.com> All Rights Reserved.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*********************************************************************************************************
*
* Authors: Liran Tal <liran@enginx.com>
*
*********************************************************************************************************
*/

include ("library/checklogin.php");
$operator = $_SESSION['operator_user'];


include_once('library/config_read.php');
$log = "visited page: ";
include('include/config/logging.php');

?>

<?php

include ("menu-config-reports.php");

?>


<div id="contentnorightbar">

<h2 id="Intro"><a href="#" onclick="javascript:toggleShowDiv('helpPage')"><?php echo $l['Intro']['configmain.php'] ?>
<h144>+</h144></a></h2>

<div id="helpPage" style="display:none;visibility:visible" >
<?php echo $l['helpPage']['configmain'] ?>
<br/>
</div>
<br/>

</div>

<div id="footer">

<?php
include 'page-footer.php';
?>

</div>

</div>
</div>


</body>
</html>
11 changes: 9 additions & 2 deletions contrib/db/mysql-migrate-0.98-to-0.99.sql
Expand Up @@ -234,7 +234,7 @@ CREATE TABLE IF NOT EXISTS `node` (
-- Generic fields

`id` int(11) NOT NULL auto_increment,
`time` varchar(20) NOT NULL COMMENT 'Time of last checkin',
`time` datetime NOT NULL default '00-00-0000 00:00:00' COMMENT 'Time of last checkin',

-- Fields used in the front end; ignored by checkin-batman

Expand Down Expand Up @@ -656,4 +656,11 @@ INSERT INTO `operators_acl` VALUES
INSERT INTO `operators_acl_files` (`file`, `category`, `section`) VALUES
('bill_invoice_report', 'Billing', 'Invoice');
INSERT INTO `operators_acl` VALUES
(0,6,'bill_invoice_report',1)
(0,6,'bill_invoice_report',1);

-- Adding ACL for the new Configuration options
INSERT INTO `operators_acl_files` (`file`, `category`, `section`) VALUES
('config_reports_dashboard', 'Configuration', 'Reporting');
INSERT INTO `operators_acl` VALUES
(0,6,'config_reports_dashboard',1);

1 change: 1 addition & 0 deletions include/menu/config-subnav.php
Expand Up @@ -2,6 +2,7 @@
<ul id="subnav">

<li><a href="config-main.php"><em>G</em>eneral</a></li>
<li><a href="config-reports.php"><em>R</em>eporting</a></li>
<li><a href="config-maint.php"><em>M</em>aintenance</a></li>
<li><a href="config-operators.php"><em>O</em>perators</a></li>
<li><a href="config-backup.php"><em>B</em>ackup</a></li>
Expand Down
21 changes: 21 additions & 0 deletions lang/en.php
Expand Up @@ -53,9 +53,17 @@
$l['all']['RADIUSDictionaryPath'] = "RADIUS Dictionary Path";


$l['all']['DashboardSecretKey'] = "Dashboard Secret Key";
$l['all']['DashboardDebug'] = "Debug";
$l['all']['DashboardDelaySoft'] = "Time in minutes to consider a 'soft' delay limit";
$l['all']['DashboardDelayHard'] = "Time in minutes to consider a 'hard' delay limit";



$l['all']['SendWelcomeNotification'] = "Send Welcome Notification";
$l['all']['SMTPServerAddress'] = "SMTP Server Address";
$l['all']['SMTPServerPort'] = "SMTP Server Port";
$l['all']['SMTPServerFromEmail'] = "From Email Address";

$l['all']['customAttributes'] = "Custom Attributes";

Expand Down Expand Up @@ -635,6 +643,9 @@
* Links and Buttons
************************************************************************************/

$l['button']['DashboardSettings'] = "Dashboard Settings";


$l['button']['GenerateReport'] = "Generate Report";

$l['button']['ListPayTypes'] = "List Payment Types";
Expand Down Expand Up @@ -819,6 +830,9 @@
$l['title']['ImportUsers'] = "Import Users";


$l['title']['Dashboard'] = "Dashboard";
$l['title']['DashboardAlerts'] = "Alerts";

$l['title']['Invoice'] = "Invoice";
$l['title']['Invoices'] = "Invoices";
$l['title']['InvoiceRemoval'] = "Invoice Removal";
Expand Down Expand Up @@ -976,6 +990,10 @@

/* ********************************************************************************** */

$l['Intro']['configdashboard.php'] = "Dashbard Settings";



$l['Intro']['paymenttypesmain.php'] = "Payment Types Page";
$l['Intro']['paymenttypesdel.php'] = "Delete Payment Type entry";
$l['Intro']['paymenttypesedit.php'] = "Edit Payment Type Details";
Expand Down Expand Up @@ -1197,6 +1215,9 @@
* page, basically your expanded tool-tip.
************************************************************************************/

$l['helpPage']['configdashboard'] = "Dashboard Settings";


$l['helpPage']['repnewusers'] = "The following table lists new users created each month.";

$l['helpPage']['login'] = "";
Expand Down
39 changes: 39 additions & 0 deletions menu-config-reports.php
@@ -0,0 +1,39 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>daloRADIUS</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/1.css" type="text/css" media="screen,projection" />
</head>
<script src="library/javascript/pages_common.js" type="text/javascript"></script>
<body>
<?php
include_once ("lang/main.php");
?>

<div id="wrapper">
<div id="innerwrapper">

<?php
$m_active = "Config";
include_once ("include/menu/menu-items.php");
include_once ("include/menu/config-subnav.php");
?>

<div id="sidebar">

<h2>Configuration</h2>

<h3>Reporting Settings</h3>


<ul class="subnav">

<li><a href="config-reports-dashboard.php"><b>&raquo;</b>
<?php echo $l['button']['DashboardSettings'] ?></a>
</li>


</ul>

</div>

0 comments on commit cd17a43

Please sign in to comment.