2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
* godmode/alerts/configure_alert_command.php, godmode/reporting/reporting_builder.item_editor.php, godmode/reporting/reporting_builder.list_items.php, godmode/agentes/agent_template.php, godmode/snmpconsole/snmp_alert.php, index.php, operation/search_users.php, operation/integria_incidents/incident.php, operation/reporting/reporting_xml.php, operation/agentes/exportdata.csv.php: cleaned source code style. * general/login_help_dialog.php, general/login_page.php: fixed the set to hidden window of info. Fixes: #3604645 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7680 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4afb03d1f8
commit
8a9bb86959
|
@ -1,3 +1,20 @@
|
|||
2013-02-19 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/alerts/configure_alert_command.php,
|
||||
godmode/reporting/reporting_builder.item_editor.php,
|
||||
godmode/reporting/reporting_builder.list_items.php,
|
||||
godmode/agentes/agent_template.php,
|
||||
godmode/snmpconsole/snmp_alert.php, index.php,
|
||||
operation/search_users.php,
|
||||
operation/integria_incidents/incident.php,
|
||||
operation/reporting/reporting_xml.php,
|
||||
operation/agentes/exportdata.csv.php: cleaned source code style.
|
||||
|
||||
* general/login_help_dialog.php, general/login_page.php: fixed the
|
||||
set to hidden window of info.
|
||||
|
||||
Fixes: #3604645
|
||||
|
||||
2013-02-19 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/javascript/pandora_modules.js: Fixed str_warning and
|
||||
|
|
|
@ -35,10 +35,12 @@ if (is_ajax()) {
|
|||
}
|
||||
|
||||
// Prints help dialog information
|
||||
echo '<div id="login_help_dialog" title="' . __('Welcome to Pandora FMS') . '" style="">';
|
||||
echo '<div id="login_help_dialog" title="' .
|
||||
__('Welcome to Pandora FMS') . '" style="">';
|
||||
|
||||
echo '<div style="position:absolute; top:30px; left: 10px; text-align: left; right:0%; height:70px; width:560px; margin: 0 auto; border: 1px solid #FFF; line-height: 19px;">';
|
||||
echo '<span style="font-size: 15px;">' . __('If this is your first time with Pandora FMS, we propose you a few links to learn more about Pandora FMS. Monitoring could be overwhelm, but take your time to learn how to use the power of Pandora!') . '</span>';
|
||||
echo '<span style="font-size: 15px;">' .
|
||||
__('If this is your first time with Pandora FMS, we propose you a few links to learn more about Pandora FMS. Monitoring could be overwhelm, but take your time to learn how to use the power of Pandora!') . '</span>';
|
||||
echo '</div>';
|
||||
|
||||
echo '<div style="position:absolute; top:110px; text-align: center; left:0%; right:0%; height:210px; width:580px; margin: 0 auto; border: 1px solid #FFF">';
|
||||
|
@ -117,10 +119,10 @@ $(document).ready (function () {
|
|||
|
||||
$("#login_help_dialog" ).dialog('close');
|
||||
|
||||
var skip_login_help = $("#checkbox-skip_login_help").attr('checked');
|
||||
var skip_login_help = $("#checkbox-skip_login_help").is(':checked');
|
||||
|
||||
// Update config['skip_login_help_dialog'] to don't display more this message
|
||||
if (skip_login_help == 'checked') {
|
||||
if (skip_login_help) {
|
||||
jQuery.get ("ajax.php",
|
||||
{"page": "general/login_help_dialog",
|
||||
"skip_login_help": 1},
|
||||
|
|
|
@ -94,13 +94,13 @@ if (isset ($login_failed)) {
|
|||
echo html_print_image('images/error_login.png', true, array("alt" => __('Login failed'), "border" => 0));
|
||||
echo '</div>';
|
||||
|
||||
echo '<div style="position:absolute; margin: 0 auto; top: 70px; left: 35%; ">';
|
||||
echo '<div style="position:absolute; margin: 0 auto; top: 70px; left: 35%; ">';
|
||||
html_print_submit_button("Ok", 'hide-login-error', false, 'class="ui-button-dialog ui-widget ui-state-default ui-corner-all ui-button-text-only" style="width:100px;"');
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
ui_require_css_file ('jquery-ui-1.10.0.custom');
|
||||
|
|
|
@ -52,7 +52,7 @@ if (isset ($_POST["template_id"])) {
|
|||
$npc = array ();
|
||||
}
|
||||
|
||||
$success_count = $error_count = 0;
|
||||
$success_count = $error_count = 0;
|
||||
$modules_already_added = array();
|
||||
|
||||
foreach ($npc as $row) {
|
||||
|
|
|
@ -28,7 +28,7 @@ if (! check_acl ($config['id_user'], 0, "LM")) {
|
|||
}
|
||||
|
||||
$id = (int) get_parameter ('id');
|
||||
$pure = get_parameter('pure', 0);
|
||||
$pure = get_parameter('pure', 0);
|
||||
|
||||
$name = '';
|
||||
$command = '';
|
||||
|
@ -81,16 +81,16 @@ $table->colspan[2][1] = 3;
|
|||
$table->data[2][0] = __('Description');
|
||||
$table->data[2][1] = html_print_textarea ('description', 10, 30, $description, '', true);
|
||||
|
||||
for($i=1;$i<=10;$i++) {
|
||||
for ($i=1; $i<=10; $i++) {
|
||||
|
||||
$table->data['field'.$i][0] = sprintf(__('Field %s description'), $i);
|
||||
|
||||
// Only show help on first row
|
||||
if($i == 1) {
|
||||
if ($i == 1) {
|
||||
$table->data['field'.$i][0] .= ui_print_help_icon ('alert_fields_description', true, ui_get_full_url(false, false, false, false));
|
||||
}
|
||||
|
||||
if(!empty($fields_descriptions)) {
|
||||
if (!empty($fields_descriptions)) {
|
||||
$field_description = $fields_descriptions[$i-1];
|
||||
}
|
||||
else {
|
||||
|
@ -101,11 +101,11 @@ for($i=1;$i<=10;$i++) {
|
|||
$table->data['field'.$i][2] = sprintf(__('Field %s values'), $i);
|
||||
|
||||
// Only show help on first row
|
||||
if($i == 1) {
|
||||
if ($i == 1) {
|
||||
$table->data['field'.$i][2] .= ui_print_help_icon ('alert_fields_values', true, ui_get_full_url(false, false, false, false));
|
||||
}
|
||||
|
||||
if(!empty($fields_values)) {
|
||||
|
||||
if (!empty($fields_values)) {
|
||||
$field_values = $fields_values[$i-1];
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -802,7 +802,7 @@ html_print_input_hidden('id_item', $idItem);
|
|||
}
|
||||
else {
|
||||
// If there are not metaconsole servers don't allow to create new custom graphs
|
||||
$style_button_create_custom_graph = 'style="display: none;"';
|
||||
$style_button_create_custom_graph = 'style="display: none;"';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ else {
|
|||
$where_types = ' AND ((server_name IS NOT NULL AND length(server_name) != 0) OR type IN (\'general\',\'SLA\',\'exception\',\'top_n\'))';
|
||||
}
|
||||
else
|
||||
$where_types = ' AND ((server_name IS NULL OR length(server_name) = 0) OR type IN (\'general\',\'SLA\',\'exception\',\'top_n\'))';
|
||||
$where_types = ' AND ((server_name IS NULL OR length(server_name) = 0) OR type IN (\'general\',\'SLA\',\'exception\',\'top_n\'))';
|
||||
|
||||
$rows = db_get_all_rows_sql('
|
||||
SELECT DISTINCT(type)
|
||||
|
|
|
@ -476,7 +476,7 @@ else {
|
|||
html_print_table ($table);
|
||||
}
|
||||
|
||||
unset ($table);
|
||||
unset ($table);
|
||||
|
||||
echo '<div style="text-align:right; width:98%">';
|
||||
echo '<form name="agente" method="post" action="index.php?sec=estado&sec2=godmode/snmpconsole/snmp_alert&update_alert=-1">';
|
||||
|
|
|
@ -396,7 +396,8 @@ if ($old_global_counter_chat != $now_global_counter_chat) {
|
|||
if (get_parameter ('login', 0) == 1) {
|
||||
|
||||
// If it's configured to not skip this
|
||||
if (!isset($config['skip_login_help_dialog']) or $config['skip_login_help_dialog'] == 0) {
|
||||
if (!isset($config['skip_login_help_dialog']) ||
|
||||
$config['skip_login_help_dialog'] == 0) {
|
||||
|
||||
include_once("general/login_help_dialog.php");
|
||||
|
||||
|
|
|
@ -51,28 +51,28 @@ $export_type = get_parameter_post ('export_type', 'data');
|
|||
$export_btn = get_parameter ('export_btn', 0);
|
||||
|
||||
if (!empty ($module)) {
|
||||
|
||||
|
||||
// Disable SQL cache
|
||||
global $sql_cache;
|
||||
$sql_cache = array ('saved' => 0);
|
||||
|
||||
|
||||
|
||||
|
||||
//Convert start time and end time to unix timestamps
|
||||
$start = strtotime ($start_date." ".$start_time);
|
||||
$end = strtotime ($end_date." ".$end_time);
|
||||
$period = $end - $start;
|
||||
$data = array ();
|
||||
$data = array ();
|
||||
|
||||
//If time is negative or zero, don't process - it's invalid
|
||||
if ($start < 1 || $end < 1) {
|
||||
ui_print_error_message (__('Invalid time specified'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// ***************************************************
|
||||
// Starts, ends and dividers
|
||||
// ***************************************************
|
||||
|
||||
|
||||
//Pure CSV is comma delimited
|
||||
$datastart = __('Agent').','.__('Module').','.__('Data').','.__('Timestamp')."\n";
|
||||
$rowstart = '"';
|
||||
|
@ -80,8 +80,8 @@ if (!empty ($module)) {
|
|||
$rowend = '"'."\n";
|
||||
$dataend = "\n";
|
||||
$extension = "csv";
|
||||
|
||||
|
||||
|
||||
|
||||
// ***************************************************
|
||||
// Header output
|
||||
// ***************************************************
|
||||
|
@ -92,13 +92,13 @@ if (!empty ($module)) {
|
|||
header("Content-Disposition: attachment; filename=export_".date("Ymd", $start)."_".date("Ymd", $end).".".$extension);
|
||||
header("Pragma: no-cache");
|
||||
header("Expires: 0");
|
||||
|
||||
|
||||
// ***************************************************
|
||||
// Data processing
|
||||
// ***************************************************
|
||||
|
||||
|
||||
$data = array ();
|
||||
|
||||
|
||||
// Show header
|
||||
echo $datastart;
|
||||
|
||||
|
@ -125,7 +125,7 @@ if (!empty ($module)) {
|
|||
$arr["module_name"] = modules_get_agentmodule_name ($selected);
|
||||
$arr["agent_name"] = modules_get_agentmodule_agent_name ($selected);
|
||||
$arr["agent_id"] = modules_get_agentmodule_agent ($selected);
|
||||
$arr["utimestamp"] = $end;
|
||||
$arr["utimestamp"] = $end;
|
||||
array_push ($data, $arr);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -256,7 +256,7 @@ switch ($tab) {
|
|||
|
||||
$search_group = get_parameter('search_group', 1);
|
||||
$params[2] = $search_group;
|
||||
|
||||
|
||||
$params = implode($token,$params);
|
||||
|
||||
$url = $integria_api."&op=get_incidents&token=".$token."¶ms=".$params;
|
||||
|
@ -271,7 +271,7 @@ switch ($tab) {
|
|||
$url = $integria_api."&op=get_incident_details¶ms=".$id_incident;
|
||||
}
|
||||
else {
|
||||
$url = $integria_api."&op=get_incident_details";
|
||||
$url = $integria_api."&op=get_incident_details";
|
||||
}
|
||||
$url_resolutions = $integria_api."&op=get_incidents_resolutions";
|
||||
$url_status = $integria_api."&op=get_incidents_status";
|
||||
|
|
|
@ -312,7 +312,7 @@ foreach ($contents as $content) {
|
|||
case 'simple_baseline_graph':
|
||||
|
||||
$data["module"] = io_safe_output_xml (db_get_value ('nombre', 'tagente_modulo', 'id_agente_modulo', $content['id_agent_module']));
|
||||
$data["agent"] = io_safe_output_xml (modules_get_agentmodule_agent_name ($content['id_agent_module']));
|
||||
$data["agent"] = io_safe_output_xml (modules_get_agentmodule_agent_name ($content['id_agent_module']));
|
||||
$data["title"] = __('Simple baseline graph');
|
||||
$data["objdata"] = array();
|
||||
|
||||
|
|
|
@ -160,15 +160,15 @@ if ($searchUsers) {
|
|||
firstname LIKE '%" . $stringSearchSQL . "%' OR
|
||||
lastname LIKE '%" . $stringSearchSQL . "%' OR
|
||||
middlename LIKE '%" . $stringSearchSQL . "%' OR
|
||||
email LIKE '%" . $stringSearchSQL . "%')".$user_condition;
|
||||
email LIKE '%" . $stringSearchSQL . "%')".$user_condition;
|
||||
$totalUsers = db_get_row_sql($sql);
|
||||
|
||||
|
||||
$totalUsers = $totalUsers['count'];
|
||||
}
|
||||
}
|
||||
|
||||
if (!$users) {
|
||||
echo "<br><div class='nf'>" . __("Zero results found") . "</div>\n";
|
||||
echo "<br><div class='nf'>" . __("Zero results found") . "</div>\n";
|
||||
}
|
||||
else {
|
||||
$table->cellpadding = 4;
|
||||
|
@ -196,12 +196,12 @@ else {
|
|||
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=profile&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectProfileUp)) . '</a>' .
|
||||
'<a href="index.php?search_category=users&keywords=' . $config['search_keywords'] . '&head_search_keywords=abc&offset=' . $offset . '&sort_field=profile&sort=down">' . html_print_image("images/sort_down.png", true, array("style" => $selectProfileDown)) . '</a>';
|
||||
$table->head[5] = __('Description');
|
||||
|
||||
|
||||
$table->data = array ();
|
||||
|
||||
foreach ($users as $user) {
|
||||
$userIDCell = "<a href='?sec=gusuarios&sec2=godmode/users/configure_user&id=" .
|
||||
$user['id_user'] . "'>" . $user['id_user'] . "</a>";
|
||||
$user['id_user'] . "'>" . $user['id_user'] . "</a>";
|
||||
|
||||
if ($user["is_admin"]) {
|
||||
$profileCell = html_print_image ("images/user_suit.png", true,
|
||||
|
@ -236,7 +236,7 @@ else {
|
|||
$profileCell,
|
||||
$user['comments']));
|
||||
}
|
||||
|
||||
|
||||
echo "<br />";ui_pagination ($totalUsers);
|
||||
html_print_table ($table); unset($table);
|
||||
ui_pagination ($totalUsers);
|
||||
|
|
Loading…
Reference in New Issue