Skip to content

Commit 958be65

Browse files
authored
NETOBSERV-1464: help on 'input size too long' (#461)
1 parent df3ec9d commit 958be65

File tree

2 files changed

+45
-19
lines changed

2 files changed

+45
-19
lines changed

web/locales/en/plugin__netobserv-plugin.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@
150150
"Build info": "Build info",
151151
"Configuration limits": "Configuration limits",
152152
"Metrics": "Metrics",
153-
"Loki '/ready' endpoint returned the following error": "Loki '/ready' endpoint returned the following error",
154-
"You may consider the following query changes to avoid this error": "You may consider the following query changes to avoid this error",
155-
"Check if Loki is running correctly. '/ready' endpoint should respond \"ready\"": "Check if Loki is running correctly. '/ready' endpoint should respond \"ready\"",
153+
"You may consider the following changes to avoid this error:": "You may consider the following changes to avoid this error:",
156154
"Reduce the Query Options -> limit to reduce the number of results": "Reduce the Query Options -> limit to reduce the number of results",
157155
"Increase Loki \"max_entries_limit_per_query\" entry in configuration file": "Increase Loki \"max_entries_limit_per_query\" entry in configuration file",
158156
"Add Namespace, Owner or Resource filters (which use indexed fields) to improve the query performance": "Add Namespace, Owner or Resource filters (which use indexed fields) to improve the query performance",
@@ -161,6 +159,11 @@
161159
"Ensure Loki config contains \"parallelise_shardable_queries: true\" and \"max_outstanding_requests_per_tenant: 2048\"": "Ensure Loki config contains \"parallelise_shardable_queries: true\" and \"max_outstanding_requests_per_tenant: 2048\"",
162160
"Reduce the time range to decrease the number of results": "Reduce the time range to decrease the number of results",
163161
"Increase Loki \"max_query_length\" entry in configuration file": "Increase Loki \"max_query_length\" entry in configuration file",
162+
"This error is generally seen when cluster admin groups are not properly configured.": "This error is generally seen when cluster admin groups are not properly configured.",
163+
"Click the link below for more help.": "Click the link below for more help.",
164+
"More information": "More information",
165+
"Loki '/ready' endpoint returned the following error": "Loki '/ready' endpoint returned the following error",
166+
"Check if Loki is running correctly. '/ready' endpoint should respond \"ready\"": "Check if Loki is running correctly. '/ready' endpoint should respond \"ready\"",
164167
"Configuring Grafana Loki": "Configuring Grafana Loki",
165168
"Show metrics": "Show metrics",
166169
"Show build info": "Show build info",

web/src/components/messages/loki-error.tsx

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,7 @@ export const LokiError: React.FC<Props> = ({ title, error }) => {
118118
</Text>
119119
{
120120
<TextContent className="error-text-content">
121-
{!_.isEmpty(ready) && (
122-
<>
123-
<Text component={TextVariants.p}>{t(`Loki '/ready' endpoint returned the following error`)}</Text>
124-
<Text className="loki-error-message" component={TextVariants.p}>
125-
{ready}
126-
</Text>
127-
</>
128-
)}
129-
<Text component={TextVariants.p}>
130-
{t('You may consider the following query changes to avoid this error')}
131-
</Text>
132-
{!_.isEmpty(ready) && (
133-
<Text component={TextVariants.blockquote}>
134-
{t(`Check if Loki is running correctly. '/ready' endpoint should respond "ready"`)}
135-
</Text>
136-
)}
121+
<Text component={TextVariants.p}>{t('You may consider the following changes to avoid this error:')}</Text>
137122
{error.includes('max entries limit') && (
138123
<>
139124
<Text component={TextVariants.blockquote}>
@@ -180,6 +165,44 @@ export const LokiError: React.FC<Props> = ({ title, error }) => {
180165
</Text>
181166
</>
182167
)}
168+
{error.includes('input size too long') && (
169+
<>
170+
<Text component={TextVariants.blockquote}>
171+
{t('This error is generally seen when cluster admin groups are not properly configured.')}{' '}
172+
{t('Click the link below for more help.')}
173+
</Text>
174+
<Button
175+
variant="link"
176+
icon={<ExternalLinkSquareAltIcon />}
177+
iconPosition="right"
178+
component={(props: React.FunctionComponent) => (
179+
<Link
180+
{...props}
181+
target="_blank"
182+
to={{
183+
pathname:
184+
'https://github.com/netobserv/documents/blob/main/loki_operator.md#loki-input-size-too-long-error'
185+
}}
186+
/>
187+
)}
188+
>
189+
{t('More information')}
190+
</Button>
191+
</>
192+
)}
193+
{!_.isEmpty(ready) && (
194+
<>
195+
<Text component={TextVariants.p}>{t(`Loki '/ready' endpoint returned the following error`)}</Text>
196+
<Text className="loki-error-message" component={TextVariants.p}>
197+
{ready}
198+
</Text>
199+
</>
200+
)}
201+
{!_.isEmpty(ready) && (
202+
<Text component={TextVariants.blockquote}>
203+
{t(`Check if Loki is running correctly. '/ready' endpoint should respond "ready"`)}
204+
</Text>
205+
)}
183206
</TextContent>
184207
}
185208
</EmptyStateBody>

0 commit comments

Comments
 (0)