hi everyone.
I’m developing a custom datasource plugin. I have the basics working and now trying to implement ad-hoc filters for it.
I have several questions:
-
first of all I couldn’t find any real documentation about it. only some commit comments on github.
is there real howto or doc somewhere?
-
looking at the elastic and influxdb implementation I see that
getTagKeyssupposed to return array of{text: .., type: ...}andgetTagValuesreturns array of `{text: …, value: …}but… looking at the implementation in
public/app/features/dashboard/ad_hoc_filters.tsI don’t seetypeandvalueactually used.in the plugin that I’m developing it would be really helpful if I could have different text and value for the
TagValues, but so far I couldn’t figure out a way to make it work. values do not show up intemplateSrv.getAdhocFilters -
is there a way to customise dropdown options for
conditionandoperator? -
Is there a way to access current range while computing
TagKeysandTagValues? I’d like to eliminate the options that do not exist in the current range from the dropdown. -
in general, is there a proper way to report errors from datasource plugin to the user? for example, if a user overwrites
conditionoroperatorto something that the plugin doesn’t support, is there a way to display a nice error message?
Thanks in advance for the help.
/Vitaly.