mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 20:51:48 +00:00
(feature)support adding tag for metric and support super admin configuration (#108)
This commit is contained in:
@@ -4,6 +4,7 @@ package com.tencent.supersonic.semantic.api.model.request;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
|
||||
import com.tencent.supersonic.common.pojo.DataFormat;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@@ -17,4 +18,6 @@ public class MetricBaseReq extends SchemaItem {
|
||||
|
||||
private DataFormat dataFormat;
|
||||
|
||||
private List<String> tags;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,4 @@ public class PageMetricReq extends PageSchemaItemReq {
|
||||
|
||||
private String type;
|
||||
|
||||
private String key;
|
||||
|
||||
}
|
||||
|
||||
@@ -16,4 +16,5 @@ public class PageSchemaItemReq extends PageBaseReq {
|
||||
private List<Long> modelIds = Lists.newArrayList();
|
||||
private Integer sensitiveLevel;
|
||||
private Integer status;
|
||||
private String key;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
package com.tencent.supersonic.semantic.api.model.response;
|
||||
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.tencent.supersonic.common.pojo.DataFormat;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.MetricTypeParams;
|
||||
import com.tencent.supersonic.semantic.api.model.pojo.SchemaItem;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
@@ -14,6 +18,8 @@ public class MetricResp extends SchemaItem {
|
||||
|
||||
private Long modelId;
|
||||
|
||||
private Long domainId;
|
||||
|
||||
private String modelName;
|
||||
|
||||
//ATOMIC DERIVED
|
||||
@@ -27,5 +33,15 @@ public class MetricResp extends SchemaItem {
|
||||
|
||||
private String alias;
|
||||
|
||||
private List<String> tags;
|
||||
|
||||
private boolean hasAdminRes = false;
|
||||
|
||||
public void setTag(String tag) {
|
||||
if (StringUtils.isBlank(tag)) {
|
||||
tags = Lists.newArrayList();
|
||||
} else {
|
||||
tags = Arrays.asList(tag.split(","));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user