api-dialog.html 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <div>
  2. <span class="brand" style="font-weight:bold;">{{gatewayApiDialog.title}}</span>
  3. <div class="card" style="margin-top: 20px;margin-bottom: 10px;">
  4. <div class="panel-body">
  5. <form role="form" class="form-horizontal">
  6. <div class="form-group">
  7. <label class="col-sm-2 control-label">API 名称</label>
  8. <div class="col-sm-9">
  9. <input type="text" ng-if="gatewayApiDialog.type == 'edit'" class="form-control" placeholder="请输入" ng-model='currentApi.apiName'
  10. disabled="" />
  11. <input type="text" ng-if="gatewayApiDialog.type == 'add'" class="form-control highlight-border" placeholder="请输入" ng-model='currentApi.apiName' />
  12. </div>
  13. </div>
  14. <div class="form-group" ng-repeat="predicateItem in currentApi.predicateItems track by $index">
  15. <label class="col-sm-2 control-label">匹配模式</label>
  16. <div class="col-sm-4 control-label">
  17. <div class="form-control highlight-border" align="center">
  18. <input type="radio" value="0" checked ng-model="predicateItem.matchStrategy" title="精确" />&nbsp;精确&nbsp;&nbsp;
  19. <input type="radio" value="1" ng-model="predicateItem.matchStrategy" title="前缀" />&nbsp;前缀&nbsp&nbsp;
  20. <input type="radio" value="2" ng-model="predicateItem.matchStrategy" title="正则" />&nbsp;正则&nbsp&nbsp;
  21. </div>
  22. </div>
  23. <label class="col-sm-2 control-label">匹配串</label>
  24. <div class="col-sm-3 control-label">
  25. <input type='text' ng-model="predicateItem.pattern" class="form-control highlight-border" placeholder="请输入" />
  26. </div>
  27. <div class="col-sm-1 control-label" align="center">
  28. <button class="btn btn-outline-danger" ng-click="removeMatchPattern($index)"
  29. align="center" ng-if="currentApi.predicateItems.length > 1">X</button>
  30. </div>
  31. </div>
  32. <div class="form-group" style="text-align: center">
  33. <button class="btn btn-outline-primary" ng-click="addNewMatchPattern()">
  34. <i class="fa fa-plus"></i>&nbsp;新增匹配规则
  35. </button>
  36. </div>
  37. </form>
  38. <div class="separator"></div>
  39. <div clss="row" style="margin-top: 20px;">
  40. <button class="btn btn-outline-danger" style="float:right; height: 30px;font-size: 12px;margin-left: 10px;" ng-click="closeThisDialog()">取消</button>
  41. <button class="btn btn-outline-success" style="float:right; height: 30px;font-size: 12px;margin-left: 10px;" ng-click="saveApi()">{{gatewayApiDialog.confirmBtnText}}</button>
  42. <button ng-if="gatewayApiDialog.saveAndContinueBtnText" class="btn btn-default" style="float:right; height: 30px;font-size: 12px;"
  43. ng-click="saveApiAndContinue()">{{gatewayApiDialog.saveAndContinueBtnText}}</button>
  44. </div>
  45. </div>
  46. </div>
  47. </div>