dasheditor.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <div class="dashboard-editor-header">
  2. <div class="dashboard-editor-title">
  3. <i class="icon icon-cogs"></i>
  4. Dashboard settings
  5. </div>
  6. <div ng-model="editor.index" bs-tabs style="text-transform:capitalize;">
  7. <div ng-repeat="tab in ['General', 'Rows', 'Features', 'Import']" data-title="{{tab}}">
  8. </div>
  9. <div ng-repeat="tab in dashboard.nav" data-title="{{tab.type}}">
  10. </div>
  11. </div>
  12. </div>
  13. <div class="dashboard-editor-body">
  14. <div ng-if="editor.index == 0">
  15. <div class="editor-row">
  16. <div class="section">
  17. <div class="editor-option">
  18. <label class="small">Title</label><input type="text" class="input-large" ng-model='dashboard.title'></input>
  19. </div>
  20. <div class="editor-option">
  21. <label class="small">Theme</label><select class="input-small" ng-model="dashboard.style" ng-options="f for f in ['dark','light']" ng-change="styleUpdated()"></select>
  22. </div>
  23. <div class="editor-option">
  24. <label class="small">Time correction</label>
  25. <select ng-model="dashboard.timezone" class='input-small' ng-options="f for f in ['browser','utc']"></select>
  26. </div>
  27. <div class="editor-option">
  28. <label class="small">Hide controls (CTRL+H)</label>
  29. <input type="checkbox" ng-model="dashboard.hideControls" ng-checked="dashboard.hideControls">
  30. </div>
  31. </div>
  32. </div>
  33. <div class="editor-row">
  34. <div class="section">
  35. <div class="editor-option">
  36. <label class="small">Tags</label>
  37. <bootstrap-tagsinput ng-model="dashboard.tags" tagclass="label label-tag" placeholder="add tags">
  38. </bootstrap-tagsinput>
  39. <tip>Press enter to a add tag</tip>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. <div ng-if="editor.index == 1">
  45. <div class="editor-row">
  46. <div class="span6">
  47. <table class="grafana-options-table">
  48. <tr ng-repeat="row in dashboard.rows">
  49. <td style="width: 97%">
  50. {{row.title}}
  51. </td>
  52. <td><i ng-click="_.move(dashboard.rows,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td>
  53. <td><i ng-click="_.move(dashboard.rows,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td>
  54. <td>
  55. <a ng-click="dashboard.rows = _.without(dashboard.rows,row)" class="btn btn-danger btn-mini">
  56. <i class="icon-remove"></i>
  57. </a>
  58. </td>
  59. </tr>
  60. </table>
  61. </div>
  62. </div>
  63. </div>
  64. <div ng-if="editor.index == 2">
  65. <div class="editor-row">
  66. <div class="section">
  67. <div class="editor-option">
  68. <label class="small">Templating</label>
  69. <input type="checkbox" ng-model="dashboard.templating.enable" ng-checked="dashboard.templating.enable" ng-change="checkFeatureToggles()"x >
  70. </div>
  71. <div class="editor-option">
  72. <label class="small">Annotations</label>
  73. <input type="checkbox" ng-model="dashboard.annotations.enable" ng-checked="dashboard.annotations.enable" ng-change="checkFeatureToggles()">
  74. </div>
  75. <div class="editor-option" ng-repeat="pulldown in dashboard.nav">
  76. <label class="small" style="text-transform:capitalize;">{{pulldown.type}}</label><input type="checkbox" ng-model="pulldown.enable" ng-checked="pulldown.enable">
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. <div ng-if="editor.index == 3">
  82. <ng-include src="'app/partials/import.html'"></ng-include>
  83. </div>
  84. <div ng-repeat="pulldown in dashboard.nav" ng-controller="SubmenuCtrl" ng-show="editor.index == 4+$index">
  85. <ng-include ng-show="pulldown.enable" src="edit_path(pulldown.type)"></ng-include>
  86. <button ng-hide="pulldown.enable" class="btn" ng-click="pulldown.enable = true">Enable the {{pulldown.type}}</button>
  87. </div>
  88. </div>
  89. <div class="clearfix"></div>
  90. </div>
  91. <div class="dashboard-editor-footer">
  92. <div class="grafana-version-info" ng-show="editor.index === 0">
  93. <span class="editor-option small">
  94. Grafana version: {{grafanaVersion}} &nbsp;&nbsp;
  95. </span>
  96. <span grafana-version-check>
  97. </span>
  98. </div>
  99. <button type="button" class="btn btn-success pull-right" ng-click="editor.index=0;dismiss();reset_panel();dashboard.emit_refresh()">Close</button>
  100. </div>