A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys, Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun VPN routing, and a web dashboard to manage it all. Free & open forever to self-host; optional paid hosted services fund it. See PROMISE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
29 lines
1.4 KiB
JavaScript
Executable File
29 lines
1.4 KiB
JavaScript
Executable File
/**
|
|
* Global Functions for Individual Task Actions
|
|
* Extends the tasks manager with global action functions for individual tasks
|
|
*/
|
|
|
|
// Task global functions initialization is now handled by SystemLoader
|
|
// Global task functions will be set up centrally when TasksManager is available
|
|
|
|
function setupTaskGlobalFunctions() {
|
|
if (window.TasksManager || window.tasksManager) {
|
|
// Use whichever instance is available
|
|
const tasksManager = window.tasksManager || window.TasksManager;
|
|
|
|
// Add modular action functions to global scope
|
|
window.installApp = (appName, config = '') => tasksManager.router.routeAction('install', { appName, config });
|
|
window.uninstallApp = (appName) => tasksManager.router.routeAction('uninstall', { appName });
|
|
window.restartApp = (appName) => tasksManager.router.routeAction('restart', { appName });
|
|
window.startApp = (appName) => tasksManager.router.routeAction('start', { appName });
|
|
window.stopApp = (appName) => tasksManager.router.routeAction('stop', { appName });
|
|
window.backupApp = (appName) => tasksManager.router.routeAction('backup', { appName });
|
|
window.updateConfig = (appName) => tasksManager.router.routeAction('update_config', { appName });
|
|
window.systemUpdate = () => tasksManager.router.routeAction('system_update');
|
|
|
|
//console.log('✅ Task action functions registered globally');
|
|
} else {
|
|
console.warn('⚠️ TasksManager not found, action functions not registered');
|
|
}
|
|
}
|