Skip to content

Commit 4eff52c

Browse files
committed
loki ready tips
1 parent b0092b9 commit 4eff52c

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
.loki-error-icon,
1414
.loki-error-message {
1515
color: #A30000 !important;
16+
margin-bottom: 1em;
1617
}
1718

1819
.health-config-text,

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,24 @@ export const LokiError: React.FC<Props> = ({ title, error }) => {
116116
<Text className="loki-error-message" component={TextVariants.p}>
117117
{error}
118118
</Text>
119-
{_.isEmpty(ready) ? (
119+
{
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+
)}
121129
<Text component={TextVariants.p}>
122130
{t('You may consider the following query changes to avoid this error')}
123131
</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+
)}
124137
{error.includes('max entries limit') && (
125138
<>
126139
<Text component={TextVariants.blockquote}>
@@ -155,11 +168,7 @@ export const LokiError: React.FC<Props> = ({ title, error }) => {
155168
</>
156169
)}
157170
</TextContent>
158-
) : (
159-
<Text className="loki-error-message" component={TextVariants.p}>
160-
{ready}
161-
</Text>
162-
)}
171+
}
163172
</EmptyStateBody>
164173
<Button
165174
variant="primary"

0 commit comments

Comments
 (0)