Skip to content

Commit d85df4e

Browse files
committed
stub out basics
1 parent f01b9fc commit d85df4e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

app/pages/project/instances/instance/tabs/NetworkingTab.tsx

+11
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ const SubnetNameFromId = ({ value }: { value: string }) => (
3939
</span>
4040
)
4141

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+
4252
export function NetworkingTab() {
4353
const instanceParams = useParams('orgName', 'projectName', 'instanceName')
4454
const queryClient = useApiQueryClient()
@@ -121,6 +131,7 @@ export function NetworkingTab() {
121131
<Column accessor="ip" />
122132
<Column header="vpc" accessor="vpcId" cell={VpcNameFromId} />
123133
<Column header="subnet" accessor="subnetId" cell={SubnetNameFromId} />
134+
<Column header="External IP" accessor="id" cell={ExternalIpsFromInstanceName} />
124135
<Column
125136
accessor="primary"
126137
cell={({ value }) =>

0 commit comments

Comments
 (0)