query.editor.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <query-editor-row query-ctrl="ctrl" has-text-edit-mode="false">
  2. <div class="gf-form-inline">
  3. <div class="gf-form">
  4. <label class="gf-form-label query-keyword width-7">Scenario</label>
  5. <div class="gf-form-select-wrapper width-15">
  6. <select class="gf-form-input" ng-model="ctrl.target.scenarioId" ng-options="v.id as v.name for v in ctrl.scenarioList" ng-change="ctrl.scenarioChanged()"></select>
  7. </div>
  8. </div>
  9. <div class="gf-form gf-form gf-form--grow" ng-if="ctrl.scenario.stringInput">
  10. <label class="gf-form-label query-keyword">String Input</label>
  11. <input type="text" class="gf-form-input" placeholder="{{ctrl.scenario.stringInput}}" ng-model="ctrl.target.stringInput" ng-change="ctrl.refresh()" ng-model-onblur>
  12. </div>
  13. <div class="gf-form">
  14. <label class="gf-form-label query-keyword">Alias</label>
  15. <input type="text" class="gf-form-input max-width-7" placeholder="optional" ng-model="ctrl.target.alias" ng-change="ctrl.refresh()" ng-model-onblur>
  16. </div>
  17. <div class="gf-form gf-form--grow">
  18. <div class="gf-form-label gf-form-label--grow"></div>
  19. </div>
  20. </div>
  21. <div class="gf-form-inline" ng-if="ctrl.scenario.id === 'manual_entry'">
  22. <div class="gf-form gf-form">
  23. <label class="gf-form-label query-keyword width-7">New value</label>
  24. <input type="number" class="gf-form-input width-15" placeholder="value" ng-model="ctrl.newPointValue">
  25. <label class="gf-form-label query-keyword">Time</label>
  26. <input type="string" class="gf-form-input width-12" placeholder="time" ng-model="ctrl.newPointTime" input-datetime>
  27. <button class="btn btn-secondary gf-form-btn" ng-click="ctrl.addPoint()">Add</button>
  28. <label class="gf-form-label query-keyword">All values</label>
  29. <gf-form-dropdown css-class="width-12" model="ctrl.selectedPoint" get-options="ctrl.getPoints()" on-change="ctrl.pointSelected($option)">
  30. </gf-form-dropdown>
  31. </div>
  32. <div class="gf-form gf-form" ng-if="ctrl.selectedPoint.value !== null">
  33. <button class="btn btn-danger gf-form-btn" ng-click="ctrl.deletePoint()">Delete</button>
  34. </div>
  35. <div class="gf-form gf-form--grow">
  36. <div class="gf-form-label gf-form-label--grow"></div>
  37. </div>
  38. </div>
  39. </query-editor-row>