Skip to content

Commit

Permalink
Fixing Multiple Issues
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
TheWitness committed Nov 10, 2020
1 parent 19a37c9 commit eff2b31
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
## ChangeLog

--- 1.5.2 ---

* 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

--- 1.5.1 ---

* issue: Upgrade to thold 1.5 misses new column causing saves to fail

--- 1.5 ---

* issue#187: Standalone Thresholds created do not read graph data due to threshold daemon not running
Expand Down
2 changes: 1 addition & 1 deletion INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[info]
name = thold
version = 1.5.1
version = 1.5.2
longname = Thresholds
author = The Cacti Group
email =
Expand Down
18 changes: 14 additions & 4 deletions thold_graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ function tholds() {
/* thold template id filter */
if (!isempty_request_var('thold_template_id')) {
if (get_request_var('thold_template_id') > 0) {
$sql_where .= ($sql_where == '' ? '(' : ' AND ') . 'td.thold_template_id = ' . get_request_var('thold_template_id');
$sql_where .= ($sql_where == '' ? '(' : ' AND ') . '(td.thold_template_id = ' . get_request_var('thold_template_id') . ' AND td.template_enabled = "on")';
} elseif (get_request_var('thold_template_id') == '-2') {
$sql_where .= ($sql_where == '' ? '(' : ' AND ') . 'td.template_enabled = ""';
}
Expand Down Expand Up @@ -947,17 +947,22 @@ function hosts() {
print "<tr class='selectable deviceNotMonFull' id='line" . $host['id'] . "'>";

$actions_url = '';

if (api_user_realm_auth('host.php')) {
$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>';
}
$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>";
$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>";

form_selectable_cell($actions_url, $host['id'], '', 'left');

form_selectable_cell(filter_value($host['description'], get_request_var('rfilter')), $host['id'], '', 'left');

form_selectable_cell(number_format_i18n($host['id']), $host['id'], '', 'right');
form_selectable_cell('<i>' . number_format_i18n($host['graphs']) . '</i>', $host['id'], '', 'right');
form_selectable_cell('<i>' . number_format_i18n($host['data_sources']) . '</i>', $host['id'], '', 'right');
form_selectable_cell(number_format_i18n($host['graphs']), $host['id'], '', 'right');
form_selectable_cell(number_format_i18n($host['data_sources']), $host['id'], '', 'right');

form_selectable_cell(__('Not Monitored', 'thold'), $host['id'], '', 'center');

form_selectable_cell(__('N/A', 'thold'), $host['id'], '', 'right');
form_selectable_cell($uptime, $host['id'], '', 'right');
form_selectable_cell(filter_value($host['hostname'], get_request_var('rfilter')), $host['id'], '', 'right');
Expand Down Expand Up @@ -1232,6 +1237,10 @@ function thold_export_log() {
foreach($logs as $log) {
print implode(',', array_values($log)) . PHP_EOL;
}
} else {
raise_message('norows', __('No Export Rows Found.', 'thold'), MESSAGE_LEVEL_ERROR);
header('Location: thold_graph.php?action=log');
exit;
}
}

Expand Down Expand Up @@ -1547,6 +1556,7 @@ function exportLog() {
strURL += '&rows=' + $('#rows').val();
strURL += '&rfilter=' + base64_encode($('#rfilter').val());
document.location = strURL;
Pace.stop();
}

$(function() {
Expand Down
1 change: 1 addition & 0 deletions thold_templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ function DownloadStart(url) {
document.getElementById("download_iframe").src = url;
setTimeout(function() {
document.location = "thold_templates.php";
Pace.stop();
}, 500);
}
Expand Down

0 comments on commit eff2b31

Please sign in to comment.