寻觅生命中的那一片浅草......

thold设置报警无法获取所有数据源

解决方法:将thold_add.php的第490-523行替换成
if ($graph != ”) {
$dt = db_fetch_assoc(‘SELECT DISTINCT data_template_rrd.local_data_id
FROM data_template_rrd
LEFT JOIN graph_templates_item ON graph_templates_item.task_item_id = data_template_rrd.id
LEFT JOIN graph_local ON graph_local.id=graph_templates_item.local_graph_id
WHERE graph_local.id = ‘ . $graph);
/* show the data source options */
?>
<tr>
<td width=’70’ style=’white-space:nowrap;’>
&nbsp;<b>Data Source:</b>
</td>
<td>
<select name=dsid onChange=”applyTholdFilterChange(document.tholdform, ‘ds’)”>
<option value=””></option><?php
foreach ($dt as $row1) {
$dss = db_fetch_assoc(‘SELECT DISTINCT id, data_source_name
FROM data_template_rrd
WHERE local_data_id = ‘ . $row1[‘local_data_id’] . ‘ ORDER BY data_source_name’);
foreach ($dss as $row) {
echo “<option value='” . $row[‘id’] . “‘” . ($row[‘id’] == $ds ? ‘ selected’ : ”) . ‘>’ . $row[‘data_source_name’] . ‘</option>’;
}}?>
<input type=hidden name=dt value=”<?php print $row1[‘local_data_id’];?>”>
</select>
</td>
</tr><?php
} else {
?>
<tr>
<td>
<input type=hidden name=dsid value=””>
</td>
</tr><?php
}

来自over大神

尚无评论

发表评论

2021年十一月
« 5月    
1234567
891011121314
15161718192021
22232425262728
2930