mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 00:24:03 +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;
|
me.tbar = undefined;
|
||||||
|
|
||||||
if (!me.onlineHelp) {
|
if (!me.onlineHelp) {
|
||||||
switch (me.pveSelNode.data.id) {
|
let typeToOnlineHelp = {
|
||||||
case 'type/storage': me.onlineHelp = 'chapter-pvesm.html'; break;
|
'type/lxc': 'chapter-pct.html',
|
||||||
case 'type/qemu': me.onlineHelp = 'chapter-qm.html'; break;
|
'type/node': 'chapter-sysadmin.html',
|
||||||
case 'type/lxc': me.onlineHelp = 'chapter-pct.html'; break;
|
'type/pool': 'chapter-pveum.html#_pools',
|
||||||
case 'type/pool': me.onlineHelp = 'chapter-pveum.html#_pools'; break;
|
'type/qemu': 'chapter-qm.html',
|
||||||
case 'type/node': me.onlineHelp = 'chapter-sysadmin.html'; break;
|
'type/storage': 'chapter-pvesm.html',
|
||||||
}
|
};
|
||||||
|
me.onlineHelp = typeToOnlineHelp[me.pveSelNode.data.id];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me.tbarSpacing) {
|
if (me.tbarSpacing) {
|
||||||
|
Loading…
Reference in New Issue
Block a user