File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,15 @@ export function filterRegions(regions: Models.ConsoleRegion[]): RegionOption[] {
15
15
return regions
16
16
. filter ( ( region ) => region . $id !== 'default' )
17
17
. sort ( ( a , b ) => {
18
- if ( a . disabled && ! b . disabled ) return 1 ;
19
- if ( ! a . disabled && b . disabled ) return - 1 ;
18
+ // Check if regions are truly available (not disabled and available)
19
+ const aAvailable = ! a . disabled && a . available ;
20
+ const bAvailable = ! b . disabled && b . available ;
21
+
22
+ // Prioritize truly available regions
23
+ if ( aAvailable && ! bAvailable ) return - 1 ;
24
+ if ( ! aAvailable && bAvailable ) return 1 ;
25
+
26
+ // Within the same availability group, sort alphabetically
20
27
return a . name . localeCompare ( b . name ) ;
21
28
} )
22
29
. map ( ( region ) => ( {
You can’t perform that action at this time.
0 commit comments