Skip to content

Commit eff2b31

Browse files
committed
Fixing Multiple Issues
* issue#457: Page show blank if do export function without log info exist * issue#458: The indicator is not removed upon completion when do export function * issue#459: Background color looks ugly for availability column. Table not aligned well. * issue#460: Filter result for template none incorrect * update changelog for version 1.5.1
1 parent 19a37c9 commit eff2b31

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
## ChangeLog
22

3+
--- 1.5.2 ---
4+
5+
* issue#457: Page show blank if do export function without log info exist
6+
7+
* issue#458: The indicator is not removed upon completion when do export function
8+
9+
* issue#459: Background color looks ugly for availability column. Table not aligned well.
10+
11+
* issue#460: Filter result for template none incorrect
12+
13+
--- 1.5.1 ---
14+
15+
* issue: Upgrade to thold 1.5 misses new column causing saves to fail
16+
317
--- 1.5 ---
418

519
* issue#187: Standalone Thresholds created do not read graph data due to threshold daemon not running

INFO

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[info]
22
name = thold
3-
version = 1.5.1
3+
version = 1.5.2
44
longname = Thresholds
55
author = The Cacti Group
66
email =

thold_graph.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ function tholds() {
374374
/* thold template id filter */
375375
if (!isempty_request_var('thold_template_id')) {
376376
if (get_request_var('thold_template_id') > 0) {
377-
$sql_where .= ($sql_where == '' ? '(' : ' AND ') . 'td.thold_template_id = ' . get_request_var('thold_template_id');
377+
$sql_where .= ($sql_where == '' ? '(' : ' AND ') . '(td.thold_template_id = ' . get_request_var('thold_template_id') . ' AND td.template_enabled = "on")';
378378
} elseif (get_request_var('thold_template_id') == '-2') {
379379
$sql_where .= ($sql_where == '' ? '(' : ' AND ') . 'td.template_enabled = ""';
380380
}
@@ -947,17 +947,22 @@ function hosts() {
947947
print "<tr class='selectable deviceNotMonFull' id='line" . $host['id'] . "'>";
948948

949949
$actions_url = '';
950+
950951
if (api_user_realm_auth('host.php')) {
951952
$actions_url .= '<a href="' . html_escape($config['url_path'] . 'host.php?action=edit&id=' . $host["id"]) . '" title="' . __esc('Edit Device', 'thold') . '"><i class="tholdGlyphEdit fas fa-wrench"></i></a>';
952953
}
953-
$actions_url .= "<a href='" . html_escape($config['url_path'] . 'graph_view.php?action=preview&reset=true&host_id=' . $host['id']) . "' title='" . __esc('View Graphs', 'thold') . "'><i class='tholdGlyphChart fas fa-chart-area></i></a>";
954+
$actions_url .= "<a href='" . html_escape($config['url_path'] . 'graph_view.php?action=preview&reset=true&host_id=' . $host['id']) . "' title='" . __esc('View Graphs', 'thold') . "'><i class='tholdGlyphChart fas fa-chart-area'></i></a>";
954955

955956
form_selectable_cell($actions_url, $host['id'], '', 'left');
957+
956958
form_selectable_cell(filter_value($host['description'], get_request_var('rfilter')), $host['id'], '', 'left');
959+
957960
form_selectable_cell(number_format_i18n($host['id']), $host['id'], '', 'right');
958-
form_selectable_cell('<i>' . number_format_i18n($host['graphs']) . '</i>', $host['id'], '', 'right');
959-
form_selectable_cell('<i>' . number_format_i18n($host['data_sources']) . '</i>', $host['id'], '', 'right');
961+
form_selectable_cell(number_format_i18n($host['graphs']), $host['id'], '', 'right');
962+
form_selectable_cell(number_format_i18n($host['data_sources']), $host['id'], '', 'right');
963+
960964
form_selectable_cell(__('Not Monitored', 'thold'), $host['id'], '', 'center');
965+
961966
form_selectable_cell(__('N/A', 'thold'), $host['id'], '', 'right');
962967
form_selectable_cell($uptime, $host['id'], '', 'right');
963968
form_selectable_cell(filter_value($host['hostname'], get_request_var('rfilter')), $host['id'], '', 'right');
@@ -1232,6 +1237,10 @@ function thold_export_log() {
12321237
foreach($logs as $log) {
12331238
print implode(',', array_values($log)) . PHP_EOL;
12341239
}
1240+
} else {
1241+
raise_message('norows', __('No Export Rows Found.', 'thold'), MESSAGE_LEVEL_ERROR);
1242+
header('Location: thold_graph.php?action=log');
1243+
exit;
12351244
}
12361245
}
12371246

@@ -1547,6 +1556,7 @@ function exportLog() {
15471556
strURL += '&rows=' + $('#rows').val();
15481557
strURL += '&rfilter=' + base64_encode($('#rfilter').val());
15491558
document.location = strURL;
1559+
Pace.stop();
15501560
}
15511561

15521562
$(function() {

thold_templates.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ function DownloadStart(url) {
100100
document.getElementById("download_iframe").src = url;
101101
setTimeout(function() {
102102
document.location = "thold_templates.php";
103+
Pace.stop();
103104
}, 500);
104105
}
105106

0 commit comments

Comments
 (0)