1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-03 01:18:43 +02:00
unleash.unleash/frontend/src/component/admin/network/NetworkPrometheusAPIWarning.tsx

25 lines
691 B
TypeScript

import useUiConfig from 'hooks/api/getters/useUiConfig/useUiConfig';
export const NetworkPrometheusAPIWarning = () => {
const {
uiConfig: { prometheusAPIAvailable },
} = useUiConfig();
if (prometheusAPIAvailable) return null;
return (
<p>
This view requires the <strong>PROMETHEUS_API</strong> environment
variable to be set. Refer to our{' '}
<a
href='https://docs.getunleash.io/reference/network-view#data-source'
target='_blank'
rel='noreferrer'
>
documentation
</a>{' '}
for more information.
</p>
);
};