feat(cluster-health): add visibility options (#3210)
This commit is contained in:
@@ -157,6 +157,21 @@ const optionMapping: OptionMapping = {
|
||||
defaultTab: (oldOptions) => ("defaultTabState" in oldOptions ? oldOptions.defaultTabState : undefined),
|
||||
sectionIndicatorRequirement: (oldOptions) =>
|
||||
"sectionIndicatorColor" in oldOptions ? oldOptions.sectionIndicatorColor : undefined,
|
||||
showUptime: () => undefined,
|
||||
visibleClusterSections: (oldOptions) => {
|
||||
if (!("showNode" in oldOptions)) return undefined;
|
||||
|
||||
const oldKeys = {
|
||||
showNode: "node" as const,
|
||||
showLXCs: "lxc" as const,
|
||||
showVM: "qemu" as const,
|
||||
showStorage: "storage" as const,
|
||||
} satisfies Partial<Record<keyof typeof oldOptions, string>>;
|
||||
|
||||
return objectEntries(oldKeys)
|
||||
.filter(([key]) => oldOptions[key])
|
||||
.map(([_, section]) => section);
|
||||
},
|
||||
},
|
||||
mediaTranscoding: {
|
||||
defaultView: (oldOptions) => oldOptions.defaultView,
|
||||
|
||||
Reference in New Issue
Block a user