This section describes how to configure the mount point of an extension in the KubeSphere web console.
You can mount extensions to the following points:
Top navigation bar
Extensions menu
In the top navigation bar, click to open the menu.
Toolbox menu
Hover over the icon in the bottom right corner of the page to open the menu.
Left navigation pane
KubeSphere provides a left navigation pane for each of the following modules: users and roles, cluster management, workspace management, project management, and platform settings. Example:
Set the mount point in the menu
object of src/index.js
. For example:
const menu = {
parent: 'global',
name: 'hello-world',
link: '/hellow-world',
title: 'HELLO_WORLD',
icon: 'cluster',
order: 0,
desc: 'HELLO_WORLD_DESC',
authKey: 'hello',
authAction: 'hello-view',
skipAuth: true,
};
Parameter | Description |
---|---|
parent | The mount point of the extension. Valid values:
parent: 'cluster.xxxx.xxxx' . |
name | The identifier of the extension on the menu. Menu permission validation uses the 'name' as the key by default. Set 'authKey' to specify module permissions for validation. For more information, please refer to Access Control. |
link | The link to the extension. This parameter is valid only when parent is set to global or topbar . |
title | The extension name displayed on the menu. Please do not hard-code the parameter values. Instead, configure the parameters as keys in the UI text and enable multi-language support by using the internationalization API of KubeSphere. For more information, please refer to Internationalization. |
icon | The icon name of the extension displayed on the menu. |
order | The sequence of the extension on the menu. Valid values: 0 or a positive integer. Value 0 indicates that the extension is at the top of the menu. |
desc | The description of the extension. This parameter is valid only when parent is set to global or topbar . We recommend that you do not hard-code the parameter settings. Instead, you can configure the parameters as keys in the UI text and enable multi-language support by using the internationalization API of KubeSphere. For more information, please refer to Internationalization. |
skipAuth | Whether to skip user permission check. For more information, please refer to Access control. |
authKey | Configure permission filtering. For more information, please refer to Access Control. |
authAction | Configure permission items. For more information, please refer to Access Control. |