Skip to content

Commit

Permalink
Hide non managed networks as uplink options for ovn (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
edlerd authored Nov 1, 2024
2 parents e5d0067 + 9970e6f commit 5bbf48d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/pages/networks/forms/UplinkSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ const UplinkSelector: FC<Props> = ({ project: projectName, props }) => {
const availableUplinks =
project?.config?.["restricted.networks.uplinks"]?.split(",") ||
networks
.filter((network) => UPLINK_NETWORK_TYPES.includes(network.type))
.filter(
(network) =>
UPLINK_NETWORK_TYPES.includes(network.type) && network.managed,
)
.map((network) => network.name);

const options = availableUplinks.map((name) => {
Expand Down
2 changes: 1 addition & 1 deletion tests/networks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ test.describe("OVN type", () => {
await page.getByLabel("Type").selectOption("OVN");
await page.getByLabel("Name").click();
await page.getByLabel("Name").fill(network);
await page.getByLabel("Uplink").selectOption({ index: 2 });
await page.getByLabel("Uplink").selectOption({ index: 1 });
});

test("configure main OVN network settings", async ({ page }) => {
Expand Down

0 comments on commit 5bbf48d

Please sign in to comment.