Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
task: Add banner encouraging edge upgrade (#6018)
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.
- Loading branch information
Christopher Kolstad
committed
Jan 24, 2024
1 parent
3acdfc2
commit 17d826d
Showing
9 changed files
with
147 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
frontend/src/component/banners/EdgeUpgradeBanner/EdgeUpgradeBanner.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
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} />} | ||
/> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters