funcEditor.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <div class="grafana-func-editor">
  2. <div class="grafana-func-editor-header">
  3. <a ng-click="removeFunction(func)">
  4. Remove
  5. </a>
  6. &nbsp;&nbsp;
  7. <a ng-click="helpFunction(func)">
  8. Help
  9. </a>
  10. &nbsp;&nbsp;
  11. <a class="close" ng-click="dismiss();" href="">×</a>
  12. </div>
  13. <div class="editor-row" ng-if="func.def.params.length">
  14. <div class="section">
  15. <div class="editor-option" ng-repeat="param in func.def.params">
  16. <label class="small">{{param.name}}</label>
  17. <div ng-switch on="param.type">
  18. <div ng-switch-when="int">
  19. <input
  20. type="number"
  21. step="any"
  22. focus-me="true"
  23. class="input-mini"
  24. ng-change="functionParamsChanged(func)" ng-model-onblur
  25. ng-model="func.params[$index]" />
  26. </div>
  27. <div ng-switch-when="string">
  28. <input
  29. type="text"
  30. focus-me="true"
  31. class="input-small"
  32. ng-change="functionParamsChanged(func)" ng-model-onblur
  33. ng-model="func.params[$index]" />
  34. </div>
  35. <div ng-switch-when="select">
  36. <select
  37. class="input-mini"
  38. ng-model="func.params[$index]"
  39. ng-change="functionParamsChanged(func)"
  40. focus-me="true"
  41. ng-options="f for f in param.options">
  42. </select>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>