module.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <div ng-controller='graphite' ng-init="init()" style="min-height:{{panel.height || row.height}}" ng-class='{"panel-full-edit-mode": inEditMode}'>
  2. <style>
  3. .histogram-legend {
  4. display:inline-block;
  5. padding-right:5px
  6. }
  7. .histogram-legend-dot {
  8. display:inline-block;
  9. height:10px;
  10. width:10px;
  11. border-radius:5px;
  12. }
  13. .histogram-legend-item {
  14. display:inline-block;
  15. }
  16. .histogram-chart {
  17. position:relative;
  18. }
  19. .histogram-options {
  20. padding: 5px;
  21. margin-right: 15px;
  22. margin-bottom: 0px;
  23. }
  24. .histogram-options label {
  25. margin: 0px 0px 0px 10px !important;
  26. }
  27. .histogram-options span {
  28. white-space: nowrap;
  29. }
  30. /* this is actually should be in bootstrap */
  31. .form-inline .checkbox {
  32. display: inline-block;
  33. }
  34. .full-edit-mode {
  35. //display: none;
  36. }
  37. .panel-full-edit-mode {
  38. z-index: 1500;
  39. display: block;
  40. position: fixed;
  41. left: 20px;
  42. right: 20px;
  43. top: 100px;
  44. outline: 1px solid #101214;
  45. border-top: 1px solid #3e444c;
  46. padding: 0 10px 10px 10px;
  47. background: #202328;
  48. }
  49. </style>
  50. <div>
  51. <span ng-show='panel.options'>
  52. <a class="link underline small" ng-show='panel.options' ng-click="options=!options">
  53. <i ng-show="!options" class="icon-caret-right"></i><i ng-show="options" class="icon-caret-down"></i> View
  54. </a> |&nbsp
  55. </span>
  56. </div>
  57. <form class="form-inline bordered histogram-options" ng-show="options">
  58. <span>
  59. <div class="checkbox">
  60. <label class="small">
  61. <input type="checkbox" ng-model="panel.bars" ng-checked="panel.bars" ng-change="render()">
  62. Bars
  63. </label>
  64. </div>
  65. <div class="checkbox">
  66. <label class="small">
  67. <input type="checkbox" ng-model="panel.lines" ng-checked="panel.lines" ng-change="render()">
  68. Lines
  69. </label>
  70. </div>
  71. <div class="checkbox">
  72. <label class="small">
  73. <input type="checkbox" ng-model="panel.stack" ng-checked="panel.stack" ng-change="render()">
  74. Stack
  75. </label>
  76. </div>
  77. </span>
  78. <span ng-show="panel.stack">
  79. <div class="checkbox">
  80. <label style="white-space:nowrap" class="small">
  81. <input type="checkbox" ng-model="panel.percentage" ng-checked="panel.percentage" ng-change="render()">
  82. Percent
  83. </label>
  84. </div>
  85. </span>
  86. <span>
  87. <div class="checkbox">
  88. <label class="small">
  89. <input type="checkbox" ng-model="panel.legend" ng-checked="panel.legend" ng-change="render()">
  90. Legend
  91. </label>
  92. </div>
  93. </span>
  94. <span>
  95. <label class="small">Interval</label> <select ng-change="set_interval(panel.interval);get_data();" class="input-small" ng-model="panel.interval" ng-options="interval_label(time) for time in _.union([panel.interval],panel.intervals)"></select>
  96. </span>
  97. </form>
  98. <center><img ng-show='panel.loading && _.isUndefined(data)' src="img/load_big.gif"></center>
  99. <div histogram-chart class="pointer histogram-chart" params="{{panel}}">
  100. </div>
  101. <span ng-show="panel.legend" ng-repeat='series in legend' class="histogram-legend">
  102. <i class='icon-circle' ng-style="{color: series.color}"></i>
  103. <span class='small histogram-legend-item'>
  104. <span ng-if="panel.show_query">{{series.alias || series.query}}</span>
  105. <span ng-if="!panel.show_query">{{series.alias}}</span>
  106. </span>
  107. </span>
  108. <div class="fluid-row panel-full-edit-mode-controls" ng-show="inEditMode" style="margin: 20px;">
  109. <div ng-model="editor.index" bs-tabs>
  110. <div ng-repeat="tab in setEditorTabs(panelMeta)" data-title="{{tab}}">
  111. </div>
  112. </div>
  113. <div ng-show="editorTabs[editor.index] == 'General'">
  114. <div ng-include src="'app/partials/panelgeneral.html'"></div>
  115. </div>
  116. <div ng-repeat="tab in panelMeta.editorTabs" ng-show="editorTabs[editor.index] == tab.title">
  117. <div ng-include src="tab.src"></div>
  118. </div>
  119. </div>
  120. </div>