Skip to content

Commit

Permalink
[Bug] [Alert] The alarm list is not sorted by alarm time (#566)
Browse files Browse the repository at this point in the history
* [Bug] [Alert] The alarm list is not sorted by alarm time #565

* [Bug] [Alert] The alarm list is not sorted by alarm time #565
  • Loading branch information
hawk9821 authored May 27, 2024
1 parent f2ae707 commit 99e3fc8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,14 @@ public void saveAlertHistory(String alertMessage) {
public Result getAlertList(Integer serviceInstanceId) {
List<ClusterAlertHistory> list = this.list(new QueryWrapper<ClusterAlertHistory>()
.eq(serviceInstanceId != null, Constants.SERVICE_INSTANCE_ID, serviceInstanceId)
.eq(Constants.IS_ENABLED, 1));
.eq(Constants.IS_ENABLED, 1)
.orderByDesc(Constants.CREATE_TIME));
return Result.success(list);
}

@Override
public Result getAllAlertList(Integer clusterId, Integer page, Integer pageSize) {
Integer offset = (page - 1) * pageSize;
int offset = (page - 1) * pageSize;
List<ClusterAlertHistory> list = this.list(new QueryWrapper<ClusterAlertHistory>()
.eq(Constants.CLUSTER_ID, clusterId)
.eq(Constants.IS_ENABLED, 1)
Expand Down

0 comments on commit 99e3fc8

Please sign in to comment.