flow.html 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 class="col-md-6">
  6. <button class="btn btn-outline-primary" style="float: right; margin-right: 10px;" ng-disabled="!macInputModel" ng-click="addNewRule()">
  7. <i class="fa fa-plus"></i>&nbsp;&nbsp;新增网关流控规则</button>
  8. </div>
  9. </div>
  10. <div class="separator"></div>
  11. <div class="container-fluid">
  12. <div class="row" style="margin-top: 20px; margin-bottom: 20px;">
  13. <div class="col-md-12">
  14. <div class="card">
  15. <div class="inputs-header">
  16. <span class="brand" style="font-size: 13px;">网关流控规则</span>
  17. <button class="btn btn-primary" style="float: right; margin-right: 10px; height: 30px;font-size: 12px;" ng-click="getMachineRules()">刷新</button>
  18. <input class="form-control witdh-200" placeholder="关键字" ng-model="searchKey">
  19. <div class="control-group" style="float:right;margin-right: 10px;margin-bottom: -10px;">
  20. <selectize id="gsInput" class="selectize-input-200" config="macsInputConfig" options="macsInputOptions" ng-model="macInputModel"
  21. placeholder="机器"></selectize>
  22. </div>
  23. </div>
  24. <!--.tools-header -->
  25. <div class="card-body" style="padding: 0px 0px;">
  26. <table class="table" style="border-left: none; border-right:none;margin-top: 10px;">
  27. <thead>
  28. <tr style="background: #F3F5F7;">
  29. <td>
  30. API 名称
  31. </td>
  32. <td>
  33. API 类型
  34. </td>
  35. <td>
  36. 阈值类型
  37. </td>
  38. <td>
  39. 单机阈值
  40. </td>
  41. <td>
  42. 操作
  43. </td>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <tr dir-paginate="rule in rules | filter: searchKey | itemsPerPage: rulesPageConfig.pageSize " current-page="rulesPageConfig.currentPageIndex"
  48. pagination-id="entriesPagination">
  49. <td>{{rule.resource}}</td>
  50. <td>
  51. <span ng-if="rule.resourceMode == 0">Route ID</span>
  52. <span ng-if="rule.resourceMode == 1">API 分组</span>
  53. </td>
  54. <td>
  55. <span ng-if="rule.grade == 1">QPS</span>
  56. <span ng-if="rule.grade == 0">线程数</span>
  57. </td>
  58. <td>{{rule.count}}</td>
  59. <td>
  60. <button class="btn btn-xs btn-outline-primary" type="button" ng-click="editRule(rule)" style="font-size: 12px; height:25px;">编辑</button>
  61. <button class="btn btn-xs btn-outline-danger" type="button" ng-click="deleteRule(rule)" style="font-size: 12px; height:25px;">删除</button>
  62. </td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. </div>
  67. <!-- .card-body -->
  68. <div class="pagination-footer">
  69. <dir-pagination-controls boundary-links="true" template-url="app/views/pagination.tpl.html" pagination-id="entriesPagination"
  70. on-page-change="">
  71. </dir-pagination-controls>
  72. <div class="tools" style="">
  73. <span>共 {{rulesPageConfig.totalCount}} 条记录, </span>
  74. <span>
  75. 每页
  76. <input class="form-control" ng-model="rulesPageConfig.pageSize"> 条记录
  77. </span>
  78. <!--<span>第 {{apisPageConfig.currentPageIndex}} / {{apisPageConfig.totalPage}} 页</span>-->
  79. </div>
  80. <!-- .tools -->
  81. </div>
  82. <!-- pagination-footer -->
  83. </div>
  84. <!-- .card -->
  85. </div>
  86. <!-- .col-md-12 -->
  87. </div>
  88. <!-- -->
  89. </div>
  90. <!-- .container-fluid -->