Overhaul The User Management Dashboard

@dmytro.trifonov, Have you made any progress? i haven’t seen any commits lately… you’re not done yet :stuck_out_tongue:

I made my last contribution (for GSoC anyways)-- just added the admin page link (makes my life easier). See the Pull Request.

Just merged this :slight_smile:

1 Like

What about this?

I will look at it…doing something right this minute and then going to sleep

1 Like

@dmytro.trifonov, what if we moved the mount-point to: /admin/user-management? That SHOULD work.

In the event that doesn’t work, take the weekend off and I’ll have a look and see if I can get it to work, I’ll pull the latest code on Saturday/Sunday. Gonna do a review of the work this weekend.

Believe it or not, there’s 3 weeks left of GSoC so here’s the plan: After I do the review --you’ll iron out any bugs that happen and fix any UI quirks I find. Then you’ll work on documentation. What would be super nice is if we had tests, but not gonna fail you for lack of those. So long as we have a prototype, I’m happy. I promise that by Sunday Night, Monday morning your time, I will give you feedback so you can plan your final weeks.

What would be SUPER nice is if we could generalize this. Formage is super bad and was never meant to be around as long as it has been.

I would also like to say that it was super nice how you were able to work independently! Thank you @michael for forcing everything to be public!

Just tested, everything is fine :slight_smile: I am using axios library for client request, just need to add async wrapper for REST calls such as in this guide

1 Like

You shouldn’t need to login – let the middleware handle the mddleware handle it for you :slight_smile: – I’m hoping you’re not logging in again :slight_smile:

One other thing that would be cool – the ability to search based on a regular expression…opinions?

1 Like

Yes, I am also think that it will be nice feature, I will think about it

1 Like

@dmytro.trifonov, one thing that I don’t like – make sure you strip trailing whitespace if at all possible :slight_smile: Good work otherwise!

Okay some comments:

issues with

  1. Let’s theme this a bit – it looks bare
  2. Editing of user data does not work, the cancel button isn’t working properly. EditUser.js:32 Uncaught TypeError: Cannot read property 'setState' of nullhandleToggle @ EditUser.js:32ReactErrorUtils.invokeGuardedCallback @ ReactErrorUtils.js:70executeDispatch @ EventPluginUtils.js:89executeDispatchesInOrder @ EventPluginUtils.js:112executeDispatchesAndRelease @ EventPluginHub.js:44executeDispatchesAndReleaseTopLevel @ EventPluginHub.js:55forEachAccumulated @ forEachAccumulated.js:25processEventQueue @ EventPluginHub.js:221runEventQueueInBatch @ ReactEventEmitterMixin.js:18handleTopLevel @ ReactEventEmitterMixin.js:29handleTopLevelImpl @ ReactEventListener.js:73perform @ Transaction.js:138batchedUpdates @ ReactDefaultBatchingStrategy.js:63batchedUpdates @ ReactUpdates.js:98dispatchEvent @ ReactEventListener.js:150
  3. You do not give me access to the information I need and additionally, First Name, not FirstName, Last Name, not LastName.

  1. It doesn’t populate the groups in the edit view properly.

I need access to all the user’s data – have a look at formage – everything i can do in formage, I should also be able ot do it in the new user management dashboard.

To wrap things up

  • Your filter doesn’t allow me to search by email and I see no reference to it. Remove the character limitation.
  • I should be able to edit a user’s details (all of it), not just groups.
  • This looks pretty sparse, let’s style it – maybe use OpenMRS’ colors and match the color scheme of ID dashboard.
  • Fix the fact that the Cancel button on the edit user details modal
  • You’re not actually showing me all the information which we store – need to fix this.
  • It would be nice if I had a full-page edit details page – where I could search in the URL itself, this makes my life easier sometimes.
  • I do not want you to automatically add us

Okay some comments:

Problems I noticed

  1. Let’s theme this a bit – it looks bare
  2. Editing of user data does not work, the cancel button isn’t working properly. EditUser.js:32 Uncaught TypeError: Cannot read property 'setState' of nullhandleToggle @ EditUser.js:32ReactErrorUtils.invokeGuardedCallback @ ReactErrorUtils.js:70executeDispatch @ EventPluginUtils.js:89executeDispatchesInOrder @ EventPluginUtils.js:112executeDispatchesAndRelease @ EventPluginHub.js:44executeDispatchesAndReleaseTopLevel @ EventPluginHub.js:55forEachAccumulated @ forEachAccumulated.js:25processEventQueue @ EventPluginHub.js:221runEventQueueInBatch @ ReactEventEmitterMixin.js:18handleTopLevel @ ReactEventEmitterMixin.js:29handleTopLevelImpl @ ReactEventListener.js:73perform @ Transaction.js:138batchedUpdates @ ReactDefaultBatchingStrategy.js:63batchedUpdates @ ReactUpdates.js:98dispatchEvent @ ReactEventListener.js:150
  3. You do not give me access to the information I need and additionally, First Name, not FirstName, Last Name, not LastName.

  1. It doesn’t populate the groups in the edit view properly.

