mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
Only triggers if there is any rows in client instances that have sdk_version: unleash-edge with version < 17.0.0 The function that checks this memoizes the check for 10 minutes to avoid scanning the client instances table too often.
23 lines
916 B
TypeScript
23 lines
916 B
TypeScript
import { useUiFlag } from '../../../hooks/useUiFlag';
|
|
import { ConditionallyRender } from '../../common/ConditionallyRender/ConditionallyRender';
|
|
import { Banner } from '../Banner/Banner';
|
|
import { IBanner } from '../../../interfaces/banner';
|
|
|
|
export const EdgeUpgradeBanner = () => {
|
|
const displayUpgradeEdgeBanner = useUiFlag('displayUpgradeEdgeBanner');
|
|
const upgradeEdgeBanner: IBanner = {
|
|
message: `We noticed that you're using an outdated Unleash Edge. To ensure you continue to receive metrics, we recommend upgrading to v17.0.0 or later.`,
|
|
link: 'https://github.com/Unleash/unleash-edge',
|
|
linkText: 'Get latest',
|
|
variant: 'warning',
|
|
};
|
|
return (
|
|
<>
|
|
<ConditionallyRender
|
|
condition={displayUpgradeEdgeBanner}
|
|
show={<Banner key={'upgradeEdge'} banner={upgradeEdgeBanner} />}
|
|
/>
|
|
</>
|
|
);
|
|
};
|