Skip to content

Commit

Permalink
QA: Shorten the name of the normalized Template
Browse files Browse the repository at this point in the history
If the SNMP Query Graph matches the Graph Template, don't show them both.
  • Loading branch information
TheWitness committed Dec 24, 2024
1 parent 5bde879 commit c4e5388
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c4e5388

Please sign in to comment.