From c4e53880d57f08688628a43cba133d04a6c7520f Mon Sep 17 00:00:00 2001 From: TheWitness Date: Tue, 24 Dec 2024 16:15:31 -0500 Subject: [PATCH] QA: Shorten the name of the normalized Template If the SNMP Query Graph matches the Graph Template, don't show them both. --- lib/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/auth.php b/lib/auth.php index 9447dbfa2e..d68729c792 100644 --- a/lib/auth.php +++ b/lib/auth.php @@ -3176,7 +3176,7 @@ function get_allowed_graph_templates_normalized($sql_where = '', $sql_order = 'n $templates = db_fetch_assoc("SELECT IF(snmp_query_graph_id=0, CONCAT('cg_',gl.graph_template_id), CONCAT('dq_', gl.snmp_query_graph_id)) AS id, - IF(snmp_query_graph_id=0, gt.name, CONCAT(gt.name, ' [', sqg.name, ']')) AS name + IF(snmp_query_graph_id=0, gt.name, IF(gt.name = sqg.name, gt.name, CONCAT(gt.name, ' [', sqg.name, ']'))) AS name FROM graph_local AS gl LEFT JOIN graph_templates AS gt ON gt.id=gl.graph_template_id