machine.html 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <div class="row" style="margin-left: 1px; margin-top:10px; height: 50px;">
  2. <div class="col-md-6" style="margin-bottom: 10px;">
  3. <span style="font-size: 30px;font-weight: bold;">{{app}}</span>
  4. </div>
  5. </div>
  6. <!--<div>-->
  7. <!--<span>实例总数 {{machines.length}}, 健康 {{healthyCount}}, 失联 {{machines.length-healthyCount}}</span>-->
  8. <!--</div>-->
  9. <div class="separator"></div>
  10. <div class="container-fluid">
  11. <div class="row" style="margin-top: 20px; margin-bottom: 20px;">
  12. <div class="col-md-12">
  13. <div class="card">
  14. <div class="inputs-header">
  15. <span class="brand" style="font-size: 13px;">机器列表</span>
  16. <span>实例总数 {{machines.length}}, 健康 {{healthyCount}}, 失联 {{machines.length - healthyCount}}.</span>
  17. <input class="form-control width-300" placeholder="关键字" ng-model="searchKey">
  18. </div>
  19. <!--.tools-header -->
  20. <div class="card-body" style="padding: 0px 0px;">
  21. <table class="table" style="border-left: none; border-right:none;margin-top: 10px;">
  22. <thead>
  23. <tr style="background: #F3F5F7;">
  24. <td>机器名</td>
  25. <td>IP 地址</td>
  26. <td>端口号</td>
  27. <td>Sentinel 客户端版本</td>
  28. <td>健康状态</td>
  29. <td>心跳时间</td>
  30. <td>操作</td>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. <tr dir-paginate="entry in machines | filter : searchKey | itemsPerPage: machinesPageConfig.pageSize " current-page="machinesPageConfig.currentPageIndex"
  35. pagination-id="entriesPagination">
  36. <td style="word-wrap:break-word;word-break:break-all;">{{entry.hostname}}</td>
  37. <td style="word-wrap:break-word;word-break:break-all;">{{entry.ip}}</td>
  38. <td> {{entry.port}} </td>
  39. <td> {{entry.version}} </td>
  40. <td ng-if="entry.healthy">健康</td>
  41. <td ng-if="!entry.healthy" style="color: red">失联</td>
  42. <td>{{entry.lastHeartbeat | date: 'yyyy/MM/dd HH:mm:ss'}}</td>
  43. <td>
  44. <button ng-if="!entry.healthy" class="btn btn-xs btn-outline-danger" style="height: 25px; font-size: 12px;" ng-click="removeMachine(entry.ip, entry.port)">移除</button>
  45. </td>
  46. </tr>
  47. </tbody>
  48. </table>
  49. </div>
  50. <!-- .card-body -->
  51. <div class="pagination-footer">
  52. <dir-pagination-controls boundary-links="true" template-url="app/views/pagination.tpl.html" pagination-id="entriesPagination"
  53. on-page-change="">
  54. </dir-pagination-controls>
  55. <div class="tools" style="">
  56. <span>共 {{machinesPageConfig.totalCount}} 条记录, </span>
  57. <span>
  58. 每页
  59. <input class="form-control" ng-model="machinesPageConfig.pageSize"> 条记录,
  60. </span>
  61. <span>第 {{machinesPageConfig.currentPageIndex}} / {{machinesPageConfig.totalPage}} 页</span>
  62. </div>
  63. <!-- .tools -->
  64. </div>
  65. <!-- pagination-footer -->
  66. </div>
  67. <!-- .card -->
  68. </div>
  69. <!-- .col-md-12 -->
  70. </div>
  71. <!-- -->
  72. </div>
  73. <!-- .container-fluid -->