settings.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <aside class="dashboard-settings__aside">
  2. <h2 class="dashboard-settings__aside-header">
  3. <i class="fa fa-cog"></i>
  4. Settings
  5. </h2>
  6. <a href="{{::section.url}}" class="dashboard-settings__nav-item" ng-class="{active: ctrl.viewId === section.id}" ng-repeat="section in ctrl.sections">
  7. <i class="{{::section.icon}}"></i>
  8. {{::section.title}}
  9. </a>
  10. </aside>
  11. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'settings'">
  12. <h3 class="dashboard-settings__header">
  13. General
  14. </h3>
  15. <div class="gf-form-group">
  16. <div class="gf-form">
  17. <label class="gf-form-label width-7">Name</label>
  18. <input type="text" class="gf-form-input width-30" ng-model='ctrl.dashboard.title'></input>
  19. </div>
  20. <div class="gf-form">
  21. <label class="gf-form-label width-7">Description</label>
  22. <input type="text" class="gf-form-input width-30" ng-model='ctrl.dashboard.description'></input>
  23. </div>
  24. <div class="gf-form">
  25. <label class="gf-form-label width-7">
  26. Tags
  27. <info-popover mode="right-normal">Press enter to add a tag</info-popover>
  28. </label>
  29. <bootstrap-tagsinput ng-model="ctrl.dashboard.tags" tagclass="label label-tag" placeholder="add tags">
  30. </bootstrap-tagsinput>
  31. </div>
  32. <folder-picker initial-title="ctrl.dashboard.meta.folderTitle"
  33. initial-folder-id="ctrl.dashboard.folderId"
  34. on-change="ctrl.onFolderChange($folder)"
  35. label-class="width-7">
  36. </folder-picker>
  37. <gf-form-switch class="gf-form" label="Editable" tooltip="Uncheck, then save and reload to disable all dashboard editing" checked="ctrl.dashboard.editable" label-class="width-7">
  38. </gf-form-switch>
  39. </div>
  40. <gf-time-picker-settings dashboard="ctrl.dashboard"></gf-time-picker-settings>
  41. <h5 class="section-heading">Panel Options</h5>
  42. <div class="gf-form">
  43. <label class="gf-form-label width-11">
  44. Graph Tooltip
  45. <info-popover mode="right-normal">
  46. Cycle between options using Shortcut: CTRL+O or CMD+O
  47. </info-popover>
  48. </label>
  49. <div class="gf-form-select-wrapper">
  50. <select ng-model="ctrl.dashboard.graphTooltip" class='gf-form-input' ng-options="f.value as f.text for f in [{value: 0, text: 'Default'}, {value: 1, text: 'Shared crosshair'},{value: 2, text: 'Shared Tooltip'}]"></select>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'annotations'" ng-include="'public/app/features/annotations/partials/editor.html'">
  55. </div>
  56. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'templating'" ng-include="'public/app/features/templating/partials/editor.html'">
  57. </div>
  58. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'links'" >
  59. <dash-links-editor></dash-links-editor>
  60. </div>
  61. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'versions'" >
  62. <gf-dashboard-history dashboard="dashboard"></gf-dashboard-history>
  63. </div>
  64. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'view_json'" >
  65. <h3 class="dashboard-settings__header">View JSON</h3>
  66. <div class="gf-form">
  67. <textarea class="gf-form-input" ng-model="ctrl.json" rows="30" spellcheck="false"></textarea>
  68. </div>
  69. </div>
  70. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'save_as'">
  71. <save-dashboard-as></save-dashboard-as>
  72. </div>
  73. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'delete'">
  74. <h3 class="dashboard-settings__header">Delete dashboard</h3>
  75. <div class="p-b-2" ng-if="ctrl.alertCount > 1">
  76. <h5>This dashboard contains {{ctrl.alertCount}} alerts. Deleting this dashboard will also delete those alerts</h5>
  77. <input type="text" class="gf-form-input width-16" style="display: inline-block;" placeholder="Type DELETE to confirm" ng-model="ctrl.confirmText" ng-change="ctrl.confirmTextChanged()">
  78. </div>
  79. <button class="btn btn-danger" ng-click="ctrl.deleteDashboard()" ng-disabled="!ctrl.confirmValid" >
  80. <i class="fa fa-trash"></i>
  81. Delete
  82. </button>
  83. </div>
  84. <div class="dashboard-settings__content" ng-if="ctrl.viewId === '404'">
  85. <h3 class="dashboard-settings__header">Settings view not found</h3>
  86. <div>
  87. <h5>The settings page could not be found or you do not have permission to access it</h5>
  88. </div>
  89. </div>
  90. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'make_editable'">
  91. <h3 class="dashboard-settings__header">Make Editable</h3>
  92. <button class="btn btn-success" ng-click="ctrl.makeEditable()">
  93. Make Editable
  94. </button>
  95. </div>