editor.html 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <div class="editor-row">
  2. <h5 class="section-heading">Links and Dash Navigation</h5>
  3. <div ng-repeat="link in dashboard.links">
  4. <div class="gf-form-group">
  5. <div class="gf-form-inline">
  6. <div class="gf-form">
  7. <span class="gf-form-label width-6">Type</span>
  8. <div class="gf-form-select-wrapper width-10">
  9. <select class="gf-form-input" ng-model="link.type" ng-options="f for f in ['dashboards','link']" ng-change="updated()"></select>
  10. </div>
  11. </div>
  12. <div class="gf-form" ng-show="link.type === 'dashboards'">
  13. <span class="gf-form-label">With tags</span>
  14. <bootstrap-tagsinput ng-model="link.tags" tagclass="label label-tag" placeholder="add tags"></bootstrap-tagsinput>
  15. </div>
  16. <div class="gf-form" ng-show="link.type === 'dashboards'">
  17. <editor-checkbox text="As dropdown" model="link.asDropdown" change="updated()"></editor-checkbox>
  18. </div>
  19. <div class="gf-form max-width-30" ng-show="link.type === 'link'">
  20. <li class="gf-form-label width-6">Url</li>
  21. <input type="text" ng-model="link.url" class="gf-form-input" ng-model-onblur ng-change="updated()">
  22. </div>
  23. <div class="gf-form">
  24. <button class="btn btn-inverse btn-mini" ng-click="moveLink($index, -1)" ng-hide="$first"><i class="fa fa-arrow-up"></i></button>
  25. </div>
  26. <div class="gf-form">
  27. <button class="btn btn-inverse btn-mini" ng-click="moveLink($index, 1)" ng-hide="$last"><i class="fa fa-arrow-down"></i></button>
  28. </div>
  29. <div class="gf-form">
  30. <button class="btn btn-inverse btn-mini" ng-click="deleteLink($index)"><i class="fa fa-trash" ></i></button>
  31. </div>
  32. </div>
  33. <div class="gf-form" ng-show="link.type === 'dashboards' && link.asDropdown">
  34. <span class="gf-form-label width-6">Title</span>
  35. <input type="text" ng-model="link.title" class="gf-form-input max-width-25" ng-model-onblur ng-change="updated()">
  36. </div>
  37. <div class="gf-form-inline" ng-show="link.type === 'link'">
  38. <div class="gf-form">
  39. <span class="gf-form-label width-6">Title</span>
  40. <input type="text" ng-model="link.title" class="gf-form-input max-width-10" ng-model-onblur ng-change="updated()">
  41. </div>
  42. <div class="gf-form">
  43. <span class="gf-form-label width-6">Tooltip</span>
  44. <input type="text" ng-model="link.tooltip" class="gf-form-input max-width-10" placeholder="Open dashboard" ng-model-onblur ng-change="updated()">
  45. </div>
  46. <div class="gf-form">
  47. <span class="gf-form-label width-6">Icon</span>
  48. <div class="gf-form-select-wrapper max-width-10">
  49. <select class="gf-form-input" ng-model="link.icon" ng-options="k as k for (k, v) in iconMap" ng-change="updated()"></select>
  50. </div>
  51. </div>
  52. </div>
  53. <div class="gf-form-inline">
  54. <div class="gf-form">
  55. <span class="gf-form-label width-6">Include</span>
  56. <editor-checkbox text="Time range" model="link.keepTime" change="updated()"></editor-checkbox>
  57. <editor-checkbox text="Variable values" model="link.includeVars" change="updated()"></editor-checkbox>
  58. <editor-checkbox text="Open in new tab " model="link.targetBlank" change="updated()"></editor-checkbox>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <button class="btn btn-inverse" ng-click="addLink()"><i class="fa fa-plus"></i> Add link</button>