Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) MASA Stack All rights reserved.
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

namespace Masa.Alert.Application.AlarmHistories.Queries;
Expand Down Expand Up @@ -55,7 +55,7 @@ public async Task GetListAsync(GetAlarmHistoryListQuery query)
private async Task<Expression<Func<AlarmHistoryQueryModel, bool>>> CreateFilteredPredicate(GetAlarmHistoryInputDto options)
{
Expression<Func<AlarmHistoryQueryModel, bool>> condition = x => true;
condition = condition.And(!string.IsNullOrEmpty(options.Filter), x => x.AlarmRule.DisplayName.Contains(options.Filter));
condition = condition.And(!string.IsNullOrEmpty(options.Filter), x => x.AlarmRule.DisplayName.ToLower().Contains(options.Filter.ToLower()));
switch (options.SearchType)
{
case AlarmHistorySearchTypes.Alarming:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) MASA Stack All rights reserved.
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

namespace Masa.Alert.Application.AlarmRules.Queries;
Expand Down Expand Up @@ -54,7 +54,7 @@ public async Task GetListAsync(GetAlarmRuleListQuery query)
private async Task<Expression<Func<AlarmRuleQueryModel, bool>>> CreateFilteredPredicate(GetAlarmRuleInputDto options)
{
Expression<Func<AlarmRuleQueryModel, bool>> condition = x => true;
condition = condition.And(!string.IsNullOrEmpty(options.Filter), x => x.DisplayName.Contains(options.Filter));
condition = condition.And(!string.IsNullOrEmpty(options.Filter), x => x.DisplayName.ToLower().Contains(options.Filter.ToLower()));
condition = condition.And(options.Type != default, x => x.Type == options.Type);
condition = condition.And(x => x.Show == options.Show);
if (options.TimeType == AlarmRuleSearchTimeTypes.ModificationTime)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) MASA Stack All rights reserved.
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the Apache License. See LICENSE.txt in the project root for license information.

namespace Masa.Alert.Application.WebHooks.Queries;
Expand Down Expand Up @@ -48,7 +48,7 @@ public async Task GetListAsync(GetWebHookListQuery query)
private async Task<Expression<Func<WebHookQueryModel, bool>>> CreateFilteredPredicate(GetWebHookInputDto options)
{
Expression<Func<WebHookQueryModel, bool>> condition = x => true;
condition = condition.And(!string.IsNullOrEmpty(options.Filter), x => x.DisplayName.Contains(options.Filter));
condition = condition.And(!string.IsNullOrEmpty(options.Filter), x => x.DisplayName.ToLower().Contains(options.Filter.ToLower()));
return await Task.FromResult(condition); ;
}

Expand Down