From ca88141d0da98110ce692b534ef60bd293e91480 Mon Sep 17 00:00:00 2001 From: elliotxx <951376975@qq.com> Date: Mon, 27 Jan 2025 12:21:17 +0800 Subject: [PATCH] fix: linting and formatting issues - Correct indentation in Go code to resolve golangci-lint issues - Reformat gradient definitions in LESS for better readability - Remove unnecessary line in exceptionList styles These changes improve code readability and maintain consistency with linting rules. --- .../search/storage/elasticsearch/resource.go | 2 +- .../eventAggregator/styles.module.less | 33 ++++++++++++------- .../exceptionList/style.module.less | 1 - 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/pkg/infra/search/storage/elasticsearch/resource.go b/pkg/infra/search/storage/elasticsearch/resource.go index 3b818dc0..bcc205ad 100644 --- a/pkg/infra/search/storage/elasticsearch/resource.go +++ b/pkg/infra/search/storage/elasticsearch/resource.go @@ -123,7 +123,7 @@ func (s *Storage) GetResource(ctx context.Context, cluster string, obj runtime.O return err } - if len(resp.Hits.Hits) == 0 { + if len(resp.Hits.Hits) == 0 { return fmt.Errorf("no resource found for cluster: %s, namespace: %s, name: %s", cluster, unObj.GetNamespace(), unObj.GetName()) } diff --git a/ui/src/pages/insightDetail/components/eventAggregator/styles.module.less b/ui/src/pages/insightDetail/components/eventAggregator/styles.module.less index a77a3ac2..27fcb238 100644 --- a/ui/src/pages/insightDetail/components/eventAggregator/styles.module.less +++ b/ui/src/pages/insightDetail/components/eventAggregator/styles.module.less @@ -251,18 +251,26 @@ 0 2px 4px rgba(149, 128, 247, 0.12); box-sizing: border-box; border: 1px solid rgba(149, 128, 247, 0.15); - background-image: radial-gradient(ellipse 489px 674px at 6px 0px, + background-image: radial-gradient( + ellipse 489px 674px at 6px 0px, #ffffff 0%, - #f3efff 100%), - radial-gradient(ellipse 587px 672px at 433px 513px, + #f3efff 100% + ), + radial-gradient( + ellipse 587px 672px at 433px 513px, #ece6ff95 0%, - #f0e9ff30 100%), - radial-gradient(ellipse 346px 396px at 15px 506px, + #f0e9ff30 100% + ), + radial-gradient( + ellipse 346px 396px at 15px 506px, #e9e3ff90 0%, - #f0e9ff30 100%), - radial-gradient(ellipse 583px 668px at 436px 8px, + #f0e9ff30 100% + ), + radial-gradient( + ellipse 583px 668px at 436px 8px, #ffffff 0%, - #f5f0ff30 100%); + #f5f0ff30 100% + ); .events_content_diagnosisHeader { padding: 12px 16px; @@ -276,10 +284,11 @@ font-weight: 500; color: #000; backdrop-filter: blur(8px); - background: linear-gradient(to right, - rgba(255, 255, 255, 0.95), - rgba(243, 239, 255, 0.95)); - + background: linear-gradient( + to right, + rgba(255, 255, 255, 0.95), + rgba(243, 239, 255, 0.95) + ); .events_content_diagnosisHeader_aiIcon { width: 18px; diff --git a/ui/src/pages/insightDetail/components/exceptionList/style.module.less b/ui/src/pages/insightDetail/components/exceptionList/style.module.less index 0d5275a6..f766c3ff 100644 --- a/ui/src/pages/insightDetail/components/exceptionList/style.module.less +++ b/ui/src/pages/insightDetail/components/exceptionList/style.module.less @@ -876,4 +876,3 @@ transform: rotate(360deg); } } -