Open mateczagany opened 5 years ago
Hi,
We have also encountered a bug where the substitution of variables don't work when using breakdown panels and fixed it the same way.
@czmate10 sorry for the delay. Question why not using:
'platform: ${PLATFORM:lucene}'
instead 'platform: $PLATFORM'
is same behavior and grafana's standard.
If we force globally this lucene
type replacement it becomes more rigit, don't you?
I'm testing/checking your changes BTW
Hi @gbrian You are correct, I didn't know about that advanced formatting, it really did solve my issue. However it didn't solve the problem we have with breakdown panels (see 53e749a )
It seems to always replace the variable with *
In case of a breakdown panel, if I type $PLATFORM
, it replaces it, but not with Lucene formatting
But if I type ${PLATFORM:lucene}
or anything that is not exactly $PLATFORM
it will replace it with *
Hi Brian,
We had problems with substituting Grafana variables into Lucene queries. Example parametrized Lucene query:
.es(index=pageview_*,metric='sum:value',timefield='timestamp',q='platform: $PLATFORM').label('Current')
Without the fix it was substituted as:
.es(index=pageview_*,metric='sum:value',timefield='timestamp',q='platform: {Android,Windows,iOS}').label('Current')
which is not a valid Lucene queryAfter the fix:
.es(index=pageview_*,metric='sum:value',timefield='timestamp',q='platform: ("Android" OR "Windows" OR "iOS")').label('Current')
Which is what we wantWould you be so kind to merge this?
Regards, Máté