osisoftpi-grafana icon indicating copy to clipboard operation
osisoftpi-grafana copied to clipboard

Variable detection within AF Elements query broken in editor mode

Open aballinEH2 opened this issue 1 year ago • 2 comments

When I was running Grafana 9.4.3 using the OSIsoft-PI plugin version 2.0.0 (or possibly 2.1.1), there was a bug with including Grafana dashboard variables as part of the AF path query. Screen shot below is from a dashboard containing location and system variables. image The segment Unit${system} is white, indicating that the presence of the variable isn't detected, and I can't further navigate down the asset tree. This is confirmed when I switch to raw query mode where 'Unit${system}' is replaced with 'undefined'. image Upgrading the plugin to version 4.2.0 fixed this issue (the segment would show up in blue text and I could further navigate in the asset tree), but upgrading to Grafana 10.2.3 seems to have broken the fix. Any chance this can be remedied again? Thanks!

aballinEH2 avatar Jan 28 '24 07:01 aballinEH2

In addition, could it be that there is a limit to the amount of AF Attributes shown/received from the API? In below example we have 6000+ attributes. If I try to find some attribute starting with the T (after CP1_) by typing "CP1_T" we do not receive any attributes at all. If I type "CP1_A" we do receive all attributes that contain that string. By scrolling through the asset tree we can see that it stops at "G". So could it be that the AF attribute query is send once instead of every time we enter some search?

image

alexl04 avatar Mar 19 '24 14:03 alexl04

Fixed in #150

coderReview avatar Apr 05 '24 21:04 coderReview

Fixed in #150

Tested with grafana 11 and plugin v5 beta > cannot confirm that it is fixed. I experience the same issue as described above.

alexl04 avatar May 21 '24 10:05 alexl04

For v5.0.0 I am increasing the max attributes count to 10000. I next versions I can check if we can improve this

pvmagacho-nde avatar Jun 12 '24 15:06 pvmagacho-nde