InterSystems Caché Administration Mobile tool - Server side. Bundled with project https://github.com/ShmidtIvan/cAdmin.
Installation guide
- Create new Namespace cAdmin with new database cAdmin with new access resource %DB_cAdmin
- Into your new namespace cAdmin mirror package SYS from database CACHESYS
- Create new resource %cAdmin with public USE on
- Create new role cAdminRole, containing %cAdmin resource (step 3) and %Admin_Manage resource
- Import all Cache classes from this repository https://github.com/eduard93/cAdmin-Server/ Either download zip or clone git
- In cAdmin.WebSocket class modify resource parameter to match %cAdmin resource
- Compile all classes
- Create new user cAdminUser with roles %DB_cAdmin (step 1), cAdminRole (step 4) and %Admin_Manage role
- For user cAdminUser on tab SQL Tables add access to Select and Delete for table cAdmin_data.CconsoleLog from cAdmin namespace
Use (JavaScript)
ws = new WebSocket("ws://<server ip>:<server port>/csp/<Namespace>/cAdmin.WebSocket.cls");
ws.onopen = function(){ ws.send(JSON.stringify({User:" cAdminUser ",Password:" cAdminUserPassword"}))};
ws.onmessage = function(m){console.log(m)};
ws.send(‘devtools:RandomNumber’);
In this example we, first, create new websocket object and point it to our websocket.
Next, we specify what to send to server after establishing the connection – JSON, containing authorization information.
After this use ws.send to send requests from request map
Use ws.readyState to check that WebSocket is working
Notes
Please refer to included Caché documentation and manual.pdf for further information.