mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
2013-01-30 Miguel de Dios <miguel.dedios@artica.es>
* godmode/agentes/planned_downtime.list.php, include/db/oracle.php, include/Image/image_functions.php, operation/events/events.build_table.php, operation/messages/message_edit.php, operation/users/user_edit.php, operation/tree.php: improved the source style. * include/constants.php: added constants for the subtype of modules. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7550 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
470864b136
commit
4b174a29b0
@ -1,3 +1,13 @@
|
||||
2013-01-30 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* godmode/agentes/planned_downtime.list.php, include/db/oracle.php,
|
||||
include/Image/image_functions.php,
|
||||
operation/events/events.build_table.php,
|
||||
operation/messages/message_edit.php, operation/users/user_edit.php,
|
||||
operation/tree.php: improved the source style.
|
||||
|
||||
* include/constants.php: added constants for the subtype of modules.
|
||||
|
||||
2013-01-30 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* godmode/events/event_responses.editor.php: Little fix
|
||||
|
@ -153,7 +153,7 @@ else {
|
||||
$data[5] .= " ";
|
||||
}
|
||||
$data[5] .= " (" . $downtime['periodically_time_from'];
|
||||
$data[5] .= "-" . $downtime['periodically_time_to'] . ")";
|
||||
$data[5] .= "-" . $downtime['periodically_time_to'] . ")";
|
||||
break;
|
||||
case 'monthly':
|
||||
$data[5] = __('Monthly:');
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* @category Images
|
||||
* @package Image_Graph
|
||||
* @category Images
|
||||
* @package Image_Graph
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -208,6 +208,8 @@ define ('STATUS_ALERT_DISABLED', 'alert_disabled.png');
|
||||
define ('STATUS_SERVER_OK', 'server_ok.png');
|
||||
define ('STATUS_SERVER_DOWN', 'server_down.png');
|
||||
|
||||
|
||||
|
||||
/* Events criticity */
|
||||
define ('EVENT_CRIT_MAINTENANCE', 0);
|
||||
define ('EVENT_CRIT_INFORMATIONAL', 1);
|
||||
@ -219,4 +221,9 @@ define ('EVENT_CRIT_CRITICAL', 4);
|
||||
define ('EVENT_CRIT_WARNING_OR_CRITICAL', 34);
|
||||
define ('EVENT_CRIT_NOT_NORMAL', 20);
|
||||
|
||||
/* Id Module (more use in component)*/
|
||||
define ('MODULE_WMI', 6);
|
||||
define ('MODULE_NETWORK', 2);
|
||||
define ('MODULE_PLUGIN', 4);
|
||||
define ('MODULE_WEB', 7);
|
||||
?>
|
@ -621,12 +621,12 @@ function oracle_db_format_array_where_clause_sql ($values, $join = 'AND', $prefi
|
||||
$query .= sprintf ("%s IN ('%s')", $field, implode ("', '", $value));
|
||||
}
|
||||
else {
|
||||
if ($value[0] == ">"){
|
||||
if ($value[0] == ">") {
|
||||
$value = substr($value,1,strlen($value)-1);
|
||||
$query .= sprintf ("%s > '%s'", $field, $value);
|
||||
}
|
||||
else if ($value[0] == "<"){
|
||||
if ($value[1] == ">"){
|
||||
else if ($value[0] == "<") {
|
||||
if ($value[1] == ">") {
|
||||
$value = substr($value,2,strlen($value)-2);
|
||||
$query .= sprintf ("%s <> '%s'", $field, $value);
|
||||
}
|
||||
@ -904,9 +904,9 @@ function oracle_db_get_row_filter ($table, $filter, $fields = false, $where_join
|
||||
}
|
||||
else {
|
||||
if (is_array ($fields))
|
||||
$fields = implode (',', $fields);
|
||||
$fields = implode (',', $fields);
|
||||
else if (! is_string ($fields))
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (is_array ($filter))
|
||||
@ -1224,6 +1224,7 @@ function oracle_db_process_sql_delete_temp ($table, $where, $where_join = 'AND')
|
||||
}
|
||||
|
||||
$result = '';
|
||||
|
||||
return db_process_sql ($query, "affected_rows", '', true, $result, false);
|
||||
}
|
||||
|
||||
|
@ -289,7 +289,7 @@ foreach ($result as $event) {
|
||||
$data[$i] = '<b><a href="'.$event["server_url"].'/index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente=' . $event["id_agente"] . $event["server_url_hash"] . '">';
|
||||
$data[$i] .= $event["agent_name"];
|
||||
$data[$i] .= "</a></b>";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$data[$i] .= ui_print_agent_name ($event["id_agente"], true);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ if ($read_message) {
|
||||
$table->data[2][0] = __('Subject');
|
||||
$table->data[2][1] = html_print_input_text_extended ("subject", $message["subject"], 'text-subject', '', 50, 70, true, false, '', 'readonly');
|
||||
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$order = array("\r\n", "\n", "\r");
|
||||
$replace = '<br />';
|
||||
$parsed_message = str_replace($order, $replace, $message["mensaje"]);
|
||||
|
||||
|
@ -561,8 +561,8 @@ if (! defined ('METACONSOLE')) {
|
||||
$img_style = array ("class" => "top", "width" => 16);
|
||||
$activeTab = get_parameter('tab','group');
|
||||
$group_tab = array('text' => "<a href='index.php?sec=monitoring&sec2=operation/tree&refr=0&tab=group&pure=$pure'>"
|
||||
. html_print_image ("images/group.png", true, array ("title" => __('Groups'))) . "</a>",
|
||||
'active' => $activeTab == "group");
|
||||
. html_print_image ("images/group.png", true, array ("title" => __('Groups'))) . "</a>",
|
||||
'active' => $activeTab == "group");
|
||||
$tags_tab = array('text' => "<a href='index.php?&sec=monitoring&sec2=operation/tree&refr=0&tab=tag&pure=$pure'>"
|
||||
. html_print_image ("images/tag_red.png", true, array ("title" => __('Tags'))) . "</a>", 'active' => $activeTab == "tag");
|
||||
$subsections = array('group' => $group_tab, 'tag' => $tags_tab);
|
||||
@ -586,7 +586,8 @@ if(tags_has_user_acl_tags()) {
|
||||
echo "<br>";
|
||||
if (! defined ('METACONSOLE')) {
|
||||
echo '<form id="tree_search" method="post" action="index.php?extension_in_menu=estado&sec=estado&sec2=operation/tree&refr=0&sort_by='.$activeTab.'&pure='.$pure.'">';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo '<form id="tree_search" method="post" action="index.php?sec=monitoring&sec2=operation/tree&refr=0&tab='.$activeTab.'&pure='.$pure.'">';
|
||||
}
|
||||
echo "<b>" . __('Agent status') . "</b>";
|
||||
@ -635,7 +636,7 @@ treeview_printTree($activeTab);
|
||||
* less_branchs int use in ajax php as binary structure 0b00, 0b01, 0b10 and 0b11
|
||||
* id_father int use in js and ajax php, its useful when you have a two subtrees with same agent for diferent each one
|
||||
*/
|
||||
function loadSubTree(type, div_id, less_branchs, id_father, server_name) {
|
||||
function loadSubTree(type, div_id, less_branchs, id_father, server_name) {
|
||||
hiddenDiv = $('#tree_div'+id_father+'_'+type+'_'+div_id).attr('hiddenDiv');
|
||||
loadDiv = $('#tree_div'+id_father+'_'+type+'_'+div_id).attr('loadDiv');
|
||||
pos = parseInt($('#tree_image'+id_father+'_'+type+'_'+div_id).attr('pos_tree'));
|
||||
@ -690,9 +691,11 @@ treeview_printTree($activeTab);
|
||||
});
|
||||
}
|
||||
else {
|
||||
<?php if (! defined ('METACONSOLE')) {
|
||||
<?php
|
||||
if (! defined ('METACONSOLE')) {
|
||||
echo 'var icon_path = \'operation/tree\';';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
echo 'var icon_path = \'../../operation/tree\';';
|
||||
}
|
||||
?>
|
||||
|
@ -237,8 +237,7 @@ $usr_groups = (users_get_groups($config['id_user'], 'AR', $display_all_group));
|
||||
$id_usr = $config['id_user'];
|
||||
|
||||
// User only can change skins if has more than one group
|
||||
if (count($usr_groups) > 1){
|
||||
|
||||
if (count($usr_groups) > 1) {
|
||||
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
echo '</td></tr><tr><td class="datos">' . __('Skin') . '</td><td class="datos2">';
|
||||
@ -250,7 +249,7 @@ echo '</td></tr><tr><td class="datos">'.__('Interactive charts') . ui_print_help
|
||||
$values = array(-1 => __('Default'),1 => __('Yes'),0 => __('No'));
|
||||
echo html_print_select($values, 'flash_charts', $user_info["flash_chart"], '', '', -1, true, false, false);
|
||||
echo '</td></tr><tr><td class="datos">'.__('Block size for pagination'). ui_print_help_tip(__('If checkbox is clicked then block size global configuration is used'), true) . '</td><td class="datos2">';
|
||||
if($user_info["block_size"] == 0) {
|
||||
if ($user_info["block_size"] == 0) {
|
||||
$block_size = $config["global_block_size"];
|
||||
}
|
||||
else {
|
||||
@ -371,42 +370,42 @@ $(document).ready (function () {
|
||||
function show_data_section () {
|
||||
section=$("#section").val();
|
||||
switch (section) {
|
||||
case <?php echo "'".__('Dashboard')."'"; ?>:
|
||||
case <?php echo "'" . __('Dashboard') . "'"; ?>:
|
||||
$("#text-data_section").css("display", "none");
|
||||
$("#dashboard").css("display", "");
|
||||
$("#visual_console").css("display", "none");
|
||||
break;
|
||||
case <?php echo "'".__('Visual console')."'"; ?>:
|
||||
case <?php echo "'" . __('Visual console') . "'"; ?>:
|
||||
$("#text-data_section").css("display", "none");
|
||||
$("#dashboard").css("display", "none");
|
||||
$("#visual_console").css("display", "");
|
||||
break;
|
||||
case <?php echo "'".__('Event list')."'"; ?>:
|
||||
case <?php echo "'" . __('Event list') . "'"; ?>:
|
||||
$("#text-data_section").css("display", "none");
|
||||
$("#dashboard").css("display", "none");
|
||||
$("#visual_console").css("display", "none");
|
||||
break;
|
||||
case <?php echo "'".__('Group view')."'"; ?>:
|
||||
case <?php echo "'" . __('Group view') . "'"; ?>:
|
||||
$("#text-data_section").css("display", "none");
|
||||
$("#dashboard").css("display", "none");
|
||||
$("#visual_console").css("display", "none");
|
||||
break;
|
||||
case <?php echo "'".__('Tactical view')."'"; ?>:
|
||||
case <?php echo "'" . __('Tactical view') . "'"; ?>:
|
||||
$("#text-data_section").css("display", "none");
|
||||
$("#dashboard").css("display", "none");
|
||||
$("#visual_console").css("display", "none");
|
||||
break;
|
||||
case <?php echo "'".__('Alert detail')."'"; ?>:
|
||||
case <?php echo "'" . __('Alert detail') . "'"; ?>:
|
||||
$("#text-data_section").css("display", "none");
|
||||
$("#dashboard").css("display", "none");
|
||||
$("#visual_console").css("display", "none");
|
||||
break;
|
||||
case <?php echo "'".__('Other')."'"; ?>:
|
||||
case <?php echo "'" . __('Other') . "'"; ?>:
|
||||
$("#text-data_section").css("display", "");
|
||||
$("#dashboard").css("display", "none");
|
||||
$("#visual_console").css("display", "none");
|
||||
break;
|
||||
case <?php echo "'".__('Default')."'"; ?>:
|
||||
case <?php echo "'" . __('Default') . "'"; ?>:
|
||||
$("#text-data_section").css("display", "none");
|
||||
$("#dashboard").css("display", "none");
|
||||
$("#visual_console").css("display", "none");
|
||||
|
Loading…
x
Reference in New Issue
Block a user