File tree 1 file changed +11
-0
lines changed
app/pages/project/instances/instance/tabs
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,16 @@ const SubnetNameFromId = ({ value }: { value: string }) => (
39
39
</ span >
40
40
)
41
41
42
+ function ExternalIpsFromInstanceName ( { value : instanceName } : { value : string } ) {
43
+ const { orgName, projectName } = useParams ( 'orgName' , 'projectName' )
44
+ const { data } = useApiQuery ( 'instanceExternalIpList' , {
45
+ orgName,
46
+ projectName,
47
+ instanceName,
48
+ } )
49
+ return < span className = "text-default" > { data ?. items . map ( ( eip ) => eip . ip ) . join ( ', ' ) } </ span >
50
+ }
51
+
42
52
export function NetworkingTab ( ) {
43
53
const instanceParams = useParams ( 'orgName' , 'projectName' , 'instanceName' )
44
54
const queryClient = useApiQueryClient ( )
@@ -121,6 +131,7 @@ export function NetworkingTab() {
121
131
< Column accessor = "ip" />
122
132
< Column header = "vpc" accessor = "vpcId" cell = { VpcNameFromId } />
123
133
< Column header = "subnet" accessor = "subnetId" cell = { SubnetNameFromId } />
134
+ < Column header = "External IP" accessor = "id" cell = { ExternalIpsFromInstanceName } />
124
135
< Column
125
136
accessor = "primary"
126
137
cell = { ( { value } ) =>
You can’t perform that action at this time.
0 commit comments