stats.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <div class="etcd-container etcd-stats {{columns}} {{tableVisibility}}">
  2. <div class="etcd-body">
  3. <div class="etcd-format-selector">
  4. <div class="etcd-selector-item etcd-selector-graph" ng-click="showGraph()">
  5. <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  6. preserveAspectRatio="xMinYMin" viewBox="0 0 60 60.007" enable-background="new 0 0 60 60.007" xml:space="preserve">
  7. <path fill="#1D1D1B" d="M30-0.091c-16.621,0-30.094,13.474-30.094,30.094c0,16.621,13.474,30.094,30.094,30.094
  8. s30.094-13.474,30.094-30.094C60.094,13.383,46.621-0.091,30-0.091z M30,47.239c-9.519,0-17.235-7.716-17.235-17.235
  9. S20.481,12.768,30,12.768c9.519,0,17.235,7.716,17.235,17.235S39.519,47.239,30,47.239z"/>
  10. </svg>
  11. </div>
  12. <div class="etcd-selector-item etcd-selector-table" ng-click="showTable()">
  13. <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
  14. preserveAspectRatio="xMinYMin" viewBox="0 0 59.496 59.503" enable-background="new 0 0 59.496 59.503" xml:space="preserve">
  15. <rect x="0" y="0" fill="#1D1D1B" width="59.496" height="13.111"/>
  16. <rect x="0" y="23.196" fill="#1D1D1B" width="59.496" height="13.111"/>
  17. <rect x="0" y="46.392" fill="#1D1D1B" width="59.496" height="13.111"/>
  18. </svg>
  19. </div>
  20. </div>
  21. <div class="etcd-graph">
  22. <h2>Peer Latency</h2>
  23. <div class="etcd-graph-container" id="latency">
  24. </div>
  25. </div>
  26. <div class="etcd-list">
  27. <h2>Peer List</h2>
  28. <table cellpadding="0" cellspacing="0">
  29. <thead>
  30. <td class="etcd-name-header">Peer Name</td>
  31. <td class="etcd-latency">Latency</td>
  32. </thead>
  33. <tbody>
  34. <tr ng-repeat="peer in peers">
  35. <td ng-switch on="{true:'leader', false: 'follower'}[leaderName == peer.name]">
  36. <div ng-switch-when="leader">{{peer.name}}<span class="etcd-peer-type">(leader)</span></div>
  37. <div ng-switch-default>{{peer.name}}</div>
  38. </td>
  39. <td>
  40. <div class="etcd-square ng-class: {'etcd-square-green': peer.latency.current < 25, 'etcd-square-orange': peer.latency.current < 60, 'etcd-square-red': peer.latency.current >= 60}"></div>
  41. <div class="etcd-latency-value">{{peer.latency.current | number:1 }} ms</div>
  42. </td>
  43. </tr>
  44. </tbody>
  45. </table>
  46. </div>
  47. </div>
  48. </div>