metric.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 class="separator"></div>
  7. <div class="container-fluid">
  8. <div class="row" style="margin-top: 20px; margin-bottom: 20px;">
  9. <div class="col-md-12">
  10. <div class="card">
  11. <div class="inputs-header">
  12. <span class="brand" style="font-size: 13px;">
  13. <i class="fa fa-sort-amount-asc" aria-hidden="true" ng-show="!isDescOrder"></i>
  14. <i class="fa fa-sort-amount-desc" aria-hidden="true" ng-show="isDescOrder"></i>
  15. {{metricTypeDesc}}&nbsp;实时监控
  16. </span>
  17. <button class="btn btn-outline-primary" style="float: right;margin-right: 10px;height: 30px;font-size: 12px;" ng-click="setDescOrder()"
  18. ng-if="!isDescOrder">降序</button>
  19. <button class="btn btn-outline-primary" style="float: right;margin-right: 10px;height: 30px;font-size: 12px;" ng-click="setAscOrder()"
  20. ng-if="isDescOrder">升序</button>
  21. <input class="form-control witdh-200" placeholder="关键字" ng-model="serviceQuery" ng-change="searchService()" style="margin-right: 20px;">
  22. </div>
  23. <!--.tools-header -->
  24. <!--<div id="g2container"></div>-->
  25. <div class="card-body">
  26. <div class="row" style="margin-left: 3px;margin-right: 3px;">
  27. <div class="card-body" style="padding: 0px 0px;">
  28. <div class="col-md-12" ng-repeat="metric in metrics" style="padding-left: 10px;padding-right: 10px;">
  29. <span ng-if="$index == metrics.length-1" ng-init="initAllChart()"></span>
  30. <div class="card" style="margin-bottom:20px;" ng-if="$index < metrics.length-1">
  31. <div class="tools-header" style="height: 45px;">
  32. <span class="brand" style="font-weight:normal;;word-break:break-all;word-wrap:break-word;">&nbsp{{metric.resource}}</span>
  33. <a ng-href="">
  34. <i class="fa fa-align-justify"></i>
  35. </a>
  36. </div>
  37. <!-- .tools-header -->
  38. <div class="card-body">
  39. <div class="row">
  40. <div class="col-md-6">
  41. <!--<div ng-if="$index != metrics.length-1" id="chart{{$index}}"></div>-->
  42. <!--<div ng-if="$index == metrics.length-1" id="chart{{$index}}" ng-init="initAllChart()"></div>-->
  43. <div id="chart{{$index}}"></div>
  44. </div>
  45. <div class="col-md-6">
  46. <table class="table table-hover table-striped table-bordered">
  47. <thead>
  48. <tr style="font-size: 13px;text-align:center;font-weight: bold;">
  49. <td style="word-wrap:break-word;word-break:break-all;">时间</td>
  50. <td style="word-wrap:break-word;word-break:break-all;" title="通过 QPS (pass qps)">通过 QPS</td>
  51. <td style="word-wrap:break-word;word-break:break-all;" title="拒绝 QPS (blocked qps)">拒绝QPS</td>
  52. <td style="word-wrap:break-word;word-break:break-all;" title="RT: 平均响应时间(毫秒)">响应时间(ms)</td>
  53. </tr>
  54. </thead>
  55. <!-- thead -->
  56. <tbody>
  57. <tr style="font-size: 12px;text-align:center;" ng-repeat="tableObj in metric.shortData">
  58. <td style="word-wrap:break-word;word-break:break-all; ">{{tableObj.timestamp | date: 'HH:mm:ss'}}</td>
  59. <td style="word-wrap:break-word;word-break:break-all; ">{{tableObj.passQps | number : 1}}</td>
  60. <td style="word-wrap:break-word;word-break:break-all; ">{{tableObj.blockQps | number : 1}}</td>
  61. <td style="word-wrap:break-word;word-break:break-all;">{{tableObj.rt | number : 1}}</td>
  62. </tr>
  63. <tr style="font-size: 12px;text-align:center;" ng-repeat="_tr in [] | range : (6 - metric.shortData.length)">
  64. <td ng-repeat="_td in [] | range : 4">-</td>
  65. </tr>
  66. </tbody>
  67. <!-- tbody -->
  68. </table>
  69. </div>
  70. </div>
  71. </div>
  72. <!-- .card-body -->
  73. </div>
  74. <!-- .card -->
  75. </div>
  76. <!-- .col-md-6 -->
  77. </div>
  78. <!-- .card-body -->
  79. </div>
  80. <!-- .row -->
  81. </div>
  82. <div style="display:none;">
  83. <li dir-paginate="empty in emptyObjs| itemsPerPage : servicePageConfig.pageSize" current-page="servicePageConfig.currentPageIndex"
  84. pagination-id="servicesPagination"></li>
  85. </div>
  86. <div class="pagination-footer" style="margin-top:5px;">
  87. <dir-pagination-controls boundary-links="true" template-url="app/views/pagination.tpl.html" pagination-id="servicesPagination"
  88. on-page-change="pageChanged(newPageNumber)">
  89. </dir-pagination-controls>
  90. <div class="tools" style="">
  91. <span>共 {{emptyObjs.length}} 条记录, </span>
  92. <span>
  93. 每页 {{servicePageConfig.pageSize}} 条记录
  94. <!--每页-->
  95. <!--<input class="form-control" ng-model="servicePageConfig.pageSize" ng-change="pageSizeChanged()">-->
  96. <!--条记录,-->
  97. </span>
  98. <span>第 {{servicePageConfig.currentPageIndex}} / {{servicePageConfig.totalPage}} 页</span>
  99. </div>
  100. <!-- .tools -->
  101. </div>
  102. <!-- pagination-footer -->
  103. <div class="row" style="margin-bottom:20px"></div>
  104. </div>
  105. <!-- .card -->
  106. </div>
  107. <!-- .col-md-12 -->
  108. </div>
  109. <!-- -->
  110. </div>