@@ -20,6 +20,7 @@ import { Columns } from '~/table/columns/common'
20
20
import { useQueryTable } from '~/table/QueryTable'
21
21
import { CopyableIp } from '~/ui/lib/CopyableIp'
22
22
import { EmptyMessage } from '~/ui/lib/EmptyMessage'
23
+ import { TipIcon } from '~/ui/lib/TipIcon'
23
24
import { ALL_ISH } from '~/util/consts'
24
25
import { pb } from '~/util/path-builder'
25
26
import type * as PP from '~/util/path-params'
@@ -68,17 +69,15 @@ export async function clientLoader({ params }: LoaderFunctionArgs) {
68
69
69
70
await Promise . all ( [
70
71
...gateways . items . flatMap ( ( gateway : InternetGateway ) => [
71
- queryClient . prefetchQuery (
72
+ queryClient . fetchQuery (
72
73
gatewayIpAddressList ( { project, vpc, gateway : gateway . name } ) . optionsFn ( )
73
74
) ,
74
- queryClient . prefetchQuery (
75
+ queryClient . fetchQuery (
75
76
gatewayIpPoolList ( { project, vpc, gateway : gateway . name } ) . optionsFn ( )
76
77
) ,
77
78
] ) ,
78
79
...routers . items . map ( ( router ) =>
79
- queryClient . prefetchQuery (
80
- routeList ( { project, vpc, router : router . name } ) . optionsFn ( )
81
- )
80
+ queryClient . fetchQuery ( routeList ( { project, vpc, router : router . name } ) . optionsFn ( ) )
82
81
) ,
83
82
queryClient . fetchQuery ( projectIpPoolList . optionsFn ( ) ) . then ( ( pools ) => {
84
83
for ( const pool of pools . items ) {
@@ -91,6 +90,16 @@ export async function clientLoader({ params }: LoaderFunctionArgs) {
91
90
return null
92
91
}
93
92
93
+ export const AttachedIpAddressHeader = ( ) => (
94
+ < >
95
+ Attached IP Address
96
+ < TipIcon className = "ml-1.5" >
97
+ Internet gateways without an IP address attached will use an address from the attached
98
+ IP pool
99
+ </ TipIcon >
100
+ </ >
101
+ )
102
+
94
103
export default function VpcInternetGatewaysTab ( ) {
95
104
const { project, vpc } = useVpcSelector ( )
96
105
@@ -111,18 +120,18 @@ export default function VpcInternetGatewaysTab() {
111
120
colHelper . accessor ( 'description' , Columns . description ) ,
112
121
colHelper . accessor ( 'name' , {
113
122
// ID needed to avoid key collision with other name column
114
- id : 'ip-address ' ,
115
- header : 'Attached IP Address ' ,
123
+ id : 'ip-pool ' ,
124
+ header : 'Attached IP Pool ' ,
116
125
cell : ( info ) => (
117
- < IpAddressCell project = { project } vpc = { vpc } gateway = { info . getValue ( ) } />
126
+ < GatewayIpPoolCell project = { project } vpc = { vpc } gateway = { info . getValue ( ) } />
118
127
) ,
119
128
} ) ,
120
129
colHelper . accessor ( 'name' , {
121
130
// ID needed to avoid key collision with other name column
122
- id : 'ip-pool ' ,
123
- header : 'Attached IP Pool' ,
131
+ id : 'ip-address ' ,
132
+ header : AttachedIpAddressHeader ,
124
133
cell : ( info ) => (
125
- < GatewayIpPoolCell project = { project } vpc = { vpc } gateway = { info . getValue ( ) } />
134
+ < IpAddressCell project = { project } vpc = { vpc } gateway = { info . getValue ( ) } />
126
135
) ,
127
136
} ) ,
128
137
colHelper . accessor ( 'name' , {
0 commit comments