I need access to all the user’s data – have a look at formage – everything i can do in formage, I should also be able ot do it in the new user management dashboard.

To wrap things up

  • Your filter doesn’t allow me to search by email and I see no reference to it. Remove the character limitation.
  • I should be able to edit a user’s details (all of it), not just groups.
  • This looks pretty sparse, let’s style it – maybe use OpenMRS’ colors and match the color scheme of ID dashboard.
  • Fix the fact that the Cancel button on the edit user details modal
  • You’re not actually showing me all the information which we store – need to fix this.
  • It would be nice if I had a full-page edit details page – where I could search in the URL itself, this makes my life easier sometimes.
  • I also do not want you to add users in LDAP but not in mongo – we have users whose accounts we deleted which are in mongo but not in LDAP(Crowd is a pain in the butt to do bulk operations) – the point of the dedupe is to indicate in the UI and maybe provide a UI to fix it with one of two resolution strategies:
  • Delete it from either LDAP/mongo (whereever it is missing)
  • Add it to whereever it is missing)

Also, see your PM – there was another issue – but will not address that in public.

  1. I will add API endpoint for this;
  2. Will add this today (firstName, lastName, displayName, what else?);
  3. I think, it have the lowest priority, will add that when all other features will done;
  4. Fixed. Also fixed React warnings in console (updates dependencies, please do npm install after pull);
  5. “where I could search in the URL itself, this makes my life easier sometimes.” - what do you mean? Please add details;
  6. For example, User A is in Mongo but not in LDAP, and User B is in LDAP but not in Mongo. Deleting User A from Mongo means that User account will be totally deleted, right? For that, we can just add “delete” button on edit page. Adding user to LDAP/Mongo is already presented on UI (chechbox).

@dmytro.trifonov,

:+1:

Replicate this:

Here’s the edit page for formage, I need access to everything here:

Remember also, that users can have more than one email – many emails. You need to allow people to add/remove emails.

So long as the functionality is there, I won’t fail you for not making it pretty.

:thumbsup:

Configure the URL router so I can get to the user easy, I wanna be able to do something like (for example in formage it’s: Admin Login (you won’t be able to see that URL; you can look at it if you run your ID Dashboard and go to http://localhost:3000/panel/model/user?_search=somethinghere)-- this should be possible with React. Not necessarily the same as this – it’s kinda bad.

I’m not crazy about that, let’s have the option for the following:

  • User A is in Mongo but not in LDAP
  • Indicate with a checkbox (not editable!) and have a button which pops up a modal which gives the following options to reconcile
    • Delete the user from Mongo (entirely)
    • Add the user to LDAP
  • User B in LDAP but not in Mongo
  • Indicate with a checkbox (not editable!) and have a button which pops up a modal which gives the following options to reconcile
    • Delete the user from LDAP
    • Add the user to MongoDB

We can’t do this automatically – There are users I deleted in Mongo that were not deleted from LDAP due to Crowd being annoying for bulk operations and I’d rather they not come back.

This should and is required to support bulk operations because the use-case I have to is to clean up things. It might be helpful to have a separate page for this case.

As for now, if checkbox is not ‘checked’ it means that user is not presented in LDAP/Mongo. Checking checkbox will add user to selected system. Is it a solution? Or you want to add buttons “Delete from …” “Add to …” in addition to checkboxes?

My opinion is to add “remove user” button and checkbox for add user to LDAP/Mongo

Why not make it a slider with a prompt before you actually make the call? Material design sliders are sexy.

Before add user to LDAP/Mongo, Remove, update user data? Okay, I will add :slight_smile:

As for reconciling differences between the two systems, don’t clutter the datagrid – do this in a separate modal or page. However you wanna do it, is up to you so long as it behaves as I laid out.

A large number of the requirements came about because of pain-points I have between Formage and Crowd :slight_smile:

1 Like

Updates during last day:

  • Fixed group list on UI
  • Fixed some warnings/errors on Open/Close “Edit User” screen
  • Updated “Edit User” screen with rest of user fields (except email list)

Plans for today:

  • Add email list edit option on UI
  • Add rest for Remove User
  • Connect UI to REST (REST calls on update user, add to LDAP/Mongo, remove user)

Some questions:

  • username/primary email update support - if we must implement such features, what about validations? (unique, possible symbols, etc)
  • validations for other fields? (for example, length, etc)
1 Like