refactor: forklift UI bug and enhancement (#989) (#991)

* fix: hide Virtul machine migration tabs if forklift addon is not enabled



* fix: rename advanced to configurations



* fix: fixed column width



* refactor: review comment



* revert: power on background color



---------


(cherry picked from commit 41cf44d231)

Signed-off-by: Andy Lee <andy.lee@suse.com>
Co-authored-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
mergify[bot]
2026-07-14 12:07:06 +08:00
committed by GitHub
co-authored by Andy Lee
parent e71d12f67f
commit 7493fe2dfc
7 changed files with 71 additions and 25 deletions
+4 -2
View File
@@ -8,9 +8,11 @@
* @param {String} config.resourceType - The schema ID for addons.
* @param {String} config.navGroup - The group name in the side nav.
* @param {Array<String>} config.types - Array of Resource IDs to show/hide.
* @param {Boolean} [config.requireSchema=true] - When true, only types with an
* accessible schema are shown. Set false for schema-less virtual types.
*/
export function registerAddonSideNav(store, productName, {
addonName, resourceType, navGroup, types
addonName, resourceType, navGroup, types, requireSchema = true
}) {
if (typeof window === 'undefined') {
return;
@@ -57,7 +59,7 @@ export function registerAddonSideNav(store, productName, {
// Adds or removes the resource IDs from the product visibility whitelist.
const setMenuVisibility = (visible) => {
const accessibleTypes = visible ? types.filter(hasAccessibleSchema) : [];
const accessibleTypes = visible ? (requireSchema ? types.filter(hasAccessibleSchema) : types) : [];
// Always clear first to remove any previously-registered types that are
// no longer accessible (e.g. partial permission changes like types=[A,B] where B is dropped).