Skip to content

Commit 54453e4

Browse files
committed
improved status message
1 parent 0478ea6 commit 54453e4

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

web/locales/en/plugin__netobserv-plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
"Can't find any namespace label in your Loki storage.": "Can't find any namespace label in your Loki storage.",
227227
"Can't find any namespace label in your Prometheus storage.": "Can't find any namespace label in your Prometheus storage.",
228228
"If this is the first time you run the operator, check FlowCollector status and health dashboard to ensure there is no error and flows are ingested. This can take some time.": "If this is the first time you run the operator, check FlowCollector status and health dashboard to ensure there is no error and flows are ingested. This can take some time.",
229-
"Loki and Prometheus storages are not consistent. Check health dashboard for errors.": "Loki and Prometheus storages are not consistent. Check health dashboard for errors.",
229+
"Loki and Prometheus storages are diverging. The number of captured namespaces does't match. Check health dashboard for errors.": "Loki and Prometheus storages are diverging. The number of captured namespaces does't match. Check health dashboard for errors.",
230230
"Zoom in / zoom out the histogram displayed time range. The selected time range in the top right corner will adapt accordingly. You can also use the plus or minus buttons while the histogram is focused.": "Zoom in / zoom out the histogram displayed time range. The selected time range in the top right corner will adapt accordingly. You can also use the plus or minus buttons while the histogram is focused.",
231231
"Move the selected range to filter the table below as time based pagination. You can also use the page up or down buttons while the histogram is focused.": "Move the selected range to filter the table below as time based pagination. You can also use the page up or down buttons while the histogram is focused.",
232232
"Shift the histogram displayed time range. The selected time range in the top right corner will adapt accordingly. You can also use the arrow left or right buttons while the histogram is focused.": "Shift the histogram displayed time range. The selected time range in the top right corner will adapt accordingly. You can also use the arrow left or right buttons while the histogram is focused.",

web/src/components/messages/status-texts.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,22 @@ export const StatusTexts: React.FC<StatusProps> = ({ status }) => {
6161
</Text>
6262
)}
6363
{status &&
64+
// Loki is operationnal and not returning error
6465
status.loki.isEnabled &&
6566
status.loki.isReady &&
6667
!status.loki.error &&
68+
// Prometheus is operationnal and not returning error
6769
status.prometheus.isEnabled &&
6870
status.prometheus.isReady &&
6971
!status.prometheus.error &&
70-
status.loki.namespacesCount !== status.prometheus.namespacesCount && (
72+
// One of the storage is empty when the other is not
73+
// This ensure the message is not displayed because of retention config
74+
((status.loki.namespacesCount > 0 && status.prometheus.namespacesCount === 0) ||
75+
(status.loki.namespacesCount === 0 && status.prometheus.namespacesCount > 0)) && (
7176
<Text component={TextVariants.blockquote}>
72-
{t(`Loki and Prometheus storages are not consistent. Check health dashboard for errors.`)}
77+
{t(
78+
`Loki and Prometheus storages are diverging. The number of captured namespaces does't match. Check health dashboard for errors.`
79+
)}
7380
</Text>
7481
)}
7582
</>

0 commit comments

Comments
 (0)