settings.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. <div class="dashboard-settings__aside-actions">
  11. <button class="btn btn-success" ng-click="ctrl.saveDashboard()" ng-show="ctrl.canSave">
  12. <i class="fa fa-save"></i> Save
  13. </button>
  14. <button class="btn btn-inverse" ng-click="ctrl.openSaveAsModal()" ng-show="ctrl.canSaveAs">
  15. <i class="fa fa-copy"></i>
  16. Save As...
  17. </button>
  18. <button class="btn btn-danger" ng-click="ctrl.deleteDashboard()" ng-show="ctrl.canDelete">
  19. <i class="fa fa-trash"></i>
  20. Delete
  21. </button>
  22. </div>
  23. </aside>
  24. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'settings'">
  25. <h3 class="dashboard-settings__header">
  26. General
  27. </h3>
  28. <div class="gf-form-group">
  29. <div class="gf-form">
  30. <label class="gf-form-label width-7">Name</label>
  31. <input type="text" class="gf-form-input width-30" ng-model='ctrl.dashboard.title'></input>
  32. </div>
  33. <div class="gf-form">
  34. <label class="gf-form-label width-7">Description</label>
  35. <input type="text" class="gf-form-input width-30" ng-model='ctrl.dashboard.description'></input>
  36. </div>
  37. <div class="gf-form">
  38. <label class="gf-form-label width-7">
  39. Tags
  40. <info-popover mode="right-normal">Press enter to add a tag</info-popover>
  41. </label>
  42. <bootstrap-tagsinput ng-model="ctrl.dashboard.tags" tagclass="label label-tag" placeholder="add tags">
  43. </bootstrap-tagsinput>
  44. </div>
  45. <folder-picker initial-title="ctrl.dashboard.meta.folderTitle"
  46. initial-folder-id="ctrl.dashboard.meta.folderId"
  47. on-change="ctrl.onFolderChange($folder)"
  48. enable-create-new="true"
  49. is-valid-selection="true"
  50. label-class="width-7">
  51. </folder-picker>
  52. <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">
  53. </gf-form-switch>
  54. </div>
  55. <gf-time-picker-settings dashboard="ctrl.dashboard"></gf-time-picker-settings>
  56. <h5 class="section-heading">Panel Options</h5>
  57. <div class="gf-form">
  58. <label class="gf-form-label width-11">
  59. Graph Tooltip
  60. <info-popover mode="right-normal">
  61. Cycle between options using Shortcut: CTRL+O or CMD+O
  62. </info-popover>
  63. </label>
  64. <div class="gf-form-select-wrapper">
  65. <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>
  66. </div>
  67. </div>
  68. </div>
  69. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'annotations'" ng-include="'public/app/features/annotations/partials/editor.html'">
  70. </div>
  71. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'templating'" ng-include="'public/app/features/templating/partials/editor.html'">
  72. </div>
  73. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'links'" >
  74. <dash-links-editor dashboard="ctrl.dashboard"></dash-links-editor>
  75. </div>
  76. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'versions'" >
  77. <gf-dashboard-history dashboard="dashboard"></gf-dashboard-history>
  78. </div>
  79. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'view_json'" >
  80. <h3 class="dashboard-settings__header">View JSON</h3>
  81. <div class="gf-form">
  82. <code-editor content="ctrl.json" data-mode="json" data-max-lines=30 ></code-editor>
  83. </div>
  84. </div>
  85. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'permissions'" >
  86. <dashboard-permissions ng-if="ctrl.dashboard && !ctrl.hasUnsavedFolderChange"
  87. dashboardId="ctrl.dashboard.id"
  88. backendSrv="ctrl.backendSrv"
  89. folder="ctrl.getFolder()"
  90. />
  91. <div ng-if="ctrl.hasUnsavedFolderChange">
  92. <h5>You have changed folder, please save to view permissions.</h5>
  93. </div>
  94. </div>
  95. <div class="dashboard-settings__content" ng-if="ctrl.viewId === '404'">
  96. <h3 class="dashboard-settings__header">Settings view not found</h3>
  97. <div>
  98. <h5>The settings page could not be found or you do not have permission to access it</h5>
  99. </div>
  100. </div>
  101. <div class="dashboard-settings__content" ng-if="ctrl.viewId === 'make_editable'">
  102. <h3 class="dashboard-settings__header">Make Editable</h3>
  103. <button class="btn btn-success" ng-click="ctrl.makeEditable()">
  104. Make Editable
  105. </button>
  106. </div>