Overhaul The User Management Dashboard

One question regarding client side dependencies: we need to include dependencies for React, and maybe some other, and there are some ways to include them:

  • As bower dependencies of main OpenMRS ID (Core) project
  • As User Dashboard module dependencies (static, CDN-based, or some other variant)

Which way do you prefer?

have a peek at the modules we have currently:

You don’t have to deal but just have to have it with that signature, but have a look here.

the index.js file is where you get access to the app itself – and what we call. Here’s the oauth module.

I watched them, and understand how server side working. But no one of them have libraries on a client side. My opinion is to add bower.json (the same as in core project), and save all dependencies there

1 Like

I’m fine – however you wanna do it – it’s a separate project as far we’re concerned right now – just hooks into dashboard :slight_smile:

ok, great :slight_smile:

1 Like

You do not need to depend on anything from ID dashboard itself. Just add what you need. If you need to, assume you are running from app/user-modules/openmrs-contrib-id-user-management-dashboard in dashboard and require accordingly.

Just pushed basic app skeleton, will be great to get your feedback :slight_smile:

1 Like

Looks Good to Me @dmytro.trifonov,

Some notes:

  • you need to check if the user is part of the dashboard-administrators LDAP group and properly reject – I’d even return 404 in that case – they shouldn’t even know this exists
  • This should be actually mounted at /admin/dashboard but that’s just my opinion

One more thing @dmytro.trifonov, when the mongo container exits, it doesn’t seem to actuallyo do so cleanly and leaves behind lock files…if that happens, do: sudo rm -fr /docker/mongo/mongod.lock and then start it – it should be fine. I’ll figure it out later.

For today, I setup React server rendering, and experimented with material-ui library. Next I plan to define skeletons for all UI components that we required, and fill them step by step.

1 Like

Thank you, you can leave your reports til Friday – I don’t wanna micromanage you – so long as you have work done – I’m happy. If you go longer than that – i’m gonna worry!

@dmytro.trifonov,

What do you think of this:

  • the midterm milestone, I’d like to see the frontend completed and all components there

  • the final milestone will be that the I’m able to see users in one unified interface from both MongoDB/LDAP – the the changes I make – affect both stores. If a user is in LDAP, but in Mongo, I should see a red X or similar – however you choose to represent this is up to you.

We can adjust this if you finish things early. Milestones are not written in stone.

Nice to haves but not required:

  • Spam account detection (not required for now)
  • LDAP is considered the authority, so if an account exists in LDAP but is not in Mongo, I’d like to be able to add them easily. I know in our production LDAP directory we have ~20,000+ or so users that exist in LDAP but not in Mongo…
1 Like

Hello, Robert!

I am totally agree with you! [quote=“r0bby, post:33, topic:6292”] the midterm milestone, I’d like to see the frontend completed and all components there [/quote]

I believe, that before midterm there may be only static data (mocks) on the UI, but of course, I will try to make things more quickly :slight_smile:

1 Like

I’m fine with place-holder data – consider just passing data as you plan to consume it via a fake REST endpoint…it should be painless to do this…and should take no more than a few hours to write that code – if even an hour!

Give me enough information that I can evaluate your components work :slight_smile:

1 Like

Robert, are you worked with React before? I have some troubles, maybe you may help me, because as you know, I am new in React.

I can probably figure out, what’s the issue? I’m about to go to sleep. I’m learning along side you, which I don’t think is a horrible thing --I know @pascal did a proof of conceptOpenMRS React Example – I feel so pointy-haired boss right now.

By the way feel free to use ES6 if you want to.

1 Like

Thanks for the link, I will look.

If it will no help - I will write detailed description of a problem.

I will help you however I can – @pascal can probably give insight

If the code is available somewhere, and it’s easy to reproduce the problem, I’ll have a look if I have time.

Good work guys.

EDIT: I like this React course.

2 Likes

There’s also the material from the react tutorial I attended at OSCON. It covers ES6 and React fundamentals at the same time.

2 Likes