feat(bpm): add recoverable connections and passive arrival monitoring
This commit is contained in:
1 parent
2d6349134f
commit
8ca493d439
37 files changed
+676
-69
No files matched your search
@@ -1,8 +1,8 @@
|
||||
// This router is called only after dashboard authentication and same-origin validation.
|
||||
function workspaceApi({workspace,store,user,route,method,body,reply,bpmSessions}){
|
||||
function workspaceApi({workspace,store,user,route,method,body,reply,bpmSessions,bpmMonitor}){
|
||||
if(!workspace)return false;
|
||||
const members=()=>store.users();
|
||||
if(route==='/api/workspace' && method==='GET'){const snapshot=workspace.snapshot(members());snapshot.capabilities.remoteLogin=Boolean(bpmSessions);reply(200,snapshot);return true;}
|
||||
if(route==='/api/workspace' && method==='GET'){const snapshot=workspace.snapshot(members());snapshot.capabilities.remoteLogin=Boolean(bpmSessions);snapshot.connections=snapshot.connections.map(c=>({...c,health:bpmSessions?.health?.snapshot(c.id)||{},monitoring:bpmMonitor?.snapshot(c.id)||{status:c.status==='disabled'?'paused':'waiting'}}));reply(200,snapshot);return true;}
|
||||
if(method!=='POST')return false;
|
||||
if(route==='/api/calendar'){reply(200,workspace.saveCalendar(body,user));return true;}
|
||||
if(route==='/api/exceptions'){reply(201,workspace.createException(body,user,members()));return true;}
|
||||
|
||||
Reference in new issue
Block a user