Skip to content

Commit

Permalink
Resolving Issue #2286
Browse files Browse the repository at this point in the history
Allow HRULES for bandwith and ptile
Cover some missed i18n strings
  • Loading branch information
cigamit committed Jan 16, 2019
1 parent 89f0a06 commit 41f2da5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -9,6 +9,7 @@ develop
-issue#2279: SQL Errors in add_graphs.php
-issue#2280: SQL Errors in snmpagent cache table inserts
-issue#2281: Database audit cli giving incorrect results
-issue#2285: Allow HRULEs for bandwith and ptile
-issue#2292: Allow Realtime to use 1 second data collection
-issue#2298: Ambiguous Toggle Switches in Sunrise Theme
-issue#2303: Problem with "Notify Primary Admin of Issues" function
Expand Down
4 changes: 2 additions & 2 deletions aggregate_templates.php
Expand Up @@ -467,11 +467,11 @@ function changeTotals() {
function changeTotalsType() {
if ($('#total_type').val() == <?php print AGGREGATE_TOTAL_TYPE_SIMILAR;?>) {
if ($('#total_prefix').val() == '') {
$('#total_prefix').attr('value', 'Total');
$('#total_prefix').attr('value', '<?php print __('Total');?>');
}
} else if ($('#total_type').val() == <?php print AGGREGATE_TOTAL_TYPE_ALL;?>) {
if ($('#total_prefix').val() == '') {
$('#total_prefix').attr('value', 'All Items');
$('#total_prefix').attr('value', '<?php print __('All Items');?>');
}
}
}
Expand Down
14 changes: 9 additions & 5 deletions lib/api_aggregate.php
Expand Up @@ -1181,7 +1181,7 @@ function aggregate_get_data_sources(&$graph_array, &$data_sources, &$graph_templ
<script type='text/javascript'>
$().ready(function() {
$('#continue').hide();
$('#cancel').attr('value', 'Return');
$('#cancel').attr('value', '<?php print __esc('Return');?>');
});
</script>
<?php
Expand All @@ -1196,7 +1196,7 @@ function aggregate_get_data_sources(&$graph_array, &$data_sources, &$graph_templ
<script type='text/javascript'>
$(function() {
$('#continue').hide();
$('#cancel').attr('value', 'Return');
$('#cancel').attr('value', '<?php print __esc('Return');?>');
});
</script>
<?php
Expand Down Expand Up @@ -1348,19 +1348,23 @@ function draw_aggregate_graph_items_list($_graph_id = 0, $_graph_template_id = 0
$matrix_title = $item['text_format'];
break;
case preg_match('/(HRULE)/', $_graph_type_name):
$force_skip = true;
$matrix_title = 'HRULE: ' . $item['value'];
if (preg_match('/(:bits:|:bytes:|\|sum:)/', $item['value'])) {
$force_skip = false;
} else {
$force_skip = true;
}
break;
case preg_match('/(VRULE)/', $_graph_type_name):
$force_skip = true;
$matrix_title = 'VRULE: ' . $item['value'];
break;
case preg_match('/(COMMENT)/', $_graph_type_name):
$matrix_title = 'COMMENT: ' . $item['text_format'];
if (preg_match('/(:bits:|:bytes:|\|sum:)/', $item['text_format'])) {
$matrix_title = 'COMMENT: ' . $item['text_format'];
$force_skip = false;
} else {
$force_skip = true;
$matrix_title = 'COMMENT: ' . $item['text_format'];
}
break;
}
Expand Down

0 comments on commit 41f2da5

Please sign in to comment.