mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Builder View Fix for Collection Selector (#11290)
* Builder View Fix for Collection Selector * change rule, to set priority on builder rule like in backend code * builder key existance verification * Update alert_rule_collection.inc.php Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
@@ -23,6 +23,8 @@
|
|||||||
* @author Neil Lathwood <neil@lathwood.co.uk>
|
* @author Neil Lathwood <neil@lathwood.co.uk>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use LibreNMS\Alerting\QueryBuilderParser;
|
||||||
|
|
||||||
if (!Auth::user()->hasGlobalAdmin()) {
|
if (!Auth::user()->hasGlobalAdmin()) {
|
||||||
die('ERROR: You need to be admin');
|
die('ERROR: You need to be admin');
|
||||||
}
|
}
|
||||||
@@ -53,7 +55,9 @@ if (!Auth::user()->hasGlobalAdmin()) {
|
|||||||
echo "
|
echo "
|
||||||
<tr>
|
<tr>
|
||||||
<td>{$rule['name']}</td>
|
<td>{$rule['name']}</td>
|
||||||
<td>{$rule['rule']}</td>
|
<td>";
|
||||||
|
echo !empty($rule['builder']) ? QueryBuilderParser::fromJson($rule['builder'])->toSql(false) : $rule['rule'];
|
||||||
|
echo " </td>
|
||||||
<td>{$rule['rule_id']}</td>
|
<td>{$rule['rule_id']}</td>
|
||||||
</tr>
|
</tr>
|
||||||
";
|
";
|
||||||
|
Reference in New Issue
Block a user