OpenMRS Atlas was previously written using PHP. OpenMRS moved towards LDAP, and that caused Atlas to break.
To solve this, work was started on a Node implementation of Atlas in a previous years’ GSoC project, but it was never fully deployed. The implementation contained most of the UI, and several routes to retrieve and save data, that aren’t yet connected to the frontend.
The primary goal of this project is to make that connection by implementing login, and ensuring basic Atlas functionality like adding, updating, and removing markers works properly.
Additional goals include adding admin privileges, a simple notification system for admins, support upload of marker images, and download of screenshots of maps.
I was looking for what the missing functionality was, that was present in ‘openmrs-contrib-atlas’ and not in ‘openmrs-contrib-atlas-node’. I could find that the ‘ping’(update, I suppose) functionality, and the ‘download’ routes were missing. Is there anything else I am missing?
I couldn’t get myself a better summary of the missing functionality as I couldn’t set up the openmrs-contrib-atlas, because I do not really know how to setup such apps. However, I could get the openmrs-contrib-atlas-node repo working.
I don’t have a staging environment anymore. I set it up last year, but the project wasn’t selected, but I can recreate it later if it gets selected this time.
I found this issue, so I made a PR for it. Unfortunately, I couldn’t test the code I wrote because the ‘/login’ route leads to ‘http://localhost:8080/authenticate/atlas’, which I don’t know how to set up.
How do I set up that link?
Login is NOT working in atlas.
A good part of the atlas project is to actually reimplement login.
I can tell you that in production it redirects to our ID SSO (it’s configured by environment variables), but it broke a long long time ago. We need to reimplement it.
@cintiadr I’m getting the following error when executing nodemon.
[nodemon] 1.18.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./bin/www`
Atlas is listening at : http://localhost:3000
{ Error: getaddrinfo EAI_AGAIN db:3306
at Object._errnoException (util.js:992:11)
at errnoException (dns.js:55:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
--------------------
at Protocol._enqueue (/home/krypt/myStuff/openmrs/openmrs-contrib-atlas/node_modules/mysql/lib/protocol/Protocol.js:145:48)
at Protocol.handshake (/home/krypt/myStuff/openmrs/openmrs-contrib-atlas/node_modules/mysql/lib/protocol/Protocol.js:52:23)
at Connection.connect (/home/krypt/myStuff/openmrs/openmrs-contrib-atlas/node_modules/mysql/lib/Connection.js:130:18)
at Object.<anonymous> (/home/krypt/myStuff/openmrs/openmrs-contrib-atlas/db.js:14:12)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
code: 'EAI_AGAIN',
errno: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'db',
host: 'db',
port: 3306,
fatal: true }
The GET routes are working fine, but I think the error may be causing my POST requests sent through postman to not respond. I’ve encountered it previously but I didn’t bother much as the GET routes were working fine. The only useful info I could find about it is: https://stackoverflow.com/a/40182520/6731940 .
I’m trying to create a simple LDAP app thingy so that I could get a better idea of how LDAP works. I’m using this code to try and connect to the server, after using docker-compose up -d.
var ldap = require('ldapjs');
var client = ldap.createClient({
url: 'ldap://127.0.0.1:636'
});
client.bind('cn=admin', 'admin', function(err) {
console.log(err);
});
But I get the following error:
{ ConnectionError: 1__ldap://127.0.0.1:636 closed
at /home/krypt/myStuff/openmrs/ldap_stuff/ldap_projects/learning_ldap/ldap_client/node_modules/ldapjs/lib/client/client.js:1277:17
at Array.forEach (<anonymous>)
at Client._onClose (/home/krypt/myStuff/openmrs/ldap_stuff/ldap_projects/learning_ldap/ldap_client/node_modules/ldapjs/lib/client/client.js:1272:19)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at TCP._handle.close [as _onclose] (net.js:557:12) lde_message: '1__ldap://127.0.0.1:636 closed', lde_dn: null }
I’m assuming its because I’m entering the username(cn)/password wrong.
From the .yml file:
This may be a delayed question but who are the mentors for this project? The GSoC list says its @burke and @dkayiwa, but the project page points to @pascal instead of @dkayiwa.