Add tasks table and API

progress will be tracked with this table instead of being in-process
like progress.js
This commit is contained in:
Girish Ramakrishnan
2018-11-16 11:13:03 -08:00
parent 390e69c01c
commit 218739a6b5
11 changed files with 259 additions and 52 deletions

View File

@@ -134,11 +134,13 @@ function initializeExpressSync() {
router.del ('/api/v1/cloudron/ssh/authorized_keys/:identifier', cloudronScope, isUnmanaged, routes.ssh.delAuthorizedKey);
router.get ('/api/v1/cloudron/eventlog', cloudronScope, routes.eventlog.get);
router.post('/api/v1/cloudron/start_backup', settingsScope, routes.backups.startBackup);
router.post('/api/v1/cloudron/stop_backup', settingsScope, routes.backups.stopBackup);
// tasks
router.get ('/api/v1/tasks/:taskId', settingsScope, routes.tasks.getProgress);
router.post('/api/v1/tasks/:taskId/stop', settingsScope, routes.tasks.stopTask);
// backups
router.get ('/api/v1/backups', settingsScope, routes.backups.list);
router.post('/api/v1/backups', settingsScope, routes.backups.startBackup);
// config route (for dashboard)
router.get ('/api/v1/config', profileScope, routes.cloudron.getConfig);