dasheditor.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <div class="dashboard-editor-header">
  2. <div class="dashboard-editor-title">
  3. <i class="fa fa-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. <editor-opt-bool text="Hide controls (CTRL+H)" model="dashboard.hideControls"></editor-opt-bool>
  28. </div>
  29. </div>
  30. <div class="editor-row">
  31. <div class="section">
  32. <div class="editor-option">
  33. <label class="small">Tags</label>
  34. <bootstrap-tagsinput ng-model="dashboard.tags" tagclass="label label-tag" placeholder="add tags">
  35. </bootstrap-tagsinput>
  36. <tip>Press enter to a add tag</tip>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <div ng-if="editor.index == 1">
  42. <div class="editor-row">
  43. <div class="span6">
  44. <table class="grafana-options-table">
  45. <tr ng-repeat="row in dashboard.rows">
  46. <td style="width: 97%">
  47. {{row.title}}
  48. </td>
  49. <td><i ng-click="_.move(dashboard.rows,$index,$index-1)" ng-hide="$first" class="pointer fa fa-arrow-up"></i></td>
  50. <td><i ng-click="_.move(dashboard.rows,$index,$index+1)" ng-hide="$last" class="pointer fa fa-arrow-down"></i></td>
  51. <td>
  52. <a ng-click="dashboard.rows = _.without(dashboard.rows,row)" class="btn btn-danger btn-mini">
  53. <i class="fa fa-remove"></i>
  54. </a>
  55. </td>
  56. </tr>
  57. </table>
  58. </div>
  59. </div>
  60. </div>
  61. <div ng-if="editor.index == 2">
  62. <div class="editor-row">
  63. <div class="section">
  64. <editor-opt-bool text="Templating" model="dashboard.templating.enable" change="checkFeatureToggles()"></editor-opt-bool>
  65. <editor-opt-bool text="Annotations" model="dashboard.annotations.enable" change="checkFeatureToggles()"></editor-opt-bool>
  66. <div class="editor-option text-center" ng-repeat="pulldown in dashboard.nav">
  67. <label class="small" style="text-transform:capitalize;">{{pulldown.type}}</label>
  68. <input class="cr1" id="pulldown{{pulldown.type}}" type="checkbox" ng-model="pulldown.enable" ng-checked="pulldown.enable">
  69. <label for="pulldown{{pulldown.type}}" class="cr1"></label>
  70. </div>
  71. <editor-opt-bool text="Shared Crosshair (CTRL+O)" model="dashboard.sharedCrosshair"></editor-opt-bool>
  72. </div>
  73. </div>
  74. </div>
  75. <div ng-if="editor.index == 3">
  76. <ng-include src="'app/partials/import.html'"></ng-include>
  77. </div>
  78. <div ng-repeat="pulldown in dashboard.nav" ng-controller="SubmenuCtrl" ng-show="editor.index == 4+$index">
  79. <ng-include ng-show="pulldown.enable" src="pulldownEditorPath(pulldown.type)"></ng-include>
  80. <button ng-hide="pulldown.enable" class="btn" ng-click="pulldown.enable = true">Enable the {{pulldown.type}}</button>
  81. </div>
  82. </div>
  83. <div class="clearfix"></div>
  84. </div>
  85. <div class="dashboard-editor-footer">
  86. <div class="grafana-version-info" ng-show="editor.index === 0">
  87. <span class="editor-option small">
  88. Grafana version: {{grafanaVersion}} &nbsp;&nbsp;
  89. </span>
  90. <span grafana-version-check>
  91. </span>
  92. </div>
  93. <button type="button" class="btn btn-success pull-right" ng-click="editor.index=0;dismiss();reset_panel();dashboard.emit_refresh()">Close</button>
  94. </div>