2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
* extensions/agents_alerts.php, extensions/snmp_explorer.php, extensions/insert_data.php, extensions/net_tools.php, extensions/resource_exportation.php, extensions/system_info.php, extensions/pandora_logs.php, extensions/agents_modules.php, godmode/reporting/reporting_builder.item_editor.php, godmode/servers/manage_recontask_form.php, godmode/setup/gis_step_2.php, godmode/massive/massive_standby_alerts.php, godmode/massive/massive_operations.php, godmode/massive/massive_add_action_alerts.php, godmode/massive/massive_add_alerts.php, godmode/massive/massive_delete_agents.php, godmode/massive/massive_delete_action_alerts.php, operation/users/user_edit.php, operation/events/events_list.php, operation/integria_incidents/incident.list.php, operation/integria_incidents/incident.workunits.php, operation/tree.php, general/shortcut_bar.php: cleaned source code style. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8054 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bc0d3dc06d
commit
b2d860d6f6
|
@ -1,3 +1,24 @@
|
||||||
|
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* extensions/agents_alerts.php, extensions/snmp_explorer.php,
|
||||||
|
extensions/insert_data.php, extensions/net_tools.php,
|
||||||
|
extensions/resource_exportation.php, extensions/system_info.php,
|
||||||
|
extensions/pandora_logs.php, extensions/agents_modules.php,
|
||||||
|
godmode/reporting/reporting_builder.item_editor.php,
|
||||||
|
godmode/servers/manage_recontask_form.php,
|
||||||
|
godmode/setup/gis_step_2.php,
|
||||||
|
godmode/massive/massive_standby_alerts.php,
|
||||||
|
godmode/massive/massive_operations.php,
|
||||||
|
godmode/massive/massive_add_action_alerts.php,
|
||||||
|
godmode/massive/massive_add_alerts.php,
|
||||||
|
godmode/massive/massive_delete_agents.php,
|
||||||
|
godmode/massive/massive_delete_action_alerts.php,
|
||||||
|
operation/users/user_edit.php, operation/events/events_list.php,
|
||||||
|
operation/integria_incidents/incident.list.php,
|
||||||
|
operation/integria_incidents/incident.workunits.php,
|
||||||
|
operation/tree.php, general/shortcut_bar.php: cleaned source code
|
||||||
|
style.
|
||||||
|
|
||||||
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
|
2013-04-25 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* general/shortcut_bar.php, general/main_menu.php,
|
* general/shortcut_bar.php, general/main_menu.php,
|
||||||
|
|
|
@ -275,7 +275,7 @@ function print_alerts_summary_modal_window($id, $alerts) {
|
||||||
$actionText = '<div style="margin-left: 10px;"><ul class="action_list">';
|
$actionText = '<div style="margin-left: 10px;"><ul class="action_list">';
|
||||||
foreach ($actions as $action) {
|
foreach ($actions as $action) {
|
||||||
$actionText .= '<div><span class="action_name"><li>' . $action['name'];
|
$actionText .= '<div><span class="action_name"><li>' . $action['name'];
|
||||||
if ($action["fires_min"] != $action["fires_max"]){
|
if ($action["fires_min"] != $action["fires_max"]) {
|
||||||
$actionText .= " (".$action["fires_min"] . " / ". $action["fires_max"] . ")";
|
$actionText .= " (".$action["fires_min"] . " / ". $action["fires_max"] . ")";
|
||||||
}
|
}
|
||||||
$actionText .= '</li></span><br /></div>';
|
$actionText .= '</li></span><br /></div>';
|
||||||
|
@ -283,7 +283,7 @@ function print_alerts_summary_modal_window($id, $alerts) {
|
||||||
$actionText .= '</ul></div>';
|
$actionText .= '</ul></div>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!empty($actionDefault)) {
|
if (!empty($actionDefault)) {
|
||||||
$actionText = db_get_sql ("SELECT name FROM talert_actions WHERE id = $actionDefault"). " <i>(".__("Default") . ")</i>";
|
$actionText = db_get_sql ("SELECT name FROM talert_actions WHERE id = $actionDefault"). " <i>(".__("Default") . ")</i>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -241,8 +241,8 @@ function mainAgentsModules() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$match = false;
|
$match = false;
|
||||||
foreach($module['id'] as $module_id){
|
foreach ($module['id'] as $module_id) {
|
||||||
if(!$match && array_key_exists($module_id,$agent_modules)) {
|
if (!$match && array_key_exists($module_id,$agent_modules)) {
|
||||||
$status = modules_get_agentmodule_status($module_id);
|
$status = modules_get_agentmodule_status($module_id);
|
||||||
echo "<td style='text-align: center;'>";
|
echo "<td style='text-align: center;'>";
|
||||||
$win_handle = dechex(crc32($module_id.$module["name"]));
|
$win_handle = dechex(crc32($module_id.$module["name"]));
|
||||||
|
@ -250,7 +250,7 @@ function mainAgentsModules() {
|
||||||
$link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=86400&id=".$module_id."&label=".base64_encode($module["name"])."&refresh=600','day_".$win_handle."')";
|
$link ="winopeng('operation/agentes/stat_win.php?type=$graph_type&period=86400&id=".$module_id."&label=".base64_encode($module["name"])."&refresh=600','day_".$win_handle."')";
|
||||||
|
|
||||||
echo '<a href="javascript:'.$link.'">';
|
echo '<a href="javascript:'.$link.'">';
|
||||||
switch($status){
|
switch ($status) {
|
||||||
case 0:
|
case 0:
|
||||||
ui_print_status_image ('module_ok.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px'));
|
ui_print_status_image ('module_ok.png', modules_get_last_value($module_id), false, array('width' => '20px', 'height' => '20px'));
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -127,7 +127,7 @@ function mainInsertData() {
|
||||||
}
|
}
|
||||||
ui_print_error_message($msg);
|
ui_print_error_message($msg);
|
||||||
}
|
}
|
||||||
if($done > 0){
|
if ($done > 0) {
|
||||||
$msg = sprintf(__('Save agent (%s), module (%s) data xml.'), $agent['nombre'], $agentModule['nombre']);
|
$msg = sprintf(__('Save agent (%s), module (%s) data xml.'), $agent['nombre'], $agentModule['nombre']);
|
||||||
if($done > 1) {
|
if($done > 1) {
|
||||||
$msg .= " ($done)";
|
$msg .= " ($done)";
|
||||||
|
|
|
@ -164,7 +164,7 @@ function main_net_tools () {
|
||||||
|
|
||||||
$int_max = exec ("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.1.0 ");
|
$int_max = exec ("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.1.0 ");
|
||||||
|
|
||||||
for ($ax=0; $ax < $int_max; $ax++){
|
for ($ax=0; $ax < $int_max; $ax++) {
|
||||||
$interface = exec ("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.2.$ax ");
|
$interface = exec ("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.2.$ax ");
|
||||||
$estado = exec ("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.8.$ax ");
|
$estado = exec ("$snmpget -Oqunv -v1 -c $community $ip .1.3.6.1.2.1.2.2.1.8.$ax ");
|
||||||
echo "<tr><td>$interface<td>$estado";
|
echo "<tr><td>$interface<td>$estado";
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
function view_logfile ($file_name) {
|
function view_logfile ($file_name) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if (!file_exists($file_name)){
|
if (!file_exists($file_name)) {
|
||||||
echo "<h2 class='error'>".__("Cannot find file"). "(".$file_name;
|
echo "<h2 class='error'>".__("Cannot find file"). "(".$file_name;
|
||||||
echo ")</h2>";
|
echo ")</h2>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -248,7 +248,7 @@ function output_xml_visual_console($id) {
|
||||||
echo "<width>" . io_safe_output($visual_map['width']) . "</width>\n";
|
echo "<width>" . io_safe_output($visual_map['width']) . "</width>\n";
|
||||||
$items = db_get_all_rows_field_filter('tlayout_data', 'id_layout', $visual_map['id']);
|
$items = db_get_all_rows_field_filter('tlayout_data', 'id_layout', $visual_map['id']);
|
||||||
if ($items === false) $items = array();
|
if ($items === false) $items = array();
|
||||||
foreach ($items as $item){
|
foreach ($items as $item) {
|
||||||
echo "<item>\n";
|
echo "<item>\n";
|
||||||
echo "<other_id>" . $item['id'] . "</other_id>\n"; //OLD ID USE FOR parent item
|
echo "<other_id>" . $item['id'] . "</other_id>\n"; //OLD ID USE FOR parent item
|
||||||
if (!empty($item['label'])) {
|
if (!empty($item['label'])) {
|
||||||
|
|
|
@ -148,14 +148,14 @@ function snmp_explorer() {
|
||||||
$errors = array();
|
$errors = array();
|
||||||
$done = 0;
|
$done = 0;
|
||||||
|
|
||||||
foreach($id_snmp as $id) {
|
foreach ($id_snmp as $id) {
|
||||||
if (isset($interfaces[$id]['ifName']) && $interfaces[$id]['ifName']['value'] != ""){
|
if (isset($interfaces[$id]['ifName']) && $interfaces[$id]['ifName']['value'] != "") {
|
||||||
$ifname = $interfaces[$id]['ifName']['value'];
|
$ifname = $interfaces[$id]['ifName']['value'];
|
||||||
}
|
}
|
||||||
else if (isset($interfaces[$id]['ifDescr']) && $interfaces[$id]['ifDescr']['value'] != ""){
|
else if (isset($interfaces[$id]['ifDescr']) && $interfaces[$id]['ifDescr']['value'] != "") {
|
||||||
$ifname = $interfaces[$id]['ifDescr']['value'];
|
$ifname = $interfaces[$id]['ifDescr']['value'];
|
||||||
}
|
}
|
||||||
foreach($modules as $module) {
|
foreach ($modules as $module) {
|
||||||
$oid_array = explode('.',$module);
|
$oid_array = explode('.',$module);
|
||||||
$oid_array[count($oid_array)-1] = $id;
|
$oid_array[count($oid_array)-1] = $id;
|
||||||
$oid = implode('.',$oid_array);
|
$oid = implode('.',$oid_array);
|
||||||
|
@ -252,13 +252,13 @@ function snmp_explorer() {
|
||||||
|
|
||||||
// Create the interface list for the interface
|
// Create the interface list for the interface
|
||||||
$interfaces_list = array();
|
$interfaces_list = array();
|
||||||
foreach ($interfaces as $interface){
|
foreach ($interfaces as $interface) {
|
||||||
// Get the interface name, removing " " characters and avoid "blank" interfaces
|
// Get the interface name, removing " " characters and avoid "blank" interfaces
|
||||||
if (isset($interface['ifName']) && $interface['ifName']['value'] != ""){
|
if (isset($interface['ifName']) && $interface['ifName']['value'] != "") {
|
||||||
$ifname = $interface['ifName']['value'];
|
$ifname = $interface['ifName']['value'];
|
||||||
}
|
}
|
||||||
else if (isset($interface['ifDescr']) && $interface['ifDescr']['value'] != ""){
|
else if (isset($interface['ifDescr']) && $interface['ifDescr']['value'] != "") {
|
||||||
$ifname = $interface['ifDescr']['value'];
|
$ifname = $interface['ifDescr']['value'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
continue;
|
continue;
|
||||||
|
@ -432,45 +432,45 @@ function snmp_changed_by_multiple_snmp (event, id_snmp, selected) {
|
||||||
$('#module').append ($('<option></option>').html ("Loading...").attr ("value", 0));
|
$('#module').append ($('<option></option>').html ("Loading...").attr ("value", 0));
|
||||||
|
|
||||||
jQuery.post ('ajax.php',
|
jQuery.post ('ajax.php',
|
||||||
{"page" : "godmode/agentes/agent_manager",
|
{"page" : "godmode/agentes/agent_manager",
|
||||||
"get_modules_json_for_multiple_snmp": 1,
|
"get_modules_json_for_multiple_snmp": 1,
|
||||||
"id_snmp[]": idSNMP,
|
"id_snmp[]": idSNMP,
|
||||||
"id_snmp_serialize": $("#hidden-id_snmp_serialize").val()
|
"id_snmp_serialize": $("#hidden-id_snmp_serialize").val()
|
||||||
},
|
},
|
||||||
function (data) {
|
function (data) {
|
||||||
$('#module').empty ();
|
$('#module').empty ();
|
||||||
c = 0;
|
c = 0;
|
||||||
jQuery.each (data, function (i, val) {
|
jQuery.each (data, function (i, val) {
|
||||||
s = js_html_entity_decode(val);
|
s = js_html_entity_decode(val);
|
||||||
$('#module').append ($('<option></option>').html (s).attr ("value", i));
|
$('#module').append ($('<option></option>').html (s).attr ("value", i));
|
||||||
$('#module').fadeIn ('normal');
|
$('#module').fadeIn ('normal');
|
||||||
c++;
|
c++;
|
||||||
});
|
});
|
||||||
if(c == 0){
|
|
||||||
if (typeof($(document).data('text_for_module')) != 'undefined') {
|
|
||||||
$('#module').append ($('<option></option>').html ($(document).data('text_for_module')).attr("value", 0).attr('selected', true));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (typeof(data['any_text']) != 'undefined') {
|
|
||||||
$('#module').append ($('<option></option>').html (data['any_text']).attr ("value", 0).attr('selected', true));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
var anyText = $("#any_text").html(); //Trick for catch the translate text.
|
|
||||||
|
|
||||||
if (anyText == null) {
|
if (c == 0) {
|
||||||
anyText = 'Any';
|
if (typeof($(document).data('text_for_module')) != 'undefined') {
|
||||||
}
|
$('#module').append ($('<option></option>').html ($(document).data('text_for_module')).attr("value", 0).attr('selected', true));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (typeof(data['any_text']) != 'undefined') {
|
||||||
|
$('#module').append ($('<option></option>').html (data['any_text']).attr ("value", 0).attr('selected', true));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var anyText = $("#any_text").html(); //Trick for catch the translate text.
|
||||||
|
|
||||||
$('#module').append ($('<option></option>').html (anyText).attr ("value", 0).attr('selected', true));
|
if (anyText == null) {
|
||||||
}
|
anyText = 'Any';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (selected != undefined)
|
$('#module').append ($('<option></option>').html (anyText).attr ("value", 0).attr('selected', true));
|
||||||
$('#module').attr ('value', selected);
|
}
|
||||||
$('#module').removeAttr('disabled');
|
}
|
||||||
},
|
}
|
||||||
"json"
|
if (selected != undefined)
|
||||||
);
|
$('#module').attr ('value', selected);
|
||||||
|
$('#module').removeAttr('disabled');
|
||||||
|
},
|
||||||
|
"json");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ]]> */
|
/* ]]> */
|
||||||
|
|
|
@ -168,7 +168,7 @@ function show_logfile($file_name, $numLines = 2000) {
|
||||||
function logFilesLines($file_name, $numLines) {
|
function logFilesLines($file_name, $numLines) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
if (!file_exists($file_name)){
|
if (!file_exists($file_name)) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -326,8 +326,9 @@ echo "</div>";
|
||||||
var id_user = $('#hidden-shortcut_id_user').val();
|
var id_user = $('#hidden-shortcut_id_user').val();
|
||||||
function shortcut_check_alerts() {
|
function shortcut_check_alerts() {
|
||||||
jQuery.post ("ajax.php",
|
jQuery.post ("ajax.php",
|
||||||
{"page" : "operation/agentes/alerts_status",
|
{
|
||||||
"get_alert_fired": 1
|
"page" : "operation/agentes/alerts_status",
|
||||||
|
"get_alert_fired": 1
|
||||||
},
|
},
|
||||||
function (data) {
|
function (data) {
|
||||||
$('#shortcut_alerts_fired').text(data);
|
$('#shortcut_alerts_fired').text(data);
|
||||||
|
|
|
@ -188,7 +188,7 @@ $(document).ready (function () {
|
||||||
update_alerts();
|
update_alerts();
|
||||||
|
|
||||||
var recursion;
|
var recursion;
|
||||||
$("#checkbox-recursion").click(function (){
|
$("#checkbox-recursion").click(function () {
|
||||||
recursion = this.checked ? 1 : 0;
|
recursion = this.checked ? 1 : 0;
|
||||||
$("#id_group").trigger("change");
|
$("#id_group").trigger("change");
|
||||||
});
|
});
|
||||||
|
|
|
@ -62,7 +62,7 @@ function process_manage_add ($id_alert_template, $id_agents, $module_names) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count($module_names) == 1 && $module_names[0] == '0'){
|
if(count($module_names) == 1 && $module_names[0] == '0') {
|
||||||
$modules_id = agents_common_modules ($id_agents, false, true);
|
$modules_id = agents_common_modules ($id_agents, false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ if ($delete) {
|
||||||
foreach ($alerts_agent_modules as $alert_agent_module) {
|
foreach ($alerts_agent_modules as $alert_agent_module) {
|
||||||
$agent_module_actions = alerts_get_alert_agent_module_actions ($alert_agent_module['id'], array('id','id_alert_action'));
|
$agent_module_actions = alerts_get_alert_agent_module_actions ($alert_agent_module['id'], array('id','id_alert_action'));
|
||||||
|
|
||||||
foreach ($agent_module_actions as $agent_module_action){
|
foreach ($agent_module_actions as $agent_module_action) {
|
||||||
foreach ($actions as $action) {
|
foreach ($actions as $action) {
|
||||||
if ($agent_module_action['id_alert_action'] == $action) {
|
if ($agent_module_action['id_alert_action'] == $action) {
|
||||||
$result = alerts_delete_alert_agent_module_action ($agent_module_action['id']);
|
$result = alerts_delete_alert_agent_module_action ($agent_module_action['id']);
|
||||||
|
|
|
@ -135,7 +135,7 @@ ui_require_jquery_file ('pandora.controls');
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready (function () {
|
$(document).ready (function () {
|
||||||
var recursion;
|
var recursion;
|
||||||
$("#checkbox-recursion").click(function (){
|
$("#checkbox-recursion").click(function () {
|
||||||
recursion = this.checked ? 1 : 0;
|
recursion = this.checked ? 1 : 0;
|
||||||
$("#id_group").trigger("change");
|
$("#id_group").trigger("change");
|
||||||
});
|
});
|
||||||
|
|
|
@ -141,7 +141,7 @@ $onheader['policies'] = $policiestab;
|
||||||
ui_print_page_header (__('Massive operations'). ' » '. $options[$option], "images/gm_massive_operations.png", false, "", true, $onheader);
|
ui_print_page_header (__('Massive operations'). ' » '. $options[$option], "images/gm_massive_operations.png", false, "", true, $onheader);
|
||||||
|
|
||||||
// Checks if the PHP configuration is correctly
|
// Checks if the PHP configuration is correctly
|
||||||
if ((get_cfg_var("max_execution_time") != 0) or (get_cfg_var("max_input_time") != -1)){
|
if ((get_cfg_var("max_execution_time") != 0) or (get_cfg_var("max_input_time") != -1)) {
|
||||||
echo '<div id="notify_conf" class="notify">';
|
echo '<div id="notify_conf" class="notify">';
|
||||||
echo __("In order to perform massive operations, PHP needs a correct configuration in timeout parameters. Please, open your PHP configuration file (php.ini) for example: <i>sudo vi /etc/php5/apache2/php.ini;</i><br> And set your timeout parameters to a correct value: <br><i> max_execution_time = 0</i> and <i>max_input_time = -1</i>");
|
echo __("In order to perform massive operations, PHP needs a correct configuration in timeout parameters. Please, open your PHP configuration file (php.ini) for example: <i>sudo vi /etc/php5/apache2/php.ini;</i><br> And set your timeout parameters to a correct value: <br><i> max_execution_time = 0</i> and <i>max_input_time = -1</i>");
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
|
|
|
@ -185,7 +185,7 @@ $(document).ready (function () {
|
||||||
clear_alert_fields();
|
clear_alert_fields();
|
||||||
|
|
||||||
var recursion;
|
var recursion;
|
||||||
$("#checkbox-recursion").click(function (){
|
$("#checkbox-recursion").click(function () {
|
||||||
recursion = this.checked ? 1 : 0;
|
recursion = this.checked ? 1 : 0;
|
||||||
$("#id_group").trigger("change");
|
$("#id_group").trigger("change");
|
||||||
});
|
});
|
||||||
|
|
|
@ -482,7 +482,7 @@ html_print_input_hidden('id_item', $idItem);
|
||||||
// Get group list that user has access
|
// Get group list that user has access
|
||||||
$groups_user = users_get_groups ($config['id_user'], "RW", $own_info['is_admin'], true);
|
$groups_user = users_get_groups ($config['id_user'], "RW", $own_info['is_admin'], true);
|
||||||
$groups_id = array();
|
$groups_id = array();
|
||||||
foreach($groups_user as $key => $groups){
|
foreach ($groups_user as $key => $groups) {
|
||||||
$groups_id[] = $groups['id_grupo'];
|
$groups_id[] = $groups['id_grupo'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,11 +45,11 @@ if (is_ajax ()) {
|
||||||
if (isset ($_GET["update"]) or (isset($_GET["crt"]))) { // Edit mode
|
if (isset ($_GET["update"]) or (isset($_GET["crt"]))) { // Edit mode
|
||||||
|
|
||||||
$update_recon = true;
|
$update_recon = true;
|
||||||
if (isset ($_GET["crt"])){
|
if (isset ($_GET["crt"])) {
|
||||||
if ($_GET["crt"] != "update"){
|
if ($_GET["crt"] != "update") {
|
||||||
$update_recon = false;
|
$update_recon = false;
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
$id_rt = get_parameter("upd");
|
$id_rt = get_parameter("upd");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,8 @@ switch ($action) {
|
||||||
|
|
||||||
require_once('gis.php');
|
require_once('gis.php');
|
||||||
return;
|
return;
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$table->width = '90%';
|
$table->width = '90%';
|
||||||
|
|
||||||
|
|
|
@ -554,7 +554,7 @@ $(document).ready( function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't collapse filter if update button has been pushed
|
// Don't collapse filter if update button has been pushed
|
||||||
if ($("#hidden-open_filter").val() == 'true'){
|
if ($("#hidden-open_filter").val() == 'true') {
|
||||||
$("#event_control").toggle();
|
$("#event_control").toggle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -807,7 +807,7 @@ $(document).ready( function() {
|
||||||
|
|
||||||
// Change toggle arrow when it's clicked
|
// Change toggle arrow when it's clicked
|
||||||
$("#tgl_event_control").click(function() {
|
$("#tgl_event_control").click(function() {
|
||||||
if ($("#toggle_arrow").attr("src").match(/[^\.]+down\.png/) == null){
|
if ($("#toggle_arrow").attr("src").match(/[^\.]+down\.png/) == null) {
|
||||||
var params = [];
|
var params = [];
|
||||||
params.push("get_image_path=1");
|
params.push("get_image_path=1");
|
||||||
params.push("img_src=images/down.png");
|
params.push("img_src=images/down.png");
|
||||||
|
|
|
@ -22,7 +22,7 @@ global $result_status;
|
||||||
global $result_groups;
|
global $result_groups;
|
||||||
global $result_resolutions;
|
global $result_resolutions;
|
||||||
|
|
||||||
if (isset ($result_status['status'])){
|
if (isset ($result_status['status'])) {
|
||||||
|
|
||||||
foreach($result_status['status'] as $st) {
|
foreach($result_status['status'] as $st) {
|
||||||
$status[$st['id']] = $st['name'];
|
$status[$st['id']] = $st['name'];
|
||||||
|
@ -33,7 +33,7 @@ if (isset ($result_status['status'])){
|
||||||
$status[0] = __('Any');
|
$status[0] = __('Any');
|
||||||
$status[-10] = __('Not closed');
|
$status[-10] = __('Not closed');
|
||||||
|
|
||||||
if (isset ($result_groups['group'])){
|
if (isset ($result_groups['group'])) {
|
||||||
foreach($result_groups['group'] as $gr) {
|
foreach($result_groups['group'] as $gr) {
|
||||||
$groups[$gr['id']] = $gr['name'];
|
$groups[$gr['id']] = $gr['name'];
|
||||||
}
|
}
|
||||||
|
@ -105,7 +105,7 @@ $table->head[10] = __('Action');
|
||||||
$table->align[4] = "center";
|
$table->align[4] = "center";
|
||||||
$table->align[5] = "center";
|
$table->align[5] = "center";
|
||||||
|
|
||||||
if(isset($result['incident'][0]) && is_array($result['incident'][0])){
|
if(isset($result['incident'][0]) && is_array($result['incident'][0])) {
|
||||||
$incidents = $result['incident'];
|
$incidents = $result['incident'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -41,14 +41,14 @@ $form .= "</form>";
|
||||||
|
|
||||||
ui_toggle($form, __('Add workunit'));
|
ui_toggle($form, __('Add workunit'));
|
||||||
|
|
||||||
if(isset($result['workunit'][0]) && is_array($result['workunit'][0])){
|
if (isset($result['workunit'][0]) && is_array($result['workunit'][0])) {
|
||||||
$workunits = $result['workunit'];
|
$workunits = $result['workunit'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$workunits = $result;
|
$workunits = $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach($workunits as $value) {
|
foreach ($workunits as $value) {
|
||||||
$table->width = "98%";
|
$table->width = "98%";
|
||||||
$table->class = "databox";
|
$table->class = "databox";
|
||||||
$table->colspan[1][0] = 4;
|
$table->colspan[1][0] = 4;
|
||||||
|
@ -57,8 +57,8 @@ foreach($workunits as $value) {
|
||||||
|
|
||||||
$table->data = array();
|
$table->data = array();
|
||||||
|
|
||||||
$table->data[0][0] = $value['id_user']." ".__('said')." ".$value['timestamp'];
|
$table->data[0][0] = $value['id_user'] . " " . __('said') . " " . $value['timestamp'];
|
||||||
$table->data[0][1] = $value['duration']." ".__('Hours')." ".__('Public').": ".$value['public'];
|
$table->data[0][1] = $value['duration'] . " " . __('Hours') . " " . __('Public') . ": " . $value['public'];
|
||||||
|
|
||||||
$table->data[1][0] = $value['description'];
|
$table->data[1][0] = $value['description'];
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,9 @@ if (is_ajax ())
|
||||||
html_print_image ("operation/tree/last_leaf.png", false, array ("style" => 'vertical-align: middle;', "id" => "tree_image_os_" . $row["id_agente"], "pos_tree" => "2" ));
|
html_print_image ("operation/tree/last_leaf.png", false, array ("style" => 'vertical-align: middle;', "id" => "tree_image_os_" . $row["id_agente"], "pos_tree" => "2" ));
|
||||||
|
|
||||||
// This line checks for (non-initialized) asyncronous modules
|
// This line checks for (non-initialized) asyncronous modules
|
||||||
if ($row["estado"] == 0 AND $row["utimestamp"] == 0 AND ($row["id_tipo_modulo"] >= 21 AND $row["id_tipo_modulo"] <= 23)){
|
if ($row["estado"] == 0 AND $row["utimestamp"] == 0
|
||||||
|
AND ($row["id_tipo_modulo"] >= 21
|
||||||
|
AND $row["id_tipo_modulo"] <= 23)) {
|
||||||
$status = STATUS_MODULE_NO_DATA;
|
$status = STATUS_MODULE_NO_DATA;
|
||||||
$title = __('UNKNOWN');
|
$title = __('UNKNOWN');
|
||||||
} // Else checks module status
|
} // Else checks module status
|
||||||
|
@ -651,7 +653,7 @@ treeview_printTree($activeTab);
|
||||||
url: <?php echo '"' . ui_get_full_url("ajax.php", false, false, false) . '"'; ?>,
|
url: <?php echo '"' . ui_get_full_url("ajax.php", false, false, false) . '"'; ?>,
|
||||||
data: "page=<?php echo $_GET['sec2']; ?>&ajax_treeview=1&type=" +
|
data: "page=<?php echo $_GET['sec2']; ?>&ajax_treeview=1&type=" +
|
||||||
type + "&id=" + div_id + "&less_branchs=" + less_branchs + "&id_father=" + id_father + "&status=" + status + "&search_free=" + search_free + "&server_name=" + server_name,
|
type + "&id=" + div_id + "&less_branchs=" + less_branchs + "&id_father=" + id_father + "&status=" + status + "&search_free=" + search_free + "&server_name=" + server_name,
|
||||||
success: function(msg){
|
success: function(msg) {
|
||||||
if (msg.length != 0) {
|
if (msg.length != 0) {
|
||||||
$('#tree_div'+id_father+'_'+type+'_'+div_id).hide();
|
$('#tree_div'+id_father+'_'+type+'_'+div_id).hide();
|
||||||
$('#tree_div'+id_father+'_'+type+'_'+div_id).html(msg);
|
$('#tree_div'+id_father+'_'+type+'_'+div_id).html(msg);
|
||||||
|
@ -766,7 +768,7 @@ treeview_printTree($activeTab);
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: <?php echo '"' . ui_get_full_url("ajax.php", false, false, false) . '"'; ?>,
|
url: <?php echo '"' . ui_get_full_url("ajax.php", false, false, false) . '"'; ?>,
|
||||||
data: "page=<?php echo $_GET['sec2']; ?>&printTable=1&id_agente=" + id_agent + "&server_name=" + server_name,
|
data: "page=<?php echo $_GET['sec2']; ?>&printTable=1&id_agente=" + id_agent + "&server_name=" + server_name,
|
||||||
success: function(data){
|
success: function(data) {
|
||||||
$('#cont').html(data);
|
$('#cont').html(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -779,7 +781,7 @@ treeview_printTree($activeTab);
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: <?php echo '"' . ui_get_full_url("ajax.php", false, false, false) . '"'; ?>,
|
url: <?php echo '"' . ui_get_full_url("ajax.php", false, false, false) . '"'; ?>,
|
||||||
data: "page=<?php echo $_GET['sec2']; ?>&printAlertsTable=1&id_module=" + id_module + "&server_name=" + server_name,
|
data: "page=<?php echo $_GET['sec2']; ?>&printAlertsTable=1&id_module=" + id_module + "&server_name=" + server_name,
|
||||||
success: function(data){
|
success: function(data) {
|
||||||
$('#cont').html(data);
|
$('#cont').html(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -790,7 +792,7 @@ treeview_printTree($activeTab);
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: <?php echo '"' . ui_get_full_url("ajax.php", false, false, false) . '"'; ?>,
|
url: <?php echo '"' . ui_get_full_url("ajax.php", false, false, false) . '"'; ?>,
|
||||||
data: "page=<?php echo $_GET['sec2']; ?>&printModuleTable=1&id_module=" + id_module + "&server_name=" + server_name,
|
data: "page=<?php echo $_GET['sec2']; ?>&printModuleTable=1&id_module=" + id_module + "&server_name=" + server_name,
|
||||||
success: function(data){
|
success: function(data) {
|
||||||
$('#cont').html(data);
|
$('#cont').html(data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -806,7 +808,7 @@ treeview_printTree($activeTab);
|
||||||
url: "<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
|
url: "<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",
|
||||||
data: "page=include/ajax/module&get_module_detail=1&server_name="+server_name+"&id_agent="+id_agent+"&id_module=" + module_id+"&offset="+offset+"&period="+period,
|
data: "page=include/ajax/module&get_module_detail=1&server_name="+server_name+"&id_agent="+id_agent+"&id_module=" + module_id+"&offset="+offset+"&period="+period,
|
||||||
dataType: "html",
|
dataType: "html",
|
||||||
success: function(data){
|
success: function(data) {
|
||||||
$("#module_details_window").hide ()
|
$("#module_details_window").hide ()
|
||||||
.empty ()
|
.empty ()
|
||||||
.append (data)
|
.append (data)
|
||||||
|
|
|
@ -35,7 +35,9 @@ $status = get_parameter ("status", -1); // Flag to print action status message
|
||||||
$user_info = get_user_info ($id);
|
$user_info = get_user_info ($id);
|
||||||
$id = $user_info["id_user"]; //This is done in case there are problems with uppercase/lowercase (MySQL auth has that problem)
|
$id = $user_info["id_user"]; //This is done in case there are problems with uppercase/lowercase (MySQL auth has that problem)
|
||||||
|
|
||||||
if ((!check_acl ($config["id_user"], users_get_groups ($id), "UM")) AND ($id != $config["id_user"])){
|
if ((!check_acl ($config["id_user"], users_get_groups ($id), "UM"))
|
||||||
|
AND ($id != $config["id_user"])) {
|
||||||
|
|
||||||
db_pandora_audit("ACL Violation","Trying to view a user without privileges");
|
db_pandora_audit("ACL Violation","Trying to view a user without privileges");
|
||||||
require ("general/noaccess.php");
|
require ("general/noaccess.php");
|
||||||
exit;
|
exit;
|
||||||
|
|
Loading…
Reference in New Issue