Skip to content

Show IP pool on floating IPs list #2243

@david-crespo

Description

@david-crespo

Followup to #2242. Now that we have ip_pool_id on the floating IP response, we can show the IP pool name in the column. We need to resolve the ID into the name. We should use the projectIpPoolList endpoint in the loader to setQueryData for projectIpPoolView, then we can just useApiQuery for the cell as normal but it'll be instant. Like this:

// fetch instances and preload into RQ cache so fetches by ID in
// InstanceLinkCell can be mostly instant yet gracefully fall back to
// fetching individually if we don't fetch them all here
apiQueryClient
.fetchQuery('instanceList', { query: { project, limit: 200 } })
.then((instances) => {
for (const instance of instances.items) {
apiQueryClient.setQueryData(
'instanceView',
{ path: { instance: instance.id } },
instance
)
}
}),

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions