diff --git a/automation_networks.php b/automation_networks.php index dcbb833f39..e1b0b22afd 100644 --- a/automation_networks.php +++ b/automation_networks.php @@ -203,19 +203,19 @@ function api_networks_save($post) { if ($save['sched_type'] == '3') { if ($save['day_of_week'] == '') { $save['enabled'] = ''; - $_SESSION['automation_message'] = __('ERROR: You must specificy the day of the week. Disabling Network %s!.', $net); + $_SESSION['automation_message'] = __('ERROR: You must specify the day of the week. Disabling Network %s!.', $net); raise_message('automation_message'); } } elseif ($save['sched_type'] == '4') { if ($save['month'] == '' || $save['day_of_month'] == '') { $save['enabled'] = ''; - $_SESSION['automation_message'] = __('ERROR: You must specificy both the Months and Days of Month. Disabling Network %s!', $net); + $_SESSION['automation_message'] = __('ERROR: You must specify both the Months and Days of Month. Disabling Network %s!', $net); raise_message('automation_message'); } } elseif ($save['sched_type'] == '5') { if ($save['month'] == '' || $save['monthly_day'] == '' || $save['monthly_week'] == '') { $save['enabled'] = ''; - $_SESSION['automation_message'] = __('ERROR: You must specificy the Months, Weeks of Months, and Days of Week. Disabling Network %s!', $net); + $_SESSION['automation_message'] = __('ERROR: You must specify the Months, Weeks of Months, and Days of Week. Disabling Network %s!', $net); raise_message('automation_message'); } } @@ -515,7 +515,7 @@ function network_edit() { 'enabled' => array( 'method' => 'checkbox', 'friendly_name' => __('Enabled'), - 'description' => __('Enable this Network Range Enabled.'), + 'description' => __('Enable this Network Range.'), 'value' => '|arg1:enabled|' ), 'enable_netbios' => array( diff --git a/cmd_realtime.php b/cmd_realtime.php index f4e93b038d..14f31ec70a 100644 --- a/cmd_realtime.php +++ b/cmd_realtime.php @@ -70,12 +70,12 @@ $polling_items = array(); /* get poller_item for graph_id */ $local_data_ids = db_fetch_assoc_prepared('SELECT DISTINCT dtr.local_data_id, dl.host_id FROM graph_templates_item AS gti - LEFT JOIN data_template_rrd AS dtr + INNER JOIN data_template_rrd AS dtr ON gti.task_item_id=dtr.id - LEFT JOIN data_local AS dl + INNER JOIN data_local AS dl ON dl.id=dtr.local_data_id WHERE gti.local_graph_id = ? - AND dtr.local_data_id IS NOT NULL', + AND dtr.local_data_id > 0', array($graph_id)); if (!count($local_data_ids)) { @@ -88,10 +88,12 @@ $hosts = array(); $idbyhost = array(); foreach ($local_data_ids as $row) { - $ids[$row['local_data_id']] = $row['local_data_id']; - $hosts[$row['host_id']] = $row['host_id']; + if ($row['local_data_id'] > 0 && $row['host_id'] != '') { + $ids[$row['local_data_id']] = $row['local_data_id']; + $hosts[$row['host_id']] = $row['host_id']; - $idbyhost[$row['host_id']][] = $row['local_data_id']; + $idbyhost[$row['host_id']][] = $row['local_data_id']; + } } $print_data_to_stdout = true; diff --git a/data_source_profiles.php b/data_source_profiles.php index 390924489f..b3ccdbe2f5 100644 --- a/data_source_profiles.php +++ b/data_source_profiles.php @@ -756,7 +756,7 @@ function get_span($duration) { } function profile() { - global $profile_actions, $item_rows, $sampling_intervals, $heartbeats; + global $profile_actions, $item_rows, $sampling_intervals, $heartbeats, $config; /* ================= input validation and session storage ================= */ $filters = array( @@ -967,6 +967,18 @@ function profile() { $readonly = false; } + if ($profile['data_sources'] > 0) { + $ds = '' . number_format_i18n($profile['data_sources'], '-1') . ''; + } else { + $ds = number_format_i18n($profile['data_sources'], '-1'); + } + + if ($profile['templates'] > 0) { + $dt = '' . number_format_i18n($profile['templates'], '-1') . ''; + } else { + $dt = number_format_i18n($profile['templates'], '-1'); + } + form_alternate_row('line' . $profile['id'], false, $disabled); form_selectable_cell(filter_value($profile['name'], get_request_var('filter'), 'data_source_profiles.php?action=edit&id=' . $profile['id']), $profile['id']); form_selectable_cell($profile['default'] == 'on' ? __('Yes'):'', $profile['id'], '', 'text-align:right'); @@ -974,8 +986,8 @@ function profile() { form_selectable_cell($readonly ? __('Yes') : __('No'), $profile['id'], '', 'text-align:right'); form_selectable_cell($sampling_intervals[$profile['step']], $profile['id'], '', 'text-align:right'); form_selectable_cell($heartbeats[$profile['heartbeat']], $profile['id'], '', 'text-align:right'); - form_selectable_cell(number_format_i18n($profile['data_sources'], '-1'), $profile['id'], '', 'text-align:right'); - form_selectable_cell(number_format_i18n($profile['templates'], '-1'), $profile['id'], '', 'text-align:right'); + form_selectable_cell($ds, $profile['id'], '', 'text-align:right'); + form_selectable_cell($dt, $profile['id'], '', 'text-align:right'); form_checkbox_cell($profile['name'], $profile['id'], $disabled); form_end_row(); } diff --git a/data_templates.php b/data_templates.php index 05bfac4701..2da2ac5e48 100644 --- a/data_templates.php +++ b/data_templates.php @@ -560,7 +560,7 @@ function template_edit() { } else { $form_array[$field_name]['sub_checkbox'] = array( 'name' => 't_' . $field_name, - 'friendly_name' => __esc('Use Per-Data Source Value (Ignore this Value)'), + 'friendly_name' => __esc('Check this checkbox if you wish to allow the user to override the value on the right during Data Source creation.'), 'value' => (isset($template_data['t_' . $field_name]) ? $template_data['t_' . $field_name] : '') ); } @@ -631,7 +631,7 @@ function template_edit() { $form_array[$field_name]['value'] = (isset($template_rrd) ? $template_rrd[$field_name] : ''); $form_array[$field_name]['sub_checkbox'] = array( 'name' => 't_' . $field_name, - 'friendly_name' => __('Use Per-Data Source Value (Ignore this Value)'), + 'friendly_name' => __esc('Check this checkbox if you wish to allow the user to override the value on the right during Data Source creation.'), 'value' => (isset($template_rrd) ? $template_rrd['t_' . $field_name] : '') ); } @@ -703,7 +703,7 @@ function template_edit() { ?>
-
+
diff --git a/docs/CHANGELOG b/docs/CHANGELOG index df2d103e3d..12443b5f9a 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -1,19 +1,34 @@ Cacti CHANGELOG +1.1.36 +-issue#1334: Console->Users->(Edit) Permissions checkmark descriptions missing +-issue#1336: Fix issue with $config not being defined +-issue: Fixed some language string inconsistencies +-feature: Updated Dutch translations + +1.1.36 +-issue#1331: Maintenance time should occur at midnight, not random time in day 1.1.35 +-issue#114: *all_max_peak* percentile calculations incorrect -issue#430: Pressing Back often fails to work as expected +-issue#564: Fail to move items in graph template as desired +-issue#981: Hyperlinks for Data Profile stats -issue#993: Realtime not working on remote pollers for certain data query --issue#1251: Make 3rd mouse button configurable for all zoom modes. Set default to zoom out. +-issue#1244: Errors importing templates with deprecated hashes +-issue#1251: Allow zoom out through mouse mmiddle button +-issue#1281: Max OIDs setting is for bulkget and not bulkwalk operations -issue#1286: Correct CHUNKED_ENCODING error when retrieving graph with some browsers --issue#1306: Fix issue #1306 where multi-value args are not parsing correctly +-issue#1306: Graphs are not always refreshed properly -issue#1309: Provide meaningful authentication errors in graph_json.php and graph_image.php --issue#1310: Unable to return to previous page from auth_changepassword.php +-issue#1310: Return button fails on change password page -issue#1315: Realtime not working on local data collector --issue#1316: CDEF Item Value dialog doesn't update creating items --issue#1319: FrontEnd + Remote Poller - Connection timeout issue --issue#1321: Use of legacy RRDtool pipelining functions within DSSTATS +-issue#1316: CDEF Item Value dialog does not update creating items +-issue#1319: Front end + remote poller - connection timeout issue +-issue#1321: Use RRDtool pipelining functions within DSSTATS -issue#1323: Enhance form layout for readability +-issue#1329: Spelling errors in automation_networks.php -issue: Validate regular expressions if specified in add_graphs.php +-issue: Ensure compression levels are consistent when importing package 1.1.34 -issue#1040: PHP version 7.2 - ERROR PHP WARNING: sizeof() diff --git a/graph_templates.php b/graph_templates.php index cc5f32bf7a..844c19581e 100644 --- a/graph_templates.php +++ b/graph_templates.php @@ -522,7 +522,7 @@ function template_edit() { if ($form_array[$field_name]['method'] != 'spacer') { $form_array[$field_name]['sub_checkbox'] = array( 'name' => 't_' . $field_name, - 'friendly_name' => __esc('Use Per-Graph Value (Ignore this Value)'), + 'friendly_name' => __esc('Check this checkbox if you wish to allow the user to override the value on the right during Graph creation.'), 'value' => (isset($template_graph['t_' . $field_name]) ? $template_graph['t_' . $field_name] : '') ); } diff --git a/graph_templates_items.php b/graph_templates_items.php index a3cdc8769e..157f62acd4 100644 --- a/graph_templates_items.php +++ b/graph_templates_items.php @@ -307,12 +307,19 @@ function item_movedown() { global $graph_item_types; - $arr = get_graph_group(get_request_var('id')); - $next_id = get_graph_parent(get_request_var('id'), 'next'); + $arr = get_graph_group(get_request_var('id')); + $next_id = get_graph_parent(get_request_var('id'), 'next'); - if ((!empty($next_id)) && (isset($arr{get_request_var('id')}))) { + $graph_type = db_fetch_cell_prepared('SELECT graph_type_id + FROM graph_templates_item + WHERE id = ?', + array(get_request_var('id'))); + + $text_type = $graph_item_types[$graph_type]; + + if (!empty($next_id) && isset($arr[get_request_var('id')])) { move_graph_group(get_request_var('id'), $arr, $next_id, 'next'); - } elseif (preg_match('/(GPRINT|VRULE|HRULE|COMMENT)/', $graph_item_types{db_fetch_cell_prepared('SELECT graph_type_id FROM graph_templates_item WHERE id = ?', array(get_request_var('id')))})) { + } elseif (!preg_match('/(AREA|STACK|LINE)/', $text_type)) { /* this is so we know the "other" graph item to propagate the changes to */ $next_item = get_item('graph_templates_item', 'sequence', get_request_var('id'), 'graph_template_id=' . get_request_var('graph_template_id') . ' AND local_graph_id=0', 'next'); @@ -335,9 +342,16 @@ function item_moveup() { $arr = get_graph_group(get_request_var('id')); $next_id = get_graph_parent(get_request_var('id'), 'previous'); - if ((!empty($next_id)) && (isset($arr{get_request_var('id')}))) { + $graph_type = db_fetch_cell_prepared('SELECT graph_type_id + FROM graph_templates_item + WHERE id = ?', + array(get_request_var('id'))); + + $text_type = $graph_item_types[$graph_type]; + + if (!empty($next_id) && isset($arr[get_request_var('id')])) { move_graph_group(get_request_var('id'), $arr, $next_id, 'previous'); - } elseif (preg_match('/(GPRINT|VRULE|HRULE|COMMENT)/', $graph_item_types{db_fetch_cell_prepared('SELECT graph_type_id FROM graph_templates_item WHERE id = ?', array(get_request_var('id')))})) { + } elseif (!preg_match('/(AREA|STACK|LINE)/', $text_type)) { /* this is so we know the "other" graph item to propagate the changes to */ $last_item = get_item('graph_templates_item', 'sequence', get_request_var('id'), 'graph_template_id=' . get_request_var('graph_template_id') . ' AND local_graph_id=0', 'previous'); diff --git a/host.php b/host.php index 39169d427c..4f44b1b667 100644 --- a/host.php +++ b/host.php @@ -416,7 +416,11 @@ function form_actions() { $form_array += array($field_name => $fields_host_edit[$field_name]); $form_array[$field_name]['value'] = ''; - $form_array[$field_name]['description'] = ''; + + if (read_config_option('hide_form_description') == 'on') { + $form_array[$field_name]['description'] = ''; + } + $form_array[$field_name]['form_id'] = 0; $form_array[$field_name]['sub_checkbox'] = array( 'name' => 't_' . $field_name, @@ -435,6 +439,8 @@ function form_actions() { device_javascript(); + device_change_javascript(); + $save_html = " "; } elseif (get_request_var('drp_action') == '5') { // Clear Statisitics for Selected Devices print " @@ -963,6 +969,52 @@ function device_reindex_methods($item, $host) { } } +function device_change_javascript() { + ?> + +