diff --git a/src/Application/Masa.Alert.Application/AlarmHistories/Queries/AlarmHistoryQueryHandler.cs b/src/Application/Masa.Alert.Application/AlarmHistories/Queries/AlarmHistoryQueryHandler.cs index 6c820d77..874c38b6 100644 --- a/src/Application/Masa.Alert.Application/AlarmHistories/Queries/AlarmHistoryQueryHandler.cs +++ b/src/Application/Masa.Alert.Application/AlarmHistories/Queries/AlarmHistoryQueryHandler.cs @@ -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; @@ -55,7 +55,7 @@ public async Task GetListAsync(GetAlarmHistoryListQuery query) private async Task>> CreateFilteredPredicate(GetAlarmHistoryInputDto options) { Expression> 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: diff --git a/src/Application/Masa.Alert.Application/AlarmRules/Queries/AlarmRuleQueryHandler.cs b/src/Application/Masa.Alert.Application/AlarmRules/Queries/AlarmRuleQueryHandler.cs index 5e51d6cd..640ef32e 100644 --- a/src/Application/Masa.Alert.Application/AlarmRules/Queries/AlarmRuleQueryHandler.cs +++ b/src/Application/Masa.Alert.Application/AlarmRules/Queries/AlarmRuleQueryHandler.cs @@ -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; @@ -54,7 +54,7 @@ public async Task GetListAsync(GetAlarmRuleListQuery query) private async Task>> CreateFilteredPredicate(GetAlarmRuleInputDto options) { Expression> 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) diff --git a/src/Application/Masa.Alert.Application/WebHooks/Queries/WebHookQueryHandler.cs b/src/Application/Masa.Alert.Application/WebHooks/Queries/WebHookQueryHandler.cs index 924ac93c..10a818a2 100644 --- a/src/Application/Masa.Alert.Application/WebHooks/Queries/WebHookQueryHandler.cs +++ b/src/Application/Masa.Alert.Application/WebHooks/Queries/WebHookQueryHandler.cs @@ -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; @@ -48,7 +48,7 @@ public async Task GetListAsync(GetWebHookListQuery query) private async Task>> CreateFilteredPredicate(GetWebHookInputDto options) { Expression> 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); ; }