editor.html 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 gf-form-inline">
  5. <div class="section">
  6. <div class="gf-form">
  7. <span class="gf-form-label width-8">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 width-8">With tags</span>
  14. <bootstrap-tagsinput ng-model="link.tags" tagclass="label label-tag" placeholder="add tags" style="margin-right: .25rem"></bootstrap-tagsinput>
  15. </div>
  16. <gf-form-switch ng-show="link.type === 'dashboards'" class="gf-form" label="As dropdown" checked="link.asDropdown" switch-class="max-width-4" label-class="width-8" on-change="updated()"></gf-form-switch>
  17. <div class="gf-form" ng-show="link.type === 'dashboards' && link.asDropdown">
  18. <span class="gf-form-label width-8">Title</span>
  19. <input type="text" ng-model="link.title" class="gf-form-input max-width-10" ng-model-onblur ng-change="updated()">
  20. </div>
  21. <div ng-show="link.type === 'link'">
  22. <div class="gf-form">
  23. <li class="gf-form-label width-8">Url</li>
  24. <input type="text" ng-model="link.url" class="gf-form-input width-20" ng-model-onblur ng-change="updated()">
  25. </div>
  26. <div class="gf-form">
  27. <span class="gf-form-label width-8">Title</span>
  28. <input type="text" ng-model="link.title" class="gf-form-input width-20" ng-model-onblur ng-change="updated()">
  29. </div>
  30. <div class="gf-form">
  31. <span class="gf-form-label width-8">Tooltip</span>
  32. <input type="text" ng-model="link.tooltip" class="gf-form-input width-20" placeholder="Open dashboard" ng-model-onblur ng-change="updated()">
  33. </div>
  34. <div class="gf-form">
  35. <span class="gf-form-label width-8">Icon</span>
  36. <div class="gf-form-select-wrapper width-20">
  37. <select class="gf-form-input" ng-model="link.icon" ng-options="k as k for (k, v) in iconMap" ng-change="updated()"></select>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <div class="section gf-form-inline" style="display: flex">
  43. <div>
  44. <div class="gf-form">
  45. <span class="gf-form-label width-6">Include</span>
  46. </div>
  47. </div>
  48. <div>
  49. <gf-form-switch class="gf-form" label="Time range" checked="link.keepTime" switch-class="max-width-6" label-class="width-9"></gf-form-switch>
  50. <gf-form-switch class="gf-form" label="Variable values" checked="link.includeVars" switch-class="max-width-6" label-class="width-9"></gf-form-switch>
  51. <gf-form-switch class="gf-form" label="Open in new tab" checked="link.targetBlank" switch-class="max-width-6" label-class="width-9"></gf-form-switch>
  52. </div>
  53. </div>
  54. <div style="display:flex; flex-direction:column; justify-content:flex-start">
  55. <div class="gf-form">
  56. <button class="btn btn-inverse gf-form-btn width-4" ng-click="deleteLink($index)">
  57. <i class="fa fa-trash"></i>
  58. </button>
  59. </div>
  60. <div class="gf-form">
  61. <button class="btn btn-inverse gf-form-btn width-4" ng-click="moveLink($index, -1)" ng-hide="$first"><i class="fa fa-arrow-up"></i></button>
  62. </div>
  63. <div class="gf-form">
  64. <button class="btn btn-inverse gf-form-btn width-4" ng-click="moveLink($index, 1)" ng-hide="$last"><i class="fa fa-arrow-down"></i></button>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <button class="btn btn-inverse" ng-click="addLink()"><i class="fa fa-plus"></i> Add link</button>