mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-26 23:25:53 -05:00
- Clear plugin headers / pages on device change
- Safety check existence of plugin on device change - Add plugin eventing capability
This commit is contained in:
parent
2dc653c402
commit
131ed27913
@ -2371,6 +2371,11 @@
|
|||||||
pluginHandler.refreshPluginHandler();
|
pluginHandler.refreshPluginHandler();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'plugin': {
|
||||||
|
if (pluginHandler == null) break;
|
||||||
|
try { pluginHandler[message.event.plugin][message.event.pluginaction](message); } catch (e) { console.log("PluginHandler could not event message: ", e); }
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
//console.log('Unknown message.event.action', message.event.action);
|
//console.log('Unknown message.event.action', message.event.action);
|
||||||
break;
|
break;
|
||||||
@ -4610,9 +4615,10 @@
|
|||||||
|
|
||||||
// Device refresh plugin handler
|
// Device refresh plugin handler
|
||||||
if (pluginHandler != null) {
|
if (pluginHandler != null) {
|
||||||
|
QH('p19headers', ''); QH('p19pages', '');
|
||||||
pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event);
|
pluginHandler.callHook('onDeviceRefreshEnd', nodeid, panel, refresh, event);
|
||||||
var lastTab = getstore('_curPluginPage', null);
|
var lastTab = getstore('_curPluginPage', null);
|
||||||
if (lastTab != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab));
|
if (lastTab != null && Q('p19ph-' + lastTab) != null) pluginHandler.callPluginPage(lastTab, Q('p19ph-' + lastTab));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching.
|
setupDesktop(); // Always refresh the desktop, even if we are on the same device, we need to do some canvas switching.
|
||||||
|
Loading…
Reference in New Issue
Block a user