mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 03:58:14 +00:00
(improvement)(Headless) Metric Market only displays published metrics (#867)
* (improvement)(Headless) Remove Query controller * (improvement)(Headless) Filter metrics and dimensions based on whether they were created as tags * (improvement)(Headless) Metric Market only displays published metrics --------- Co-authored-by: jolunoluo
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.tencent.supersonic.common.pojo;
|
||||
|
||||
import com.tencent.supersonic.common.pojo.enums.TimeDimensionEnum;
|
||||
import com.tencent.supersonic.common.util.DateUtils;
|
||||
import lombok.Data;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@@ -46,6 +47,8 @@ public class DateConf {
|
||||
|
||||
private boolean isInherited;
|
||||
|
||||
private boolean groupByDate;
|
||||
|
||||
public List<String> getDateList() {
|
||||
if (!CollectionUtils.isEmpty(dateList)) {
|
||||
return dateList;
|
||||
@@ -55,6 +58,18 @@ public class DateConf {
|
||||
return DateUtils.getDateList(startDateStr, endDateStr, getPeriod());
|
||||
}
|
||||
|
||||
public String getGroupByTimeDimension() {
|
||||
if (Constants.DAY.equals(period)) {
|
||||
return TimeDimensionEnum.DAY.getName();
|
||||
} else if (Constants.WEEK.equals(period)) {
|
||||
return TimeDimensionEnum.WEEK.getName();
|
||||
} else if (Constants.MONTH.equals(period)) {
|
||||
return TimeDimensionEnum.MONTH.getName();
|
||||
} else {
|
||||
return TimeDimensionEnum.DAY.getName();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
|
||||
@@ -2,10 +2,10 @@ package com.tencent.supersonic.common.pojo;
|
||||
|
||||
|
||||
import com.tencent.supersonic.common.pojo.enums.FilterOperatorEnum;
|
||||
import java.util.List;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@@ -13,6 +13,7 @@ import lombok.NoArgsConstructor;
|
||||
public class Filter {
|
||||
|
||||
private Relation relation = Relation.FILTER;
|
||||
private Long id;
|
||||
private String bizName;
|
||||
private String name;
|
||||
private FilterOperatorEnum operator;
|
||||
|
||||
Reference in New Issue
Block a user