flow_v2.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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-default-inverse" style="float: right; margin-right: 10px;" ng-click="addNewRule()">
  7. <i class="fa fa-plus"></i>&nbsp;&nbsp;新增流控规则
  8. </button>
  9. <!-- <a class="btn btn-default-inverse" style="float: right; margin-right: 10px;" ui-sref="dashboard.flowV1({app: app})">-->
  10. <!-- 回到单机页面-->
  11. <!-- </a>-->
  12. </div>
  13. </div>
  14. <div class="separator"></div>
  15. <div class="container-fluid">
  16. <div class="row" style="margin-top: 20px; margin-bottom: 20px;">
  17. <div class="col-md-12">
  18. <div class="card">
  19. <div class="inputs-header">
  20. <span class="brand" style="font-size: 13px;">流控规则</span>
  21. <input class="form-control witdh-200" placeholder="关键字" ng-model="searchKey">
  22. </div>
  23. <!--.tools-header -->
  24. <div class="card-body" style="padding: 0px 0px;">
  25. <table class="table" style="border-left: none; border-right:none;margin-top: 10px;">
  26. <thead>
  27. <tr style="background: #F3F5F7;">
  28. <td style="width: 40%">
  29. 资源名
  30. </td>
  31. <td style="width: 10%;">
  32. 来源应用
  33. </td>
  34. <td style="width: 8%;">
  35. 流控模式
  36. </td>
  37. <td style="width: 8%;">
  38. 阈值类型
  39. </td>
  40. <td style="width: 8%;">
  41. 阈值
  42. </td>
  43. <td style="width: 8%;">
  44. 阈值模式
  45. </td>
  46. <td style="width: 8%;">
  47. 流控效果
  48. </td>
  49. <td style="width: 12%;">
  50. 操作
  51. </td>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. <tr dir-paginate="rule in rules | filter: searchKey | itemsPerPage: rulesPageConfig.pageSize " current-page="rulesPageConfig.currentPageIndex"
  56. pagination-id="entriesPagination">
  57. <td style="word-wrap:break-word;word-break:break-all;">{{rule.resource}}</td>
  58. <td style="word-wrap:break-word;word-break:break-all;">{{rule.limitApp }}</td>
  59. <td>
  60. <span ng-if="rule.strategy == 0">直接</span>
  61. <span ng-if="rule.strategy == 1">关联</span>
  62. <span ng-if="rule.strategy == 2">链路</span>
  63. </td>
  64. <td>
  65. {{rule.grade == 0 ? '线程数' : 'QPS'}}
  66. </td>
  67. <td style="word-wrap:break-word;word-break:break-all;">
  68. {{rule.count}}
  69. </td>
  70. <td>
  71. <span>{{generateThresholdTypeShow(rule)}}</span>
  72. </td>
  73. <td>
  74. <span ng-if="rule.controlBehavior == 0">快速失败</span>
  75. <span ng-if="rule.controlBehavior == 1">Warm Up</span>
  76. <span ng-if="rule.controlBehavior == 2">排队等待</span>
  77. <span ng-if="rule.controlBehavior == 3">预热排队</span>
  78. </td>
  79. <td>
  80. <button class="btn btn-xs btn-default" type="button" ng-click="editRule(rule)" style="font-size: 12px; height:25px;">编辑</button>
  81. <button class="btn btn-xs btn-default" type="button" ng-click="deleteRule(rule)" style="font-size: 12px; height:25px;">删除</button>
  82. </td>
  83. </tr>
  84. </tbody>
  85. </table>
  86. </div>
  87. <!-- .card-body -->
  88. <div class="pagination-footer">
  89. <dir-pagination-controls boundary-links="true" template-url="app/views/pagination.tpl.html" pagination-id="entriesPagination"
  90. on-page-change="">
  91. </dir-pagination-controls>
  92. <div class="tools" style="">
  93. <span>共 {{rulesPageConfig.totalCount}} 条记录, </span>
  94. <span>
  95. 每页
  96. <input class="form-control" ng-model="rulesPageConfig.pageSize"> 条记录
  97. </span>
  98. <!--<span>第 {{rulesPageConfig.currentPageIndex}} / {{rulesPageConfig.totalPage}} 页</span>-->
  99. </div>
  100. <!-- .tools -->
  101. </div>
  102. <!-- pagination-footer -->
  103. </div>
  104. <!-- .card -->
  105. </div>
  106. <!-- .col-md-12 -->
  107. </div>
  108. <!-- -->
  109. </div>
  110. <!-- .container-fluid -->