2010-10-25 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_agents.php, godmode/agentes/modificar_agente.php,
	godmode/alerts/alert_list.list.php: clean source style.
	
	* godmode/servers/manage_export_form.php: fixed a unclose parentheses.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3459 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-10-25 15:55:16 +00:00
parent c1c8dbcb15
commit 13dd0e4ae5
4 changed files with 34 additions and 14 deletions

View File

@ -1,4 +1,11 @@
2010-10-21 Miguel de Dios <miguel.dedios@artica.es> 2010-10-25 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_agents.php, godmode/agentes/modificar_agente.php,
godmode/alerts/alert_list.list.php: clean source style.
* godmode/servers/manage_export_form.php: fixed a unclose parentheses.
2010-10-25 Miguel de Dios <miguel.dedios@artica.es>
* extensions/module_groups.php: show color for when the alert fired, and * extensions/module_groups.php: show color for when the alert fired, and
added cluetip for more details. added cluetip for more details.

View File

@ -47,7 +47,9 @@ if (isset ($_GET["borrar_agente"])) { // if delete agent
if (give_acl ($config["id_user"], $id_grupo, "AW")==1) { if (give_acl ($config["id_user"], $id_grupo, "AW")==1) {
$id_agentes[0] = $id_agente; $id_agentes[0] = $id_agente;
delete_agent ($id_agentes); delete_agent ($id_agentes);
} else { // NO permissions. }
else {
// NO permissions.
audit_db ($config["id_user"],$_SERVER['REMOTE_ADDR'], "ACL Violation", audit_db ($config["id_user"],$_SERVER['REMOTE_ADDR'], "ACL Violation",
"Trying to delete agent \'$agent_name\'"); "Trying to delete agent \'$agent_name\'");
require ("general/noaccess.php"); require ("general/noaccess.php");
@ -59,11 +61,12 @@ if (isset ($_GET["borrar_agente"])) { // if delete agent
print_page_header (__('Agent configuration')." &raquo; ".__('Agents defined in Pandora'), "", false, "", true); print_page_header (__('Agent configuration')." &raquo; ".__('Agents defined in Pandora'), "", false, "", true);
// Show group selector // Show group selector
if (isset($_POST["ag_group"])){ if (isset($_POST["ag_group"])) {
$ag_group = get_parameter_post ("ag_group"); $ag_group = get_parameter_post ("ag_group");
echo "<form method='post' echo "<form method='post'
action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group_refresh=".$ag_group."'>"; action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&ag_group_refresh=".$ag_group."'>";
} else { }
else {
echo "<form method='post' echo "<form method='post'
action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'>"; action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'>";
} }
@ -86,9 +89,10 @@ echo __('Free text for search (*)');
echo "</td><td>"; echo "</td><td>";
// Show group selector // Show group selector
if (isset($_POST["ag_group"])){ if (isset($_POST["ag_group"])) {
$group_mod = "&ag_group_refresh=".get_parameter_post ("ag_group"); $group_mod = "&ag_group_refresh=".get_parameter_post ("ag_group");
} else { }
else {
$group_mod =""; $group_mod ="";
} }
@ -98,10 +102,11 @@ echo "</td><td valign='top'>";
echo "<input name='srcbutton' type='submit' class='sub search' value='".__('Search')."'>"; echo "<input name='srcbutton' type='submit' class='sub search' value='".__('Search')."'>";
echo "</form>"; echo "</form>";
echo "<td>"; echo "<td>";
echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">'; echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">';
print_input_hidden ('new_agent', 1); print_input_hidden ('new_agent', 1);
print_submit_button (__('Create agent'), 'crt', false, 'class="sub next"'); print_submit_button (__('Create agent'), 'crt', false, 'class="sub next"');
echo "</form>"; echo "</form>";
echo "</td></tr></table>"; echo "</td></tr></table>";

View File

@ -425,7 +425,8 @@ foreach ($simple_alerts as $alert) {
$data[6] = __("Default"). " : ".get_db_sql ("SELECT name FROM talert_actions WHERE id = $default_action"); $data[6] = __("Default"). " : ".get_db_sql ("SELECT name FROM talert_actions WHERE id = $default_action");
} }
} else { }
else {
$data[6] = '<ul class="action_list">'; $data[6] = '<ul class="action_list">';
foreach ($actions as $action_id => $action) { foreach ($actions as $action_id => $action) {
$data[6] .= '<li>'; $data[6] .= '<li>';
@ -497,10 +498,12 @@ foreach ($simple_alerts as $alert) {
if ($alert["times_fired"] > 0) { if ($alert["times_fired"] > 0) {
$status = STATUS_ALERT_FIRED; $status = STATUS_ALERT_FIRED;
$title = __('Alert fired').' '.$alert["times_fired"].' '.__('times'); $title = __('Alert fired').' '.$alert["times_fired"].' '.__('times');
} elseif ($alert["disabled"] > 0) { }
elseif ($alert["disabled"] > 0) {
$status = STATUS_ALERT_DISABLED; $status = STATUS_ALERT_DISABLED;
$title = __('Alert disabled'); $title = __('Alert disabled');
} else { }
else {
$status = STATUS_ALERT_NOT_FIRED; $status = STATUS_ALERT_NOT_FIRED;
$title = __('Alert not fired'); $title = __('Alert not fired');
} }
@ -518,7 +521,8 @@ foreach ($simple_alerts as $alert) {
if (isset($data)){ if (isset($data)){
print_table ($table); print_table ($table);
} else { }
else {
echo "<div class='nf'>".__('No alerts defined')."</div>"; echo "<div class='nf'>".__('No alerts defined')."</div>";
} }
@ -564,7 +568,9 @@ $(document).ready (function () {
//---------------------------- //----------------------------
<?php if (! $id_agente) : ?> <?php
if (! $id_agente) {
?>
$("#id_group").pandoraSelectGroupAgent ({ $("#id_group").pandoraSelectGroupAgent ({
callbackBefore: function () { callbackBefore: function () {
$select = $("#id_agent_module").disable (); $select = $("#id_agent_module").disable ();
@ -575,7 +581,9 @@ $(document).ready (function () {
}); });
//$("#id_agent").pandoraSelectAgentModule (); //$("#id_agent").pandoraSelectAgentModule ();
<?php endif; ?> <?php
}
?>
$("a.template_details").cluetip ({ $("a.template_details").cluetip ({
arrows: true, arrows: true,
attribute: 'href', attribute: 'href',

View File

@ -26,7 +26,7 @@ if (! give_acl ($config['id_user'], 0, "PM")) {
return; return;
} }
if (isset (get_parameter("update")) { // Edit mode if (isset (get_parameter("update"))) { // Edit mode
$id_rt = (int) get_parameter_get ("update"); $id_rt = (int) get_parameter_get ("update");
$row = get_db_row ("trecon_task","id_rt",$id_rt); $row = get_db_row ("trecon_task","id_rt",$id_rt);
$name = $row["name"]; $name = $row["name"];