dasheditor.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <div class="modal-body">
  2. <div class="pull-right editor-title">Dashboard settings</div>
  3. <div ng-model="editor.index" bs-tabs>
  4. <div ng-repeat="tab in ['General','Index','Rows']" data-title="{{tab}}">
  5. </div>
  6. </div>
  7. <div class="row-fluid" ng-show="editor.index == 0">
  8. <div class="span4">
  9. <label class="small">Title</label><input type="text" class="input-large" ng-model='dashboard.current.title'></input>
  10. </div>
  11. <div class="span1">
  12. <label class="small"> Editable </label><input type="checkbox" ng-model="dashboard.current.editable" ng-checked="dashboard.current.editable" />
  13. </div>
  14. <div class="span3">
  15. <label class="small">Style</label><select class="input-small" ng-model="dashboard.current.style" ng-options='f for f in ["dark","light"]'></select>
  16. </div>
  17. </div>
  18. <div class="row-fluid" ng-show="editor.index == 1">
  19. <h4>Index Settings</h4>
  20. <div ng-show="dashboard.current.index.interval != 'none'" class="row-fluid">
  21. <div class="span12">
  22. <p class="small">
  23. Time stamped indices use your selected time range to create a list of
  24. indices that match a specified timestamp pattern. This can be very
  25. efficient for some data sets (eg, logs) For example, to match the
  26. default logstash index pattern you might use
  27. <code>[logstash-]YYYY.MM.DD</code>. The [] in "[logstash-]" are
  28. important as they instruct Kibana not to treat those letters as a
  29. pattern.
  30. Please also note that indices should rollover at midnight <strong>UTC</strong>.
  31. </p>
  32. <p class="small">
  33. See <a href="http://momentjs.com/docs/#/displaying/format/">http://momentjs.com/docs/#/displaying/format/</a>
  34. for documentation on date formatting.
  35. </p>
  36. </div>
  37. </div>
  38. <div class="row-fluid">
  39. <div class="span2">
  40. <h6>Timestamping</h6><select class="input-small" ng-model="dashboard.current.index.interval" ng-options='f for f in ["none","hour","day","week","month","year"]'></select>
  41. </div>
  42. <div class="span4" ng-show="dashboard.current.index.interval != 'none'">
  43. <h6>Index pattern <small>Absolutes in []</small></h6>
  44. <input type="text" class="input-medium" ng-model="dashboard.current.index.pattern">
  45. </div>
  46. <div class="span2" ng-show="dashboard.current.index.interval != 'none'">
  47. <h6>Failover <i class="icon-question-sign" bs-tooltip="'If no indices match the pattern, failover to default index *NOT RECOMMENDED*'"></i></h6>
  48. <input type="checkbox" ng-model="dashboard.current.failover" ng-checked="dashboard.current.failover" />
  49. </div>
  50. <div class="span4" ng-show="dashboard.current.failover || dashboard.current.index.interval == 'none'">
  51. <h6>Default Index <small ng-show="dashboard.current.index.interval != 'none'">If index not found</small></h6>
  52. <input type="text" class="input-medium" ng-model="dashboard.current.index.default">
  53. </div>
  54. </div>
  55. </div>
  56. <div class="row-fluid" ng-show="editor.index == 2">
  57. <div class="span12">
  58. <table class="table table-condensed table-striped">
  59. <thead>
  60. <th>Title</th>
  61. <th>Delete</th>
  62. <th>Move</th>
  63. </thead>
  64. <tr ng-repeat="row in dashboard.current.rows">
  65. <td>{{row.title}}</td>
  66. <td><i ng-click="dashboard.current.rows = _.without(dashboard.current.rows,row)" class="pointer icon-remove"></i></td>
  67. <td><i ng-click="_.move(dashboard.current.rows,$index,$index-1)" ng-hide="$first" class="pointer icon-arrow-up"></i></td>
  68. <td><i ng-click="_.move(dashboard.current.rows,$index,$index+1)" ng-hide="$last" class="pointer icon-arrow-down"></i></td>
  69. </tr>
  70. </table>
  71. </div>
  72. </div>
  73. <div class="row-fluid" ng-show="editor.index == 2">
  74. <form>
  75. <div class="span5">
  76. <label class="small">Title</label>
  77. <input type="text" class="input-large" ng-model='row.title' placeholder="New row"></input>
  78. </div>
  79. <div class="span2">
  80. <label class="small">Height</label>
  81. <input type="text" class="input-mini" ng-model='row.height'></input>
  82. </div>
  83. <div class="span1">
  84. <label class="small"> Editable </label>
  85. <input type="checkbox" ng-model="row.editable" ng-checked="row.editable" />
  86. </div>
  87. </form>
  88. </div>
  89. <!--<div class="row-fluid" ng-show="editor.index == 3">
  90. <h6>Region</h6><select class="input-small" ng-model="dashboard.current.time.region" ng-options='f for f in ["africa","america","asia","atlantic","australia","europe","indian","pacific"]'></select>
  91. </div>-->
  92. </div>
  93. <div class="modal-footer">
  94. <button ng-click="add_row(dashboard.current,row); reset_row();" class="btn btn-success" ng-show="editor.index == 2">Create Row</button>
  95. <button type="button" class="btn btn-danger" ng-click="editor.index=0;dismiss();reset_panel();dashboard.refresh()">Close</button>
  96. </div>