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