@@ -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() {
0 commit comments