diff --git a/backend/src/main/java/com/park/utmstack/service/overview/OverviewService.java b/backend/src/main/java/com/park/utmstack/service/overview/OverviewService.java index 525a41722..11badbec4 100644 --- a/backend/src/main/java/com/park/utmstack/service/overview/OverviewService.java +++ b/backend/src/main/java/com/park/utmstack/service/overview/OverviewService.java @@ -67,8 +67,8 @@ public List countAlertsTodayAndLastWeek() throws DashboardOverviewExce .query(SearchUtil.toQuery(filters)).aggregations(AGG_NAME, Aggregation.of(agg -> agg .dateRange(dr -> dr.field(Constants.timestamp) .keyed(true).timeZone("UTC") - .ranges(r -> r.key(TODAY_KEY).from(f -> f.expr("now/d")).from(t -> t.expr("now"))) - .ranges(r -> r.key(LAST_WEEK_KEY).from(f -> f.expr("now-7d/d")).from(t -> t.expr("now")))))).size(0)); + .ranges(r -> r.key(TODAY_KEY).from(f -> f.expr("now/d")).to(t -> t.expr("now"))) + .ranges(r -> r.key(LAST_WEEK_KEY).from(f -> f.expr("now-7d/d")).to(t -> t.expr("now")))))).size(0)); SearchResponse response = elasticsearchService.search(sr, String.class); Aggregate aggregate = response.aggregations().get(AGG_NAME); diff --git a/frontend/src/app/shared/components/utm/filters/elastic-filter-time/elastic-filter-time.component.ts b/frontend/src/app/shared/components/utm/filters/elastic-filter-time/elastic-filter-time.component.ts index 46b76335d..c810d9672 100644 --- a/frontend/src/app/shared/components/utm/filters/elastic-filter-time/elastic-filter-time.component.ts +++ b/frontend/src/app/shared/components/utm/filters/elastic-filter-time/elastic-filter-time.component.ts @@ -126,7 +126,7 @@ export class ElasticFilterTimeComponent implements OnInit, OnChanges, OnDestroy this.dateTo = 'now'; this.dateFrom = common.label; if (!this.formatInstant) { - const timeFrom = ElasticTimeEnum.NOW + '-' + common.last + common.time; + const timeFrom = ElasticTimeEnum.NOW + '-' + common.last + common.time + '/d' ; const timeTo = ElasticTimeEnum.NOW; this.emitElasticDate(timeFrom, timeTo); } else { diff --git a/version.yml b/version.yml index 4b21a570b..736260096 100644 --- a/version.yml +++ b/version.yml @@ -1 +1 @@ -version: 10.2.1 \ No newline at end of file +version: 10.2.2 \ No newline at end of file