9.7.2. Create custom tabs in the web console


As a cluster administrator, you can customize the OpenShift Container Platform web console by adding customized tabs to the Virtualization page.

Prerequisites

  • You have created a dynamic plugin.
  • You have cluster administrator permissions.
  • You have access to an OpenShift Container Platform cluster where OpenShift Virtualization is installed.

Procedure

  • Add the kubevirt.tab/horizontalNav extension to the plugin-extensions.ts file of the KubeVirt plugin:

    {
        type: 'kubevirt.tab/horizontalNav',
        properties: {
          model: {
            version: 'v1',
            group: 'kubevirt.io',
            kind: 'VirtualMachine',
          },
          page: {
            name: 'Kubevirt Test',
            href: 'kubevirt-test',
          },
          isVisible: { $codeRef: 'isKubevirtTabVisible' },
          component: { $codeRef: 'KubevirtTestTab' },
        },
      }
    • The component flag that references KubevirtTestTab refers to the actual tab content that you want to include.
    • The isVisible flag refers to the following example code reference:

      import { K8sResourceCommon } from '@openshift-console/dynamic-plugin-sdk';
      
      const isKubevirtTabVisible = ({
        created,
      }: {
        created: boolean;
        obj: K8sResourceCommon & { cluster?: string };
      }) => created;
      export default isKubevirtTabVisible;

      The KubeVirt plugin provides this parameter, and it is true if the referenced object has been already created. This flag ensures that the plugin author can prevent the custom tab from being displayed on certain pages, such as the Create Virtual Machine page.

Verification

  1. Log in to the OpenShift Container Platform web console.
  2. Go to the Virtualization page and verify that the custom tab you have created is visible.
  3. Go to the Create Virtual Machine page and verify that your custom backup actions or tabs do not appear.
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동