mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-03 01:18:43 +02:00
https://linear.app/unleash/issue/2-3290/rename-networkviewenabled-to-prometheusapiavailable Follow-up to: https://github.com/Unleash/unleash/pull/9325 See: https://github.com/Unleash/unleash/pull/9325#discussion_r1960085303 Renames `networkViewEnabled` to `prometheusAPIAvailable`. This new name better reflects what it stands for.
25 lines
691 B
TypeScript
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>
|
|
);
|
|
};
|