mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 15:58:20 +00:00
ui: config panel: refactor onlineHelp switch to object map
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
709065a63f
commit
ea5d9c35c8
@ -176,13 +176,14 @@ Ext.define('PVE.panel.Config', {
|
||||
me.tbar = undefined;
|
||||
|
||||
if (!me.onlineHelp) {
|
||||
switch (me.pveSelNode.data.id) {
|
||||
case 'type/storage': me.onlineHelp = 'chapter-pvesm.html'; break;
|
||||
case 'type/qemu': me.onlineHelp = 'chapter-qm.html'; break;
|
||||
case 'type/lxc': me.onlineHelp = 'chapter-pct.html'; break;
|
||||
case 'type/pool': me.onlineHelp = 'chapter-pveum.html#_pools'; break;
|
||||
case 'type/node': me.onlineHelp = 'chapter-sysadmin.html'; break;
|
||||
}
|
||||
let typeToOnlineHelp = {
|
||||
'type/lxc': 'chapter-pct.html',
|
||||
'type/node': 'chapter-sysadmin.html',
|
||||
'type/pool': 'chapter-pveum.html#_pools',
|
||||
'type/qemu': 'chapter-qm.html',
|
||||
'type/storage': 'chapter-pvesm.html',
|
||||
};
|
||||
me.onlineHelp = typeToOnlineHelp[me.pveSelNode.data.id];
|
||||
}
|
||||
|
||||
if (me.tbarSpacing) {
|
||||
|
Loading…
Reference in New Issue
Block a user