editor.html 3.6 KB

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