表格显示优化

1.x
tanghc 6 years ago
parent 41ee76b56a
commit f8fd24ce32
  1. 3
      sop-admin/sop-admin-front/pages/service/limitManager.js
  2. 3
      sop-admin/sop-admin-front/pages/service/routeManager.js
  3. 1
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/LimitApi.java
  4. 12
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/api/service/result/LimitVO.java
  5. 10
      sop-admin/sop-admin-server/src/main/java/com/gitee/sop/adminserver/bean/GatewayRouteDefinition.java
  6. 12
      sop-common/sop-service-common/src/main/java/com/gitee/sop/servercommon/route/GatewayRouteDefinition.java

@ -126,7 +126,8 @@ lib.importJs('../../assets/js/routerole.js')
, headers: {access_token: ApiUtil.getAccessToken()}
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
, cols: [[
{field: 'routeId', title: 'id(接口名+版本号)', width: 200}
{field: 'name', title: '接口名', width: 200}
, {field: 'version', title: '版本号', width: 80}
, {
field: 'type', title: '限流策略', width: 80, templet: function (row) {
return LIMIT_TYPE[row.type + ''];

@ -108,7 +108,8 @@ lib.importJs('../../assets/js/routerole.js')
, headers: {access_token: ApiUtil.getAccessToken()}
, cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 新增
, cols: [[
{field: 'id', title: 'id(接口名+版本号)'}
{field: 'name', title: '接口名', width: 200}
, {field: 'version', title: '版本号', width: 80}
, {field: 'uri', title: 'uri', width: 200}
, {field: 'path', title: 'path'}
, {field: 'roles', title: '访问权限', width: 100, templet: function (row) {

@ -58,6 +58,7 @@ public class LimitApi {
.map(gatewayRouteDefinition -> {
String routeId = gatewayRouteDefinition.getId();
LimitVO vo = new LimitVO();
CopyUtil.copyPropertiesIgnoreNull(gatewayRouteDefinition, vo);
ConfigRouteLimit configRouteLimit = routeLimitMap.getOrDefault(routeId, getDefaultLimit());
CopyUtil.copyPropertiesIgnoreNull(configRouteLimit, vo);
vo.setRouteId(routeId);

@ -16,6 +16,18 @@ public class LimitVO {
@ApiDocField(description = "路由id")
private String routeId;
/**
* 接口名
*/
@ApiDocField(description = "接口名")
private String name;
/**
* 版本号
*/
@ApiDocField(description = "版本号")
private String version;
@ApiDocField(description = "serviceId")
private String serviceId;

@ -17,6 +17,16 @@ public class GatewayRouteDefinition {
@ApiDocField(description = "路由id")
private String id = "";
/**
* 接口名
*/
private String name;
/**
* 版本号
*/
private String version;
/**
* 路由断言集合配置
*/

@ -11,10 +11,20 @@ import java.util.List;
@Data
public class GatewayRouteDefinition {
/**
* 路由的Id
* 路由的Id接口名+版本号确保此id全局唯一
*/
private String id;
/**
* 接口名
*/
private String name;
/**
* 版本号
*/
private String version;
/**
* 路由断言集合配置
*/

Loading…
Cancel
Save