Accessing query editor elements in the datasource query method


#1

Hi all,

I am playing with SimpleJSON plugin. I want to add select elements in the query editor. I added in the query.editor.html the following code:

<div class="gf-form max-width-80">
  <label for="srcSelect">Source:</label>
  <select name="srcSelect" id="srcSelect" class="gf-form-input" ng-model="ctrl.target.src" ng-options="f as f for f in ['x1 'x2"></select>
</div>

How can I access the value of the source selector in the query method?

Many thanks!
Hakan


#2

every property you set on target will be on the target objects sent to the datasource (SimpleJsonDatasource js class)


#3

ok. But how I can access this target object in the query method? When I do this in the query method:
console.log(target) I get undefined. Can you put here some Code example for this?
Thanks,
Hakan