From 50fef4b85ee434230ddd0367e1c720c86f1113f0 Mon Sep 17 00:00:00 2001 From: Ugo Palatucci Date: Tue, 17 Dec 2024 14:29:10 +0100 Subject: [PATCH] CNV-53286: add udn navbar item in network virt-perspective --- src/perspective/extensions.ts | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/perspective/extensions.ts b/src/perspective/extensions.ts index 5102430c9..616085679 100644 --- a/src/perspective/extensions.ts +++ b/src/perspective/extensions.ts @@ -3,6 +3,7 @@ import { HrefNavItem, NavSection, ResourceClusterNavItem, + ResourceNSNavItem, Separator, } from '@openshift-console/dynamic-plugin-sdk'; import type { ConsolePluginBuildMetadata } from '@openshift-console/dynamic-plugin-sdk-webpack'; @@ -288,7 +289,7 @@ const networkingSection = [ required: ['NET_ATTACH_DEF', 'KUBEVIRT_DYNAMIC'], }, properties: { - id: 'networkattachmentdefinitions', + id: 'networkattachmentdefinitions-virt-perspective', model: { group: 'k8s.cni.cncf.io', kind: 'NetworkAttachmentDefinition', @@ -330,7 +331,7 @@ const networkingSection = [ 'data-quickstart-id': 'qs-nav-state-list', 'data-test-id': 'state-nav-list', }, - id: 'state', + id: 'state-virt-perspective', model: { group: 'nmstate.io', kind: 'NodeNetworkState', @@ -342,6 +343,24 @@ const networkingSection = [ }, type: 'console.navigation/resource-cluster', } as EncodedExtension, + { + properties: { + dataAttributes: { + 'data-quickstart-id': 'qs-nav-udns', + 'data-test-id': 'udns-nav-item', + }, + id: 'udns-virt-perspective', + model: { + group: 'k8s.ovn.org', + kind: 'UserDefinedNetwork', + version: 'v1', + }, + name: '%plugin__networking-console-plugin~UserDefinedNetworks%', + perspective: 'virtualization-perspective', + section: 'networking-virt-perspective', + }, + type: 'console.navigation/resource-ns', + } as EncodedExtension, ]; const storageSection = [