File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed
packages/compass-connections/src/components Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import {
3+ css ,
4+ Banner ,
5+ Link ,
6+ spacing ,
7+ Body ,
8+ BannerVariant ,
9+ showConfirmation ,
10+ } from '@mongodb-js/compass-components' ;
11+ import {
12+ getConnectionTitle ,
13+ type ConnectionInfo ,
14+ } from '@mongodb-js/connection-info' ;
15+
16+ const modalBodyStyles = css ( {
17+ marginTop : spacing [ 400 ] ,
18+ marginBottom : spacing [ 200 ] ,
19+ } ) ;
20+
21+ export function showEndOfLifeMongoDBWarningModal (
22+ connectionInfo ?: ConnectionInfo ,
23+ version ?: string
24+ ) {
25+ return showConfirmation ( {
26+ title : 'End-of-life MongoDB Detected' ,
27+ description : (
28+ < >
29+ < Banner variant = { BannerVariant . Warning } >
30+ { connectionInfo
31+ ? `Server or service "${ getConnectionTitle ( connectionInfo ) } "`
32+ : 'This server or service' } { ' ' }
33+ appears to be running a version of MongoDB that is no longer
34+ supported.
35+ </ Banner >
36+ < Body className = { modalBodyStyles } >
37+ Server version{ version ? ` (${ version } )` : '' } is considered
38+ end-of-life, consider upgrading to get the latest features and
39+ performance improvements.{ ' ' }
40+ </ Body >
41+ < Link
42+ href = "https://www.mongodb.com/docs/manual/release-notes/"
43+ target = "_blank"
44+ data-testid = "end-of-life-warning-modal-learn-more-link"
45+ >
46+ Learn more from the MongoDB release notes.
47+ </ Link >
48+ </ >
49+ ) ,
50+ } ) ;
51+ }
You can’t perform that action at this time.
0 commit comments