Skip to content

Commit b19f5d1

Browse files
committed
merge main, bump api, and fix type errors
2 parents 34b7437 + e40d1ea commit b19f5d1

19 files changed

+436
-296
lines changed

OMICRON_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ae1c739ca12f3d3fc94e78fb024bcaf2e2cbca56
1+
8bb4c1163ec57f2915fc0aa40b7dc96821079a64

app/api/__generated__/Api.ts

Lines changed: 44 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/api/__generated__/OMICRON_VERSION

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/api/__generated__/msw-handlers.ts

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/api/__generated__/validate.ts

Lines changed: 35 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/components/ExternalIps.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ import { intersperse } from '~/util/array'
1818
import { pb } from '~/util/path-builder'
1919
import type * as PP from '~/util/path-params'
2020

21-
/** Move ephemeral IP (if present) to the end of the list of external IPs */
22-
export const orderIps = (ips: ExternalIp[]) =>
23-
R.sortBy(ips, (a) => (a.kind === 'ephemeral' ? 1 : -1))
21+
/** Order IPs: floating first, then ephemeral, then SNAT */
22+
const IP_ORDER = { floating: 0, ephemeral: 1, snat: 2 } as const
23+
export const orderIps = (ips: ExternalIp[]) => R.sortBy(ips, (a) => IP_ORDER[a.kind])
2424

2525
export function ExternalIps({ project, instance }: PP.Instance) {
2626
const { data, isPending } = useApiQuery('instanceExternalIpList', {
@@ -29,7 +29,11 @@ export function ExternalIps({ project, instance }: PP.Instance) {
2929
})
3030
if (isPending) return <SkeletonCell />
3131

32-
const ips = data?.items
32+
// Exclude SNAT IPs from the properties table because they are rarely going
33+
// to be what the user wants as the "external IP" of the instance -- they
34+
// want one that can receive inbound traffic. This will have to change with
35+
// https://github.com/oxidecomputer/omicron/issues/4317
36+
const ips = data?.items.filter((ip) => ip.kind !== 'snat')
3337
if (!ips || ips.length === 0) return <EmptyCell />
3438
const orderedIps = orderIps(ips)
3539
const ipsToShow = orderedIps.slice(0, 2)

app/pages/project/instances/InstancePage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ async function refreshData() {
7171
apiQueryClient.invalidateQueries('instanceExternalIpList'),
7272
apiQueryClient.invalidateQueries('instanceNetworkInterfaceList'),
7373
apiQueryClient.invalidateQueries('instanceDiskList'), // storage tab
74-
apiQueryClient.invalidateQueries('diskMetricsList'), // metrics tab
7574
apiQueryClient.invalidateQueries('antiAffinityGroupMemberList'),
75+
// note that we do not include timeseriesQuery because the charts on the
76+
// metrics tab will manage their own refresh intervals when we turn that
77+
// back on
7678
])
7779
}
7880

@@ -261,7 +263,7 @@ export default function InstancePage() {
261263
<PropertiesTable.DateRow date={instance.timeCreated} label="Created" />
262264
<PropertiesTable.IdRow id={instance.id} />
263265
<PropertiesTable.Row label="external IPs">
264-
{<ExternalIps {...instanceSelector} />}
266+
<ExternalIps {...instanceSelector} />
265267
</PropertiesTable.Row>
266268
</PropertiesTable>
267269
<RouteTabs fullWidth>

0 commit comments

Comments
 (0)